raytk
raytk copied to clipboard
Export of SOP geometry from a RayTK scene
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.
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?
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.