PDA

View Full Version : Global Ambient Occlusion testing


STRAT
09-19-2005, 09:17 AM
Hi

This is a small test of R9.5's rough and ready global AO facility for architectural based scenes.

The global method of AO is fantastically easy to use and set up - all it does is basically enhance the shadows (or edge/intersect shadows to be more accurate - the shadows associated with the realism GI gives) in a given scene, to enhance, simulate or fake a GI effect.

It can be used with real GI of course, but it's probably more effective in plain raytraced (or scanlined) imagery. It's not half as accurate or real as GI, and personally i'd still use real GI for my still work, but being as the current AR is unusable for GI animation rendering, the global AO makes a nice alternative.

here are a couple of test animations and stills from the anims -


EXTERNAL

Just 1 infinate light with 85% brightness and full hard shadows and an ambient omni at 75% brightness (no GI used). Rendered @ 640 X 480 @ 2.5 mins per frame

AO settings -

min ray length - 0m
max ray length - 1500 m
disp - 100%
Acc - 0%
min samp - 10
max samp - 75
contrast - -15%



http://www.nikclark.com/strat/cgt/external.mov




http://www.nikclark.com/strat/cgt/AOexternal01.jpg


http://www.nikclark.com/strat/cgt/AOexternal02.jpg


http://www.nikclark.com/strat/cgt/AOexternal03.jpg

STRAT
09-19-2005, 09:21 AM
INTERNAL

1 infinate light with 70% brightness and full hard shadows and a few infill omnis at 35% brightness and soft shadows. 1 ambient omni set to 75% brightness for the AO shader. (no GI used). Rendered @ 640 X 480 @ 4.5 mins per frame

AO settings -

min ray length - 0m
max ray length - 1000 m
disp - 100%
Acc - 0%
min samp - 15
max samp - 50
contrast - -60%



http://www.nikclark.com/strat/cgt/internal.mov



http://www.nikclark.com/strat/cgt/AOinternal01.jpg


http://www.nikclark.com/strat/cgt/AOinternal02.jpg


http://www.nikclark.com/strat/cgt/AOinternal03.jpg

STRAT
09-19-2005, 09:24 AM
In conclusion i think it'll make a nice little addition to the rendering tools available, specially for animation rendering, but at over 4.5 mins per frame for the internal mall anim, real GI would have been faster, and more realistic. It's gives it's own feel as you can see, but it's only an enhancement to what the artist can create - if the user is an ace in general lighting rigs and settups then he'll love this tool. it isn't like real GI where an inexperienced user can use it as a 'make nice' filter imo

It still needs as fair bit of tweeking by the coders i fear as the relationships between the accuracy, min and max, and contrast settings dont interact together as nicely as one would have hoped.
Each setting works properly and does it's bit, but, like with real GI, it's a case of trading all these settings off against each other to get the optimum render quality/speed setting.

also, as soon as you turn off AA the rendering speeds up by X2!!! so i think a later optomisation to be made there too.

and yup, flicker free with constant frame render times!

But i'm not moaning.

panchopantera
09-19-2005, 09:26 AM
awsome, flicker free, who needs gi.

Simon Wicker
09-19-2005, 05:50 PM
one thing to remember is that if you are not using an environment map either in the environment channel or on a sky object (and then clicking the appropriate settings in the AO render settings) then you are only getting half the equation.

the ambient occlusion defines the attenuation of your ambient environment but the ambient environment should come from either a blurred map in the environment channel or a sampled sky object. this way your object will receive colour from the ambient environment (blue from the sky, green from the grass, red from brickwork, etc) and this is then shaded/attenuated by the ambient pass.

this way you simulate the full effects of a one bounce GI with soft shading on shadows and colour bleed.

to get the full low down on how this is used in film vfx then you should check out the siggraph paper by hayden landis of ILM:

http://www.debevec.org/HDRI2004/landis-S2002-course16-prodreadyGI.pdf

one other thing to remember is that you are probably best off rendering your AO pass separately as the technique will be sensitive to your AA settings. you can probably use Geometry AA only for your AO which will be faster than using stochastic GI for the full scene. you can then combine your ambient environment and AO passes together in post for the final effect - doing it this way also means you have further over the colour/density of your fake GI effect.

using best AA on the whole scene will push up the rendertimes because of the extra samples you are asking the render engine to make.

cheers, simon w.

Daoine
09-20-2005, 08:17 AM
Excellent study Strat. As well your inclusion, Simon, Great stuff. This may just be the solution for my current project's animation.:applause:


