Mon, Nov 25, 11:24 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 24 8:11 pm)



Subject: Prismatic Glass Shader


anim8ter ( ) posted Tue, 27 January 2015 at 1:25 PM · edited Mon, 25 November 2024 at 9:19 AM

I know glass shading has been addressed multiple times, but the one thing I can't seem to locate is how to achieve the prismatic effect along the edge of a thick piece of glass.  Any suggestions?


Daffy34 ( ) posted Tue, 27 January 2015 at 1:40 PM

Try the fresnel node instead of refraction..that's about as close as you're going to get.

Laurie



anim8ter ( ) posted Wed, 28 January 2015 at 9:28 AM

Hmm, I see what you mean.  Thanks Laurie.

For some reason, I thought I saw a render of a diamond complete with prismatic refraction.  Must've been my wild imagination.


Miss Nancy ( ) posted Wed, 28 January 2015 at 12:35 PM

BB posted animated poser render of diamond with dispersion/ internal reflection, but we currently have to fake them.  

simple refraction works using BB's transmissive-refractive shader.



bagginsbill ( ) posted Wed, 28 January 2015 at 1:00 PM · edited Wed, 28 January 2015 at 1:00 PM

Is the original question really about being "prismatic" (dispersion into rainbow colors)?

I'm understanding the question to be something different.

"effect along the edge of a thick piece of glass"

This sounds like you're asking about how the edge of a pane of glass looks green. This is not a "prismatic" effect, but it is the "edge" effect of glass, caused by total internal reflection creating a long path through glass, which contains iron deposts that absorb red and blue more than green. This is "absorption", not "dispersion".

So what are you after?

Note: A picture is worth a thousand words.

file_1385974ed5904a438616ff7bdb3f7439.jp


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


willyb53 ( ) posted Wed, 28 January 2015 at 1:33 PM

I dont think rainbow dispersion is possible directly with poser because it is based on the RL fact that the IOR varies by frequency (color)

I suppose that it might be possible to break up the incoming light into a finite set of colors and use that drive the IOR value :D

Bill

People that know everything by definition can not learn anything


anim8ter ( ) posted Wed, 28 January 2015 at 4:58 PM

@BB, no, I'm not after the green edge.  I really do mean prismatic.  Unfortunately, I don't have a reference photo at the moment but will endeavor to find one.  In the meantime, what I'm after is the rainbow effect when two adjacent glass edges are at an angle and the light seemingly refracts on the edge.  Perhaps a useful example would be a glass award with edges that refract when turned to the light. Very similar to cut crystal.


anim8ter ( ) posted Wed, 28 January 2015 at 5:03 PM

I found a picture for reference.  Does this help?

file_2b24d495052a8ce66358eb576b8912c8.pn


Miss Nancy ( ) posted Thu, 29 January 2015 at 11:59 AM

one may use BB's shader on that:

http://www.renderosity.com/mod/forumpro/?thread_id=2879047&page_number=2#msg4141519

if it's glass or acrylic, it wouldn't have as much dispersion as diamond, hence you could fake it with reflection of off-screen items.  

also, if one's boss were to be awarded one of those, I hope no mischievous prankster would put it on his chair when he wasn't looking 🤣



bagginsbill ( ) posted Thu, 29 January 2015 at 4:19 PM

OK. Miss Nancy linked to a shader that solved a different problem. That one is not prismatic, but it is refracting and passes light through instead of making a 100% shadow.

Meanwhile, willyb thinks it's not possible in Poser. Well it is.

It involves creating three different refract nodes, each with a different IOR. You take the red from one, the green from another, and the blue from the last and put them together.

The dispersion will not quite be equal to real life, but it will be much better than nothing.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 29 January 2015 at 4:31 PM

Also, you can just fake it as I did here. In this shader I applied some edge_blend-driven colors to the reflect and refract.

The effect is slight, but if I take it away you'd notice.

file_a3c65c2974270fd093ee8a9bf8ae7d0b.jp


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anim8ter ( ) posted Thu, 29 January 2015 at 4:35 PM

Thanks for the link and suggestion Miss Nancy.

BB, that's awesome!  Yes, that's what I'm looking for.  I know you described what you did, but can you also please post a screen capture of your set-up?

Thanks!


bagginsbill ( ) posted Thu, 29 January 2015 at 4:44 PM · edited Thu, 29 January 2015 at 4:44 PM

Working on it. Here's a demo.

I desaturated the environment so everything reflected or refracted is black and white - no color.

Observe the colored prismatic world on the glass edge.

file_c8ffe9a587b126f152ed3d89a146b445.jp


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 29 January 2015 at 4:48 PM · edited Thu, 29 January 2015 at 4:48 PM

Here is the shader.

This is exaggerated!!! You do not have to make the IORs so different.

The UserDefined node is putting the r, g, and b together. I used a little more green than red and blue, because that is how glass behaves - slightly green.

Poser is still not doing total internal reflection correctly, which would enhance the effect without my exaggerated values. So - play around.

The basic premise is all there.

file_42a0e188f5033bc65bf8d78622277c4e.pn


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


Miss Nancy ( ) posted Thu, 29 January 2015 at 6:22 PM · edited Thu, 29 January 2015 at 6:28 PM

man, that's great!  they could add colour math/blinn node to mix refl. when using directional lites.

is using heart-shaped diamond cathedral engagement ring by luxxeon

