View Full Version : Shade Maya the way a Painter Thinks
jfrancis 05-25-2006, 05:41 AM Suppose I have a bright red flag and I want to shade it. The typical CG solution will give me a red flag with dark red shading.
An illustrator or painter won't settle for dark red shading. His creativity may tell him that the red flag would look good with deep purple shading.
How can we achieve this effect in Maya?
http://www.digitalartform.com/archives/images/render1_2.jpg
Our first attempt might be to make the fill light very purple. In practice, however, we find that purple light has almost no effect on a saturated red object since saturated red (1 0 0) times dark purple (.5 0 .5) only equals dark red (.5 0 0)
http://www.digitalartform.com/archives/images/render3.jpg
Our second attempt entails using not just a red flag, but a purple one too.
It's still not quite right.
http://www.digitalartform.com/archives/images/render4.jpg
Our final attempt succeeds when we use two textures, but divide the flag color by its own luminance to effectively remove the lighting.
details are here . . .
http://www.digitalartform.com/archives/2006/05/sophisticated_c.html
|
|
avinashlobo
05-25-2006, 07:13 AM
Just went through your open notebook. Some very useful information in there. Thank you very much. :thumbsup:
jfrancis
05-25-2006, 03:48 PM
Thank you . . . :)
tachy0n
05-25-2006, 04:19 PM
Wouldnt a ramp shader do the same thing and with more control ?
jfrancis
05-25-2006, 10:04 PM
Tell me more about what you mean.
pixlix2
05-26-2006, 01:10 AM
Hi,
thanks for the article and all your other notes in your notebook!
I wanted to ask if there is any advantage in using a lambert shader, with the color divided by it's own luminance, over just a standard surface shader?
Oh, and I believe tachy0n just wanted to point out that mayas built-in ramp shader can be used to map different shaders on an object based on it's surface brightness...
Nicool
05-26-2006, 04:19 PM
jfrancis thank you I like to see people demonstrating that default color transitions in 3d are bad! By default it goes from the selected color to a dirtering black.
> But, in my opinion, the use of a blend node isn't smart here. Why don't remap a ramp with the surface luminence directly ? Then you can blend more that two colors in one node only and see immediatly throught the ramp editor how the colors evolve.
Using the blend, I created a velvet shader wuite like you did (attached)
My two cents :thumbsup:
jfrancis
05-26-2006, 06:22 PM
I had blend nodes on my mind since I recently had to come up with a two-sided shader, and it seemed to be a good way to go.
http://www.digitalartform.com/archives/2006/05/maya_doubleside.html
I'll check out the ramp ideas. I'm always interested in learning new things.
jfrancis
05-26-2006, 06:26 PM
Hi,
thanks for the article and all your other notes in your notebook!
I wanted to ask if there is any advantage in using a lambert shader, with the color divided by it's own luminance, over just a standard surface shader?
I started with a Lambert because I assumed without verifying or testing my assumption that a surface shader would not respond to lighting and so would not supply varying surface luminance info.
I wanted the flag to look lit as if with lighting - I just wanted the color transitions to do something other than drop in luminosity toward black.
I'm not sure what a surface shader would do. I'll check it out.
Hi jfrancis!
I think a surface shader would respond correctly to light and supply the varying surface luminance you're looking for. And that way you would avoid a problem that maybe you didn't see: what about the spots where you get no luminance at all? I mean, the spots where you would be dividing by zero! If you have a spot that is totally unlit then you'll probably get an error.
If you still want to use that multiplyDivide node, maybe you should use something like a setRange utility between that and the surfaceLuminance node, just to make sure you avoid a zero value for the luminance.
Anyway... I think you have a good point in here. Sometimes you don't want to have your shaders fading to black in unlit areas, but maybe to purple, let's say. Is not that an artist wouldn't want a shaded object. We know how important lighting is and we surely want our objects to be shaded! But a hue change where the objects get darker sure sets a good mood! ;)
Kako.
jfrancis
05-28-2006, 06:07 AM
It's true; you do need to catch zero luminance. I found an ambient light with a timy value sets a floor to luminance.
Here's a completely other way I came up with to get a hue change when the light falls off --
http://www.digitalartform.com/archives/images/hueFalloffDemo.jpg
http://www.digitalartform.com/archives/images/hueFalloffNetwork.jpg
http://www.digitalartform.com/archives/2005/08/hue_falloff_in.html
floze
05-28-2006, 04:27 PM
Try to use the ramp shader with color input set to brightness. It does the exact same thing with more control and tons of other gadgets in one single node.
I dont want to bash your effort here, that's the last thing I want to do because I know how much effort it does take to get where you are. But with the ramp shader it's really all obsolete imho.
jfrancis
05-28-2006, 04:56 PM
I took a look at it; I suppose you're right.
If I'm using it correctly, it seems a little buggy, but I'm glad they are making moves in this direction.
http://www.digitalartform.com/archives/images/whiteBugRampShader.jpg
...and it puts the color transition onto the object, as I did with the flag example above.
One (to my mind) interesting thing about my second approach is that it puts the hue falloff into the light. You could argue that such color effects belong with the shader and not the light, but I like a variety of tools.
The nice thing about a new kind of light is that you can see what effect the hue falloff has on a pre-existing scene without completely reworking all the surface shaders already in place.
CGTalk Moderation
05-28-2006, 04:56 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.