Jump to content

What's the fastest way to create/copy a new volume?


Recommended Posts

Hi,

I have a VDB velocity field that's merged, so it's 1 volume which is vec3s, not vel[x,y,z], and I am wondering the fastest way to add a scalar volume to the same stream?

I would like it to work with VDBs and standard volumes and whether they are merged or not, or whether the stream has a scalar field already or not.

I don't see a straightforward way. I need this to populate the new volume using a volume vop so I would like this operation to be very fast as all I need is an empty volume.

 

Thanks :)

Link to comment
Share on other sites

it's all about the exact needs

do you need it to have the same voxel size and active voxels? or do you just add empty totally independent volume?

here is an example with 3 different methods of creating empty density field, matching voxel size and active voxels from incoming vel field, if you need normal volume instead of VDB use Convert VDB afterwards

ts_VDB_volume_from_reference.hip

  • Like 1
Link to comment
Share on other sites

Thanks anim, very clever methods. I want to store a scalar field based on the vel field, so I assume I have to activate the same regions.

From your 3 methods, your 3rd method to use VDB Analysis is the fastest in my tests with 7M voxels.

Link to comment
Share on other sites

  • 4 weeks later...

Also anim do you know if there is a good way for Houdini volumes? Volume Analysis trick doesn't work for standard Houdini volumes.

Also do you have a way for both types of volumes when you don't need to copy/initialize any values from the original volume?

Link to comment
Share on other sites

in case of houdini volume, it can't hold vec3 so you don't need Volume Analysis to convert it to float, just take any of the volume components and rename the same way as in the blue chain of VDB examples

and if you don't want to initialize/reset values and are ok with garbage values, just skip initialize_values part

  • Like 1
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...