VEX/VOP node to sample point from VDB
8779 3 1- ben-andersen
- Member
- 47 posts
- Joined: Jan. 2014
- Offline
- Ratmann
- Member
- 110 posts
- Joined:
- Offline
- jbudsberg
- Member
- 91 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]
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]
- ben-andersen
- 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.
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