View Full Version : Precise control over particle emission interval

04 April 2008, 09:15 PM
I'm trying to emit particles from an object into a very regular pattern, by moving the object and emitting the particles with no velocity.

One of the problems I keep running into is that Maya doesn't seem to emit the particles at any specific point in time.

If I have a 30FPS maya file and I set the emitter to emit 30 particles per second and then move my emission object 30 units, I would think I'd get an evenly spaced set of particles reflecting where the object was at each frame.

However, it seems that Maya emits particles in between frames, and so I get particles at random positions where the object passed between the frames.

Is there any way to either tell maya to only emit a particle on a frame, or to have maya wait for some trigger before it emits a particle?

04 April 2008, 05:56 PM
Anyone have any input on this?

04 April 2008, 06:20 PM
If you need exact control you could create your particles with a script or expression. Here is an example of MEL to make a particle grid.

string $particleCommand = "particle ";

for ($i=0; $i<10; $i++) {
for ($j=0; $j<10; $j++) {
$particleCommand += " -p ";
$particleCommand += $i;
$particleCommand += " ";
$particleCommand += $j;
$particleCommand += " 0";

eval( $particleCommand );

With an expression on world position you could set the position after each particle is emitted.

04 April 2008, 07:00 PM
Hey Stev,

Thanks for the reply. What I really need is precise control of When the particles are emitted, not where.Is there any way to modify that expression to make it execute over a period of time, so it only emits on each frame?

04 April 2008, 11:45 PM
Not that I know of.


05 May 2008, 12:32 AM
Well, thanks anyway Stev. Anyone else have any ideas?

How about if I wrote an expression that duplicates the item I wanted to instance based on the position of a locator, do expressions execute only on every frame?

05 May 2008, 03:50 AM
yes they do. but you could increase your sub frame count by decreasing the playback number in your preferences. Or by increasing oversamples in the solvers -> edit over sampling or caching settings.

i found also that if you use a directional or omni emitter even as an 'object' emitter and not surface, it will respect the frame rate you have. ie i set mine to 24 and got one particle per vertex at each frame.

hope that helps

05 May 2008, 11:30 PM
Hey Phil, yep, talked to Autodesk, oversampling fixes the problem.

I guess if the oversampling is too low, it just sort of guesses when the particle is supposed to be emitted. Anyway, that makes my life a lot simpler. Thanks for the help.

05 May 2008, 12:12 PM
I guess if the oversampling is too low, it just sort of guesses when the particle is supposed to be emitted. Anyway, that makes my life a lot simpler. Thanks for the help.

that's correct, from Maya Help:

Over Samples

Specifies the number of sub-steps for each frame of your dynamics simulation. A value of 1 sets no oversampling. A value of greater than 1 causes Maya to oversample your dynamics simulations by the specified value. You can use any arbitrary value for Over Samples, as long as it is a positive integer. See dynGlobals.

You can often fix excessive dynamics behavior by increasing the oversampling of your dynamic calculations. Increasing oversampling slows down playback but increases the stability of your dynamics.

I got the same issue a few days a go, and even create a thread about it ( where i found a sort of patch to make it, but this is the propper solution.

CGTalk Moderation
05 May 2008, 12:12 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.