Jump to content

MaxDist for Refraction Rays on Mantra


Recommended Posts

Hello wizards!

I am doing some glass renderings, and for a very specific case I am facing a problem that could be potentially solved by limiting how far a refraction ray should travel.
Like, if the next level of ray depth already travelled a certain distance kill it and return the color of the environment for example. 
This is because there are some cases where my object could refract itself which is something desirable but only at a certain distance.
I found on the documentation that there is a maxdist for the RayOption on the trace() and refractlight() function, but I have no idea how would I go into using it or building the shader.

The render configuration right now is using a custom lens that at the beginning of the project meant for it to let us see the other side of this water cylinder, I can hide a portion of it by limiting the far clipping, but then of course parts that are inside the refraction will still be visible, that's why I'd like to be able to kill the refraction rays if the have travelled a certain distance since self refractions are still desirable for the surface's top part.

So far what I would be trying is a combination of manual masking and using the RayLevel image plane that gives me a little of what I need but still not the perfect solution. Certainly a bit of help regarding manipulating the rays within Mantra would be of huge help.

WTNK_ClearWater_FarClip_3_5.PNG

WTNK_ClearWater_FarClip_25.PNG

WTNK_RefractMaxDist.PNG

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