7

What is the difference between ambient occlusion vs environment lighting?

To me it looks like environmental lighting turns an image texture(or single color) into a hemi lamp source that shines from all angles but casts no shadows.

While Ambient occlusion turns a single color into a hemi lamp source that shines from all angles but casts some shadows.

Difference being: one has the ability to cast shadows and the other has the ability to use a texture as a lamp?

Actually, it looks like if you use environmental lighting, you automatically also use ambient occlusion just with less control over its shadows.

Im getting a circular error in my brain. Can-Not-Compute

The manual says the difference is

The difference is that Environment lighting takes into account the “ambient” parameter of the material shading settings, which indicates the amount of ambient light/color that that material receives.

But ambient occlusion has a similar setting called "Factor".

But the factor settings effects ambient occlusion for all objects while the "ambient" parameter effects just a single texture.

Is that it?

Here is a scene in Blender Render with AO on: enter image description here

and here is the same scene with environmental lighting on: enter image description here

So again, what is the difference?

enter image description here enter image description here

enter image description here enter image description here

eromod
  • 2,638
  • 19
  • 36
  • related: http://blender.stackexchange.com/questions/7816/what-is-ambient-occlusion –  Jul 15 '16 at 00:26
  • @ cegaton Alright, but does that mean ambient occlusion is inside of Environmental mapping? Because environmental mapping has the "ambient" parameter in the material shading setting? – eromod Jul 15 '16 at 00:44
  • When you set up Environment It behaves like a sphere that surrounds the scene and lights the scene completely. If the environment is a single color you get the flattest possible light. Using an image as environment will make every pixel of that image behave like an emitter. –  Jul 15 '16 at 00:48
  • @cegaton, what about the "ambient" parameter, does that have anything to do with ambient occlusion? – eromod Jul 15 '16 at 00:56
  • Trying to reproduce it, I feel like it's broken. My memories may be bad, but back in Blender 2.4 or so, it worked more like expected. – Thomas Weller Jul 15 '16 at 07:59

3 Answers3

3

I wouldn't think of Ambient Occlusion as part of your scene lighting, it's really a tool to art direct your image, and (if you output it to a render pass) for extra flexibility in the post production of your image. As Duarte already mentioned it is not physically accurate but is much faster to calculate so it can be helpful to increase the visual appeal of the render.

If you look at many artists' making of videos, you'll generally see that the AO pass is added on in post and not usually as part of the scene render. It's technically a localized shadow effect that gives you more control over the contrast in crevices and surfaces that are close to each other.

I generally think of it as a tool to give you more control over the image, it's more of an art direction tool than a realistic lighting tool. I think it's more helpful to think of it that way. I know you can have AO enabled and combined into your raw render, but it's much more powerful as a post effect.

Todd McIntosh
  • 9,421
  • 25
  • 50
  • so the difference is that AO gets baked to a texture map but Environmental lighting doesnt? Is that it? – eromod Jul 15 '16 at 02:16
  • No, AO can be used as an effect added to the raw render, or it can be rendered separately as a render pass and then used in compositing to add additional depth to the image. The latter option provides more artistic control. – Todd McIntosh Jul 15 '16 at 06:42
  • I personally would try to avoid using AO directly in your raw render, much more control in post – Todd McIntosh Jul 15 '16 at 06:42
  • but if you baked the environmental lighting, wouldint you get the exact same texture? – eromod Jul 15 '16 at 06:43
  • If the env light was pure white and the strength was set properly, and all your materials were white, you might get a similar pass. The point is the AO is an extra effect to give you additional control over the darkness of crevices, contact shadows etc. – Todd McIntosh Jul 15 '16 at 06:46
  • I get that, but the environmental lighting seems to do the exact same thing – eromod Jul 15 '16 at 06:48
  • Is the AO shader (with a couple extra nodes) a good way to add dirt to an object? – John Dvorak Jul 15 '16 at 07:03
  • actually, im not sure its possible to bake environmental lighting to a texture. That might be the difference... – eromod Jul 15 '16 at 07:43
  • @jan - you can use AO for a dirt mask, but the pointiness node in Cycles is a better way to add dirt as well as masked scratches to external pointed edges. – Todd McIntosh Jul 15 '16 at 13:05
  • @eormod - In reality your env lighting is not going to be a pure white light, you'll like be colouring it, or using image based lighting for the scene. The AO effect is a very specific BW shadowing effect that also renders faster. – Todd McIntosh Jul 15 '16 at 13:07
  • Im having trouble understanding why they are so similar and how they are different. – eromod Jul 16 '16 at 22:45
  • Env lighting lights your scene as well as casts shadows. AO does not light your scene and give you the option of additional shadowing in tight spaces like crevices, etc. You have more options with both. – Todd McIntosh Jul 16 '16 at 23:37
2

Bottom line is Ambient Occlusion is an approximation, it is used in place of real environment light when performance is a concern or realistic results are not needed/wanted.

It is fast and computationally inexpensive and yields 'good enough' results, it is a simplification and is not 'realistic' or physically correct.

Environment light however is (or can be depending on the Rendering engine implementation of course) physically correct and a 'real world phenomenon'. It can use real textures to simulate the natural lighting variations of a real world scene. It more realistic, but also a lot more complex to calculate and thus computationally expensive.

