ambient occlusion shader in blender?

In maya,I am able to add an ambient occlusion texture/node and input it directly into a materials ambient color. So that everything with that material will be able to calculate a “faked” ambient occlusion.Is this possible in blender?

If you’re not understanding,the link below talks about the node in maya…

http://www.artbycrunk.com/tutorial/maya/ambient-occlusion-using-mib_amb_occlusion_node/

it also allows me to change the color of the ambient occlusion before rendertime.

Is this possible in blender?

If didn’t know whether to post this in texturing or lighting forum,please move if necessary.

The only other option I can think of is to render off the ambient occlusion on a separate layer,and it that in post.Which would I don’t like the idea of :no:

In maya,I am able to add an ambient occlusion texture/node and input it directly into a materials ambient color. So that everything with that material will be able to calculate a “faked” ambient occlusion.Is this possible in blender?

If you’re not understanding,the link below talks about the node in maya…

http://www.artbycrunk.com/tutorial/m…cclusion_node/

it also allows me to change the color of the ambient occlusion before rendertime.

Is this possible in blender?

If didn’t know whether to post this in texturing or lighting forum,please move if necessary.

The only other option I can think of is to render off the ambient occlusion on a separate layer,and it that in post.Which would I don’t like the idea of :no:

(sorry I posted this topic in the lighting forum too)

Use an extended material node, plug the AO and color into a mix node and that to the output. I think this might be the route you’re looking for.

  • for add AO shader in Cycles…

ajm: i’m a little confused here,perhaps because i’m not so familiar with the node editor.Do you think you could walk me through the setup.I have a basic scene with a box with a window cut out,and a few simple shapes in it,with a spot lamp lighting the objects through the window.I’m not sure what the next step is.

are the only AO settings in the global tab,or are there more somewhere else? (blender internal)

ron43,i’m using blender internal,as I want more controlled,and less realistic results.However if you took a look at the link above and think I could achieve what i’m going for in cycles please say.

If you look at the link I posted above,and scroll down to the Bright/Dark section,thats what i’m trying to achieve as well as the faked occlusion.

I got something close to what I wanted,by changing the ambient colour,but that changes the entire ambient,and doesn’t leave the dark areas dark,it changes everything equally.

sigh I guess its just more experimentation.

Unwrap Object->Add empty Texture->rendertab->bake->bake method:Ambient Occlusion->bake
Alternatively use the forumsearch or google, you can use the Dirty-Vertex-Colors from Vertexpaint to bake into a AO-texture

There is no automatic AO node though, you have to supply an AO-texture.

:no: thats not a very efficient workflow for a more complex scene.

It’s quite efficient if you have a static scene.

If it’s dynamic you don’t use static AO anyways, as the AO will change.
For that you got AO in the world settings, either approximated or raytraced. It’s not per material, but per scene.

ng- post a screenshot of your node setup and a background image from the node editor?

Sorry I didn’t mean to come across as if I was shutting you down.
I just meant compared to maya,which is like a two click process,unwrapping all the objects just to fake AO seems like too much.

In maya the the AO node connects to the ambient of the material,almost like a procedural /generated texture.

Even if I did bake,i don’t think its going to give me the control I want,the node in maya enables me to change the color of the darkest areas of the faked AO and also the lightest areas,see image below…

thus giving more control over the way the image looks,and get a very painterly scene.

[ATTACH=CONFIG]195975[/ATTACH]

the only option I can change in blender is the ambient colour,which doesn’t give me enough control.

any ideas?

I appreciate the help.

What do you actually want?

Do you need an AO map for a game model?
Do you need baked AO for a static scene?
Do you want AO in your scene?

All that is possible with blender.

What renderer are you using?

I guess what you’re looking for is the world tab. With Blender Internal you got two choises, approximated or raytraced AO.
And you got all the control there you want.
In the world Settings you’ll find Environment Lighting and Ambient Occlusion, which is pretty much the bright/dark from maya.
For fast preview I suggest raytraced gathering with a low amount of samples.
If you render a still, go with raytraced and high amount of samples.
If you render an animation, use approximated gathering.

*** Both threads merged ***

Hi arexma

I’m aware of the world tab and the ambient occlude option.How do I change the bright/dark colour of the occlude?

What do I want? well I’m looking to see if I can imitate the effect of the mib_amb_occlusion Node in maya.

If you have the time,If you go to this link below,he explains what exactly the node does in maya,its the 1st video,its free…(its not long)

I’m bad at explaining,but the node in maya works like a texture,so I think its like baking but not quite.I read there was a script in an an older version blender called self-shadow in vertex paint mode,which gave similar results.

He starts to explain around 2:35 what this shader is actually doing.

I want to be able to change the colour of the bright and dark of the ambient occlude in my scene,which doesn’t seem to be an option in the world settings,I am using blender internal.

the image will be static,but its more to create a stylized effect,which may be able to be used in animation aswell.

ng-matreial, not seen your links so this is a general comment.
If you want to adjust the AO I would say the general method of doing so in blender would be via the compositor rather than via the material or texture (assuming you’re not wanting to bake AO to a texture). In the render settings you can enable the AO as a pass. In the compositor the AO pass can then be adjusted with other colour/effect nodes before incorporating back into the main scene.

yeh I could do that Richard,if that is the only way.I was just hoping I could add the effects pre-rendertime.

I have attached an image,from a tutorial from pixar lighting artist jeremy vickery (in maya),i took screenshots as the tutorial went on,just to show the settings,and the control you have over the ambient occlude colour.I’m not surehow I would control the light and dark value via compositing…

[ATTACH=CONFIG]195979[/ATTACH]

but do you think that amount of control is possible?

thanks for all the feedback guys…

The Colour balance node allows you to adjust Dark, Midtones and Highlights. Not tried to adjust AO myself so cannot confirm will give the desired control you’re after.

I just tried plugging the AO into a colorbalance node,and a mix node,and the results are satisfactory,but obviously it effects the entire image,and not specific objects for more control.

so what are my options for rendering out the ambient occlude on separate objects?

baking? rendering the objects with ambient occlude on separate layers (masking) I don’t know how to do that stuff yet,but if so. i’ll go and research.

baking? rendering the objects with ambient occlude on separate layers (masking) I don’t know how to do that stuff yet,but if so. i’ll go and research.
There are a number of ways such as putting objects on different layers and separating them with render layers, combining them together in the compositor. If you have a complex scene this can get mind numbingly complicated to set up the layers if you have other interactions between the objects.

sounds challenging.Thanks for your help.Guess its experimenting from here on out,unless someone writes me an ambient occlude node :stuck_out_tongue: