magneto Posted May 9, 2016 Share Posted May 9, 2016 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 Quote Link to comment Share on other sites More sharing options...
anim Posted May 9, 2016 Share Posted May 9, 2016 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 1 Quote Link to comment Share on other sites More sharing options...
anim Posted May 9, 2016 Share Posted May 9, 2016 but if all you need is completely empty volume without any active voxels, just use VDB SOP and merge it with you geo (or Volume SOP for houdini volumes) 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted May 9, 2016 Author Share Posted May 9, 2016 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. Quote Link to comment Share on other sites More sharing options...
magneto Posted June 3, 2016 Author Share Posted June 3, 2016 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? Quote Link to comment Share on other sites More sharing options...
anim Posted June 3, 2016 Share Posted June 3, 2016 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.