Daoine

STRAT
09-20-2005, 08:56 AM
one other thing to remember is that you are probably best off rendering your AO pass separately as the technique will be sensitive to your AA settings. you can probably use Geometry AA only for your AO which will be faster than using stochastic GI for the full scene. you can then combine your ambient environment and AO passes together in post for the final effect - doing it this way also means you have further over the colour/density of your fake GI effect.

using best AA on the whole scene will push up the rendertimes because of the extra samples you are asking the render engine to make.

cheers, simon w.


unfortunately, this isn't the case. AO requires AA set to BEST to work. which means you wont save any time multi passing the rendering :(

i also tried rendering the AO pass with no AA and blurrring it in post, but it just isn't good enough either.

the render difference is huge though for AO rendered with and without AA -


Main single-pass full render of model and AO with AA activated - 2.39
Main render with best AA, but without AO - 0.13
AO pass with best AA - 2.37
AO pass without AA - 0.27

so as you can see, rendering in passes actually takes even longer than a single run, once you've fannied about and comped everything.

but the diference in rendertimes between AO with and without AA is the crunch. I hope this is somewhere maxon can optomise in later releases.

MJV
09-20-2005, 03:50 PM
You don't want your ambient pass to affect direct lighting. It should only affect ambient lighting. Maxon left out any ability to do this in global renders, so you have to multipass and composite outside Cinema.

STRAT
09-20-2005, 03:57 PM
You don't want your ambient pass to affect direct lighting. It should only affect ambient lighting. Maxon left out any ability to do this in global renders, so you have to multipass and composite outside Cinema.

i did this during testing this morning, not only did the whole process take longer, but the final composed image was exactly the same as if i rendered the whole lot in 1 pass.

MJV
09-20-2005, 04:02 PM
Then you're not doing it correctly. Multiply the AO layer with the ambient layer only. There is a nice little tutorial by Simon around here somewhere.

Edit: Found it here http://forums.cgsociety.org/showthread.php?t=129843

STRAT
09-20-2005, 04:25 PM
yup, i found that too, but finding it most complicated and time consuming to follow.

i cant see how different my test rusults i posted above would greatly differ compaired to if i followed this tutorial. (other than the inbuild 9.5 AO method is much faster to use with no messing) and this tut was written before the 'easy-does-it' AO shader in 9.5.

Multi passing is a fiddly time consuming process i cant always sit down and play with when deadlines lume. (hence i pressume why the 9.5 method is available).

as i say, what would the difference in image quality be if i followed that tut compaired to the AO shader i used above? if the results would be extremely subtle or nearly not noticable, then i'd prefer not to use it. how much more different can an AO image look?

MJV
09-20-2005, 04:38 PM
Ambient occlusion simulates the shadowing that results from an ambient environment. It does not simulate shadowing from direct illumination. If you use it with direct illumination you get shadows where they shouldn't be. It is simply wrong and easily identified as such by the trained eye. The untrained eye will simply detect that something is wrong or else stylized.

STRAT
09-20-2005, 04:53 PM
Ambient occlusion simulates the shadowing that results from an ambient environment. It does not simulate shadowing from direct illumination. If you use it with direct illumination you get shadows where they shouldn't be. It is simply wrong and easily identified as such by the trained eye. The untrained eye will simply detect that something is wrong or else stylized.

hmm, well i must be doing it right somewhere along the line as i certainly have a trained eye and i cant pick up any 'wrong' shading anywhere.

even testing now with just the ambient and ao together, and the main image and direct separate, the final result in near as damn it identical, appart from the fact the general feel and lighting in the multipassed render is most flat and dull.

MJV
09-20-2005, 05:10 PM
These shadows don't make a lot of sense to me because supposedly this is the side of the building receiving direct sunlight, yet the shadows make it look as if the lighting is coming completely from ambient light, such as total cloud cover. If sunlight is hitting these areas directly, there will be no very dark and soft shadows such as these.

http://www.mvpny.com/AOShadowsStratMV.jpg

STRAT
09-20-2005, 05:15 PM
if you look, all the shadows are that dark. they are this dark because i hadn't played with the contrast control in the AO panal at that time.

turning the contrast control to a negative figure really makes them sit better and not as strong.

(rendering now to show you :) )


[edit]

http://www.nikclark.com/strat/cgt/aotest.jpg


these inital tests i did before i was better aquainted with the settings

