[Sidefx-houdini-list] Procedural primitive group deletion

Rick Fuentealba ricardof at gmail.com
Wed Feb 18 19:13:59 EST 2009


Thanks guys, this is exactly what I was looking for!

On Wed, Feb 18, 2009 at 3:36 PM, Antoine Durr <antoine at floqfx.com> wrote:
>
> On Feb 18, 2009, at 3:23 PM, eetu at iki.fi wrote:
>
>> Or, just put a Delete SOP inside the foreach loop, with expression
>> set to
>> nprims("../each1") < 20   :)
>
> Yeah, I guess that would be a whole bunch easier, wouldn't it!
>
> -- Antoine
>
>>
>> (Only the current group's geometry exists inside each loop iteration)
>>
>> eetu.
>>
>>
>>> I would add a prim float attribute to the whole geometry, set it to
>>> 1.0; then do a foreach SOP, go by groups; attribpromote that float
>>> prim attribute to a detail attribute, using 'sum', which will add up
>>> all the 1.0's and give you your prim count in that chunk; then delete
>>> the whole thing if below threshold before delivering it to the
>>> 'foreach'.
>>>
>>> I was also thinking about another approach involving the hasprim()
>>> and primlist() functions, e.g. args(primlist("../previousSOP",
>>> pieces_0)) would give you the prim count of pieces_0, but I couldn't
>>> think of a way to get an answer to "if I am primitive 4, how do I get
>>> the answer to 'what group am I in'".  If I could, i.e. if I knew that
>>> primitive 4 was in pieces_3, then you could do the args(primlist
>>> ()) gag.
>>>
>>> -- Antoine
>>>
>>> On Feb 18, 2009, at 2:50 PM, Rick Fuentealba wrote:
>>>
>>>> Hey gang,
>>>>
>>>> I'm looking for a way to delete primitive groups that have a
>>>> specified
>>>> number of primitives in the group.
>>>> For example:
>>>>
>>>> 10 Primitive Groups:
>>>>    114 primitives in pieces_0
>>>>     88 primitives in pieces_1
>>>>     50 primitives in pieces_2
>>>>     27 primitives in pieces_3
>>>>    141 primitives in pieces_4
>>>>      8 primitives in pieces_5
>>>>    117 primitives in pieces_6
>>>>    160 primitives in pieces_8
>>>>      2 primitives in pieces_7
>>>>    129 primitives in pieces_9
>>>>
>>>> So now say I want to have the the groups with less than 10
>>>> primitives
>>>> deleted, in this case 5 and 7.
>>>>
>>>> Anyone have a method for this?
>>>>
>>>> Thanks,
>>>> Rick
>>>> _______________________________________________
>>>> Sidefx-houdini-list mailing list
>>>> Sidefx-houdini-list at sidefx.com
>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>> -- Antoine
>>>
>>> Antoine Durr
>>> Floq FX Inc.
>>> 10659 Cranks Rd.
>>> Culver City, CA 90230
>>> 310/430-2473
>>>
>>>
>>> _______________________________________________
>>> 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
>
> -- Antoine
>
> Antoine Durr
> Floq FX Inc.
> 10659 Cranks Rd.
> Culver City, CA 90230
> 310/430-2473
>
>
> _______________________________________________
> 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