PDA

View Full Version : Particle birth


nph_assassin
01-07-2007, 06:14 PM
Is there a way to control particle birth other than using start and end times. I want one particle to be born every time I move an object on a path from 0 to 100%.
Thx

Bobo
01-07-2007, 07:57 PM
Is there a way to control particle birth other than using start and end times. I want one particle to be born every time I move an object on a path from 0 to 100%.
Thx

Well, assuming we are talking about Particle Flow, you can animate the Birth Rate in any way imaginable - keyframes, scripted controller, expression controller... You can set the Start and End to the current animation segment and then control the birth using the rate. When the rate is 0, nothing will be born.

Alternatively, you can create a Birth Script and write your code there based on the path values of your object...

nph_assassin
01-07-2007, 09:28 PM
I don't know very much about particle systems and particle flow.. Is it possible to eliminate rate, start time, end time, and have one particle spawn when I need it to spawn? I'm trying to simulate the shell ejection from a pistol... everytime the slide goes back I need a shell to spawn and project away from the gun. I can't use start and end time because they spawn particles at a constant rate.. but the rate at which the person fires the gun is random.

I want to shoot off particles like this ( . are pauses)
- ....- - - ......- - - - .....- .....- - ....- - -... - -

not like this
- - - - - - - - - - - - - - - - - - - - - - - -

I tried wiring the rate of birth/spawn to my slide in many ways but I didn't get the desired results.

Can't I just make it so that every time I make a keyframe for PF source it creates one particle?

:sad:

Bobo
01-07-2007, 09:38 PM
An alternative approach would be to create dozens of Events, each with its own Birth operator, that have their own Start and End and deal with a single shot. You can then connect them to the same PF_Source emitter and send out the particles to the same next event to apply forces and other effects.
I usually use this approach when creating particle flows procedurally using scripting, but it might be an overkill to do by hand.

Animating the Rate to emit particles when you need them via keyframes or procedural controllers is really the #1 option here.

Bobo
01-07-2007, 09:42 PM
Once again, read what I said. The Rate is NOT constant. It is ANIMATABLE. You can keyframe it to emit particles when you want it and as many as you want, then set a key to 0 and nothing will happen. Or assign a Noise Controller and get completely random "shooting". Or a Wave controller and get some sine curve controlling what happens. Or a scripted or expression or wire or whatever controller that reacts to somethign else (like the angle of the trigger finger of the character holding the gun :)).

And then again, you can write your own scripted birth operator that does just what you want, when you want it. But you ignorred what I wrote ;)

The fact that you don't know PFlow well does not mean that my answer is not a valid solution...

nph_assassin
01-07-2007, 09:47 PM
Sorry, I didn't understand what you meant because I keyed in the rates to close and it looked as if the particles didn't stop flowing at all.
Thanks.

plejboy
01-08-2007, 05:03 PM
just gonna sneak in a little suggestion... bobo is ofcoarse correct in what he says but since i do very little scripting i would do it this way. It does not use your slider though but its one dynamic way of making this type of thing....

Just maka a pflow with ONE particle that is locked to the pflowIcon. then link the pflowIcon to the thing on the gun that snaps back. (dont know what its called.) then put a deflector at the end of the gun so that the pflowIcon passes through it. link the deflector to the gun. Make your ONLY particle spawn on every contact with the deflector and since the pflowIcon goes back and forth (producing TWO shells) just add a split amout with every 2nd particle so it kills every 2nd.... Could be a solution...
test movie:
http://www.mainframe.co.uk/people/Arvid/gun.mov
pflow flow:
http://www.mainframe.co.uk/people/Arvid/gun.gif

Bobo
01-08-2007, 05:47 PM
just gonna sneak in a little suggestion...

Now this is a very creative solution!
[ Borat ] I LIIIKE! IT'S NIIIICE! :thumbsup:[ /Borat]

nph_assassin
01-14-2007, 07:24 PM
just gonna sneak in a little suggestion... bobo is ofcoarse correct in what he says but since i do very little scripting i would do it this way. It does not use your slider though but its one dynamic way of making this type of thing....

Just maka a pflow with ONE particle that is locked to the pflowIcon. then link the pflowIcon to the thing on the gun that snaps back. (dont know what its called.) then put a deflector at the end of the gun so that the pflowIcon passes through it. link the deflector to the gun. Make your ONLY particle spawn on every contact with the deflector and since the pflowIcon goes back and forth (producing TWO shells) just add a split amout with every 2nd particle so it kills every 2nd.... Could be a solution...
test movie:
http://www.mainframe.co.uk/people/Arvid/gun.mov
pflow flow:
http://www.mainframe.co.uk/people/Arvid/gun.gif


Thanks that works but there is one problem. When I attach the gun to the bone of my rigged character the pflow stops working and becomes extremely laggy. Shells wont eject even though its passing the deflector...

The gun setup is similar to what you had. It can be seen in this video.
http://www.youtube.com/watch?v=Hqc6yWBH0gc

Plejboy attach your gun to a box and animate the shells ejecting.. then animate the box moving down while the shells are ejecting and you should see what im talking about.

nph_assassin
01-14-2007, 07:28 PM
Never mind you just have to add "lock on emitter".

CGTalk Moderation
01-14-2007, 07:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.