before i had a strong contrast and a large spread.

AdamT
09-20-2005, 05:24 PM
But changing the AO contrast is global. What MV and Simon are saying is that AO should react to direct lighting, just as GI lighting does. It doesn't show up much in these scenes because there isn't a strong direct light source, but IMO it would still look better if done the right way. But maybe not enough better to justify the time....

STRAT
09-20-2005, 06:04 PM
dont get me wrong chaps, and i'm not trying to start an argument here atall.

i'm not saying what MV ans Simon are saying is wrong, infact they aren't wrong.

i'm only here trying to champion the new global AO shader that 9.5 has inbuilt, which really does do an excellently close job to real gi as it stands.

i'm sure there's several methods of tweeking allot of shaders in c4d to gain that extra realism, but it's not needed imo. if ur going to go that far in faffing about using the ao shader, why not just use real gi? the rendering speed differences would probably be on the real gi side too.

mastering the ao panels controls is more than enough for a convincing ao render without havting to resort to multipass rendering.

besides, how am i meant to render a multi passed ao animation? impossible in my possition. the 1 stop solution of the ao shader does the trick very effectively.

MJV
09-20-2005, 11:52 PM
I've put together some tutorial files on how to use AO with Janine's kitchen scene. The movie shows the differences between applying AO globally or selectively to the ambient channel only, as well as the correct layering in AE. The zip file includes both C4D and AE project files. I may make a full blown tutorial out of this eventually but I think the movie and files together should be pretty self explanatory.

http://www.mvpny.com/AOtutorial/

In short, use the ambient layer as the base layer in AE. Place the AO layer above it in multiply mode. This multiplies the ambient by the AO layer. Place the diffuse-specular-shadow layer above that in add mode. Then place the reflection and refraction layers above that again using add mode.

AdamT
09-21-2005, 04:51 AM
besides, how am i meant to render a multi passed ao animation? impossible in my possition. the 1 stop solution of the ao shader does the trick very effectively.
Why? It isn't any more difficult than rendering a multipass still--as long as you have plenty of HD space. Just composite in AE (or your compositor of choice) as you would in PS.

STRAT
09-21-2005, 08:14 AM
Why? It isn't any more difficult than rendering a multipass still--as long as you have plenty of HD space. Just composite in AE (or your compositor of choice) as you would in PS.

hehe, sorry, thats why i said it's impossible for me. it'll suprise you to learn my office havent as yet (after 8 or 9 years) bought me any compositing s/w for animations. i only have photoshop :sad::sad::sad:

i composite my animations using backround rendering. how desparate is that i ask you???

besides, with carefull tweeking the AO shader can produce very desirable results, maybe not accurate like MJV and Simon point out, but pretty near as damn it - darker and lighter where it should be. (also, 1 or 2 mins post in ps can get the same results with the AO pass layer)



thanks for the time and the tut MJV :)

AdamT
09-21-2005, 02:31 PM
hehe, sorry, thats why i said it's impossible for me. it'll suprise you to learn my office havent as yet (after 8 or 9 years) bought me any compositing s/w for animations. i only have photoshop :sad::sad::sad:
Damn, that's nutty. You need to do some arm twisting! AE standard edition isn't that expensive and I'd consider it absolutely essential for your work. Maybe keep an eye out for it on E-Bay and alert your buying department if a good "Buy Now" deal comes along.

ThirdEye
09-21-2005, 02:35 PM
Yeah, that or combustion

STRAT
09-21-2005, 02:39 PM
Damn, that's nutty. You need to do some arm twisting! AE standard edition isn't that expensive and I'd consider it absolutely essential for your work. Maybe keep an eye out for it on E-Bay and alert your buying department if a good "Buy Now" deal comes along.

just a quick OT note, other than the obviouse, will AE also do what say a normal comping program like sony vegas or premier will do? can i use AE as my one stop shop, or will i need a proggy like premier to fill in the gaps?

all i ever need to do basically is compile rendered images into mov's and avi's, at whatever image size and video output i choose. will AE do all that for me?

perhaps i should start another post

AdamT
09-21-2005, 02:42 PM
Yeah sure, if it's just a question of merging a bunch of clips together with simple transitions AE will do fine.

Ernest Burden
09-21-2005, 02:49 PM
will AE also do what say a normal comping program like sony vegas or premier will do? can i use AE as my one stop shop

Yes, though the workflow is very different. AE is Photoshop with a timeline. Premiere is build around the timeline. I have both, use Premiere 99% of the time, but for layering stuff AE is better.