In Cycles, for example, enabling Ambient Occlusion overrides partially the natural lighting of a scene technically reducing realism and physical accuracy of a render.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
  • so AO is the fast and dirty version of Environmental Lighting? – eromod Jul 15 '16 at 00:53
  • Yes it generally is sort of, depends a bit on the specific implementation of the rendering engine. I remember MentalRay for example had an ambient occlusion algorithm that took into account surrounding object's color. There are also non physically accurate real time versions of 'environment lighting', for real-time rendering (like PBR, game engines, etc.). But generally speaking most Ambient Occlusions are simpler and quicker than real Environment Lighting – Duarte Farrajota Ramos Jul 15 '16 at 01:04
  • okay, what about the "ambient" parameter in environmental lighting? – eromod Jul 15 '16 at 01:09
  • Where are you seeing this? Blender Internal? Cycles? Nodes? Properties window? – Duarte Farrajota Ramos Jul 15 '16 at 01:14
  • blender render, properties editor->materials->shading – eromod Jul 15 '16 at 01:17
  • Blender internal is not physically accurate. That setting basically controls how much the environment lighting affects a certain material. You can see this by activating Environment Light in the world settings and playing with values. – Duarte Farrajota Ramos Jul 15 '16 at 01:22
  • so by activating environmental lighting, you automatically also activate AO? – eromod Jul 15 '16 at 01:25
  • No, ambient occlusion and evironment lighting are totally separate effects added on top of eachother. You activate Ambient Occlusion in a separate panel called Ambient Occlusion in the world settings – Duarte Farrajota Ramos Jul 15 '16 at 01:30
  • the "ambient" parameter has nothing to do with AO? – eromod Jul 15 '16 at 01:31
  • 1
    No as explained above the two simulate very similar aspects or lighting a scene but are totally separate effects and go about doing so in different ways. Depending on the render engine they can be used simultaneously on top of each other for more detail but are still independent from one another. – Duarte Farrajota Ramos Jul 15 '16 at 01:35
  • so in a nutshell, what is the difference? I rendered the default scene with the two different ones and they look identical. – eromod Jul 15 '16 at 01:42
  • @eromod the default scene is not ideal to show the effect of ambient occlusion. Create a scene with geometry a bit more complex than just cubes. Place some close to each other and some objects further away. Ambien occlusion will be more pronounced in surfaces in close proximity. –  Jul 15 '16 at 03:29
  • @cegaton, here is a different scene with Suzanne and a cube mesh edited, still look identical. – eromod Jul 15 '16 at 03:49
0

A google of "Enviroment Lighting vs Ambient Occlusion" yields a top result of a 2-post thread from the Blender Artists forums, with the second post saying this:

AO has to do with objects / surfaces close to gather, there by reducing lights reaching them. You get dark corners. Environment lighting is like fill lighting. It brighten up shadows.

I googled to understand it more and I feel complete now.

AO doesn't necessarily 'make the corners darker', when you have a bright light, it will amplify the bright parts and spread the light around a little. EL on the other hand doesn't touch the light you made but adds some more to everything, even where your light doesn't light up. EL can make the whole scene darker if you set it to a dark color.

how the hell do these not look different to you

Aj Otto
  • 1
  • 2
  • now try putting that knowledge to use and test it out, I cant see any difference between them. – eromod Jul 15 '16 at 07:00
  • make an array of arrays of cubes stretching into the distance (with gaps between them!) and check the shadows between them? enviroment lighting uses raytracing vs ambient occlusion doing matrix multiplications of the rendered image. – Aj Otto Jul 15 '16 at 07:03
  • tried it, they are still the same – eromod Jul 15 '16 at 07:08
  • i'm triggered. i'm at work but i'm installing blender to investigate – Aj Otto Jul 15 '16 at 07:09
  • 1
    they are not the same, even though they might look the same. – Aj Otto Jul 15 '16 at 07:10
  • even the noise is the same – eromod Jul 15 '16 at 07:11
  • created an example where they are different in like 3 minutes – Aj Otto Jul 15 '16 at 07:24
  • look at the shadows! – Aj Otto Jul 15 '16 at 07:25
  • now try AO as factor 7 too – eromod Jul 15 '16 at 07:25
  • try to draw a piece with a permanent marker and a black pen, but draw the exact same thing! they are different tools for different applications, they can emulate each other, yes, but that's not their point – Aj Otto Jul 15 '16 at 07:28
  • different tools for different applications, elaborate? – eromod Jul 15 '16 at 07:29
  • The example images look exactly the opposite of "AO [...] get dark corners. Environment lighting [...] brighten up shadows." – Thomas Weller Jul 15 '16 at 07:57
  • like the other posters said above you'd use AO to make the final render look cooler while EL is for making the scene look realistic or well-lit, AO makes the corners of shadows look darker and lightest parts lighter like a selective Gaussian Blur. EL on the other hand would be used to light up the whole scene with a color as if it's the sun, or to make objects 'shine' onto other objects. – Aj Otto Jul 15 '16 at 07:57
  • @Thomas, yeah my example is bad and I apologize for that, closed it without saving... the right side is darker because the sky color used for EL is default grey, the AO on the left would also look brighter if it was on Add instead of Multiply. details aside, I'm a total knob with AO and EL, I just wanted to clearly show that they lead to different results and more specifically wanted to show something with each that the other can't really do... EL cannot Multiply and AO cannot take the color from the sky color or skybox, as far as I know. – Aj Otto Jul 15 '16 at 08:13