2
$\begingroup$

I created an object with some basic shading and Ambient Occlusion switched on and thus getting the right look. Now that I need to paste it in my main project (through Append) I need the same effect but it shouldn't affect anything else but this object.

Any idea how to apply Ambient Occlusion to a particular object or imitating it somehow?

$\endgroup$
  • 6
    $\begingroup$ There is an Ambient Occlusion node in Cycles $\endgroup$ – Duarte Farrajota Ramos Oct 18 '18 at 21:47
  • 2
    $\begingroup$ Only in the new daily version. And to make the AO node only see the object itself, check "only local" $\endgroup$ – Dr. Farquaad Oct 18 '18 at 22:59
4
$\begingroup$

The future

There is a very easy way for versions of Blender compiled after last June: not just Blender 2.8 but also Blender 2.79's "latest builds" that you can download from the Blender BuilderThese builds are not as stable as releases, use at your own risk.»).

The Ambient Occlusion node

This is the effect of the Ambient Occlusion input on a Emission Shader node: the plane looks entirely flat without AO, despite having a complex geometry (there is no other source of shadows; in fact, the scene has no lights apart from the plane itself). Cavities become evident with AO:

enter image description here

It can be made dependent on the local object only by ticking "Only Local".

Where to use it

You should use a MixRGB node in the Multiply mode to darken whatever color input you have with the "blacks" coming from the AO socket of the Ambient Occlusion node.

enter image description here

More on the Ambient Occlusion node

...in this video from the Blender Developers.

The past

There was a very preliminary "node based" solution also in the stable release, but the old Ambient Occlusion node outputs an Emission-like BSDF (bsdf), not a Color (rgb) or a Fac (scalar). This makes it basically impossible to add your AO on top of other shaders.

It also doesn't have parameters!

enter image description here

It is basically only good for baking textures, or for shadeless visualizations.

$\endgroup$
  • $\begingroup$ Thanks for the great explanation! I can`t afford using unstable release now, but will do those things in the nearest future for sure! $\endgroup$ – Blender Enthusiast Oct 19 '18 at 15:20
1
$\begingroup$

You can bake out the AO as a map, since you have exactly the result you're going for. No matter what other materials you use, it'll ignore everything except the geometry (real and normal mapped) when it bakes it, so as long as you use an appropriate image resolution when baking it out, it should do alright. If you need it to be baked into your base color, bake out your color information as a separate map, then mix the two together (generally in multiply, either right in your material or an external image editor). If you need more in depth information on baking maps or UV unwrapping, let me know (but this is a well-used feature, so a simple Google search will probably tell you everything you need)!

$\endgroup$
  • $\begingroup$ that might work, thanks, just wanna ask if you know a faster way to bake AO maps as my object consists of many small objects with lots of different materials. Unwrapping each one and then doing everything for baking would be time consuming $\endgroup$ – Blender Enthusiast Oct 19 '18 at 20:47
  • 1
    $\begingroup$ Well, you can use a texture atlas, but you still have to unwrap everything. You'd only have to bake just the once, though (or twice, if you need the color map). It works the same way as regular baking, you just have to make sure your target texture is selected in the last object you selected (the active object). $\endgroup$ – Lee Oct 19 '18 at 21:08
  • 1
    $\begingroup$ Good luck and happy Blending. $\endgroup$ – Lee Oct 19 '18 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.