[Sidefx-houdini-list] Pop : Limit the number of particles

Larry Giunta larry at gcreativestudios.com
Fri Mar 25 12:24:53 EDT 2016


This is really great Timothy, 

Although I’m still trying to wrap my head around recreating some of the functionality from old pops.

If I try this method to birth just 10 particles it works great.
However, if I have 10 points scattered on a tube, I tend to get 2 particles birthing from one point … and then none from others.

If I jump down to Steve’s suggestion I can set up a delete SOP so I can feed one point at a time into the simulation.
Set emission type to “all points” and it does birth from each points in order. Half the battle.

However, since that only leaves “Impulse Activation” available I have not been able to have it birth just one particle per point.
It still wants to birth a stream at each point.

I’m need to explore Mike’s detail method further. The answer may lie there.

In my case I was trying to simulate a specific number of leaves falling off a branch.
Slowly, one at a time. So it’s essential to birth only one particle per point as they are introduced into the simulation.

Thanks, 
Larry


> On Mar 20, 2016, at 4:22 PM, Timothy Stam <timothystam at hotmail.com> wrote:
> 
> You're most welcome, glad I could help!
> 
>> Date: Sun, 20 Mar 2016 20:37:29 +0100
>> From: facialdeluxe at gmail.com
>> To: sidefx-houdini-list at sidefx.com
>> Subject: Re: [Sidefx-houdini-list] Pop : Limit the number of particles
>> 
>> Timothy it is working great !
>> The npoints just has to reference a Sop node after the Popnet.
>> If I reference the popnet itself it doesn't work.
>> if (npoints("/obj/geo1/popnet/") >= 167, 0, 1)
>> If I reference a Point Sop (point1) which comes after the Popnet it works !
>> if (npoints("/obj/geo1/point1/") >= 167, 0, 1)
>> And I can compare 2 different sop nodes !
>> if (npoints("/obj/geo1/point1/") >= npoints("/obj/geo1/sphere1/"), 0, 1)
>> 
>> Exactly what I was looking for ! Thank you Thimothy !
>> 
>> On Sun, Mar 20, 2016 at 5:45 PM, Timothy Stam <timothystam at hotmail.com>
>> wrote:
>> 
>>> Hi Olivier,
>>> You can use the following expression in the Impulse Activation parameter
>>> on the popsource node:
>>> if (npoints("/obj/grid/dopnet1/") >= 500, 0, 1)
>>> so, if the number of points in dopnet1 exceeds 500, parameter value is 0,
>>> else it is 1.
>>> You have to reference a SOP node - I think - because in DOPs we use
>>> particles, not points, where npoints() looks for points.When referencing
>>> any of the DOP nodes it won't work for me.
>>> This way it stops birthing as soon as I hit 500 particles.
>>> I hope this is what you were looking for.
>>> Cheers,
>>> Timothy Stam
>>> 
>>>> From: larry at gcreativestudios.com
>>>> Date: Sat, 19 Mar 2016 11:05:59 -0400
>>>> To: sidefx-houdini-list at sidefx.com
>>>> Subject: Re: [Sidefx-houdini-list] Pop : Limit the number of particles
>>>> 
>>>> Olivier,
>>>> 
>>>> It would be great if you can follow up on this if you do find a suitable
>>> solution.
>>>> 
>>>> I was just trying to tackle this a few months ago for a potential
>>> project.
>>>> I never quite got it working exactly as I needed …. but the project
>>> never happened either.
>>>> So I just moved on.
>>>> 
>>>> But it’s something I’ve had on the list to revisit because it has come
>>> up a few times now.
>>>> 
>>>> Good luck!
>>>> 
>>>> Larry
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On Mar 18, 2016, at 5:53 PM, Olivier Jeannel <facialdeluxe at gmail.com>
>>> wrote:
>>>>> 
>>>>> Hey Michael, thank you !
>>>>> I'll try your solution on monday (weird this is a Detail, I would have
>>> say
>>>>> "Point" in the first thought)
>>>>> I was thinking maybe also trying to work with particle states, but I'm
>>> not
>>>>> sure this (ice) feature exists in Houdini.
>>>>> 
>>>>> On Fri, Mar 18, 2016 at 10:40 PM, Michael Dunkley <mdunkley at gmail.com>
>>>>> wrote:
>>>>> 
>>>>>> Hey Olivier, the pop source node automatically attaches a detail
>>>>>> attribute, called "nextid", to pop geometry that describes which
>>>>>> particle id is next in line to be used.  It's technically possible to
>>>>>> reference this through expressions in your activation parameters.  So,
>>>>>> impulse activation could be (for instance):
>>>>>> 
>>>>>> detail("$DOPNET:popobject1/Geometry","nextid",0)<100
>>>>>> 
>>>>>> Note that you may have to change "popobject1" depending on what your
>>>>>> particle object is called.  popobject1 is the default name from the
>>>>>> shelf operations.
>>>>>> I suspect this is not a hundred percent solution, as that number would
>>>>>> only be updated between cooks.  If you're emitting very slowly, then
>>>>>> probably everything would be fine.  But if you're emitting 10000
>>>>>> particles on frame one, it would birth all 10000 particles, then stop
>>>>>> on the next frame (or substep) as "nextid" would then be 10001.  Might
>>>>>> work well for efficiency's sake in concert with Steven's delete
>>>>>> solution, so that you'd be both stopping emission and running cleanup.
>>>>>> 
>>>>>> mike
>>>>>> 
>>>>>> On Fri, Mar 18, 2016 at 5:10 PM, steven ong <steve_nong at pointy.tv>
>>> wrote:
>>>>>>> Hi Olivier,
>>>>>>> 
>>>>>>> The POP Kill is deleting the particles.
>>>>>>> 
>>>>>>> If you're trying to emit particles one after another, you have to
>>> either
>>>>>>> delete the points one by one in SOPs and set Emission Type to All
>>> Points.
>>>>>>> 
>>>>>>> However, in the old POPnet, you can put down a grid as a source and
>>> in
>>>>>> the
>>>>>>> Source POP with Emission Type as "Points(ordered)", set Constant
>>>>>> Emission to
>>>>>>> $FPS so now you'll get a particle per frame in the sequence of the
>>> point
>>>>>>> number order of the grid.
>>>>>>> 
>>>>>>> This functionality is missing from the new Source POP in DOPs. :(
>>>>>>> 
>>>>>>> Cheers!
>>>>>>> steven
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On 03/18/2016 13:55, Olivier Jeannel wrote:
>>>>>>>> 
>>>>>>>> Thank you François,
>>>>>>>> 
>>>>>>>> But then, in Pop, how do you do you have the particles to move one
>>> after
>>>>>>>> the other and not all at once ?
>>>>>>>> Thank you Steven,
>>>>>>>> It works very well ! But should I consider that it delete
>>> particles, or
>>>>>> is
>>>>>>>> the emission simply stopped ?
>>>>>>>> 
>>>>>>>> Thank's for your help :)
>>>>>>>> 
>>>>>>>> On Fri, Mar 18, 2016 at 9:47 PM, steven ong <steve_nong at pointy.tv>
>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Hi Olivier,
>>>>>>>>> 
>>>>>>>>> You can do this very easily with the old POPnet as there is a "Max
>>> # of
>>>>>>>>> Particles" parameters. If you don't need the new POPnet
>>> functionality,
>>>>>>>>> you
>>>>>>>>> can consider use the old version.
>>>>>>>>> 
>>>>>>>>> Else, in a Pop Kill, you can use the following expression under the
>>>>>> Rule
>>>>>>>>> tab:
>>>>>>>>> 
>>>>>>>>> if(@id>999)
>>>>>>>>>   dead=1;
>>>>>>>>> 
>>>>>>>>> That should limit the number of particles to 1000. Hope this helps.
>>>>>>>>> 
>>>>>>>>> Cheers!
>>>>>>>>> steven
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 03/18/2016 13:39, Olivier Jeannel wrote:
>>>>>>>>> 
>>>>>>>>>> Hi there,
>>>>>>>>>> A very simple noob question :
>>>>>>>>>> In  a Popnet, using a PopSource node, I'm using Impulse
>>> Activation and
>>>>>>>>>> Impulse Count.
>>>>>>>>>> I would like the emission to stop when a certain ptnum is reached.
>>>>>>>>>> I tried in Impulse Activation the following expression :
>>>>>>>>>> if (@id >100, 0, 1)
>>>>>>>>>> But no luck.
>>>>>>>>>> I'm sure I've seen it somewhere inside one of the 300 tutorials
>>> I've
>>>>>>>>>> watched but I'm too dumb to find it :/
>>>>>>>>>> 
>>>>>>>>>> Can someone give me the correct expression ?
>>>>>>>>>> 
>>>>>>>>>> Thank you :)
>>>>>>>>>> _______________________________________________
>>>>>>>>>> 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
>>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> 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
>>>> 
>>>> _______________________________________________
>>>> 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
> 		 	   		  
> _______________________________________________
> 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