ourouk
Hello,

I actually have some mesh2arrays nodes plugged in an instancer ( no particles, juste points plugged in inputPoints)...

I would like to delete some of these points "manually" based of an Id or something like that...
I would like also to delete mesh2arrayspoints based on mesh color ( I need mesh2arrays for relax, can't use scatter ). btw mesh2arrays has a "color mask" attr but it seems buggy when combined to relax.

Is it possible ?


EDIT
Another idea for the "delete points based on id" :

I could replace some mesh2arrays points with a "null" when matching their ID, something like that in a point node :

If ($ID == 113)
    $W = 0;
else
    $W = rand(1,3)

where $ID is the id of the scattered point
and $W is instance number ( a null )
and instancer number 0 is a null

but I don't know where to find this $ID...

Thanks a lot for any help.



Reply 0 0
plarson
Where are you putting that If/else? The $ID and $W suggest the Point node to me but maybe that's a coincidence. Here's a scene with what I think you have in mind, using a Point node to set instancer objectIndex. ( ma pointCull_instancer.ma      )
Reply 0 0
ourouk
Your scene is exactly what I was thinking about :)

I shoul read the "quick help - local variables" in soup node more often :p
I didn't know there where a $ID...

It's perfect.
Thanks a lot
Reply 0 0
ourouk
Btw, do u know how to display the "ID" of each point ?

Edit :

Ok I have it, just plut the outIdPP of the pointNode to a displayComponent
Reply 0 0
ourouk
And last question :)

Is it possible to delete points ?
Using a "null" instance is ok, but when u have a LOOOOT of scattered points, it is pretty slow to compute. Would like to delete some points BEFORE instancing...
Reply 0 0
plarson
No problem, glad that's what you were looking for.

A good way to do that is with the Point inComponents. If you use a Group before the Point and set the Point to use components it will only loop over those points.

Two things to mention about adding that to the previous scene. The positions are coming from the mesh2arrays. Since we need to cull the positions as well, use the Point's outPositionPP instead. Also when adding a Group node between the Point node, because the inGeometry is a curve(pointCloudToCurve), the Group node should be set to Component type curve cv. Here's that added. ( ma pointCull_instancer_2.ma      )

It might be more efficient to cull the points at the mesh2array with the vertex color mask option, but I'd have to try. By the way, as Peter mentioned in this thread, the Scatter should be able to give a very similar relaxed result.
Reply 0 0
ourouk
ok thx a lot !
Reply 0 0
Reply