View Full Version : particle emission based on surface luminance...


RhythmOfLine
09 September 2008, 04:51 PM
hey guys...

so i basically need to emit particles based on surface luminance. i got two options:

1. bake the lighting as a texture and use it as texture rate(works perfectly)
2. bake the lighting info as color(prelight), loop through the vertices, find out
if the illumination at that vertex is 1 or 0(or a specific intensity), if it is then put
a particle on that vertex and emit particles from those particles.

well, this is what I got so far:

string $selectedPoints[] = `ls -sl -flatten`;
string $currentPoint;
float $pointPosition[];

for ($currentPoint in $selectedPoints)
{ float $colorAtVert[] = `polyColorPerVertex -q -rgb`;
if($colorAtVert[0] == 1)
{
$pointPosition = `pointPosition -w $currentPoint`;
particle -p $pointPosition[0] $pointPosition[1] $pointPosition[2] -c 1;
}
}

my questions are:

1. does prelight bake in the lighting info as RGB? because thats what I queried. and I only queried one element of the array.
2. how do you query all of them in one line? in fact, better yet, is there a way to get the intensity or tolenrance of the light instead of getting only 0 0 0 and 1 1 1 which polyColorPerVertex command returns?
3. how to make each particle follow every vertex where it took birth so I can use the emit command to emit particles from those particles? i have never goaled individual particles to individual vertices.

thanks for all your help in advance, it is much appreciated! :)

cheers,
SD

CGTalk Moderation
09 September 2008, 04:51 PM
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.


1