Arnold API - Find closest point on surface

Anonymous

Arnold API - Find closest point on surface

Anonymous
Not applicable

I would basically like to recreate the xyzdist and primuv functions from Houdini/mantra. xyzdist finds the closest point on a specified geometry’s surface given a starting position.

I couldn’t find anything similar in the api so I guess ray tracing along a defined ray direction is the closest method.

Does anyone have a simple example of firing a ray and retrieving the hit position, normals and uvs?

And is it possible to ray trace an object from disk? Ie I don’t actually want to render the object being hit. Or would I just have to turn all its visibility off?

And can you specify objects (or even better polygon groups) to ray trace? With tracesets?

Or is osl able to do this?..

Cheers,

Mike

0 Likes
Reply
329 Views
0 Replies
Replies (0)