Jump to content

Default glass shader problems


rob

Recommended Posts

Hi All ,

The default glass shader in 9.1 only seems to have a solid alpha ! theres no fall off at all in the alpha for use in compositing. I did some digging around and found a node in the shader that alters the alpha called AF_1 which you can lower but again it does not apply any fresnel effect to the alpha. I have enclosed a simple test scene and I am hoping that there is something simple I can add / alter to get the fresnel effect on the alpha aswell.

rs_glasstest.hipnc

post-1566-1208136124_thumb.jpg

Edited by rob
Link to comment
Share on other sites

Actually, this is the physically correct behaviour, since real life glass is refractive, which means that it is non-transparent. sounds funny but that's the way it is. But this isn't going to help you, and obviously one has come to expect a different output from other renderers.

one way is to write a shader that outputs the fresnel as opacity (3 vops :) ) and set up an "alpha" pass where you assign that shader to all glass things and use the resulting mask in compositing.

Link to comment
Share on other sites

Actually, this is the physically correct behaviour, since real life glass is refractive, which means that it is non-transparent. sounds funny but that's the way it is. But this isn't going to help you, and obviously one has come to expect a different output from other renderers.

one way is to write a shader that outputs the fresnel as opacity (3 vops :) ) and set up an "alpha" pass where you assign that shader to all glass things and use the resulting mask in compositing.

If you set the ETA/IOR to 1.0 the shader might switch into a simple transparency mode and give you non-refractive glass with the Alpha you'd expect. It doesn't look much like solid glass anymore though.

(The older glass shader did this, the new one might ALWAYS trace out the back of even non-refractive glass - I haven't tried it)

Link to comment
Share on other sites

Thanks for the words guys. If this is physically correct , surely you then are limited when it comes to comping the various layers.

Yes, refraction does not make a simple composite. However, I wouldn't use the term "limited" because you can break all the components out using the DeepRaster capabilities and perform essentially the final computations of the shader in composite instead. I'm talking about splitting out the reflection result, the refraction result and the fresnel weight into separate layers and then doing the (simple) weighted blend in comp.

Link to comment
Share on other sites

Anamous , your file is fantasitc. Not that I understand the vops fully, it would be doubtfull if I could of achieved your effeort without some expert knowledge. Thats whats causing me the most difficulty ! As theres not a lot of information out there to get me started !

Thanks

R

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...