message passing/tag child ray

   2613   2   0
User Avatar
Member
1694 posts
Joined: March 2020
Offline
Hi,

Is it possible to ‘label’ or ‘tag’ a child ray in a vop/vex (surface) shader? I'd like to add some extended information to child rays (i want to implement more detailed ray type info, so I'd like to attach a ‘ray type’, e.g. “occlusion”, “refraction”, “probe”, etc.) Then my own shader could pick up this information when it has to deal with such a child ray.

This functionality exists in mental ray, and I wonder if it's possible in mantra?


imre
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
User Avatar
Member
941 posts
Joined: July 2005
Offline
riviera
Is it possible to ‘label’ or ‘tag’ a child ray in a vop/vex (surface) shader?
This functionality exists in mental ray, and I wonder if it's possible in mantra?

Yes, VEX supports ray labels/tags. Have a look at the rayimport() [sidefx.com] function.
Despite what the documentation implies, the “send:<varname>” variadic argument is available to all the raytracing fuctions, not just gather() [sidefx.com]. So you can also “send:” (or attach labeled data) to rays generated by functions like occlusion() [sidefx.com], reflectlight() [sidefx.com], refractlight() [sidefx.com], etc.
However, this is only applicable to the non-PBR engines – the concept of attaching user data to rays is not yet available for PBR (except maybe indirectly when/if the above functions are used to calculate some terms in a bsdf assignment).
Mario Marengo
Senior Developer at Folks VFX [folksvfx.com] in Toronto, Canada.
User Avatar
Member
1694 posts
Joined: March 2020
Offline
Yes, VEX supports ray labels/tags

thanks, this'll allow me to build much more elegant shaders.

rokkenroll!


imre
Imre Tuske
FX Supervisor | Senior FXTD @ Weta FX

qLib -- Houdini asset library
http://qlab.github.io/qLib/ [qlab.github.io]
https://www.facebook.com/qLibHoudini [www.facebook.com]
  • Quick Links