VEX add additional volumes

   3215   3   0
User Avatar
Member
126 posts
Joined: Aug. 2010
Offline
What's the intended work-flow for creating volumes with VEX?

Say I have a scalar density volume and I want to create a noise vector field using anoise().

My vector field should be based on my scalar field, such that size and voxels match.
User Avatar
Member
7740 posts
Joined: Sept. 2011
Offline
In dops, you can use ‘gasmatchfield’. In sops, the volume sop can create new arbitrary volumes. If you need it reflect the dimensions, transform, and grid resolution of another volume, use blast to isolate the reference volume. Then use ‘name’ to rename it, and primitive sop to modify the volume properties such as border condition and visualization style. Finally, merge it back with the original stream using the merge node.
Edited by jsmack - March 20, 2018 11:22:11
User Avatar
Member
126 posts
Joined: Aug. 2010
Offline
seems like a lot of spagetti for a couple of new volumes. , any compact solutions?
User Avatar
Member
7740 posts
Joined: Sept. 2011
Offline
If you want fewer nodes, you can use duplicate the reference volume. You will need to rename it somehow to differentiate it from the existing volumes. You can skip the primitive sop if you don't care about visualizing it, and if the border condition is already what you want.

The most compact would be to do it all in a python sop or vex sop, but it's just as complicated, if not more so, as you are left setting intrinsic properties in code.

There is no ‘simpler’ way to create a new volume that has the same properties as an existing one. three or four sops to copy geometry differentiate it, and merge it back is hardly spaghetti.

VDB volumes have a simpler workflow, as most take reference vdb as input, so adding new vdb volumes is as simple as plugging a reference vdb into the input of a vdb sop.
  • Quick Links