Jump to content
Hash, Inc. Forums

Screen Space AO


jason1025

Recommended Posts

Not a tutorial as such this but to get you started;

Turn ON SSAO in the render options.

Expand the options triangle for SSAO and turn On the first setting 'SSAO Effect Only'.

Leave everything else at their defaults so you have a known starting point for further experimenting.

Open a Chor and pop some things into it and render out 1 frame.

What you will get is a white image with just the SSAO effect. This makes assessing the effects any changes you then go on to make to the other SSAO settings much easier to see and asses.

Having MultiPass On can also affect the reaults. Here's some I made earlier;

FinalRender_Only0.tga

FinalRender_SSAO0.tga

SSAO0_Only.tga

SSAO_Only_No_MultiPass.tga

Link to comment
Share on other sites

I have found that the results are not only based on distance, gamma values (haven't tried other variables), but also the resolution rendered, how much modeled detail as well as bumps, displacement, hair, and probably model sizes.

 

Everything rendered multipass (2 pass), cpu SSAO, 18a/32

 

the SSAO effect in first image 1280 x 900 with all defaults looks quite different from the top render in 2nd image (640 x 450) - all defaults

 

bigger distances = darker

smaller gammas = darker

 

EDIT: I was wrong. SSAO does not reflect bump maps. And I have no idea why one eye isn't getting the SSAO effect on some models, as they are all the same.

 

EDIT: more findings:

 

I see no effect from changing radius only (changed from 1 default to 1000 and to .1). BLUR must be ON (duh) to see any effect with changing radius. Bigger radius = Bigger blur

 

Could not see any effect from changing Luminence Influence from 0 (default, and minimum) to 1 (maximum)

 

Changing density from 50% (default) to 100% increased render times (twice?) but had a slight darkening effect (not worth it)

 

And final images are without SSAO (2 pass - 23 secs) and with default settings SSAO applied by A:M (43 secs)

1280x900dist25Gamma1.jpg

640x450comparedistancegamma.jpg

100bumpNOdisplacement.jpg

BlurON2Radius0.jpg

NOSSAO0.jpg

WithDefaultSSAO0.jpg

Edited by NancyGormezano
Link to comment
Share on other sites

I'm not a big fan of heavy gray shadows on things, so one thing I've been doing is after I render the AO image separately, I place the color image on top in Photoshop and use the "color" layer effect. This gives me an AO shot in colors. I think take that and put it over the color image and set the layer effect to "multiply."

 

It's a matter of taste, but I like the colorful stuff.

 

Oh and I usually blur the AO layer, too.

 

On the downside, it does sometimes put shadows in where shadows wouldn't be... like a halo around an object. I take the eraser to those.

Link to comment
Share on other sites

may it be that the normals are facing the other way for the eye that does not receive any ssao?

 

Good hint. So yes, there are some funny patches on the irises (but those patches aren't meant to be seen). But weird thing is that both eyes have the same funny patches and all the models have the same eyes. I would expect to see same problem on all eyes?

 

However, it's a good idea to try and fix, but I also notice in 18a/32 when I try to isolate the irises, to do anything with them, that A:M stops responding. Models were developed in 16b. I will go back to 16b to try and modify and see if that makes difference (wouldn't hurt)

Link to comment
Share on other sites

The beauty of the vid tutorial is a master like you will never have to remember it again. I often look at my AM vid tutorials. Its strange because Its like listening to a future knowledgeable time traveling self.

 

Only hes from the passed and I cant remember even making the video tutorial.

Link to comment
Share on other sites

  • Hash Fellow

While I was researching...

 

Would you believe this AO-look render comes from just one Sun light? It's not on a spinning rig or on a spline or z-buffered, it's a regular ray-traced Sun light like we've had for 15 years or more.

 

OneSkyB_1000cm_276sec.jpg

Link to comment
Share on other sites

  • Hash Fellow
Im confused. Is that with Screen AO applied? Also can you post the clear plastic model on the left. I like it.

 

No SSAO, no AO, just a standard light.

 

That happens to be a glass casserole dish.

 

Casserole_Dish.mdl

 

It's really just a quick doodad I needed for this test scene. I'm still adding stuff to it to show what works and what doesn't.

Link to comment
Share on other sites

Nice Robert!

 

I am going to guess this is done with a very large sun type light (100 feet-ish?, small fall-off), overhead pointed straight down, with multiple/lots of rays (not sure how many), distributed in passes?, (not sure how many passes - 9 or more?)

 

Has encouraged me to play more with sun type light!

Link to comment
Share on other sites

  • Hash Fellow

I was going to sit down this morning to finally record this tut and now they are smashing the street outside my house. :angry: Maybe this evening I'll get it done.

 

I am going to guess this is done with a very large sun type light (100 feet-ish?, small fall-off), overhead pointed straight down, with multiple/lots of rays (not sure how many), distributed in passes?, (not sure how many passes - 9 or more?)

 

Yes, it is a very large sun light (1000 cm) tilted somewhat forward rather than straight down. Only 2 rays, but not "distributed". More passes makes more rays and this was at least 100 passes, but it still only took 276 seconds to render.

 

I'm not sure what "size" truly means for a sun light which is already an infinitely wide source of parallel light rays, but in practice it seems to govern how much those rays are tilted among the passes.

Link to comment
Share on other sites

  • Hash Fellow

Here's are some basic settings i can suggest until i get my tut finished:

 

SSAO Effect Only ON (while you are testing your SSAO settings)

Samples 32 Higher if there is obvious stair-stepping the shadows.

 

set Radius and Distance to a large number like 200

 

Gamma 1.0

Density 100%

Softeness 50%

Luminance Influence 0

Blur the effect OFF (the Radius parameter below Blur is for Blur effects only)

 

 

 

gradually reduce Distance until the black halos are gone

reduce Radius if the shadow areas are too wide

 

SSAO can't be tested in an onscreen render, you have to render to file.

regular AO should be OFF, of course.

Link to comment
Share on other sites

  • Hash Fellow

Another tidbit.

 

SSAO works better on a multi-pass render than a regular render BUT multi-pass set to an even number of passes tends to have more halo and weird artifact problems than with an odd number of passes.

 

I don't know why since SSAO is only figured once at the end of a render no matter how many passes are used but it makes a visible difference in my test scene.

 

I only noticed this after a couple weeks of testing with ... 4 passes. <_>

Link to comment
Share on other sites

SSAO works better on a multi-pass render than a regular render BUT multi-pass set to an even number of passes tends to have more halo and weird artifact problems than with an odd number of passes.

 

I don't know why since SSAO is only figured once at the end of a render no matter how many passes are used but it makes a visible difference in my test scene.

 

Interesting - I usually am using only 2 passes or 5 passes and have not noticed a difference in SSAO (same chor) - but I will go back and reinvestigate. (18a/32)

 

I like that it is only figured once on the last pass, as my normal passes for a particular chor takes maybe 12 secs, and the SSAO adds an additional 20 secs to the last pass.

 

I also found that the resolution of the image influences the SSAO look (larger is darker effect). See images in my post above - looks different for 1280 x 900 versus 640 x 450. (compare 1st image and the top result of the 2nd image)

 

I have been using distance = 25 (default) and have found it plenty dark enough (1280 x 900). In fact, for this chor, I found ALL the default settings to be good.

 

Maybe the version 64 bit you are using makes different results than 18a/32?

Edited by NancyGormezano
Link to comment
Share on other sites

  • Hash Fellow

Here's an example comparison of 9 passes and 16 passes. Flip between the first (9 passes) and last frame (16 passes).

 

9vs16passes.mov

 

The anti-aliasing of internal details is better with 16 passes but everything else is better in the 9 pass version

Link to comment
Share on other sites

The anti-aliasing of internal details is better with 16 passes but everything else is better in the 9 pass version

 

Werry Intewesting. I shall have to experiment more.

 

What is the scale of your models? Mine are about 3 feet high (90 cm).

 

Focal length for camera? Mine is default 70. Don't know if that has anything to do with anything, it did with FAKEAO.

 

Do you know what the units are for distance? is it pixels? cm?

 

What were your SSAO settings for that movie?

Link to comment
Share on other sites

  • Hash Fellow
What is the scale of your models? Mine are about 3 feet high.

 

My scene is 200 cm from the ground to the top of the rabbit's ears

Focal length for camera? Mine is default 70.

 

Same here.

 

 

 

 

Do you know what the units are for distance? is it pixels? cm?

 

I think "radius" represents pixels on the screen

 

 

What were your SSAO settings for that movie?

 

I'm thinking that ti depends a lot on the scene but here's what I used for that shot...

 

(the gammas setting was set extra low to make the artifacts more visible for study)

 

SSAOSettings.PNG

 

1

Link to comment
Share on other sites

  • Hash Fellow

"Radius" roughly represents the screen distance that one surface can shadow another and/or the size of the shadow effect. If it is too small, the shadow is clipped before it fades out completely.

Link to comment
Share on other sites

Thanks Robert.

 

And I can't believe I missed that 1st radius property! I kept thinking you were refering to the radius associated with the Blur. Duh on me.

 

But still, I have no idea what the distance property means or what units it is (after the first radius), but I do notice if I decrease the distance (leaving radius constant, default), effect gets lighter. Is it a falloff?

 

I haven't yet seen any effect from changing Luminance influence (goes from 0 to 1)

 

Back to the experimenting.

Link to comment
Share on other sites

  • Hash Fellow
But still, I have no idea what the distance property means or what units it is (after the first radius), but I do notice if I decrease the distance (leaving radius constant, default), effect gets lighter. Is it a falloff?

 

Distance seems to control front-to-back influence. Larger numbers make it easier for an edge to shadow something behind it. Too large numbers create undesirable dark halos around the edges of objects, although with odd multipasses that problem is not so severe overall.

 

A lot of stuff i thought i knew has changed since i found this even-odd multipass issue.

Link to comment
Share on other sites

  • Hash Fellow

I've put in a bug report to Steffen.

 

I'm going to temporarily table my tutorial effort until I see what he thinks about the multipass thing.

 

Until then, I still suggest this workflow...

 

 

SSAO Effect Only ON (while you are testing your SSAO settings)

Samples 32 Higher if there is obvious stair-stepping the shadows.

 

set Radius and Distance to a large number like 200

 

Gamma 1.0 (try 0.8 for darker effect)

Density 50%

Softeness 50%

Luminance Influence 0

Blur the effect OFF (the Radius parameter below Blur is for Blur effects only)

 

Do test renders with an odd number of multipasses. SSAO can't be tested in an onscreen render, you have to render to file. regular AO should be OFF, of course.

 

 

Reduce Distance if the shadows extend too far behind objects or if there are dark halos.

Reduce Radius if the shadow areas are too wide for your taste. Raise Radius if the shadows are dropping off too suddenly.

 

Do more test renders.

Link to comment
Share on other sites

For my case, 1280 x 900 ver 18a/32:

 

I left distance (25), gamma (1), blur (off), softness (50%) - all at defaults.

 

I rendered mostly at 2 pass, and tried 5 pass for one case. Did see some difference with the 5 pass, but couldn't say which was better, for my taste. Probably the 5 pass.

 

I varied samples (default =16, 32), radius (default =16, 100), density (default = 50%, 100%). The rendering times shown are for Cpu SSAO computation only (last pass). The other computations consumed 12-13 secs/pass

 

Biggest bang for buck for this scene was increasing the radius from 16 to 100, IMO. Render time went from 20 secs to 41 secs, and looked better (for my taste).

 

Least bang for buck was increasing the density to 100% and render time went to over 5 mins! Not worth it.

 

Use keyboard arrow keys (forward, back) to see the differences. There are 5 frames. (hope that works on forum, it works on my qt player)

00.mov

Link to comment
Share on other sites

Use a 3 pass instead of a 2 pass and I think the fringes will be gone.

 

Ah yes...The artifacts get disguised somewhat when combined with the color render. I also notice that number of black spots on lion's hair (in this 2 frame movie) is also less when go to 3 pass, but overall, fringes hanging off lions feet are gone. Unfortunately I like the interior ssao better on lion with 2 pass. But more than likely this will be addressed (differences in #passes).

 

2 frame movie - 2 pass (1st frame) versus 3 pass (2nd frame) - both radius 50, all other ssao settings default.

01Lion2pass3passcompare.mov

Edited by NancyGormezano
Link to comment
Share on other sites

This is the look I want. Ok default settings. I have played quite a bit with SSAO and have not achieved this look.

 

What are the basics?

 

Um..not sure I understand question. Do you mean the basics of SSAO? Do you want my SSAO settings for this chor? I suspect each chor will have to be handled differently, depending on your model's sizes, their amount of modeling detail, the final render resolution, maybe camera angle, and currently (until fixed) the number of passes.

 

I found that for my stuff, I just had to play with the radius (how far out the occlusion/shadowing effect would spread), and up it from default 16 to 50 or 100. There is some addtional descriptions starting here earlier on in this thread which describes/shows some effects of changing SSAO settings (as well as render times). Post your results/settings and maybe we can suggest what to do?

 

In this particular chor, I was going for a late afternoonish/twilightish typish lookish. This chor also has a 100 foot width, 50% white overhead Sun type light (with 1 ray trace shadows, 100% dark), and 3 kliegs with z buffered shadows (25% soft, 80% dark, 1 with flare on), uses 50% white Global Ambiance, front projected ground plane. I can post those settings as well if you'd like?

 

I found that I particularly like how SSAO fills in the interior crevices with shadows on the model's detail, hair, displacements, but prefer the shadows from lights that get projected from a direction.

 

EDIT: added the SSAO only render (2 pass) to show what SSAO contributes to scene. All other shadowing comes from the lights. The full render with SSAO was 3 pass.

02CameraSettingsLionCrazyBears.jpg

CrazyyellowPandabear2pass1ray100footFalloffNODistributebluediffuseOFFklieggroundreflec50radiusSSAObriteblueback3pass0.png

CrazyyellowPandabear2pass1ray100footFalloffNODistributeFOGbluediffuseOFFklieggroundreflec100radiusSSAOonly0.png

Edited by NancyGormezano
Link to comment
Share on other sites

Thank you Nancy that is what I needed to see. My settings for the radius were incorrect. Once I changed that settings wow the effect were great and what I am looking for!!! Thank you

 

Great! and it would be even GREATer if we could see your results! Would love to see it.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • Hash Fellow

Here is the introduction of the tutorial on AO and SSAO I was working on before I stopped working on it.

 

I though it was important to make sure people knew what these effects were trying to do but maybe it's too obvious?

 

This is unedited. There are several spots where I repeat myself to try to phrase something in a better way with the intention of editing it later.

 

 

Link to comment
Share on other sites

  • Admin

Very nice Robert!

 

I appreciate your efforts and learn a lot from them.

 

Just the other day I was observing the sky and environment around me and the thought occurred that everything looked very unreal. It was an amusing moment because how can you get any more realistic than real? And yet that is what I was perceiving. This can present quite a dilemma in that we can spend an inordinate amount of time lighting a scene only to have it seem like it isn't real. I wish I could go back and study that scene a little more to figure out exactly why it looked the way it did but at a guess I would say that depth cues were off because of stormy weather all around and in the distance. This created harsh light on physical objects that would normally be softer and soft light was diffusing areas that normally would have more detail. I can't help but wonder if a photo might have captured that moment well but in my experience photos never quite do justice to the real thing. There is always something lost in translation.

 

I have been using SSAO of late and have been enjoying the look coming out of A:M's renderer. Thus far I'm liking the look on my Sci Fi WIP.

Link to comment
Share on other sites

  • Hash Fellow
Just the other day I was observing the sky and environment around me and the thought occurred that everything looked very unreal.

 

I can recall a few days like that where things looked very odd. At the time I thought the skylight was the wrong color. It was an overcast sky but somehow it looked very bright and orange.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...