particle collision radius over time

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  10 October 2012
particle collision radius over time

Hey guys, I have a pretty simple concept I need to execute but I feel as though the solution is a bit tougher than I initially thought.

I have a ball bouncing across a polyPlane and upon each collision the ball emits particles. Here's the line of code I've got running the sim:

if (rigidBody1.contactCount > 0) { string $cp[] = `rigidBody -q -cp rigidBody1`;

int $i;

for ($i = 0;$i < size($cp);$i++) {

eval ("emit -object particle1 -pos " + $cp[$i]);

}

}


Upon each collision I need the particles to grow over time, enhancing the effect of dust rising after being displaced. It's easy on the first collision, that's just a matter of keying frames. But when it comes to the particles increasing their radius over time upon each separate collision, I'm drawing a blank.

Anyone know how I can connect the above line of code to the radius of the emitted particles?

Thanks in advance!

-max
 
  10 October 2012
Well what you really want to do is to have an expression for the Per Particle Array Attributes that increases the size of the particle over time starting with it's birth.


So if the attribute you are anmating is radiius then you need to add the radiusPP attribute and then add this expression to it's runtime before dynamics

particleShape1.radiusPP=particleShape1.radiusPP+.1

when the particle is born this will increment it's size by .1 at each frame.

you can also do this using a ramp
__________________
blah blah blah
 
  10 October 2012
Worked like a charm!!

Thanks man, much appreciated

-max
 
  10 October 2012
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed 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 05:25 PM.


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