Hello again. I'm using maya's default ocean. I would like to know how I go about expressions so that I can emit particles where foam is.
thank you.
B
Page 1 of 1
Splashing particles where foam is Maya
#2
Posted 12 February 2010 - 11:03 AM
foam is normally white so you can use 'colorAtPoint' function to get color data from the ocean shader..
vector $myPos = particleShape1.position;
float $px = $myPos.x;
float $pz = $myPos.z;
float $colorInfo[] = `colorAtPoint -o RGB -u $px -v $pz oceanShader1`;
use $colorInfo[0],$colorInfo[1],$colorInfo[2] in a conditional statement to determine where are white areas(foam). <<1,1,1>> is white so I would find points where the data is higher than 0.6 or something like that.
then emit particles from there.
vector $myPos = particleShape1.position;
float $px = $myPos.x;
float $pz = $myPos.z;
float $colorInfo[] = `colorAtPoint -o RGB -u $px -v $pz oceanShader1`;
use $colorInfo[0],$colorInfo[1],$colorInfo[2] in a conditional statement to determine where are white areas(foam). <<1,1,1>> is white so I would find points where the data is higher than 0.6 or something like that.
then emit particles from there.
~ houdini fan ~
Page 1 of 1







MultiQuote
