PDA

View Full Version : how?: Occlusion map affecting only ambient light.



tudor
11-15-2007, 07:07 AM
Hey!

how would you go about making the baked occlusion map affecting only how much the ambient light affects that part without affecting normal lights such as point or spotlights?

Let me explain why I want this effect:
Say we have a tunnel where you also see the outside the tunnel.
If I bake this the inside of the tunnel will go almost black as it should.
Now, when I apply the baked map to the object I can apply it in a few different ways: luminosity map, diffuse or color. Each of these methods give some disadvantage.
color and diffuse means that the entire color texture gets darker. If I take a spotlight and light the darker areas, they will never get really bright as the base color is too dark.
luminosity. works pretty good apart from that now the ambient light is not really used at all. Setting up follower or whatever to control luminosity values for every material in the scene is tedious (so the ambient light intensity can be adjusted easily).

Now, if the baked map just controls how much the ambient light affects the surface we have proper ambient occlusion just like the name says. Just the ambient light is occluded.

Can this be done and how?

tischbein3
11-15-2007, 12:27 PM
Well the obvious solution (or I missed something, wich propably could be,today):

Setup a default surface with ambient occlusion into the diffuxe channel and a
white color channel. Copy it to all other surfaces and turn off all lights affecting diffuse, et voilą: ambient only.
(sounds harder than it actually is.)

(BTW this is defintive one of those surfaces wich should go into your personal preset collection for future use... )

G M D THREE
11-15-2007, 12:28 PM
I would bake radiosity instead of using a occlusion shader. This way in takes your lights into consideration.

Just my 5¢.

///

tudor
11-15-2007, 12:48 PM
GMD three: Well. I do bake radiosity normally. I just got into the thinking of ambient occlusion.

isschbein3: Using the diffuse shader is not an option for me as I cannot light the surface properly with for example a spotlight if the diffuse shader is used.

The closest thing to what I want is to apply the baked map to the luminosity channel and using the texture value to mimic the ambient light setting. It is however tedious to do that on all surfaces.

What I want is a solution where I can bake the GI and still have the whole scene react to animated lights and at the same time have the option to easily adjust the ambient light value.

gerardstrada
01-15-2008, 02:51 PM
Hey!

how would you go about making the baked occlusion map affecting only how much the ambient light affects that part without affecting normal lights such as point or spotlights?

Let me explain why I want this effect:
Say we have a tunnel where you also see the outside the tunnel.
If I bake this the inside of the tunnel will go almost black as it should.
Now, when I apply the baked map to the object I can apply it in a few different ways: luminosity map, diffuse or color. Each of these methods give some disadvantage.
color and diffuse means that the entire color texture gets darker. If I take a spotlight and light the darker areas, they will never get really bright as the base color is too dark.
luminosity. works pretty good apart from that now the ambient light is not really used at all. Setting up follower or whatever to control luminosity values for every material in the scene is tedious (so the ambient light intensity can be adjusted easily).

Now, if the baked map just controls how much the ambient light affects the surface we have proper ambient occlusion just like the name says. Just the ambient light is occluded.

Can this be done and how?

You can have more control if you use diffuse shading instead. You can mix a diffuse shading model with your AO map. If you use multiply, you get the effect you are describing, but we can also use screen or additive blending mode, which adds diffuse component to the AO map (or vice versa). I guess you want this last option. If you are referring to separate the ambient effect from the occlusion effect, that's other history, but possible as well.



Gerardo