[Sidefx-houdini-list] Point count from a group
dogboy_l at yahoo.com
Thu Apr 23 14:42:30 EDT 2009
I think he means a way to do it without trashing memory. If you had to do this over millions of points and hundreds of point groups, it would take forever. The solution doesn't scale well. I personally try to avoid the whole copy/stamp/delete group thing as much as possible for this same reason. I mean, you're creating and deleting all the geometry n times, where n is the number of groups. That is not elegant.
Maybe try using the 'add' sop to connect the points by group, then create a point attribute called 'count' initialized to one. Do attribute promote 'count' to primitive using sum. That'll count all the points in a group and assign the value to the primitive.
--- On Thu, 4/23/09, François Duchesneau <sidefx at trinix.ca> wrote:
What do you mean by "a more elegant way"? If you branch off a Delete
and you put an expression in it that is driven by the group name the
user specifies, from your main node tree you can read npoints() on that
Delete Sop node and it's fully procedural.
Maybe I don't understand your problem :)
robert east wrote:
> Hi Prema ,
> I have already used the npoints function and blasted
> unwanted points at the SOP level that works, but I really wanted a more
> elegant way. As it would be nice to read in the point count from
> groups as required by the user.
> Kind regards rob
> On Thu, Apr 23, 2009 at 11:07 AM, Premamurti Paetsch <
> premamurti.paetsch at gmail.com> wrote:
>> Hi Rob,
>> What about blasting away all but the group in question, and then
>> $NPT to return the point count?
>> 2009/4/23 robert east <east.robert at gmail.com>
>>> Hi List ,
>>> Is there a function I can use to read the point count from a group
>>> sop level into a pop network as I want to use that to emit
>>> birth tab
>>> Kind regards Rob
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
More information about the Sidefx-houdini-list