Page 1 of 2

Semi-transparent curtains; How?

Posted: Sat Jul 16, 2016 11:25 am
by gmenzel
Question for the experts: How to simulate angle-dependent opacity of semi-transparent fabric?

I'm trying to find an approach for realistic curtains made out of mid-heavy fabric. Such a material is of course trivial as long as it will only ever be viewed in fairly steep angles. But how do I get the opacity of the material to diminish in a realistic fashion for shallower viewing angles? Some examples as illustration:

https://www.creationbaumann.com/portal/ ... ild_02.jpg
https://carnegie.scdn4.secure.raxcdn.co ... _1_WEB.jpg
http://g04.a.alicdn.com/kf/HTB1Nw0pHVXX ... urtain.jpg

In the past, when still working with biased renderers, I would simply use a falloff map to blend the opacity map to white. Maxwell, unfortunately, doesn’t provide such an option. Is there another way to achieve this effect (other than in post)?

Using displacement to give the fibers thickness is *theoretically* possible, but would surely be prohibitively expensive. I have also experimented with solid geometry and while this already gave much more convincing results, this approach has a couple of drawbacks (slower SSS, potential for Moiré patterns, etc.) and completely breaks down when the viewing angle get too shallow. A purely material-based approach would definitely be preferable. Is there one?

Any help appreciated!

Re: Semi-transparent curtains; How?

Posted: Sat Jul 16, 2016 11:10 pm
by seghier
are you tried with opacity mask ?
Image

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 11:14 am
by gmenzel
Sorry, maybe I could have been clearer. I'm talking specifically about angle-dependent opacity for fabrics. Here a simple mock-up:

Image

On the left, what Maxwell renders with a simple opacity map. On the right, how it should look in reality (done in post). Does anyone know of a way to do this as an material effect only?

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 11:23 am
by seghier
gmenzel wrote:Sorry, maybe I could have been clearer. I'm talking specifically about angle-dependent opacity for fabrics. Here a simple mock-up:

Image

On the left, what Maxwell renders with a simple opacity map. On the right, how it should look in reality (done in post). Does anyone know of a way to do this as an material effect only?
how you know how it should look in reality ?
try to use velvet effect with opacity map maybe that give you what you want

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 11:33 am
by gmenzel
seghier wrote:how you know how it should look in reality ?
Have a look at the reference images I included in my first post. The simple fact is that fabrics have thickness in reality. The shallower the viewing angle, the less you'll be able to see through the spaces between fibers. Hence the diminished opacity, although this is much less obvious for really thin and transparent fabrics, like in your image. Since the most efficient way to model curtains is as single-sided geometry with no thickness at all, this effect would best be created using a material effect. This is really trvial with biased renderers but seemingly difficult with Maxwell.

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 11:40 am
by seghier
remember that not all clothes are the same ; and velvet is a solution also displacement or maybe normal map and the right lighting of course
if you want compare reality with 3d scene you must create the same lighting setup
than you can see if your material good or not

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 12:06 pm
by gmenzel
seghier wrote:remember that not all clothes are the same
Of course not. But the fabric I wish to re-create is what it is.
seghier wrote:and velvet is a solution also displacement or maybe normal map and the right lighting of course
In what sense is velvet a solution here? I mentioned displacement in my initial post. The material in my scene already uses normal mapping. The lighting is what the scene necessitates.
seghier wrote:if you want compare reality with 3d scene you must create the same lighting setup than you can see if your material good or not
That's precisely how I came to realize that something was missing in the first place. By comparing the render output to photographic reference.

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 12:14 pm
by seghier
you must try and it's better if you share simple scene
many users can give you different solutions

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 12:58 pm
by gmenzel
seghier wrote:you must try
It's not like I'm asking unprepared, you know. I tried all sorts of things. I generally only use this forum when I'm stumped.
seghier wrote:and it's better if you share simple scene many users can give you different solutions
Not sure what use that would be. I'm looking for a general approach to produce this effect; not something specific to a certain scene.

Looking foward to additional input from other users. I would hate to have to add semi-transparent fabrics to my avoid-when-working-with-maxwell list.

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 1:01 pm
by Mihai
There is no layer opacity based on viewing angle in Maxwell yet I'm afraid, but you could still try to mimic the effect in this case by duplicating your base Layer with opacity mask etc, and for the duplicate use the following settings:

Image

Note the Nd of 10, when using the r2 parameter, the higher Nd exaggerates the effect. So this essentially creates a darkening effect as the viewing angle increases.

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 4:23 pm
by gmenzel
Mihai wrote:There is no layer opacity based on viewing angle in Maxwell yet I'm afraid, but you could still try to mimic the effect in this case by duplicating your base Layer with opacity mask etc, and for the duplicate use the following settings
Thanks, Mihai! I had already played with the R2 parameter. Unfortunately, this really only alleviates the problem in situations where it is less noticable anyway. It won't work for back-lit fabrics, which is what I need a solution for.

I did some further experiments with extruded geometry. This is the closest result yet. How this will work with thin-SSS I'll have to see.
Image

Is there any indication that NextLimit has plans to improve the material system in future releases? Of great utility (not only in this scenario) would be a procedural falloff map. And not just a simple camera-falloff (already useful though), but rather a falloff parameter curve which maps the angle between the face normal and the incident light vector. This way, you could have semi-transparent curtains even cast correct shadows, where the lack of diminished opacity is even more obvious at the moment and which is not easily achieved even as a post effect.

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 6:41 pm
by Mihai
I don't know if it's in the plans but I agree it would make things a bit faster to create, and more convenient. But thinking of how it works in the real world, of course there is only the specific weave and thickness of the threads that creates this effect. So your approach with extrusion is correct. Or using on-the-fly displacement you can go really high on the subdivision to have perfect displacement while not using any more RAM. In this case since the displacement height would be tiny, the on the fly method would not be much slower than the pretesselated method.

About the backlit r2 thing, it didn't work either if you applied the same material but to the "backface" slot of the geometry?

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 6:55 pm
by seghier
if you use thick surface with opacity mask you will get two surface duplicated
i don't think this will give you right result
try with bump or normal map
Image

Re: Semi-transparent curtains; How?

Posted: Mon Jul 18, 2016 7:11 pm
by seghier
two tests
with bump
Image


without bump
Image

Re: Semi-transparent curtains; How?

Posted: Tue Jul 19, 2016 1:51 pm
by gmenzel
Thanks for the pointers, Mihai!
Mihai wrote:using on-the-fly displacement you can go really high on the subdivision to have perfect displacement while not using any more RAM. In this case since the displacement height would be tiny, the on the fly method would not be much slower than the pretesselated method.
Will have to experiment with that a bit more. My first attempts proofed unfeasibly slow.
Mihai wrote:About the backlit r2 thing, it didn't work either if you applied the same material but to the "backface" slot of the geometry?
Could you elaborate on that, please? You mean a 2-sided material? How would the back-face material influence the opacity of the front-face material?
Did I misunderstand?