Jump to content

PBR Attenuation in Glass Hack


anamous

Recommended Posts

Hey all,

Unfortunately depth attenuation in the Trace VOP doesn't work in PBR. In case anyone ever needs depth attenuation in glass in PBR, I use this cheap hack: I modified the glass material to include a gather loop that returns the depth of the glass at a sampling point, and I mix in the attenuation color with the refraction depending on that depth.

Limitations are mainly backlighting and the incredibly cheap VOP hackery :).

post-1116-1223898867_thumb.jpg

cheers,

Abdelkareem

pbr_cheap_att.hipnc

  • Like 2
Link to comment
Share on other sites

  • 3 years later...
  • 3 months later...

Here's a version with the extra nodes transferred to a "modern" glass material. Seems to baheva a bit differently, though.

For some reason blending with a constant BSDF gives me black, so this is with lambert.

The glass material does have attenuation built in these days, too..

post-2678-133716806426_thumb.jpg

pbr_cheap_atte.hipnc

Link to comment
Share on other sites

  • 2 weeks later...

Here's a version with the extra nodes transferred to a "modern" glass material. Seems to baheva a bit differently, though.

For some reason blending with a constant BSDF gives me black, so this is with lambert.

The glass material does have attenuation built in these days, too..

Hi eetu!

You can use "uniform volume" property for same geometry that surface and render two objects on same time: original geometry with mantra surface shader and their copy with volume shader. So you have volume inside shape with same form. Then you get physically correct attenuation closest to PBR philosofy as I think.

Edited by almatea
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...