How can I connect the Ambient Occlusion Shader to a textured Arnold Standard Shader?

How can I connect the Ambient Occlusion Shader to a textured Arnold Standard Shader?

anoh94
Explorer Explorer
16,049 Views
25 Replies
Message 1 of 26

How can I connect the Ambient Occlusion Shader to a textured Arnold Standard Shader?

anoh94
Explorer
Explorer

Hi everyone,

I was wondering if it's possible to get Ambient Occlusion connected to a Standard Arnold Shader that has texture files connected to it? Basically would like to get the dark shadow AO added onto my textured environment.

Is there any way to achieve this?

0 Likes
16,050 Views
25 Replies
Replies (25)
Message 2 of 26

zenop
Advocate
Advocate

You can use a mix shader with the AO shader connected to the mix parameter, or you can use a layered texture shader and mix the AO shader on top of the diffuse only.

0 Likes
Message 3 of 26

Anonymous
Not applicable

Thanks Zeno, I know how to use a mix shader but what do you mean by layered? Just want to improve.

0 Likes
Message 4 of 26

lee_griggs
Autodesk
Autodesk

Layer textures are here.

Lee Griggs
Arnold rendering specialist
AUTODESK
0 Likes
Message 5 of 26

aaronfross
Collaborator
Collaborator

There's a material called aiLayerShader that lets you composite materials on each other. This would be the way to go if you want to mask the entire material and all components... diffuse, specular, SSS, etc.

Another way to go would be to send the AO to the Weight inputs of each material component such as diffuse or specular.

Still another way to go, depending on the results you want, would be to install the AO Light Filter. It's a secret magic Arnold plugin that is not included with the installation. There's no good reason this isn't available. It's super useful. You can get fake GI by disabling all Diffuse rays, adding a Skydome without shadows, and then adding the AO Light Filter to the Skydome.

aolightfilter.zip

0 Likes
Message 6 of 26

Anonymous
Not applicable

Would you also have the source for that filter?

0 Likes
Message 7 of 26

aaronfross
Collaborator
Collaborator

Here's the source for Mike Farnsworth's AO Light Filter

aolightfiltershader.zip

0 Likes
Message 8 of 26

Anonymous
Not applicable

Thanks for that! Seems to have a similar effect as the shadow controls Renderman had for years.

However, maybe I'm missing something but is that any different from comping over an AO pass with the same settings?

0 Likes
Message 9 of 26

aaronfross
Collaborator
Collaborator

"is that any different from comping over an AO pass with the same settings?"

Depends on how much comping you want to do. If you saved the skydome illumination out as its own light group AOV render pass, then multiplied that with the AO pass, then yes, you'd get the same result ... transparent objects notwithstanding. If you did have transparent objects, then you'd need to create a material override for those so they wouldn't capture the AO pass. Using the light filter makes the whole job way easier.

0 Likes
Message 10 of 26

Anonymous
Not applicable

If somebody else wants to use that with Arnold 4 ...

0 Likes
Message 11 of 26

tatjana.jukova
Explorer
Explorer

Hi all, I've followed the installation instructions Mads has on his website(C/ProgramData/Autodesk/ApplicationPlugins), but I don't see the light filter show up in drop down menu for skydomes. His tutorial video is of little help sadly, as well since it doesn't cover installation of this plugin. Am I missing something?..A little help will be appreciated 🙂

0 Likes
Message 12 of 26

madsd
Advisor
Advisor

I don't know where the file have to go if you use Maya, but in MAX it should work if you put the .dll file into the root folder of the Arnold plugin.

0 Likes
Message 13 of 26

Anonymous
Not applicable

in maya the best way is to create a folder(LightFilter) with 02 subfolders(ae & bin)
AOLightFilter.dll & AOLightFilter.mtd in bin folder
AOLightfilterTemplate.py in ae folder
then add ARNOLD_PLUGIN_PATH & MTOA_TEMPLATES_PATH variables
ARNOLD_PLUGIN_PATH = C:\LightFilter\bin
MTOA_TEMPLATES_PATH = C:\LightFilter\ae

Here is LightFilter for Maya Houdini and Cinema4D
LightFilter.zip

here is the aeTemplate file
6430-aeaolightfiltertemplate.jpg

and here is the edited mtd file
6491-aolightfilter.jpg

0 Likes
Message 14 of 26

madsd
Advisor
Advisor

OK, I think Im going to update the files on my git where its located and rewrite description on site so it works with your py file.

0 Likes
Message 15 of 26

Anonymous
Not applicable

that's nice idea

For cinema4D
just put dll and mtd file to C:\Program Files\Maxon Cinema 4D R21\plugins\C4DtoA\arnold\plugins
For Houdini same as Maya but add ARNOLD_PLUGIN_PATH in houdin.env file or a json.fil
ARNOLD_PLUGIN_PATH = C:/LightFilter/bin

0 Likes
Message 16 of 26

madsd
Advisor
Advisor

Alright, Ill ping you to prof read when Ive updated it.
I dont suppose we could go all in, and you can provide 3 screenshots of some ui showing interconnections. Then Ill do the last. would make docu much better.

0 Likes
Message 17 of 26

tatjana.jukova
Explorer
Explorer

@rachid thanks for your answer. In which directory do you to create the folder specified? And "ARNOLD_PLUGIN_PATH & MTOA_TEMPLATES_PATH variables" - what is this?

0 Likes
Message 18 of 26

Anonymous
Not applicable

any directory you want
ARNOLD_PLUGIN_PATH to read the .dll and the .mtd file
MTOA_TEMPLATES_PATH to read the aeTemplate file

0 Likes
Message 19 of 26

Anonymous
Not applicable

yes you are right


here is the screenshot for Maya
6424-maya-aolightfilter.jpg

for Houdini
6425-houdini-aolightfilter.jpg

For cinema4D
6426-c4a-aolightfilter.jpg
and here is the zipped file (maya asci file, houdini file, and Cinema4D file )

aoLightFilter.zip

0 Likes
Message 20 of 26

madsd
Advisor
Advisor

Perfect, I'll hook it up.


0 Likes