VolumeWrangler get height of specified

   Views 442   Replies 3   Subscribers 2
User Avatar
Member
11 posts
Joined: July 2024
Offline
VolumeWranglers are invoked for each Voxel in a HeightField and so already have access to that voxel. Is there a way to read the height of a neighbourning voxel.

Thanks
Clff
User Avatar
Member
30 posts
Joined: Jan. 2011
Offline
To access neighbors, you need to calculate their positions relative to the current one. Since voxels are on a grid, you do this by offsetting the voxel coordinates. Houdini provides the volumeindex VEX function [www.sidefx.com] to help you read values from a volume at specific voxel coordinates.
Edited by Farmeadow - April 10, 2025 12:11:33
User Avatar
Member
503 posts
Joined: Nov. 2016
Offline
You can do it using:
volumesample(0, 'height', v@P + offset)
Edited by Tanto - April 10, 2025 12:28:36
User Avatar
Member
11 posts
Joined: July 2024
Offline
Thank you both. I now have it working.

Cliff
  • Quick Links