Volume color ramp distance from center to boundary

   3829   3   0
User Avatar
Member
336 posts
Joined: Dec. 2014
Offline

I'm sure this has been covered and I'm sure it's trivial but I'm not able to find the links. I'd like build a color ramp based on the distance from the center of a volume to it's boundary, and transfer that to points. Tips?
User Avatar
Member
39 posts
Joined: July 2013
Offline
You can do a volume sample to get each points distance in relation to an SDF's surface. This value is a float and you can plug it into a ramp to colour your points. I've attached a a scene file which has it both in VOP and VEX format. Hope this helps!

Attachments:
colorPtsByDepth.hipnc (316.9 KB)

User Avatar
Member
336 posts
Joined: Dec. 2014
Offline
Super helpful file, thanks! I was confused for a moment with the Bind Outputs using “parm” but I see that it's just to see your VOP values in the spreadsheet
Edited by AndyW - Aug. 24, 2016 09:53:36
User Avatar
Member
39 posts
Joined: July 2013
Offline
Ah yes, should have annotated!
  • Quick Links