VEX/VOP node to sample point from VDB

   8799   3   1
User Avatar
Member
47 posts
Joined: Jan. 2014
Offline
I want to sample points from my VDB in a VOP SOP or VEX. What's the VOP node that will let me do that? I tried volume sample, but it didn't seem to work.
User Avatar
Member
110 posts
Joined:
Offline
Ben Andersen
I want to sample points from my VDB in a VOP SOP or VEX. What's the VOP node that will let me do that? I tried volume sample, but it didn't seem to work.

Well VDB grids don't actually have points, they are voxels. But you can use a Volume VOP to access them.
User Avatar
Member
92 posts
Joined: Aug. 2010
Offline
hey ben! I use “volume sample from file” or “volume sample vector from file” to point sample a vdb grid onto points in a VOP SOP.

The points are in the first input of the VOP, and then I pipe the vdb into the second input. Inside the VOP, I use a file parameter with “op:`opinputpath(”.“, 1)`”, which is then hooked into the volume sample from file.

I hope that helps; check my openvdb example hip if ya need:
http://www.openvdb.org/download/ [openvdb.org]
User Avatar
Member
47 posts
Joined: Jan. 2014
Offline
Hey Jeff!

Thanks. I was trying to sample vector components as floats using volumesamplefile, then changing the primitive number to get the individual components (the way it works for dense volumes). I don't know why I didn't see the volume sample vector from file. I was too hasty, I suppose :-) I wonder why there are two different nodes for float and vector. Import attribute, bind, and parameter all allow you to set the input type on the node itself. This worked well.

Thanks!

Ratmann – sorry for the confusion. I meant that I wanted to sample voxel data on to a set of points that I'm feeding into a vopsop.
  • Quick Links