PDA

View Full Version : colorAtPoint help


Shankar
05-12-2010, 06:41 AM
Hello Friends,
I am trying to get the color of the particle [rgbPP] from the ground Texture. My ground is polygon Mesh. The texture of the ground is animated [ planar Projection]. I tried using the closestPoinMesh which is connected to the ground. Next I tried to query the color of the ground using colorAtPoint and particle position. I am not getting it right

Thanks in advance
-Sankar

ruchitinfushion
05-12-2010, 06:51 AM
collect the X & Z position & store in $posU & $posV
float $col[]=`colorAtPoint -o RGBA -u $posU -v $posV shader or tex name`;
now capture $col[0] for Red,$col[1] for green,$col[2] for Blue & $col[3] for Alpha.

Shankar
05-13-2010, 01:57 AM
Thanks for your help Ruchit.
yes it does works !

-Sankar

CGTalk Moderation
05-13-2010, 01:57 AM
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.