Someone posted this in the Maxwell forum:

Free Video Editing software:

Avid FreeDV
Wax
ddclip Free
Zwei-Stein
HyperEngine-AV
Mr Free Free
Virtual Edit Free DV
Jahshaka
VirtialDub

STRAT
09-21-2005, 03:07 PM
and like Premier, AE is a stand alone package?

AdamT
09-21-2005, 03:46 PM
and like Premier, AE is a stand alone package?
Yes. All the Adobe apps work really well together, but they work nicely as standalones too.

I have AE and Premiere too, but I use AE 99% of time. :)

STRAT
09-21-2005, 03:50 PM
well in my old firm years ago i regulaly used Premier, but wasn't never a massive fan of it. then recently i used the demo of Vegas and fell in love with it, and it's a similar price to AE, but if AE does the same, with the added ability of allowing me to use multiple pass rendering or separate rendered layers into my work (which i something i keep meaning to get into) then perhaps it's time i downloaded the demo

interactiveBoy
09-21-2005, 11:54 PM
the thing to realize is you're trying to compare a compositing app with a real-time non-linear video app.

AE is for compositing, you can stack nearly infinite amount of layers and effects and nested compositions, etc.

Premiere and Vegas are non-linear video editors, although, of the two, Vegas has more (much, much more) going for it.

AE will always need to be rendered to ram for realtime playback, but is an artist's canvas for compositing video and effects.

That being said, I use AE for compositing and for finishing also. I have premiere but NEVER touch it. I've gotten used to the workflow, so it's no big deal to do it all in AE for me.

STRAT
10-12-2005, 05:11 PM
optomisations fellers!

ok, i know you can get nice hybrid gi/ao renders, but what about individually?

we've discussed the gi situation in the other thread, and came to several conclusions, but what methodes are there for optomising global ao?

look at these 2 simple testers -


Image 1, normal gi

http://www.nikclark.com/strat/cgt/ao01.jpg



image 2, AO

http://www.nikclark.com/strat/cgt/ao02.jpg



as you can see, the gi render is twice as fast, and i could have even used lower samples and still got a more pleasing image.

the ao image is pretty good, but not as crisp and the render time is doubled. the ao render settings are infinately more simple to master than the gi settings. they are pretty logical and predictable and you dont need to be a rocket scientist to work them out like you sometimes need to be with gi.

but how would you, if you could, go about drastically lowering the render time to something closer to the gi time whilst retaining graininess quality. as you can see, i really dont want to lower the max samples any more.

lowering the accuracy means you must up the max samples, and not saving on render times.

is optomisation muchly possible?

lllab
10-12-2005, 08:19 PM
your ao setting is wierd/high, no wonder it takes longer than GI.

in the 9.5 addenum is a example of accuracy near 0 but a lot of samples. it took only 23% rendertime.
i would also check the minimum raydistance- 0 is not necessary here if your modell isnt extremly detailed. i also use a negative contrast.
my settings are anormally about 30% accuracay with 11min 55max samples, but as gI it depends on your scene.

i would really recomend having a look at the 9.5 addenum.

cheers
stefan

Ph0n33z
10-12-2005, 08:32 PM
lllab: It would be awesome if you could show us some examples of how you implement AO and GI into your scenes.

From the way you speak about it, it appears as though you have afound a happy medium which could help all of us out!

Thanks!

STRAT
10-13-2005, 08:24 AM
your ao setting is wierd/high, no wonder it takes longer than GI.

in the 9.5 addenum is a example of accuracy near 0 but a lot of samples. it took only 23% rendertime.
i would also check the minimum raydistance- 0 is not necessary here if your modell isnt extremly detailed. i also use a negative contrast.


cheers
stefan

i normally do use a setting of accuracy around the 0 mark, but as i say, by the time you compensate using higher samples your render speeds dont really change.

and yes, i know how to use the ray distance and negative contrasts, i just didnt need to bother in this example. the negative contrast makes it look better, but doesnt speed up rendering. the raydistance must also be determined by your scene at the time, then you're more or less stuck with it.


you're examples of settings are very similar to the ones i normaly use, and they compliment gi extremely nicely. i too have found i can drastically lower my gi settings if i also use a moderate ao setting with it. it's a nice combination both render speed wise and visually :)

i was just hoping to get an answer for faster indipendant ao thats all.

CGTalk Moderation
10-13-2005, 08:24 AM
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.