oglop

06-30-2005, 01:59 AM

in

FLOW WORKFLOWS

SIGGRAPH Masters of Maya seminar July 2003

Presentation Outline

SIGGRAPH 2003

Tom Kluyskens

Example2

I just can't tell what is the math behind the most tricky lines of expression,anybody kind enough can give me a hint where or in which field can i get the philosophy behind the "key" expression?As i am in China here(not so many seasoned veterans,i guess the expression has something to do with wave physics,or damping functions in math?)

he created particle collision event and stored the collision data in a vector array

global int $dropCount;

global vector $collisionData[];

if (collisionU != -1) {

$collisionData[size($collisionData)] = << collisionU, collisionV, frame>>;

lifespanPP = 0;

$dropCount++;

}

and then considering the distance between collision point and time factor

global vector $collisionData[];

if (frame<2) clear $collisionData;

int $i;

float $amplitude;

float $totalAmplitude = 0;

// control variables

float $frequency=100;

float $decay=4;

float $timeDecay=.01;

float $ampMult = .5;

float $speed = .25;

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

vector $data = $collisionData[$i];

float $tdist = (frame-($data.z))*$speed;

float $dist = mag(<<si.uCoord,si.vCoord,0>> - <<($data.x),($data.y),0>>);

float $x = ($dist*$frequency - $tdist);

$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

$totalAmplitude += $amplitude;

}

rippleRamp.vCoord = clamp(0,1,$totalAmplitude*$ampMult);

and here comes the question,what the heck are these two lines doing?

float $x = ($dist*$frequency - $tdist);

$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

Albeit i am not a bachelor of math or something else associated,at least the eager of getting the lore of TD will always not change.By the way,i got my BS degree on Biochemistry and Molecular Biology,so i think i have the ability to find what i want if anyone gives me hint.any hint will be greatly appreciated.thanks in advance.

Already searched the forum and googled,but no results.I even wrote to the author sometime ago,but maybe he was busy doing something and who knows.so bear my poor english,dunno if i made myself clear.Anyway that's it.Hope u savvies give me a hand,really appreciate it.

FLOW WORKFLOWS

SIGGRAPH Masters of Maya seminar July 2003

Presentation Outline

SIGGRAPH 2003

Tom Kluyskens

Example2

I just can't tell what is the math behind the most tricky lines of expression,anybody kind enough can give me a hint where or in which field can i get the philosophy behind the "key" expression?As i am in China here(not so many seasoned veterans,i guess the expression has something to do with wave physics,or damping functions in math?)

he created particle collision event and stored the collision data in a vector array

global int $dropCount;

global vector $collisionData[];

if (collisionU != -1) {

$collisionData[size($collisionData)] = << collisionU, collisionV, frame>>;

lifespanPP = 0;

$dropCount++;

}

and then considering the distance between collision point and time factor

global vector $collisionData[];

if (frame<2) clear $collisionData;

int $i;

float $amplitude;

float $totalAmplitude = 0;

// control variables

float $frequency=100;

float $decay=4;

float $timeDecay=.01;

float $ampMult = .5;

float $speed = .25;

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

vector $data = $collisionData[$i];

float $tdist = (frame-($data.z))*$speed;

float $dist = mag(<<si.uCoord,si.vCoord,0>> - <<($data.x),($data.y),0>>);

float $x = ($dist*$frequency - $tdist);

$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

$totalAmplitude += $amplitude;

}

rippleRamp.vCoord = clamp(0,1,$totalAmplitude*$ampMult);

and here comes the question,what the heck are these two lines doing?

float $x = ($dist*$frequency - $tdist);

$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

Albeit i am not a bachelor of math or something else associated,at least the eager of getting the lore of TD will always not change.By the way,i got my BS degree on Biochemistry and Molecular Biology,so i think i have the ability to find what i want if anyone gives me hint.any hint will be greatly appreciated.thanks in advance.

Already searched the forum and googled,but no results.I even wrote to the author sometime ago,but maybe he was busy doing something and who knows.so bear my poor english,dunno if i made myself clear.Anyway that's it.Hope u savvies give me a hand,really appreciate it.