pcopen query normal/cone angle? Does it work?

   3864   2   0
User Avatar
Member
88 posts
Joined: July 2005
Offline
Hi all,

I'm trying to renumber/sort the points on a curve with correctly ordered points along it's length. In a vop sop using point cloud open, the ‘cone angle’ parm is 180 deg or less with a query normal (created with polyframe) but many of the points ignore the supplied query normal direction and return points in the opposite direction. Is this a bug? Or am I using it incorrectly? I also tried rejecting points in a while loop based on the dot product between my query vector and a vector from the query position and the returned position. However I don't know if it's possible to reject points in this way (sort of a makeshift ‘continue’ statement).

Any ideas? Thanks in advance.
/ken_jones/$: _
User Avatar
Member
8595 posts
Joined: July 2007
Online
just to make things clear Cone Angle in pcopen is not cone angle in front of the point in the direction specified by N input.
It is angle between vector in N input and vector attribute on queried points specified in Normal Channel parm
so it can very well happen that point in any direction will be queued as long as it's mentioned attribute fits within the specified angle from N input vector
(I'm not sure if it's normalizes the vectors for this test, so maybe do it yourself just to be sure)

so maybe that will not help you in this case (and note that angle of 180 will get you all points within the specified count and radius as that covers -180 to 180 so pretty much everything)

so to get only the points in front you need to use your mentioned plan B
which is just simple while or for loop over pcopened points.

but for what you want to achieve, can't you just use Sort SOP and set it to By Vertex Order?
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
88 posts
Joined: July 2005
Offline
Thanks so much Tomas, so I was in fact wrong as to how cone angle works. I had tried the while loop technique but I was not getting what I want, presumably because while passes the values unchanged instead of rejecting them if the condition is untrue. It might be possible to wire up what I need but I'm not all that gangsta with vops as yet

As for the sort based on vertex order, I had tried that but it was not working. It turns out that my curve was made of many primitives instead of the one I expected, and a post you made on odforce pointed the way to the Join sop which, after a little cleanup, worked perfectly. Problem solved, thanks again!
/ken_jones/$: _
  • Quick Links