VolumeWrangler get height of specified

   Views 453   Replies 3   Subscribers 2
User Avatar
Member
11 posts
Joined: 7月 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: 1月 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 - 2025年4月10日 12:11:33
User Avatar
Member
503 posts
Joined: 11月 2016
Online
You can do it using:
volumesample(0, 'height', v@P + offset)
Edited by Tanto - 2025年4月10日 12:28:36
User Avatar
Member
11 posts
Joined: 7月 2024
Offline
Thank you both. I now have it working.

Cliff
  • Quick Links