Welcome to the Poser Forum
Forum Moderators: Boni, Kendra Forum Coordinators: darknewt, Jules53757, SpookieLilOne, gmm2
Poser F.A.Q (Updated: 2016 Nov 29 4:50 pm)
Subject: Shader gurus: clear plastic?


I've searched this forum for a clear plastic shader, and found only one thread on the topic with no responses.
I'd like to be able to render transparent plastic, such as a vinyl shower curtain, or a sandwich baggie. Or clothes. Whatever. I wouldn't balk at transparent plastic clothing. :lol:
When I've tried to devise a shader for this in the past, it hasn't looked right. The specific levels of transparency, falloff, and surface shine seem to be hard to capture. Possibly part of the problem is how Poser handles transparency. Whenever the back side of the clear plastic object is visible through the transparent front, it looks really pretty bad, actually, on any clumsy shader I've tried.
Does anyone know how to approach this material well? As far as I can tell from looking at real life objects, the reflectivity is low, as well as the refractivity. But I really don't understand these things at all, at all. :sad:
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.Cage has freebies. He would like to thank EnglishBob for hosting these.
The Cage Page at Morphography: Python, Antonia & More

Latexluv ( ) ( ) posted at 1:33AM Thu, 16 December 2010 · @3740976

bagginsbill ( ) ( ) posted at 6:54AM Thu, 16 December 2010 · edited on 6:55AM Thu, 16 December 2010 · @3741019
It's the same as a thin glass Fresnel shader, but with a lower amount of reflection.
I'm pressed for time, so I'll not be able to give a long explanation.
Here are the highlights:
Thin plastic (or anything thin) doesn't refract much, so use of transparency instead of refraction can be a better way to go. Poser has a this-is-just-how-it-works problem that refractive objects cast a shadow as if they are opaque. Using transparency instead solves that and can produce faster renders.
On the other hand, the realism of this type of material is increased via gamma correction and if you do not have Poser Pro, then shader GC must be used. But shader GC with transparency can only be approximated. Shader GC with refraction can be done with precision because we don't ask the PoserSurface to do anything there except spit out what we tell it. But when we rely on transparency, for which there is no separate node, we cannot do the linear rendering equation that works in all situations and lighting. So, we have to tweak.
So I'm going to show you an un-tweaked shader that is using Poser Pro with render GC. If you don't have Pro, you will need to tweak. Mostly you'll want to adjust the Blending value in the Blender node that is currently .02 in this screen shot.
This is the simplest (fewest nodes) that gets you 95% realism. To get closer to 100% we need more nodes.
Depending on the geometry, you may find this excrutiatingly slow.
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

Cage ( ) ( ) posted at 1:45PM Thu, 16 December 2010 · @3741116
Wow. Yes, that looks pretty good. Thank you, BB! :woot:
I don't have Pro and probably wouldn't be using GC if I had it. So I guess that knocks down my realism a few more notches.
I tested this a bit and found that it can render a bit clowly, but actually more quickly than my most recent efforts to ad lib such a shader. And it looks better than what I've had. Yay! :thumbupboth:
Now, since I'm not sure what a fresnel really is, I'm going to go a 'Googling.
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.Cage has freebies. He would like to thank EnglishBob for hosting these.
The Cage Page at Morphography: Python, Antonia & More

fivecat ( ) ( ) posted at 2:10PM Thu, 16 December 2010 · @3741131

bagginsbill ( ) ( ) posted at 3:12PM Thu, 16 December 2010 · @3741166
http://www.3drender.com/glossary/fresneleffect.htm
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

bagginsbill ( ) ( ) posted at 3:14PM Thu, 16 December 2010 · @3741169
http://en.wikipedia.org/wiki/Fresnel_equations
Now I often do the full equation but that's a lot of nodes. Keeping it simple I used Schlick's approximation in the shader above. I discovered this equation on my own before I'd ever heard of Schlick and in fact the coefficients I'm using are better than his. But he found it first, so it's named after him.
http://en.wikipedia.org/wiki/Schlick's_approximation
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

