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.

Sign in to follow this  
Followers 0
nicoladanese

export velocity into vdb from pyro sim

Hey All!

I'm trying to write out some vdb caches from a pyro sim. As long as I plug the DOP Import into a VDB convert and then into a file everything looks great and I get my density for render. Problem is, now I want to write out velocities of the volume so I can later import it in a fresh scene to advect some particles. I can't find a way to enable the DOP import to get the velocity, so I'm plugging the DOP I/O which has all the field I need. BUT the cache is getting much much heavier in terms of disk space. I am writing out 4 scalar fields (density vel.x vel.y and vel.z) so I'm expecting the cache to be roughly 4 times bigger, but in my case frame 10 was around 2 Mb and now is 240 Mb

any one with some ideas? Thanks in advance!

here some screens of how I'm setting this

Screenshot_01.png

Screenshot_02.png

Share this post


Link to post
Share on other sites

You can have velocity where you have no density.
DOP networks are using Houdini volumes so all fields should have the same dimensions and "weight", I mean, filesize.
Since you convert to VDB you are scrapping out useless voxels. If you have the situation described above, each VDB cached field would have a different filesize, well, at least for density and vel. 
vel.x, vel.y and vel.z should be have the same file size since they are all part of the same original field.


To import a field from a DOP network, use DOPImportField rather than a DOPImport.


if you want to double check which voxels will be stored:
after your VDB conversion, add a blastSOP and keep only one of your field then lay down a VDB Visualize Tree where you change the Active Voxels dropdown to Points.
Depending on which field you keep in your blast SOP you might see more or less points.
More points = more voxels = more Mb to store.

Share this post


Link to post
Share on other sites

Hi Anthony, thanks for your reply!

you were right, the voxels for vel are basically filling up the bounding box of the volume in a few frames (I guess the reasons are collisions with geos) , while the density is very limited (I've attached 2 images for comparison)

Now I'm looking for a reasonable way of getting the velocity info without filling up the disks! I guess I can VDBresample vel field before writing it out to maybe a 10 times lower resolution field grid so I get the velocities I need , although I'm not getting the fine details...

 

Screenshot_02.png

Screenshot_01.png

Share this post


Link to post
Share on other sites

If you only really want the velocity in the areas around the density then you could always keep your resolution but zero out the velocity in the other areas and deactivate those vdb voxels.

Share this post


Link to post
Share on other sites

Hey Gavin, you mean to get the velocity grid only where I have density above 0? any idea how to achieve that?

Share this post


Link to post
Share on other sites

You could use a Volume VOP to check whether a voxel has a density of zero, and then use that to activate an  IF/Then Block that sets the velocity to zero. 

Would the VDB then delete the velocity voxels that were at zero? Not sure...

1 person likes this

Share this post


Link to post
Share on other sites

Does OP need 32bit fields for this application? Converting to 16bit using the Primitive SOP will dramatically decrease disk write. Just don't know if you need the precision for advection?

Edited by shawn_kearney

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
Sign in to follow this  
Followers 0