nbjsargent Posted October 31, 2011 Share Posted October 31, 2011 I have a sphere (Polygon Mesh) with random color on each primitive. Some primitives receive the same color and I would like to select primitives that are perpendicular to each other if they have the same color. I tried separating all primitives with the same color, then using a primneighbours() function in a for loop to select primitives that have 2 or more points shared with another primitive? That doesn't work. Can anyone provide an example of how to use the primneighbours() function to select perpendicular primitives with shared edges? (Or provide an alternative method?) Quote Link to comment Share on other sites More sharing options...
SpencerL Posted November 1, 2011 Share Posted November 1, 2011 I have a sphere (Polygon Mesh) with random color on each primitive. Some primitives receive the same color and I would like to select primitives that are perpendicular to each other if they have the same color. I tried separating all primitives with the same color, then using a primneighbours() function in a for loop to select primitives that have 2 or more points shared with another primitive? That doesn't work. Can anyone provide an example of how to use the primneighbours() function to select perpendicular primitives with shared edges? (Or provide an alternative method?) Off the top of my head you could get the prim neighboour's normal and test it against the current prim's normal. You can test if they are perpendicular using the dot product. If the dot product of the two normals equals 0, then they are perfectly perpendicular to each other. Probably easiest to do this in a Vop Sop. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.