Jump to content

Pyro: Match vdb source and sim grids


nuki

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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...