Which points are on my primitives?

   3617   4   3
User Avatar
Member
3 posts
Joined: 6月 2014
Offline
Please can someone tell me how I can access the point numbers of all the points attached to my prims. I have a grid - facet - primitive setup to split the grid into its polygons and want to displace each primitive on the grid by the average luminance of its 4 corners (or of the center of each polygon).

File attached if you want a look

Cheers

Pete

Attachments:
abstract cubes.hipnc (135.7 KB)

User Avatar
Member
1391 posts
Joined: 12月 2010
Offline
You have couple ways , I think the simpler way is add point in center of each primitive , displace these points with your texture , move each prims with it's own centered point.

you can do this with a VOP SOP for displacing points and a For Each SOP for moving each prim to the Points.

Also you can use another VOP SOP for moving prims to the points instead of For Each SOP.

Just you should add a ID attribute for each prim that is same with it's centered point's number , then use this ID for finding it's centered point in the VOP SOP for moving this prim to the it's centered point.
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: 12月 2010
Offline
This is an example file about these methods :wink:

Attachments:
JK_Displacement_Prims.hipnc (167.1 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: 12月 2010
Offline
Maybe you can do all just with single VOP SOP , it can so faster than another methods.

For example use Neighbor VOP and Neighbor Count VOP for finding corner points of each prim , then use For Each VOP for looping over these corner points and take average position (or any value ) of these corner points.

But this method is a little complex 8)
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
339 posts
Joined: 8月 2007
Offline
You just need a couple Attribute Promotes

Attachments:
abstract_cubes_203.hipnc (147.2 KB)

Jesse Erickson
Fx Animator
WDAS
  • Quick Links