Ambient occlusion pass

   25610   9   3
User Avatar
Member
86 posts
Joined: Aug. 2010
Offline
How do i generae an ambiant occlusiono.pass…iv tried like all availabla planes…nothing
the xon can
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
I have not done passes too much yet, but I know u can get AO in two ways:

1. Create an environment light (you can find it on the lighting shelf) and switch your lighting from “direct light” to “ambient occlusion”, the tune the settings. Make sure no other light is on the scene, and you should have an ambient occlusion render

2. Add an occlusion operator inside of any of your material networks as the input for the diffuse color (I.e you could do this on one of the flat surface materials in the material gallery), and assign it to all the objects of your scene for that pass

Sorry I cannot offer screenshots/more specifics, but I do not have a computer in front of me at the moment

I hope it helps!
-G
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
thexon
iv tried like all availabla planes…nothing

Sounds like you use the default planes. In that case, switch to PBR renderer and see if it gives you what you want.

Or, check if you spelled your parameter names correctly.
--
Jobless
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
2. Add an occlusion operator inside of any of your material networks as the input for the diffuse color (I.e you could do this on one of the flat surface materials in the material gallery), and assign it to all the objects of your scene for that pass

Is this possible to get working with PBR. I can't manage it. With micropoly it works.

Or is there some other way to get a look which is kinda the same. I could calculate curvature on sop level and use only where it is concave but i would very much like to do it in the shader.
Drive, monkey, drive!
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
You need to plug in something into the bsdf (yellow). I'm not sure an occlusion node makes sense in PBR.
--
Jobless
User Avatar
Member
861 posts
Joined: Oct. 2008
Offline
Here is an example. It works, but I don't know if it makes sense. If nothing else, it magnifies the effect.

Attachments:
Capture.JPG (13.8 KB)
occ.hip (116.7 KB)

--
Jobless
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
Thanks but it's not what I want. I know how to get a AO pass for the whole scene affecting.

What i wan't is like AO but for a single object where it should only look how it self occludes itself. Not checking if other objects in the scene occludes it. only itself

Hope this was a better explanation than my last.
Drive, monkey, drive!
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Hey Erik_je, I do not know if this applies to your case, but have u tried separating your ambient occlusion pass in separate passes per object? I know I have used that in the past to achieve what you are trying to do. You get your self occlusion, but without sampling other objects (I believe you can do this by including a ROP network with each object that has a mantra node with the proper settings)
-G
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Did you “actually” look at the files I sent in your other thread:

http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=21763&highlight=ambient+occlusion [sidefx.com]

One of the files uses an Occlusion VOP inside the shader. You can actually copy/paste the shop from this file in to your file to test. You can specify the objects that occlude and in what Null Object space. Please have a look at that. As I mentioned it works with mp/rt and not pbr.
There's at least one school like the old school!
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
Soothsayer
You need to plug in something into the bsdf (yellow). I'm not sure an occlusion node makes sense in PBR.

This was they key. Just me being stupid first. Now i can get AO with PBR without having any lights in the scene. Thanks.

What i can't do tho is use occlusion for displacement. “I” is not available in the displacement context. Is there any way to first run a surface shader. Export color. Import color into displacement and then run a second surface shader afterwards?

Kinda like using an FBO for storing stuff when doing shaderwriting for games.
Drive, monkey, drive!
  • Quick Links