View Full Version : Color-Pick channel to scaler value

09 September 2007, 09:17 PM
I am making an expression to drive the y transform of on object with the average color of an image.
I have a gray image that ranges from .624 - .645 +\-
Render tree: Image lookup --> pick channel (red) --> scaler2color.....

I am drag&dropping the input node of the scaler2color to the expression editor, it validates, but always gives a value of .5

Any help would be appreciated.


09 September 2007, 11:05 PM
Rendertree nodes are mentalray shaders. They don't evaluate outside a render and AFAIK you cant use their output to control scene objects.

To control an object based on an image, you can create a SCOP and use GetPixel()/GetPixelArray() Try the SDK manual for details.

09 September 2007, 11:58 PM
Thanks tachyOn,

Thats exactly what I needed, I've worked all weekend trying to get it with vector states, savestates, etc. But this is what I pain no gain!

CGTalk Moderation
09 September 2007, 11:58 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.