Jump to content

Recommended Posts

Hello all, I'm trying to find a way to create a thickness mask - I'd like to use it on a mesh surface to generate a faked subsurface look.  My general idea is that I would fire a ray from the camera position to each point of the mesh, then measure the distance to the next surface each ray hits.  I'm sure you could then fit range that, and store it in @Cd or a custom float attribute.  Does anyone have any hints on how to go about that (or maybe there is already a prebuilt method of doing so?).

Thanks!

Share this post


Link to post
Share on other sites

Hi Aren,

you can have a look at the file of how to use the intersect function to cast light rays with vex
i think you should use the intersect_all for your thickness mask

 

Share this post


Link to post
Share on other sites

Thanks! - I did find a rather hacky way of doing this using the ray sop, but I think using intersect_all will be faster and more flexible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×