Sophisticated Control over Hue In Maya Shading

| 8 Comments

It's hard to light highly saturated colored objects in a sophisticated manner, even when (and one might say especially when) using saturated light.

Suppose I have a bright red flag. Further suppose I wish its shaded areas to fall into a rich dark purple.

Easier said than done.

render1_2.jpg

My first attempt might entail filling the dark areas of my waving red flag with a saturated purple light. As you can see from the images above, saturated purple light has no effect on a saturated red object because saturated red (1 0 0) times dark purple (.5 0 .5) only equals dark red (.5 0 0)

What I need to do is use the lighting of the flag as a matte into another texture map - a purple one.

twoFlags.jpg

First a create a second texture map in a deep rich purple.

shaderNetwork_v1.jpg

Next I use surface luminance to control a blend between the red and purple flag textures.

render3.jpg

It's not a bad idea. The only problem is Maya continues to LIGHT the flag. See how dark the shaded area still is? I don't want that effect.

shaderNetwork_v2.jpg

I compensate for the lighting by DIVIDING the object's color by its own luminance. This effectively turns the Lambert lighting into a surface shader.

render4.jpg

Ah, that's more like it! See how nice and purple the shaded region is? It's not just a darker version of the red flag; it's a whole other hue. Very painterly. Not at all CG-ish.

UPDATE 5/29/2006

If this line of thinking interests you, be sure to explore Maya's Ramp Shader, which addresses the issue of hue falloff in CG lighting.

8 Comments

For you who is often taking screen shots for your tips articles, I'd like to advice you to use SLIBER. I press ALT+F2 and a screenshot that I crop is saved. Wonder full tool : http://www.sliber.com/

I'll check it out; thanks!

Joseph,

I found this article from the APA forums...I am a board member of the LA chapter.

After reading this article regarding the "Flag", I was a bit confused as to why all the trouble...could have just cut and pasted into another layer the shady part or just larger then that and used Selective color to change the black to the color needed. Then add a black mask and just paint in the areas of the flag...and perhaps throw a "Curve" afterward. Now your article may be over-my-head in experience, but I'm not sure. You caught my eye with the APA response regarding the 645...I use to know all that stuff.
Anyhow, let me know if I am on the right track.
Thanks,
Ken

excelent, thanks for the tutorial!!!

Hi, thanks for writing, Ken,

You could do what you're describing if you were working on a single image in Photoshop. What I'm describing is for motion graphics where the lighting effect is coming from synthetic 3D lights, and there may be many other flags of different colors, and the whole thing has to work in motion. In that case, it's easier to do this stuff as part of the recipe that generates the animation frames, rather than as a post-process during compositing.

Zamolxes, thanks for writing. I checked out your own blog, at http://mustec.bgsu.edu/~virgil/ -- very good.

I want to spend some time there, reading more in detail.

you could of also used a ramp with a surface shader, NO?

Yes. See my update of 5/29/2006 - the last line of the blog entry.

About this Entry

This page contains a single entry by published on May 24, 2006 9:56 PM.

Saturated Hues and RGB Color Space in Maya was the previous entry in this blog.

Maya Ramp Shader is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.