prim normal to point normal

   3608   4   0
User Avatar
Member
343 posts
Joined: Dec. 2014
Offline
I'm adding points to the centroid of a bunch of prims and I need to get normal direction of that prim onto those points, any tips? I can find the normal with VOP primnormal, but I'm having some trouble correlating that to point normals
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
You could use an Attribute Wrangle set to primitive, to both add the point and set the normal in one go:
int newpoint = addpoint(0,@P); //store the new tmp pointid in "newpoint"
setpointattrib(0,'N',newpoint,@N); //use the prims normal to set the normal on the new point

-b
Edited by bonsak - Nov. 10, 2017 11:31:46
http://www.racecar.no [www.racecar.no]
User Avatar
Member
343 posts
Joined: Dec. 2014
Offline
Thanks! Plus this is a much more elegant way of adding points to prims, I was using a for-each subnetwork
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
NP. You might want to add a second attribute to the point so you can isolate it from the prims later.
http://www.racecar.no [www.racecar.no]
User Avatar
Member
343 posts
Joined: Dec. 2014
Offline
Yep I grouped them thanks
  • Quick Links