[Sidefx-houdini-list] Point count from a group

Lucio Flores 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
Sop 
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 :)

François

robert east wrote:
> Hi Prema ,
>                    I have already used the npoints function and blasted
away
> 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
predefined
> 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
simply use
>> $NPT to return the point count?
>>
>> Cheers,
>> Prema
>>
>>
>> 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
at the
>>> sop level into a pop network as I want to use that to emit
particles in
>>>       
>> my
>>     
>>> birth tab
>>>
>>>
>>> Kind regards Rob
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>>       
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
>>     
>
>
>
>   
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



      


More information about the Sidefx-houdini-list mailing list