Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

catchyid

How to convert VDB to Points? OR how to visualize VDB precisely?

Hi,

I am rendering Lava FLIP simulation in an external renderer as VDB. I want to visualize the generated SDF VDB before sending it to the external renderer, meaning: I want to "see" the voxels with zero density that represent the surface, other negative voxels that represent the inside of the fluid and how thick they are (i.e. is it one layer below the surface or two layers, does it go all the way to the inner most of the fluid...), does it generate positive voxels and how many layers? 

I am not sure exactly how to do that? I looked into "Particle Fluid Surface" and it uses "VDB From Particle Fluid" node with "Half-Band Voxel" set to 3, so I am assuming that I have approximately 6 layers of SDF VDB. However, I could not find a way to visualize these layers easily?? ALL what I got is a something that looks like an ISO surface (plz, check attached image)

I am thinking, is there a way to convert each voxel to exactly one point such that it copies the "density" attribute in the voxel? I was able to do something similar by using "Attribute from Volume" node, but it's not accurate because this node requires points cloud to copy attributes to (so multiple points might exist in the same voxel or maybe too many voxels outside the VDB altogether). 

Thanks,

 

 

 

vdb_vis.png

using_attribute_from_volume.png

Share this post


Link to post
Share on other sites

VDB Visualize Tree SOP or perhaps Volume Slice SOP depending on what you need.

1 person likes this

Share this post


Link to post
Share on other sites

Thanks Edward...I've tried both, I don't understand how VDB Visualize Tree works (meaning, I don't understand its parameters, I think I need to understand VDB data structures in order to understand this node!), and Volume Slice SOP definitely helps... However, I was hoping to find a way to query VDB densities, for example : I want a way to query (either visually or in the spread sheet) all voxels with positive densities, negative densities, zero densities, etc...

I could not find a way to do that natively in VDB, so I thought about converting a VDB to points (i.e. sample VDB densities using points), however this is not easy because I want exactly one point per voxel if does exist (i.e. in VDB you might not have voxels since it's sparse) and I don't know how to match the number of the generated points to the number of existing voxels...

Anyways, I don't think there is a direct way to do that.... Once more, thanks for your help :)

 

Share this post


Link to post
Share on other sites

Volume slice, when you choose method - points, matches the voxel count. and you can check the density value in geometry spreadsheet.

If that is not good enough, you can do that in volume vop. Just add points where you have density. and color the points depending on your density values.

Well as for everything in Houdini, many ways how to achieve it.

 

1 person likes this

Share this post


Link to post
Share on other sites

Thaaaaaaanks Janis :) I have tested volume slice and it does work exactly like you described. However, when it comes to Volume VOP, I am not sure exactly how to do this test : if density > 0 execute the addpoint command? plz, see attached image where you can see what I have done...

 

Once more thanks for your help :)

 

vop_question.png

vop_question.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now