Jump to content
Sign in to follow this  
nuki

Pyro: Match vdb source and sim grids

Recommended Posts

I have a source vdb and a sparse pyro dopnet, the source being a thresholded noise with only 0.0 or 1.0 values. When enabling "solve on creation frame" I would expect the values of the source and the sim (with all advection disabled) to be the same. As you can see they're not, and I can only suspect the grids of the source and sim volumes are not lining up resulting in interpolated samples.

sourcing.JPG.57935a317392478a1b084362c9b6b6de.JPG
left is a slice of the source, right is a slice of the sim

For sake of avoiding interpolation of the values during sourcing, the source volume field should exactly match the sim field (voxel size and positions).

So I attempted to resample my source volume with the max bounds, center and voxel size settings of the sim, but there are still lots of intermediate values generated during sourcing.

Another approach was to use "gas match field" to match my flame field to my source vdb. That worked nicely but the field wont be resized anymore, which isnt good when advecting.

So how could i align my volume sources voxels perfectly with my (sparse) pyro sim?

 

pyro_match_source.hiplc

Edited by nuki

Share this post


Link to post
Share on other sites

Not exactly sure what is going on, but if you unlock the smokeobject and change the Voxel Sampling to Edge XZ on the flame field it will match. Thats the only thing I changed.

Or you can transform your source field with half a voxelsize in X and Z (0.015 in this case), seems to have the same effect pretty much.

image.thumb.png.2d97a10ace644beb1cb12de8cf5d2458.png

  • Like 1

Share this post


Link to post
Share on other sites

Yea, it seems offset by half voxelsize - wondering if its the sampling position of the noise. maybe the offset is needed so @P points def to voxel center.
Resampling the source to the max bounds before applying the noise also works.

I had no idea that I could change the Voxel Sampling Edge!
Thanks a lot man!

Edited by nuki

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  

×