PDA

View Full Version : Mr Zap and his AmbientLight&Occlusion


achoury
11-05-2008, 06:44 PM
Hi guys
mr Zap (http://mentalraytips.com/) has an interesting article about Ambient Light and Occlusion
one of them is just by pluging mib_amb_occlusion into an areaLight






Create an area light
Set it's area light type to "User" and 1 sample
Use the mib_amb_occlusion shader as the light shader of the light

here is some test
http://www.postmyimage.com/images/imagesOYj10084.jpg

and if you change the color you get this

http://www.postmyimage.com/images/imagesZID10108.jpg

Thank a lot mr Zap !


edit: the images above are rendered with the default settings

/rachid

joie
11-06-2008, 09:11 AM
Wich are the benefits of using this method?.

achoury
11-06-2008, 10:22 AM
Wich are the benefits of using this method?.

hi
please read this article (http://mentalraytips.com/) first, and i can't explain more than the author himself
but here are some quote of the author

However, unfortunatly, many people have read and misunderstood the original ILM documents on Ambient Occlusion, and apply the Occlusion pass across the entire rendering. This is W R O N G!!

and

Globally multiplying occlusion on top of the beauty pass (including reflections, direct light, etc) is WRONG. Don't do it.

/rachid

joie
11-06-2008, 12:01 PM
Yes, I read it yesterday but I didn't found the advantages of doing it with a light..., I might go out and do some tests...

naik
11-06-2008, 01:15 PM
Yes but the question is how are you going to use that passes?
I mean you can not just multiply those renderings with the others.
With mutliply it would change almost the whole image....


NAIK

cheebamonkey
11-06-2008, 01:28 PM
yeah seems to be processed over the beauty pass making it unlikely to be used in a multi-pass pipeline. It looks good.. I just tried it but like the AO switch in material-x, sometimes I want more control.

The only other thing i can think of is to create a separate render layer, add all the objects and area light, then use a lambert shader w/color at pure white and diffuse up to 1.0 and use that as a material override for the layer.
edit: newp.. just tried that and it looks exactly the same (rendered) as creating "old" mib_ao way.

Ironhalo
11-06-2008, 05:03 PM
i know zap said its wrong to multiply the ao over the beauty, and his explanation does make sense. i normally do the multiply method, but i also adjust the levels to pull the black areas back into their origins.

i havent had a chance to play with the mulit pass system in 2009, is it easier to apply zap's methods with the new pass options? it seems that you'd need light passes to correctly apply this technique.

also, what of directional occlusion? i seem to remember ctrl studios releasing a shader that accounts for this.

ph2003
11-07-2008, 01:48 PM
thanks to this explain master zap!

when i always multiply my AO pass globally i feels its looks "strange"...
thats why i always do alot masking in composite to get out those area i dont want "dirty" looks :(

now i can save up more time for masking in post,with just 1 "clean" AO pass! allright!!

djx
11-07-2008, 02:39 PM
I like the look of the "wrong" method of multiplying by amb-occl pass. Yes, it incorrectly multiplies areas getting direct light and reflections, but sometimes that's a small price to pay for nice dark nooks and crannies. Mostly I try instead to use the mia_x built in amb-occl and FG since they work together nicely (as Zap mentioned).

What I find interesting about this "method 3" with the area light using amb_ocl as a light shader is that it is adding light to the scene, not taking it away (like when we multiply by black). This is why it looks different to the old pass method when used in combination with your direct lighting. I'm seeing this as something I might use when FG is causing problems (thats instead of FG, probably not in combination).

The areaLight/ambOccl is a fake for secondary and environment lighting, so to use it in combination with FG seems a bit redundant. Although if we do combine them, then maybe we use less diffuse bounces on the FG and let the areaLight/ambOccl fake that. However what I am finding in my tests is that using the usual low accuracy FG works against us, since it tends to let light into the cracks, and the areaLight/ambOccl does not make them any darker.

-- David

achoury
11-07-2008, 03:22 PM
The areaLight/ambOccl is a fake for secondary and environment lighting, so to use it in combination with FG seems a bit redundant. Although if we do combine them, then maybe we use less diffuse bounces on the FG and let the areaLight/ambOccl fake that. However what I am finding in my tests is that using the usual low accuracy FG works against us, since it tends to let light into the cracks, and the areaLight/ambOccl does not make them any darker.
-- David
According to David post I did some test with and without FG, and the result is a little bit different especially in a dark area !

simple without FG
http://www.postmyimage.com/images/images8Mr70762.jpg

with FG

http://www.postmyimage.com/images/imagesym470803.jpg

/rachid

rebb
11-07-2008, 03:49 PM
Can anyone confirm that this works inside of Maya from the instructions ? I can't seem to get it working that way :/

Edit : NM, it works now ;).

chronic
11-07-2008, 04:53 PM
the Ambient Occlusion Light technique comes from the old (or not so old) days of using renderman in production. renderman does not do the best job of global ilumination/final gather (newer point based techniques changed this) - so you would light your scene with an ambient light, but an ambient light with a texture imput. imagine a final gather IBL setup but without the final gather raycasting, just plain old ambient light. by using AO in combination with this setup you get a indirect-illuminationish look. add in a few more tricks to take into account the general direction of your 'sun' light and BAM - good enough for most uses, and fast (the most important thing is speed in production)

some thoughts:
i dont think it would be a good idea to use both the AO light and FG - thats like having inderect/ambient illumintaion happening 2 times -> not good
but if you want to use FG, just use the mia's built in AO, or make a standard AO pass and multiply it with your indirect pass before you layer on your diffuse, etc, etc passes.

the things i take away from Zap's posting are: AO is a great way to add extra lighting detail. the grain acosiated with AO is more pleasing/"filmish" than the splotchy FG flickering. for outdoor scenes there are ways to get a pleasing look without needing FG.

we should all read more technical papers, who knew the ambient light wasnt just the vile spawn of the devil

jasonhuang1115
11-07-2008, 09:36 PM
Thanks, Chronic and achoury,

I am a bit confused here. Zap mentioned his "advocate" way, which is "low-density, high interpolation FG multiplied by AO" to get occluded ambient environment lighting. Then he also mentioned the method 3 (for Maya and XSI user) of using Area light w/AO shader. So are these two approach used together or pick either of them? (If we have HDR env map as IBL source)

coccosoids
11-09-2008, 07:59 PM
According to David post I did some test with and without FG, and the result is a little bit different especially in a dark area !

simple without FG
http://www.postmyimage.com/images/images8Mr70762.jpg

with FG

http://www.postmyimage.com/images/imagesym470803.jpg

/rachid

Hello achoury, can you post the scene file used to render these two images? :)

achoury
11-09-2008, 09:58 PM
Hello achoury, can you post the scene file used to render these two images? :)

Hi
Sorry I've not save it since it was just for testing the new method, but I attached the same scene! nothing mystery just an area light with occlusion shader and Fg

/rachid

ghostlake114
11-10-2008, 08:17 AM
I may a hard head donkey :p, but I like the multiply way. It is not so production, but to my job only, it save time because a seperate pass like this make life easier for tweaking, and the little dirty spot dont cause me as much as trouble as 4kx4k motion picture must have. So this way, IN my opinion, not wrong at all.

Omarios
11-12-2008, 09:23 AM
hmm, this is an interesting thread,
i have tried this technique of plugging ao in the area light and changing the colour it gives a richer image instead of the dark blacks.
my friend has a connection of plugging a surface luminance node into the key light of the scene to get the occlusion shadow in the direction of the light......maybe by plugging an ao to it and changing the colour i can get nice shadows in my scene......

omar

MAV4d
11-17-2008, 06:03 PM
couldnt you just plug AO into the ambient of the shader?

CGTalk Moderation
11-17-2008, 06:03 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.