Arnold API - Find closest point on surface
Not applicable
02-07-2019
11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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