magneto Posted December 7, 2013 Share Posted December 7, 2013 Hi, Is there a way to find the outermost voxels in an SDF volume (standard volumes or VDBs)? By outermost, I meant in a way that if you were to place a box for each of these voxels that has the same size as the voxel, you wouldn't be able to see the inside of the surface, or have any holes. I did some experiments and it seems like using sqrt(2*voxelsize^2) doesn't include every outermost voxel. When I looked how the distances of voxel centers vary from the actual surface, it seems like some are being missed by a tiny amount which puts them great than 2 * voxelsize. So I am not sure if this can be done in a better way? Thanks Quote Link to comment Share on other sites More sharing options...
magneto Posted December 8, 2013 Author Share Posted December 8, 2013 I found some info here: http://forums.odforce.net/index.php?/topic/16190-gradients-and-inflection-points/ But I am not sure how to do that. If I could find those points, I would use Volume Pos to Index VOP and then Volume Index to Pos VOP to get the center of the voxels. I just don't know how I can use the Divergence DOPs (?) to get those points and then bring it back into SOPs. Any ideas from the volume experts? Quote Link to comment Share on other sites More sharing options...
ikarus Posted December 8, 2013 Share Posted December 8, 2013 VDB Analysis sop can do all the field operators the dop version can 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 9, 2013 Author Share Posted December 9, 2013 Thanks ikarus, I am glad to know about this SOP now. Though after examining the options, I don't think I can use it to do what I need unless I am missing something? From my tests before which might be flawed, I couldn't find voxels with a value of 0 in an SDF volume. I found a hacky way that works but not completely and requires the surface to be there as well. So if I have a geometry like a torus and then scatter say 1M points on it, then on another branch turn the torus into an SDF, I can check where those points are as voxels and they do give me the result I need since the points were on the surface of the geometry. But this requires me to scatter so many points to cover all the geometry, otherwise you will miss some voxels. And this requires me to have the geometry around which I won't necessarily have. There must be a much smarter way I am sure. I just can't think of it as I am not an expert in volumes Quote Link to comment Share on other sites More sharing options...
ikarus Posted December 10, 2013 Share Posted December 10, 2013 (edited) Unless the surface lied exactly along the centers of the voxels why would you expect to find any actual 'zero' value? Geometric surfaces (in our context) are simply collections of infinitely thin, triangle-shaped planes. Perhaps you should read up on how the marching cubes algorithm determines surfaces from grid data http://en.wikipedia.org/wiki/Marching_cubes Edited December 10, 2013 by ikarus Quote Link to comment Share on other sites More sharing options...
anim Posted December 10, 2013 Share Posted December 10, 2013 (edited) you can resample SDF to VDB with band of 1 and then create point for each of those band voxels which lies outside of the surface look at the file (H13 only, due to addpoint vop) ts_get_boundary_voxels_from_sdf.hip Edited December 10, 2013 by anim 3 Quote Link to comment Share on other sites More sharing options...
magneto Posted December 10, 2013 Author Share Posted December 10, 2013 Thanks anim, that's amazing, you did it again This was exactly what I wanted to get. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.