PDA

View Full Version : Shader that uses only one light to produce specular highlight


Soviut
05-11-2009, 10:08 PM
I'm trying to create a shader for an eye that uses all lights in a scene to illuminate and colour itself, but I'd like to allow only a single key light to control the specular highlight. This is so I can move the specular highlight if its positioned wrong and generally compose the highlight.

Can this be accomplished with a shader? Initially I tried to use closestPointOnMesh nodes to use the light's relative position to try and shift the UV coordinates of a ramp on the eye, faking the specular highlight. But it was inconsistent and prone to wrapping and warping.

I'm thinking that perhaps treating all other lights as though they were contributing to a lambert and then mixing that with a phone for the key light might be possible, but I'm not sure how.

CGTalk Moderation
05-11-2009, 10:08 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.