Lee, Andrew Hickinbottom (3D) Tank Girl, Pedro Conti (2D)

View Full Version : getting luminance at point?

05-04-2006, 03:32 PM
There is a command called colorAtPoint that does a pretty good job of grabbing the color of a specific point based on an objects proximity. However, is there one for Luminance? I have not been able to find a command to do so, or .. is there a way to get the Luminance value from the RGB value? Better yet, is there a command that will do something similar, like .. luminanceAtPoint ?? (not that I've found in the docs) ...

Also, colorAtPoint only works at the base texture. Meaning, if I try to use a RGB->Luminance utility node through a ramp (like RGB->HSV) and then sample that new ramp, it will not work... It has to be done (from what I've found) at the base texture level as well ...



05-05-2006, 12:47 AM
searching google for "rgb luminance" yields a site withRGB Luminance value = 0.3 R + 0.59 G + 0.11 BThat's the generally accepted weight of the channels in luminance. Just plug your variables into that formula after using colorAtPoint.

CGTalk Moderation
05-05-2006, 12:47 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.