magneto Posted November 14, 2013 Share Posted November 14, 2013 Hi, I wanted to check out the VDB volumes but anyone knows how to create a VDB SDF volume? I briefly looked at the SOPs under VDB but couldn't see anything that might do this. Thanks Quote Link to comment Share on other sites More sharing options...
ikarus Posted November 14, 2013 Share Posted November 14, 2013 'surface' and 'distance' volumes are the same thing as sdf. All of the vdb generating sops ie vdb from particles or vdb from polygons has it enabled to build an sdf by default 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 14, 2013 Author Share Posted November 14, 2013 Thanks, that helped. Can I just drop in a VDB from Polygons instead of an old SDF volume? Because when I did that and saved the attribute values for each point of a geometry using this volume that represents another geometry, the attribute values are completely different. I am using Volume Sample in a VOPSOP and the old volumes give me the correct distance values from this volume to my geometry. But the VDB SDF has different distance values. Is it a matter of playing with the VDB parameters? Quote Link to comment Share on other sites More sharing options...
tjeeds Posted November 14, 2013 Share Posted November 14, 2013 Ryan, you should have a look through the Houdini Examples file on http://www.openvdb.org/download/ it's very thorough! 1 Quote Link to comment Share on other sites More sharing options...
Solitude Posted November 14, 2013 Share Posted November 14, 2013 The VDB from Polygons is the right one to use to make an sdf. You should understand 2 things... 1 is that that vdb does not fill the volume the same way, since it uses sparse volumes you only get proper values within your set voxel bandwidth (increase bandwidths and/or fill interior depending on your needs). 2 is that the sdf values for vdb are flipped (negated). 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 14, 2013 Author Share Posted November 14, 2013 Thanks alot. I didn't know they had Houdini samples there. @Solitude, now it starts to become more clear when you explained it I just assumed it was a drop in place to get instant speed and memory savings I will experiment with this. Quote Link to comment Share on other sites More sharing options...
magneto Posted November 14, 2013 Author Share Posted November 14, 2013 (edited) Also guys I just tried the Fill Interior and it works great, and actually solves another problem for me Because I don't know why this is happening. In both SDF volumes, I have a simple grid and a sphere and I am checking the value (Volume Sample) for the point at the exact center of the sphere volume and the IsoOffset's SDF gives me -0.86, while VDB gives me 0.99, which is close to what I expect. I understand the sign difference but I mean the absolute value. Increasing the resolution of IsoOffset's SDF from 30 to 100 brings the value up to -0.95, which is not bad but I was hoping -1 or -0.99. VDB SDF only has 50K voxels, and yet gives more accurate values. Does this have to do with volume resolution and VDB somehow interpolates the values better? Or are SDF volumes something VDBs are better at? Thanks Edited November 14, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
tjeeds Posted November 14, 2013 Share Posted November 14, 2013 That might make sense if they are corner sampled and VDB's are center sampled. I don't know if that's the case or not. Could have to do with interpolating the values of surrounding voxels too. 1 Quote Link to comment Share on other sites More sharing options...
edward Posted November 15, 2013 Share Posted November 15, 2013 is that the sdf values for vdb are flipped (negated). That is false. The SDF values in a VDB follow the same convention as native Houdini volumes. Just append a Volume Slice and look at the values in the spreadsheet. Quote Link to comment Share on other sites More sharing options...
Solitude Posted November 15, 2013 Share Posted November 15, 2013 Ah... k. I was actually basing that statement off of the Fluid Source sop. It outputs collision volumes negated.... and I was trying to get a vdb collision working, but had to set the source volume's multipler to -1 in dops. Figured it would best up to work with just a default signed sdf. Quote Link to comment Share on other sites More sharing options...
johner Posted November 15, 2013 Share Posted November 15, 2013 (edited) Ah... k. I was actually basing that statement off of the Fluid Source sop. It outputs collision volumes negated.... and I was trying to get a vdb collision working, but had to set the source volume's multipler to -1 in dops. Figured it would best up to work with just a default signed sdf. This is because for obscure historical reasons, the collision field in Houdini fluids is indeed inverted from what you might normally think. Since FluidSource is directly manipulating the collision field, you have to invert the source volume before merging it into the collision field. But you have to do the same thing if the source volume is a regular, non-VDB SDF from the IsoOffset SOP, for example. Edited November 15, 2013 by johner Quote Link to comment Share on other sites More sharing options...
Solitude Posted November 15, 2013 Share Posted November 15, 2013 ^Indeed, I was even testing on an isooffset before I posted that to double check. Thanks for clarifying. I do vaguely remember this, but after using the fluid source for so long, I must have forgotten. Quote Link to comment Share on other sites More sharing options...
magneto Posted November 15, 2013 Author Share Posted November 15, 2013 Do you guys know the best way to represent a sphere as an SDF volume? When I convert a primitive or polygonal sphere, it's not as smooth because of resolution. NURBS seem to give better result at low resolution but seems slower to convert to a volume. Can I just populate some points as spherical SDF volumes? Using a spherical SDF VDB and then copying it onto points take 30 seconds and 5GB of memory. I was thinking of combining it as a single volume afterwards, but this is not effective anyway. Instead of converting an actual geometry, is there a procedural way to create these shapes mathematically as volumes, SDF in my case? Thanks Quote Link to comment Share on other sites More sharing options...
Milan Posted November 15, 2013 Share Posted November 15, 2013 Do you guys know the best way to represent a sphere as an SDF volume? When I convert a primitive or polygonal sphere, it's not as smooth because of resolution. NURBS seem to give better result at low resolution but seems slower to convert to a volume. vdbfromparticles seems to be by far the most efficient to do this from my tests. just create a point in the centroid of your sphere, give it pscale to match the sphere's size and feed it into vdbfromparticles. It's very precise and fast as far as I can tell. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 15, 2013 Author Share Posted November 15, 2013 Thanks that looks like a good idea. I just tried it but VDB from particles do not have a Fill Interior feature, which changes the result. Is there a way to set this for a volume? VDB from polygons have this feature. Quote Link to comment Share on other sites More sharing options...
edward Posted November 16, 2013 Share Posted November 16, 2013 Do you need the Fill Interior feature if you're doing an SDF? The point of an VDB SDF is so that you maintain the narrow band only. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 16, 2013 Author Share Posted November 16, 2013 Thanks Edward, I think I do Because I am doing checks to see if points are inside the SDF volume. If the inside is not filled, then I am getting very faint colors that are normally supposed to be full values. So basically my assumption was that if the inside is not filled, then SDF values are not as accurate. But the difference is huge. Though if the point of VBD SDF is to maintain a narrow band, why does VDB from Polygons have a feature called "Fill Interior"? Outside is another deal though. I only need to know if my points are inside. Quote Link to comment Share on other sites More sharing options...
edward Posted November 16, 2013 Share Posted November 16, 2013 But the inside of VDB SDFs will still have a negative value. If you just need an "is inside" test, then that should work with narrow band SDFs. What you will not get is accurate distance values outside of the narrow band. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted November 16, 2013 Author Share Posted November 16, 2013 (edited) Thanks Edward, you explained it perfectly. Sorry I didn't say it but the colors I used were scaled based on distance, so I actually need the distance Do you think in this case standard Houdini SDF is better? Edited November 16, 2013 by magneto Quote Link to comment Share on other sites More sharing options...
edward Posted November 16, 2013 Share Posted November 16, 2013 If what you want is "dense" data after all, then I'm not sure if VDBs will buy much. I suggest you test the differences for a single sphere with a tight volume bbox. 1 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.