Is ambient occlusion broken?

Can anyone get Ambient occlusion in 2.5x to darken ambient shading.

As far as I’m concerned AO creates little pockets of darkness in corners of objects. This worked fine in 2.49 using “sub” and “both” modes. I’ve been told that multiply should do this but it doesn’t. Multiply only effects shading of lights in the scene not the ambient light.

  1. If you open the scene1 I’ve attached and render you will see what looks like AO between the balls. However this isn’t controlled by the ambient occlusion panel at all as you will notice AO is actually off. If you now try rendering it with occlusion on you see that it renders the same.

2 Open scene 2. This has a point light in it and AO is at factor 10 to see the issue clearly. Now render and you will notice that areas of darkness are created, but only based on the point light.

In other words, it seems that AO is only being calculated for scene lights rather than the ambient or environmental lights.

Does anyone agree or disagree?

Attachments

aotest.blend (450 KB)aotest1.blend (443 KB)

To me it looks like the problem lies in the environment light, it looks like that turns on AO regardless of what the AO panel says.

Thanks Sim, yes this is exactly what I think. It’s as if before the GUI was ready, the coder hardcoded the settings but then forgot to hook up the gui for environmental lighting.

EnvironmentLighting and Ambient Occlusion are basically the same thing. If you separate the layer into passes and look at AO and EnvLight you will see that they are exactly the same (except if you you set EnvLight to “sky color”, that will tint the pass). But with the sliders you can balance them better than before in 2.49b.
Basically light is added and Shadows are multiplied, that’s why EnvLight and AO give different results, even if they look the same.
I usually set AO to 1 and EnvLight to something around 0.75 or lower, that doesn’t overexpose the scene but still gives a nice ambient shading. When rendering daylight scenes you can set horizon color to yellow and zenith to blue, then set EnvLight from “white” to “sky color”, that gives a nice sun/sky shading.

https://img.skitch.com/20110103-p5biucfu473wt8i8er8msummgi.jpg

Thanks for the tips on the 2.5 AO setup, here is my scene.

However, it looks like 2.5 can not do shadows only. If I turn that on for the floor, the floor does disappear, but the shadows do too! In 2.49 this worked. In 2.5 is does not seem to.

Can anyone else get shadow only to work with this AO setup?

Attachments

25_shadow_only_fails.blend (578 KB)

The shadows seem to get blown out by the environment lighting.

@Atom try setting the material ambient to 0 and you’ll get some shadows -from lights-, or maybe change your point lamp into a sun… never got this right when compositing over a photo.
edit: darkening your sky colors so you can increase the enviroment lighting energy over 1 seems to work nicer on getting only shadows from occlusion…
edit2: an image here

I think most people are missing the point.

The AO factor is supposed to multiply the effect of the ambient occlusion. We can see this when we use a point light, it creates very dark areas based on that lights shading. But AO factor is having zero effect on the environmental light itself.

I’ve uploaded the an image to illustrate the issue. (Obviously I’ve exaggerated the AO multiply factor for the sake of clarity.)

The mouth best demonstrates the problem.
Notice on the bottom lip there is a very dark patch (this is the AO caused by the light in the scene).
Then see how it suddenly stops as it enters the mouth and it becomes light again. This is because Environment AO is not effected by the “AO factor” so it doesn’t match the lights AO.

Attachments


@liero: Thanks, turning down the ambient did the trick. 1.0 is a very dumb default ambient value.

The AO factor is supposed to multiply the effect of the ambient occlusion.

@tmcthree: The “multiply” is only the Blend mode of the AO result, it is not multiplying the factor. In my mind, the Factor is the multiplier whether you choose to Add or Multiply the result. There should also be a Subtract in that list. Something we lost that used to be in 2.49.

Yeah I agree about losing sub, but I was told by Markew that multiply does the job of sub, (he was nearly right it actually is closer to “both” but alas only for lights not ambient light)

edit, this is the thread that started it all http://blenderartists.org/forum/showthread.php?t=205940&p=1766082#post1766082

And yeah this area is absolutly strewn with awkward terminology. Ambient occlusion effects enviromental light not the ambient light and only by adding not actually occluding. Ambient multiply doesnt’t even effect the environment light only scene lights by “seemingly” mutiplying by its factor.

