Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Dynamics / No particles collision in the first second...
  RSS 2.0 ATOM  

No particles collision in the first second...
Rate this thread
 
38806
 
Permlink of this thread  
avatar
  • Total Posts: 7
  • Joined: 25 November 2006 05:40 AM

Hello,

Want to write an expression (per particle) wich make no collision for each particle during its first second of life…
Can you help me ?

Alain



Replies: 0
avatar
  • THNKR
  • Posted: 18 January 2010 03:28 AM

You can do it if you create a non-colliding particle that dies when it has reached a certain age and then emits another particle from the same position and with the same velocity.

Here’s a run-time expression that does that:

if (particleShape1.age >= 1.0 ) {
 float $pos[] 
=  particleShape1.position;
 
float $vel[] =  particleShape1.velocity;

 print 
$pos;
 
// kill the particle
 
particleShape1.lifespanPP 0;
 
// emit the new particle
 
emit -object particle2 -position $pos[0] $pos[1] $pos[2] -attribute velocity -vectorValue $vel[0] $vel[1] $vel[2];
}

You’ll need to create a single particle so you have something to emit, and you also need to have the lifespan set to use lifespanPP.

Attachments seem to be broken again. Email me if you need an example michiel(at)thnkr.com



Replies: 0
avatar

Very great idea !

Thank you very much Michiel

Alain



Replies: 0
avatar

It works...but very slow....:-(

But, you give me THE IDEA :

This works much better :

Make the Trace Depth = 0 for the particle system, and write this :

if (particleShape1.age < 1)
{
particleShape1.traceDepthPP = 0;
}
else
{
particleShape1.traceDepthPP = 10;
}

Very good solution !!!

Thanks again, I found the solution with your help (for the use of particleShape1.age)

Alain



Replies: 0