Accessing a specific Voxel within a volume vop

   2362   1   1
User Avatar
Member
1 posts
Joined: May 2013
Offline
Hey, quick question,
Is there any way to access the value of a specific voxel within a volume vop? I'm not sure exactly how they are stored, but if I want to, for example, set the density value of the current voxel in the volume vop to the density value of a voxel that is 3 voxels up and 4 voxels to the left of the current one, how could I do this?

Thanks in advance.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
If it is a volume convolution you wish, use the Volume Convolve VOP. It has a 3x3 voxel radius.

Volume Sample from File VOP gives you all the control you need. That and looking at the global inputs for the Volume VOP Global Parameters:
http://www.sidefx.com/docs/houdini12.5/nodes/vop/volumevopglobal [sidefx.com]
Note the dPd? input globals.


Gotta love 3 up and 4 left. Somewhat ambiguous don't you say.


You know that volume containers have an orientation and if you rotate it, it's rotated.

Now if you want to support a randomly rotated volume and still want object space coordinates to index, just set two constant vectors, one Z and one up and then march on those two the average of dPdx, dPdy, and dPdz which should get you the voxel distance assuming you have squareish voxels.

Attachments:
convolve_volume_data.hip (107.0 KB)

There's at least one school like the old school!
  • Quick Links