The solution seems simple to me. Environmental light should be multiplied by the AO multiply factor in the same way as scene lights are.

Yeah I agree about losing sub, but I was told by Markew that multiply does the job of sub, (he was nearly right it actually is closer to “both” but alas only for lights not ambient light)

edit, this is the thread that started it all http://blenderartists.org/forum/show...82#post1766082

And yeah this area is absolutly strewn with awkward terminology. Ambient occlusion effects enviromental light not the ambient light and only by adding not actually occluding. Ambient multiply doesnt’t even effect the environment light only scene lights by “seemingly” mutiplying by its factor.

The solution seems simple to me. Environmental light should be multiplied (or whatever) by the AO multiply factor in the same way as scene lights are.

Like I said. I think most of this should be done in comp. You’ll never get the degree of control nor will it be speedy doing it by tweaking the settings and rendering over and over again. I do acknowledge that settings are different and missing. But when it comes to multiplying and subtracting, etc AO I’d stick with comp.

I attached a simple scene file showing a good setup.

PS. The reflection of that face seems pretty intense. If you are going for realism I’d drop it down.

Attachments

comp.blend (467 KB)

Ambient occlusion should be effecting only the scene lights. That’s the original purpose of ambient light to add light to the shadow areas. The ambient light is the source of occlusion and is “effected” (with occlusion on of course). You can see that by simply turning off environment lighting. Make the environment colors both black and make the ambient light something bright and obvious like say green. You’ll see it as the source of light in an ambient occlusion pass and as an additive/overlay to the combined pass. I wouldn’t want environmental light to be multiplied by default by AO factor. I suppose as an option could work, but I’d prefer to multiple in post. Everything you want is something designed to occur in post. Multiplying the environmental light by AO does occur when compositing. I do that in my sample file even.

Thanks thats very helpful.

Yeah the reflection is very high and also the environment isn’t illuminating her face, so the bright part of the environment map seems all the brighter because it’s in a dark part of her face.

Here’s a shot in whcich the enviroment map is also illuminating her face. Its probably still too bright but it looks better because the bright arts of the reflection light her face correspondingly brightly.

Attachments


Yeah better. Though still bright. It does look a bit like sweat in the last image. Some blurring of that reflection might help? I’d drop down the reflection in the eyes as well. Seems more more intense than it should be. The only other crit are the eyebrows. They look drawn on.

I played with your image. It’s not exactly realistic nor would I call it perfect adjustments. (a bit too red I think actually!) I hope you don’t mind. I just blurred the skin reflections a bit in post and added some adjustment layers and color adjustments. I also blurred the eye reflections a bit to dampen the effect. And of course darkened the nostrils! Which I know is something you wanted. I definitely think bringing down the reflection a few notches and blurring it would do wonders. Then add a bit more pink/purple into the base skin tone would bring the character to life more. Perhaps just a hand painted blush in the cheeks?

Is that a mesh artifact on the ear in the right side of the image or just hair?

Attachments


Re the image, cheers, yeah the eyebrows are definitely a first draft. Although I like the brightness in the eyes.

Re Ambient occlusion. I don’t think I could disagree with you more. AO is first and foremost a negative effect. The original purpose of ambient light was to create a very rudimentary global illumination effect, the fact that it illuminated areas which should have been in shadow was an unavoidable by-product. Ambient occlusion was indroduced to counter this effect by , well er… occluding the ambient light, that is darkening little nooks and crannies that have been illuminated by ambient light. Blender 2.49 had both additive subtractive and combined methods and zbrush uses subtractive. Occluding ambient light is by definition negative in nature.

No I don’t mind at all. I like the colour.

I want to blur the reflection but the problem is that its the geometry rather than the reflection which is causing it to seem “pixelly”. Its a raytraced reflection and its set to about 6 glossy which is pretty blurred, but because theres a lot going on with the geometry there is a lot of variation in the angle of reflection. I’m probably going to redo the skin soon so I’l make it less pitted. Also a reflection that bright should glow which blurring sort of simulates too.

And yes the geometry in the ear corrupted when I retopologised. It will sculpt out easy enough, but I havent got round to it.

The way I wrote it makes sense to me. But I basically intended to say what you did in a roundabout way. It was late. hehe.