RobynsVeil ( ) ( ) posted at 3:23PM Thu, 16 December 2010 · @3741175
{{--carefully transcribing this into my BB's Poser notebook - thanks for this, Bagginsbill! --}}
Mint18/HighSierra/Win7Pro-Blender2.79-PoserPro 11(inches)-FinalCutProX
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[we realise that people hold in contempt that which they do not understand]

Cage ( ) ( ) posted at 3:49PM Thu, 16 December 2010 · @3741186
Thanks, BB! :laugh: When you get that book together, sign me up for a copy!
So this isn't "frez-nel", but "freh-nel". Sort of like Euler isn't "you-ler", but "oil-er".
Is it unusual for a 3D rendering engine not to have any kind of built-in option for handling something like the fresnel effect?
Just tinkering around, I notice that the source of the slowness of the shader is the raytrace node which is plugged into alt_diffuse. Is there any way to fake the desired effect for greater speed? Substituting a sphere map node with a reflection map doesn't seem to help.
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.Cage has freebies. He would like to thank EnglishBob for hosting these.
The Cage Page at Morphography: Python, Antonia & More

millighost ( ) ( ) posted at 6:57PM Thu, 16 December 2010 · @3741242

bagginsbill ( ) ( ) posted at 10:30PM Thu, 16 December 2010 · @3741303
Quote - Is it unusual for a 3D rendering engine not to have any kind of built-in option for handling something like the fresnel effect?
Yes it is. Poser has the Fresnel node, but that is only correct for clear materials that have 0 opacity or color. The Fresnel effect happen on everything that is even slightly shiny. For example, any sort of finished wood.
Quote - Just tinkering around, I notice that the source of the slowness of the shader is the raytrace node which is plugged into alt_diffuse. Is there any way to fake the desired effect for greater speed? Substituting a sphere map node with a reflection map doesn't seem to help.
Are you sure? Sphere map works very fast for me.
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

Cage ( ) ( ) posted at 10:47PM Thu, 16 December 2010 · @3741306
Quote - Are you sure? Sphere map works very fast for me.
Sorry, I was unclear. The sphere map is faster, but using a reflection map instead of the raytraced node seemed to produce results which weren't right.
Poser has a fresnel node?
Cage has freebies. He would like to thank EnglishBob for hosting these.
The Cage Page at Morphography: Python, Antonia & More

RobynsVeil ( ) ( ) posted at 11:18PM Thu, 16 December 2010 · @3741311

Cage ( ) ( ) posted at 12:08AM Fri, 17 December 2010 · @3741324
Quote - Such as it is:
New node -> Lighting -> Ray Trace -> Fresnel
Doip! :scared:
Wow. I had no idea. I'm betting this has been covered in the various materials threads recently, and I was just skimming through and looking at the pictures.
It's good to learn something new. Thank you. But I guess this node is broken. :sad:
Cage can be an opinionated jerk who posts without thinking. He apologizes for this. He's honestly not trying to be a turkeyhead.Cage has freebies. He would like to thank EnglishBob for hosting these.
The Cage Page at Morphography: Python, Antonia & More

EnglishBob ( ) ( ) posted at 7:27AM Fri, 17 December 2010 · edited on 7:31AM Fri, 17 December 2010 · @3741368
You can still use the fresnel node - I use it all the time for water and glass. You just need to be aware of its limitations. Bagginsbill pointed out one major one in his first post in this thread - refractive materials cast a shadow.
In some cases you need to make the refractive part a separate prop in its own right, in which case you can turn off "casts shadows" in the properties tab. The test render attached wouldn't have been possible using my breaking window prop in its supplied form, since the glass is part of the same prop as the window frame and wall. If I left "casts shadows" on, the glass also cast a shadow and there was no sunlight on the floor. If I turned it off, then of course the sunlight shone through the walls too. Neither situation is terribly realistic. :)
I had to separate the window into 'glass only' and 'glass free' props. The former has fresnel refraction but no shadows, the latter, the opposite. Unfortunately the 3D motion blur I used tends to obscure the refraction effect - but the shards of glass still catch the light convincingly, I think.

bagginsbill ( ) ( ) posted at 7:39AM Fri, 17 December 2010 · @3741369
Yep. Fresnel is fine for clear glass, diamond, water, etc.
For colored glass, or cloudy glass, or blue water, or a thousand other things, you have to separate the refraction from the reflection.
For anything that is opaque, such as car paint, it's not at all suitable.
And then the Fresnel effect becomes your responsibility.
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

bagginsbill ( ) ( ) posted at 7:40AM Fri, 17 December 2010 · edited on 7:41AM Fri, 17 December 2010 · @3741371
This skeleton was shaded with just the Fresnel node, IOR = 1.54.
P.S. - Then the train hit him and shattered him.
Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

RobynsVeil ( ) ( ) posted at 8:31AM Fri, 17 December 2010 · @3741377
Quote - This skeleton was shaded with just the Fresnel node, IOR = 1.54.
P.S. - Then the train hit him and shattered him.
So much for Monty Python's theory on the advantages of "Not Being Seen"... :lol:
Mint18/HighSierra/Win7Pro-Blender2.79-PoserPro 11(inches)-FinalCutProX
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[we realise that people hold in contempt that which they do not understand]
To create a post you must first sign in or register an account.