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

Timothy Stam timothystam at hotmail.com
Sun Mar 20 12:45:06 EDT 2016


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
 		 	   		  


More information about the Sidefx-houdini-list mailing list