Filter out primitives

   3046   13   3
User Avatar
Member
766 posts
Joined: April 2014
Offline
I'm going to describe this the best I can. How can I filter out selected primitives from the result of a dot product which is point subtracting from all the primitives on the mesh ? I was informed area could do the task but area works on micro-poly ?
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
Your question implies that the result of a dot product is a set of primitives, which is not, it's just a float value.

Secondly, what do you mean by “point subtracting” ?

Third, micro-poly ? Are you talking about shading ?
User Avatar
Member
766 posts
Joined: April 2014
Offline
What I don't understand is, the measure SOP write the area of each primitive as I was informed; how do I use the attribute in VEX ?
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
Oh, like any other attribute: f@area;

You meant attribute wrangle right? Run over primitives
User Avatar
Member
766 posts
Joined: April 2014
Offline
Yes What is and how is it calculating the area of each primitive ?
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
What's what?

an attribute?
an attribute wrangle?
a primitive?
a measure SOP?

Well, I don't know exactly how the measure SOP calculates the area, does it matter ?
User Avatar
Member
253 posts
Joined: July 2006
Offline
Oh, sorry, are you actually asking how to use the measure sop to calculate the area of each prim? Given that by default it gives you the perimeter?

If so, change type to “area”
User Avatar
Member
766 posts
Joined: April 2014
Offline
A-OC
Oh, sorry, are you actually asking how to use the measure sop to calculate the area of each prim? Given that by default it gives you the perimeter?

If so, change type to “area”

How is it calculating the area; how is it doing the measuring ?
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
I think i'm a genius, i might have finally cracked the code, i mean, your question.

You have a tube-like shape, you want to create a group of the primitives that are facing inward, but only the ones which are larger. And then count how many primitives there are in this group.

So you're placing a single point with add sop, and use that with a dot product to detect the inward facing prims.

Now you don't know how to exclude the smaller prims, but you were informed you could do it using a measure sop.

Ok, check this scene.

Attachments:
circle_mesh_d.hipnc (1.4 MB)

User Avatar
Member
766 posts
Joined: April 2014
Offline
A-OC
I think i'm a genius, i might have finally cracked the code, i mean, your question.

You have a tube-like shape, you want to create a group of the primitives that are facing inward, but only the ones which are larger. And then count how many primitives there are in this group.

So you're placing a single point with add sop, and use that with a dot product to detect the inward facing prims.

Now you don't know how to exclude the smaller prims, but you were informed you could do it using a measure sop.

Ok, check this scene.

That's it Except you blasted away the polygons

Is there another route way this could be done, out of curiosity ?

Where are @count & @numprim being declared ?
Edited by _Christopher_ - Jan. 5, 2017 10:11:51
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
Yes, npointsgroup, either hscript expression or vex function, they're called the same.

@count is declared in the node I typed it in.

@numprim is an attribute always available, just like @P, @N, @ptnum, @primnum, @numpt.
User Avatar
Member
253 posts
Joined: July 2006
Offline
oops, i just realized we were counting primitives, not points.

So it should rather be nprimitivesgroup in vex or nprimsgroup in hscript
User Avatar
Member
766 posts
Joined: April 2014
Offline
The attributeWrangler2 @count attribute in the spreadsheet (detail) should give me a value other then 0, correct in relation to your scene ?
【T】【C】【S】
User Avatar
Member
253 posts
Joined: July 2006
Offline
Yes, in fact it reads 58
  • Quick Links