maya shader that blends with light direction


#1

Im trying to create a planet shader where areas that are illuminated by a directional light show one material, and the areas not illuminated use a different material (Day/night).

I’m using vray. I’ve been trying all sorts of combinations with the blendColors, lightDirection, SampleInfo, Surf.Luminance nodes with no luck.

Ideally, I’d like to have a shader that will actively blend between the Day and Night materials depending on the angle the light hits the surface. The only other method I can think of to at least show the blending is to do it in post, but wheres the challenge in that? :smiley:


#2

Can you use the outColor from a white lambert shader to use as the blend?

Simon


#3

To connect the outColor of the lambert to the blend factor, you’d first have to use an RGBtoLuminance to convert it to a single value. Even so, it would work exactly the same as the blend factor by itself (white 1, black 0)

What I need is something that would sample the surface luminance and use that value to control the blend.

…Just after writing that, I tried the Surf.Luminance node using the default connection, and it works! Apparently the effect doesnt show in IPR rendering. Heres a successful test image of the blend from day to night:

Thanks for the response though. Good team work! :beer:


#4

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.