Assistance with RGBPP animation

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  03 March 2013
Assistance with RGBPP animation

Hey guys,

I am stuck trying to animate the rgbpp of particles. Here is the situation:

I have a scene of floating particles that will have a pulsating brightness to them, like fireflies. I want to have "shockwave" pass through them and have the particles get brighter for a second once the shockwave hits them and then have them die back down to their original color and start pulsating again. I'm stuck with trying to wrap my head around how the whole Run After/Before Dynamics works since it is run per frame.

I guess that my confusion stems from these questions:

1. If MEL scripts are run per frame in "Run After/Before Dynamics" how can I pass variables to the next frame or keep certain variables throughout the timeline? Such as if I wanted a 'bool $glowing = true' when the the shockwave hits the particles and then pass that into an if statement that starts the dimming animation if $glowing=false. Or something to that extent?

2. How can I animate something like RGBPP over time like for 30 seconds have it dim down to its original color. I was able to make it animate from 1,1,1 to 0,0,0 over 30 frames in the below code but I cannot wrap my head around how to do anything else with it!

vector $rgb = Floating_bitsShape.rgbPP;
 float $subtracation = .033;
   if(Floating_bitsShape.inputForce[4] > 0)
   $rgb -= $subtracation;
   Floating_bitsShape.rgbPP = $rgb;

Any tips or tricks to point me in the right direction would be great. I've been scouring google for hours and have re-written my code numerous times. It used to be 20 lines or so when I thought the MEL script would hold onto the variables from frame to frame but that is no longer the case.

Thanks in advance and I look forward to learning from you!!
  03 March 2013
You can create your own per-particle attributes and store values in them. Then re-use those stored values on the next frame. And store the new result. And so on...

  03 March 2013
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
Society of Digital Artists

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

All times are GMT. The time now is 05:47 PM.

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