Jump to content

AOVs through refraction


adamr

Recommended Posts

Hello!

 

I am currently working on a project that has the majority of the image is refracted through a ocean spectrum surface. The problem being that I am unable to get AOVs such as point position, depth, and diffuse for the objects that are under the surface. I currently have a work around, where I have created utility shaders to enable control of the elements under the water surface. However, this has resulted in having a different render for each AOV needed!

Does anyone have good approach to accessing the refracted objects AOVs? The current approach is a bit cumbersome and time consuming.

 

Any advice would be much appreciated!!

 

 

Link to comment
Share on other sites

you can use a trace() function to pull your aovs from your shaders hit by the traced ray.

 

i believe it's as simple as:

vector direct_diffuse;
trace(P,T,time,"raystyle","primary","direct_diffuse",direct_diffuse,...);

 

T is the transmission vector (from a fresnel function, most likely)

 

i think you can stack them up to get additional attributes...

 

the "raystyle" flag tells mantra to consider the ray being cast as a primary ray, which will let you use matte objects in your refractions.

Link to comment
Share on other sites

  • 7 months later...

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...