nParticle trails starting too late?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

 
Thread Tools Display Modes
  03 March 2018
nParticle trails starting too late?

I have a nParticle system that follows a nurbs surface with a goalPP and a ramp to move up the U.
I want this particle system to leave a trail of particles behind it, so I made it an emitter.
Unfortunately, there seems to be a delay before emitting the trails which leaves a small gap between the emitting particle and the trail particles?

Does anyone know of a fix for this?

__________________
Richard Cheek
http://www.freelance-animation.com
Personal project : The Goblin Abyss
 
  04 April 2018
If you increase the emission per second amount, does that help?
__________________
Commodore 64 @ 1MHz
64KB RAM
1541 Floppy Drive


"Like stone we battle the wind... Beat down and strangle the rains..."
 
  04 April 2018
Hey Richard,

it seems to me like the position of the emitting particles is evaluated after the emission of the trail particles. You could revert the position of the emitting particles with an expression by the u value step they made. But this may result in wrong motion blur values.

I don't know a clean way to fix it, only workarounds. Sorry.

Another slow way would be to use the emit command in a runtime expression or interpolate the trail position random between the original position and the position of the emitting particle.

Cheers
 
  04 April 2018
Yes I think the only way is to use the emit command, however that also lets you do just about anything.
Here is a simple scene with one particle emitting into another with exactly uniform spacing of the particles:
particle_uniform_emit_particle.ma

In this the nParticle1 has an added per particle vector attribute "lastEmitPosition". This is require to get nice uniform spacing.

In the creation expression for nParticle1 we simply set:
lastEmitPosition = position;

The runtime after dynamics expression does the emission:

"
float $separationDistance = 0.05;
vector $p = nParticleShape1.position;
vector $lastP = nParticleShape1.lastEmitPosition;
vector $dif = $p-$lastP;
float $len = mag($dif);
int $count = $len/$separationDistance;
if( $count > 0 ){
string $cmd = "emit -o nParticle2"; // build an emit command string
int $i;
vector $step = $dif * $separationDistance/$len;
for( $i = 0; $i < $count; $i++ ){
$lastP += $step;
$cmd += ("-pos " + $lastP.x + " " + $lastP.y + " " + $lastP.z); // add the position to list of points to emit. Other lines could be added to set properties like velocity.
}
eval $cmd; // evaluate the command
lastEmitPosition = $lastP;
}
"

This is simply emitting a uniformly dotted line... one could easily add randomization to the position if desired. For example:
$lastP += $step * (0.5+ rand(1.0));

(instead of "$lastP += $step")
 
  04 April 2018
Did you increase your oversampling numbers? Usually it set to 1, you can increase it to larger numbers so it will evaluate your emission multiple times pre-sec. This shoud fix the gap between emissions.
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:50 PM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.