raytk icon indicating copy to clipboard operation
raytk copied to clipboard

Export of SOP geometry from a RayTK scene

Open t3kt opened this issue 3 years ago • 2 comments

See #657 for details about how SDFs differ from traditional SOP geometry.

Options: Using a pointMapRender with a grid of points can produce distance values for each point, which can be used to determine whether that point is inside or outside the shape. That could be used to create a set of cubes that fill the SDF area. Converting that to a single more usable mesh may be possible.

t3kt avatar Jan 20 '22 21:01 t3kt

If I am not mistaken, Houdini for example should be able to convert said points to a mesh and has a flexible toolkit available for experimenting. Is it possible to export these points from raytk as of yet?

Empyreans avatar Apr 04 '22 09:04 Empyreans

Yeah Houdini can do it. To export the points, you'd use a pointMapRender to sample the SDF at points in a grid, then use the resulting distance values to delete outside points (those with positive distances).

I've had some success with using the Convex Hull SOP plugin to do that conversion. It only works for convex shapes though, sort of like shrink-wrapping a shape without getting all the inner details.

I've also successfully done the reverse in Houdini, taking a model and producing SDF data out of it (with a lot of limitations). See #657 for more about that.

t3kt avatar Apr 05 '22 01:04 t3kt