Poser shader question...

  • Okay, so I found this old thread at RDNA, started by Bagginsbill about building shaders using the Fresnel effect. And he showed how to do glass, plastic, paint and metal. I decided to follow his instructions and duplicate the shaders. Here's the thread link:
    [http://forum.runtimedna.com/showthread.php?25885-The-Fresnel-Effect-Glass-Paint-Plastic-and-Metal](link url)

    So The first shader went okay, using the Fresnel node, but then he split the node up and replaced it with a refract node, and a reflect node. and that's where everything went south trying to recreate his colored glass effect.
    I'll see if I can post a picture of what I got for a render, but the major difference was that while the glass node went okay, the second, doing colored glass flipped everything 180 degrees. Did I miss something there? I tried to stick as close to what he showed in the thread as I could.

  • Here's the shader as Bagginsbill posted. They look nothing alike.
    Of course the thread dates back to 2006, so I'm wondering if maybe there were some changes in the nodes used?

  • Poser Ambassadors

    I suspect you didn't change the Index_of_Refrection which defaults to 1.2. The focal length of a ball lens is

    radius * ior / (2 * (ior - 1))

    With the default ior of 1.2, this is radius * 1.2/.4 = radius * 3

    So - when your camera distance from the ball center is less than 3 radii, you're inside the focal point and there is no inversion. You need the focal point between your camera and the ball center to see an inversion.If you move your camera farther back it should appear.

    However, no glass exists with IoR of 1.2. A better value is 1.5 to 1.7. (Depends on what kind of glass it is.)

    I would also point out that, indeed, that was 2006 and we have better ways to do this effect now (Fresnel_Blend node).

  • Poser Ambassadors

    You have other weirdness going on there. The black squares appear green when seen through the sphere. Something ain't right. They should stay black.

    Did you happen to leave some diffuse turned on somewhere?

  • I did change the numbers on the node to match the ones I saw and that included the IOR. It also included the color of refraction which was green. I didn't touch anything else initially, although I did change the diffuse color to a black after I realised that you had done so in your posted image. To be honest, I did notice that the colored glass effect did look fine at first with the Fresnel node. I lost the image inversion though when I changed it out for the reflections and refraction nodes.

  • Poser Ambassadors

    Well, leaving aside the strange green color of the black squares, your image looks to me like it's a perfect mirror. Did you accidentally swap Reflect and Refract?

  • Poser Ambassadors

    Here is a render with the incorrect setup, where the Reflect is plugged in where the Refract should be and vice versa.

    0_1461682109944_swapped setup.png

    Compared to this where the connections are correct.

    0_1461682136708_correct setup.png

  • Poser Ambassadors

    You would do well to use an environment image like I did so that you can recognize reflections vs. refactions of the sky. The trees help me orient what I see.

  • Like I said I was trying to follow what I saw. Here's the node setup as I copied it.
    0_1461704243408_node setup.png

  • How many ray trace bounces are you using?

  • @chriswwd Only 4.

  • @eclark1849 Okay, plenty for testing. So it's time for the silly questions: I see your material is for the second Hi-Res Ball added to your scene. Is the first one still around (hehe) and if so is it interfering?

  • @chriswwd The second or rather, the first ball is still around. If it's interferring, only BB can tell you. I created it per his instructions in the thread.

  • Poser Ambassadors

    I didn't give any instructions to add a second ball overlapping the first. To what are you referring?

    I did say " I usually experiment with two balls side-by-side" but that isn't relevant.

  • Poser Ambassadors

    Really though, why are you following that thread? It's not how we do Fresnel now. Heck, even then it isn't. I didn't know how to get an accurate Fresnel effect at the time. That thread was an approximation.

  • Poser Ambassadors

  • @bagginsbill The first ball was something you called a "skyball" scaled up to 100000 %.
    The second ball is the test ball.

    Thanks for the new fresnel thread then. I'll abandon this one then and follow the other.

  • Poser Ambassadors

    Sky ball, or sky dome, or environment sphere all refer to the device for faking the 360 degree environment.

    That wasn't what chriswwd was hypothesizing about.

    Again - you would do well to use my Environment Sphere and attach an HDR image to it. The reflections and refraction will be far more interesting.

  • @bagginsbill Uhh, actually, I DID use your environment sphere. Even did like you suggested and saved it to be my default loaded scene. Your thread didn't say thethe skyball and the Env. sphere were the same thing, so I thought they were separate props. Although i did NOT attach an HDR image to it, but I did load a generic IBL light .

  • So I picked up this EZ Metals pack for Poser and I have to admit it's great. Although, I keep seeing all of these threads about how to make basic shaders for things like metal, glass paint and plastic, and they're done with relatively few shader nodes and they still look fantastic. So two questions... what do ALL these extra nodes attached to some of these shaders do? And does anyone know if there is an EZ Glass shader pack for Poser?