http://www.renderosity.com/mod/freestuff/?item_id=73938



anim8ter ( ) posted Thu, 29 January 2015 at 6:58 PM

Thanks BB!

Is there a way the effect can be applied to edges only just as you have in your render?  Obviously I'm doing something wrong (see below) but I can't figure out what.

BTW, my raytrace is set to 2 (although I've gone as high as 4 without improvement); pixel sample set to 3.  Lighting is 3 infinite and 1 diffuse IBL.

file_5f93f983524def3dca464469d2cf9f3e.pn


Miss Nancy ( ) posted Thu, 29 January 2015 at 7:04 PM

it looks like glass pane has diffuse component.  you would map pane in box mode and apply shader to each face.



bagginsbill ( ) posted Thu, 29 January 2015 at 7:15 PM

What version of Poser are you using there? It looks like the back-side refraction is not reversed like it is in PP 2014 latest SR.

The result is you're dispersing even through the large face. 

Mine only shows the dispersion on the edge where the ray goes a long way through the glass. I didn't do anything to make that happen. When a ray goes across the front-back a short distance, the deviation is reversed quickly and no real bending happens. That's why mine only seems to bend light into colors along the edge.

So - Poser version matters here. PP2012 and earlier don't do the right math.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 29 January 2015 at 7:16 PM

Also I agree it looks like you have some diffuse going there - the glass is brighter than the world around it.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 29 January 2015 at 7:18 PM

Regarding bounces, minimum is 2, but then you get no internal reflection, so I use 3 to 4. My image above was 3.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Thu, 29 January 2015 at 7:23 PM

Here's mine from a different angle and with a thicker pane. Nothing like yours. I am suspicious that you don't have Poser 10 or Poser Pro 2014, or that you are not up to date with SRs.

file_f7e6c85504ce6e82442c770f7c8606f0.jp


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anim8ter ( ) posted Thu, 29 January 2015 at 8:20 PM

I'm using Poser 2014, but I might be an SR behind.  I'll start there, thanks.


pumeco ( ) posted Fri, 30 January 2015 at 4:17 AM

Fantastic, Baggins, but I hate you for not humoring me on the Anamorphic thing that time :-(
I'd love to be able to render Anamorphic in this renderer, it would be the icing on the cake, looks much nicer and more real-world lens-like than standard.


anim8ter ( ) posted Fri, 30 January 2015 at 2:14 PM

OK, I'm up to date with SR5.  Unfortunately, I'm still getting the same results.  Here's a screencap of my set-up.  I'm using a box primitive as before.  Raytracing set to 4.

file_fc221309746013ac554571fbd180e1c8.jp


RedPhantom ( ) posted Fri, 30 January 2015 at 3:52 PM
Site Admin Online Now!

Anim8er, your refract nodes have a white background rather than black. That might be the problem.


Available on Amazon for the Kindle E-Reader Monster of the North and The Shimmering Mage

Today I break my own personal record for the number of days for being alive.
Check out my store here or my free stuff here
I use Poser 13 and win 10


anim8ter ( ) posted Fri, 30 January 2015 at 4:28 PM

Thanks RedPhantom, I changed the refract colors to black but it still renders the same.


Anthanasius ( ) posted Sun, 01 February 2015 at 5:38 AM

 Interesting subject

Génération mobiles Le Forum / Le Site

 


bagginsbill ( ) posted Sun, 01 February 2015 at 8:45 AM

I am away from home so cannot investigate. I notice your refract IORs are very different than what I showed. Since the effect comes from those values, perhaps you should try my numbers before you attempt to come up with your own deviations.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


bagginsbill ( ) posted Sun, 01 February 2015 at 8:47 AM

Also your fresnel blend ior is wrong.copy me exactly first. There is no mystery here why you are getting a different shader. You made it different.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anim8ter ( ) posted Sun, 01 February 2015 at 11:10 AM

Fair enough BB.  Here's the result.  What am I doing wrong?

file_698d51a19d8a121ce581499d7b701668.pn


bagginsbill ( ) posted Mon, 02 February 2015 at 8:20 AM

Now that the refract background is black, we can see why your earlier render looked super bright - it was hitting some nothing-here areas in your scene and using the indicated pure white as a substitute. The last shows pure black. When working with reflective objects, always fill the world with something to reflect.

Meanwhile, I'm guessing that your camera is far away and zoomed in. You need to be closer to see the prismatic variations - from a greater distance there is no separation since all the rays are nearly parallel.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anim8ter ( ) posted Mon, 02 February 2015 at 12:16 PM

Ah, got it!  Thanks BB!   Excellent explanation.  Initially, I wanted the effect to be cast on a glass object against a black background.  I understand now that this may not be the applicable method for that type of scenario.  But it's still an awesome shader!!   Thank you!!   BTW, is there a particular type of lighting you think works best with this effect?


bagginsbill ( ) posted Mon, 02 February 2015 at 1:21 PM · edited Mon, 02 February 2015 at 1:23 PM

I didn't use any lighting. A light has no effect on this shader. This is because Reflect and Refract don't pay any attention to lights - they show scene objects modulated by the surface they're on.

The shader shows objects around it reacting to light, so light affects it, but only indirectly.


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)


anim8ter ( ) posted Mon, 02 February 2015 at 1:36 PM

Interesting.  Thanks again for another great explanation and assistance!


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.