PDA

View Full Version : Dirtmap: Deepen Shadows Only?


chriswaner
09-17-2004, 03:56 PM
Hey All,

I'm currently using the Dirtmap Shader for single pass ambient occlusion on my scene; I have one directional light with shadows turned on. I need to know if there is a way to darken these shadows and add a blue violet color to it. Presently, with the settings that look right for the rest of the scene, the shadows come out just a little to light, and when the shadow color is not set to black (ie set to violet), the shadows are even less intense. Is there a way to do darken and intensify the shadows with the dirtmap shader without using passes and compositing later.

Visuals:

Trying to make this (straight out of Maya):

http://www.freewebs.com/chriswaner/Tests/comp02.jpg

Look like this (composited with passes):

http://www.freewebs.com/chriswaner/Tests/comp01.jpg

In one beauty pass.

Thanks,

Chris

Jozvex
09-18-2004, 01:33 AM
You can use a negative value for the dirt colour! Set it to the colour you want, then in HSV mode set the Value to something like -0.5.

chriswaner
09-18-2004, 03:26 PM
Jozvex (http://cgtalk.com/member.php?u=3127)

That worked great for the actual dirt shadows! Now I need to extend the same colorization to the rest of the directional light shadow. I've started on a method of doing this based upon the negative value idea that you presented. I have one directional light (the sun) and a second directional light mirroring the sun which has a negative intensity value and the correct shadow color. However that second directional light illuminates the entire scene. Is there a way to limit the illumination of the second directional light to only the shadow areas of the first (sun) directional light?

Visuals:

This is an example pic with just one directional light (sun) and dirtmap:

http://www.freewebs.com/chriswaner/Tests/comp03.jpg

This is the same view with the first (sun) and second (blue) directional light and dirtmap:

http://www.freewebs.com/chriswaner/Tests/comp04.jpg

To recap: is there a way to limit the illumination of the blue directional light to the shadows of the sun directional light?

Any ideas from anyone are greatly appreciated.

Thanks

Chris

Jozvex
09-18-2004, 10:21 PM
Well this might be a silly suggestion, but why not just use a negative blue coloured shadow for the first sun light?

chriswaner
09-19-2004, 04:11 AM
Hehehe....not a silly suggestion at all. Sometimes I over think things a bit, or maybe I get too close to see the obvious. It works like a charm. Let me pose one more thing: the side of objects away from the light do not get the color of the shadow. Why? Is there an attribute, node, or other method that would insure that all the sides of objects opposite the light get at least a bit of that color--I'm talking about on the objects that cast shadows not the shadows themselves?

BTW, Jozvex, your help has been invaluable. Thanks.

Chris

Jozvex
09-19-2004, 11:57 PM
the side of objects away from the light do not get the color of the shadow. Why? Is there an attribute, node, or other method that would insure that all the sides of objects opposite the light get at least a bit of that color

Well you're right about that, the side of the object in shadow doesn't turn blue. I think this is somewhat the case in real life too! If I shine a red spotlight on something in an otherwise normally lit room, the redness will only wrap so far around the object. In fact the shadow wouldn't be red either because the shadow is just a lack of the red light.

However in your case with the blue shadow, what that's really representing I guess is the ambient blue-ish light from the sky. We faked that by simply turning the shadow blue. In order to shade the shadow side of the object blue, the best idea would be to use a blue fill light I think.

You could use a Blend Colors node and plug your shaders colour into one slot, then dark blue into the other, then use a Surface Luminance node as the input into the Blender attribute, that would shade the object more blue the less light it recieved. However you'd have to do that for every shader you need affected.

chriswaner
09-20-2004, 04:09 AM
Success! I used the surface illumination with the color blend node (along with some other elements that were necessary to perfect the effect) and it is precisely what I'm going for. This information is not just floating around on the internet--I've looked. Lighting is not my mainstay, so when my animation is complete, I'd like to give you, Jozvex, credit for your help--as a matter of personal respect for your work and as a matter of academic integrity. I'd like to use your name, so if you would not mind emailing me your name, I'd greatly appreciate it. If I don't hear from you, I'll simply credit your handle.

Thanks again,

Chris
chriswaner@hotmail.com

CGTalk Moderation
01-19-2006, 07:00 AM
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.