Welcome to the Poser Forum

Forum Moderators:  Boni, Kendra    Forum Coordinators:  darknewt, Jules53757, SpookieLilOne, gmm2

Poser F.A.Q (Updated: 2016 Nov 29 4:50 pm)


 Subject: Realism Tip - Use the Ambient_Occlusion node

bagginsbill opened this issue on Oct 25, 2007 · 273 posts

Top of Forum Print

  bagginsbill    ( ) ( posted at 8:54AM Thu, 25 October 2007 · edited on 8:55AM Thu, 25 October 2007


I'm writing this little tip because I bet a lot of beginners don't even know about this.

When showing something on a surface or floor, a lot of realism is lost because we don't get nice soft "contact" shadows. Adding the Ambient_Occlusion node to your floor material will improve this dramatically.

The neat thing about using it on the material, instead of AO on the light, is that you can restrict this expensive operation to a subset of your scene items, and you get more control with regard to different parameters in different places, and also it just works better than Light based AO.

I've done a bunch of experiments with regard to quality and render time. Knowing the following info will help you skip a lot of wasted time.

Setting Samples more than 3 is important. 4 is clearly better than 3 and not much slower. 5 is modestly better and not much slower. 10 is great but much slower. More than 10 is not worth it.

The MaxDist parameter controls how far the effect goes. I have no idea what the units of this parameter are. I find that 30 to 50 produces good results in most cases.

The Strength parameter seems to do nothing. 0, 1, .5, all produce the same results. No matter - the MaxDist parameter pretty much also controls the strength of the effect. Lower values produce less shadow.

In Poser 7, Irradiance Caching (render setting) will have an impact on quality and speed. Lower values are faster, and sometimes produce no loss of quality, depending on your geometry. IC 0 to 50 seems to produce pretty much identical results. Always try a low IC for speed first - if the results are good, you're done. Sometimes, though, the maximum value is necessary for quality, but you get a huge increase in render time. Note that if you type in 100, it often resets to 99 or 98 - wierd. Ignore that. It works.

I've attached two renders to demonstrate. I was messing about with refining my leather shading techniques, and was unhappy with the final render, on the left. It still looked fake. Adding AO to the ground, I rendered again. The shoe pixels are identical, yet the second render looks more real! It's in the shadows baby.

On the bottom is a screen shot of how to wire the node into your shader. Just plug it into the Diffuse_Value. My render actually used a MaxDist=500, which produced a much broader darkening. This made the shadow go beyond a simple contact shadow, but I liked the effect.

Click the image to see it full size.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 8:59AM Thu, 25 October 2007 · edited on 9:00AM Thu, 25 October 2007 · @3099177

Oh hey I just discovered another thing. The MaxDist parameter changes if you alter your Poser Display Units. This means that the number you should use will depend on your Display Units setting. My units are always inches. So 50 is 50 inches (although clearly it doesn't actually go that far, more like 5 inches.)

So if you're using centimeters, my 50 is your 127 (roughly). If you're using Poser Native Units, my 50 is your .484496.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  SSAfam1    ( ) ( posted at 9:26AM Thu, 25 October 2007 · edited on 9:35AM Thu, 25 October 2007 · @3099188

Yay you're here today and we get to have a material room discussion. Excellent!


  Tyger_purr    ( ) ( posted at 9:31AM Thu, 25 October 2007  · @3099192

a little more info

Poser 7 has a "Set Up Ambient Occlusion" wacro in the material room that will automatically add the AO node and plug it into your Diffuse_Value and Specular_Value of your current material.

Occlusion Master is a wacro avaiable here (i believe from Face_off) that will let you set up and adjust  an AO node on mutliple materials of the current figure/prop.

and thank you Bagginsbill for the explanation. Keep up the good work

My Homepage - Free stuff and Galleries


  SamTherapy    ( ) ( posted at 9:33AM Thu, 25 October 2007  · @3099193

Nice one, BB.  Karen suggested I use the technique on one of my pics so it's nice to have a practical demostration.

Coppula eam se non posit acceptera jocularum.

My Store

My Gallery


  bagginsbill    ( ) ( posted at 11:00AM Thu, 25 October 2007  · @3099231


Quote - Poser 7 has a "Set Up Ambient Occlusion" wacro in the material room that will automatically add the AO node and plug it into your Diffuse_Value and Specular_Value of your current material.

 

Don't use that wacro. It should not attach AO to the Specular_Value. Specular reflections simulate the direct bouncing of light from the light source to the camera. Such light beams are not ambient at all, but are direct illumination from a particular spot, reflected towards the eye. The presence of nearby objects does not stop a specular reflection in real life, unless they are directly in the path of the beam. In other words, ordinary shadows handle this correctly. So you shouldn't model that in your shader.

Imagine you have a shiny ball at the bottom of a coffee cup. You shine a spot light into the cup. Should you see a specular reflection on the ball? Yes you should, unless (and only unless) the rim of the cup blocks the light directly. If you suppress that specular with an AO node, it won't be real. The specular reflection is not coming from all over, so should not be decreased just because there are object nearby but not in the way.

Diffuse reflection, however, is a collection of light beams bounced from lots of different directions. So you do want to block the diffuse component of a shader using AO, so that it reacts properly to the presence of geometry nearby, in pretty much any direction.

My attached image demonstrates. First is without any AO. Second is with AO on Diffuse_Value of all cup, ball, and ground. Third is with AO on Diffuse_Value and Specular_Value. Notice how much the ball's specular is supressed. This is wrong. It's hard to notice, but the specular on the lower part of the cup handle has also been modified slightly by the AO - this is not realistic.

If I posed a character's hand near the cup handle, the speculars would go away, even if the hand does not block the spotlight.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 11:17AM Thu, 25 October 2007  · @3099237


Earlier I mentioned that the AO Strength parameter does nothing. This is a problem, because sometimes you need to adjust the degree of darkening. Consider the ball and cup - just because the cup blocks some light from the sky, doesn't mean the ball and cup should go completely black. There's still some light bouncing around inside the cup itself, so the ball would be partially lit by the cup.

In the attached image, I show how to make your own strength for the AO. Plug the AO into a Blender as shown, and adjust the darkest shadow you want by changing the Input_1 value to an appropriate shade of gray.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  Tyger_purr    ( ) ( posted at 11:19AM Thu, 25 October 2007  · @3099240

Quote - Don't use that wacro. It should not attach AO to the Specular_Value. Specular reflections simulate the direct bouncing of light from the light source to the camera.

 

Good to know. although most products that i have run across, the Specular_Color is set to black so it would not make any diffrence.

My Homepage - Free stuff and Galleries


  bagginsbill    ( ) ( posted at 11:23AM Thu, 25 October 2007  · @3099246


Here's another trick. Inside the cup, the occlusion is mostly from the ball. We can use this knowledge to create a little fake Global Illumination. The ball is red. Where the ball is very close to the cup, the AO will go dark. Use that info - add some red to the shade of gray on the Blender Input_1, and connect it to the cup's Diffuse_Color instead of the Diffuse_Value.

Now the cup is red where the ball is causing AO.

Unfortunately, we're also getting red AO on the outside of the cup. The way to handle that is to edit the cup's material zones, using the Group tool, so that there is an inside material and an outside material. You'd then be able to use the gray+red only on the inside, leaving the outside still plain gray.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  Acadia    ( ) ( posted at 11:33AM Thu, 25 October 2007  · @3099257

Well, darn! I just finished a render where I thought that while things were sitting on the floor they looked "pasted" there and planned on using the "darken tool" in post work to fix it. Now I come here and see this! I think I'll take another 3 hours and do another render,  LOL

hugs

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Acadia    ( ) ( posted at 11:38AM Thu, 25 October 2007  · @3099259

I have a question.

I put a cloth plain into a box and added a texture to it that looks like a rich top soil.

However when I render it looks like a flat plane that is textured like top soil, LOL   There doesn't seem to be any "interaction" with the box at all IE: the shadows which are visible in your coffee cup/ball example.  I don't have that effect and the result is pretty flat and unreal looking.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Acadia    ( ) ( posted at 11:42AM Thu, 25 October 2007 · edited on 11:54AM Thu, 25 October 2007 · @3099260


Here is an image of what I mean. How  would I go about getting that nice shadowed edge without the shine on the soil. Do I attach the AO node to the casket or the cloth plane? I'm a bit confused about where to put it when it's not "ground"

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Gareee    ( ) ( posted at 12:14PM Thu, 25 October 2007  · @3099280

Hey BB.. just had a question/thought... What's the best node setup to use an image as background? I'm sure you prolly have a trick or two up your sleeve about that setup.

Wouldn't a good default load setup have the ao applied on the ground plane, and a graphic backdrop with whatever node mojo you'd have for it?

Granted, no two renders are the same, but a good starting point would be useful.

Hmmm..... can a node setup be done for a proceedural gradiant "sky" effect? (I lightwave, you can define the highest sky point as one color, the bottom most as another color, and adjust the blend point with a setting. Maybe a sky gradiant like that could be setup in poser, with a number of gradiant colors, so you could simulate, say  a sunset "sky"? That could possibly even be hooked into somehow as additional base sky "lighting" of objects?

The moon thing got me wondering is a gradiant could be setup for the sky, rather then loading a prop, and faking a gradiant sky with that.

Way too many people take way too many things way too seriously.

  bagginsbill    ( ) ( posted at 12:25PM Thu, 25 October 2007  · @3099286

Quote - I have a question.

I put a cloth plain into a box and added a texture to it that looks like a rich top soil.

However when I render it looks like a flat plane that is textured like top soil, LOL   There doesn't seem to be any "interaction" with the box at all IE: the shadows which are visible in your coffee cup/ball example.  I don't have that effect and the result is pretty flat and unreal looking.

 

Put the AO node on the dirt's Diffuse_Value just like I showed. The AO node will darken whatever it is on, based on other things being nearby.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 12:26PM Thu, 25 October 2007  · @3099287

Quote - Here is an image of what I mean. How  would I go about getting that nice shadowed edge without the shine on the soil. Do I attach the AO node to the casket or the cloth plane? I'm a bit confused about where to put it when it's not "ground"

 

The soil is shiny?!? Do you have specular on it?

You probably also want to put the AO node on the casket too. It will do the right thing.

I don't have a casket. Where can I get one? Free stuff? I'll go look.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 12:29PM Thu, 25 October 2007  · @3099288

Quote - Hey BB.. just had a question/thought... What's the best node setup to use an image as background? I'm sure you prolly have a trick or two up your sleeve about that setup.

Wouldn't a good default load setup have the ao applied on the ground plane, and a graphic backdrop with whatever node mojo you'd have for it?

Granted, no two renders are the same, but a good starting point would be useful.

Hmmm..... can a node setup be done for a proceedural gradiant "sky" effect? (I lightwave, you can define the highest sky point as one color, the bottom most as another color, and adjust the blend point with a setting. Maybe a sky gradiant like that could be setup in poser, with a number of gradiant colors, so you could simulate, say  a sunset "sky"? That could possibly even be hooked into somehow as additional base sky "lighting" of objects?

The moon thing got me wondering is a gradiant could be setup for the sky, rather then loading a prop, and faking a gradiant sky with that.

 

For an image on a background, load a one sided square. Set Diffuse_Value = 0, Specular_Value = 0. Attach your image to Alternate_Diffuse. Done.

Yeah its probably a good idea to configure your ground plane to have an AO node by default, and save that as your default scene.

As for gradient sky - sure - I do it all the time. In my default scene, I have a giant sphere. I load any gradient I want using nodes. We need a new thread for this. I'll be back.

As for using the environment sphere for lighting as well, you need to have an image for the sphere in panoramic format, and also an Angular Map conversion of that image for your IBL. I discussed this in a few other threads over the last couple weeks.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  Acadia    ( ) ( posted at 12:35PM Thu, 25 October 2007  · @3099289

Quote - > Quote - Here is an image of what I mean. How  would I go about getting that nice shadowed edge without the shine on the soil. Do I attach the AO node to the casket or the cloth plane? I'm a bit confused about where to put it when it's not "ground"

 

The soil is shiny?!? Do you have specular on it?

You probably also want to put the AO node on the casket too. It will do the right thing.

I don't have a casket. Where can I get one? Free stuff? I'll go look.

No, sorry.  I was trying to hurry up and type because someone was waiting at my door,  LOL  that will teach me ;)

The soil isn't shiney. What I meant was without the shine that is on the ball in your image examples.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Acadia    ( ) ( posted at 12:37PM Thu, 25 October 2007  · @3099291

Quote - Put the AO node on the dirt's Diffuse_Value just like I showed. The AO node will darken whatever it is on, based on other things being nearby.

Ok, that seems pretty clear. I'm going to give that a try not only on the soil but a few other items in the scene that look "flat" too and see how it goes. Thanks :)

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Acadia    ( ) ( posted at 12:43PM Thu, 25 October 2007 · edited on 12:52PM Thu, 25 October 2007 · @3099295

Quote - You probably also want to put the AO node on the casket too. It will do the right thing.

I don't have a casket. Where can I get one? Free stuff? I'll go look.

The coffin is by adp001

http://www.sharecg.com/pf/adp__

I will send you a link to my dirt texture.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  Gareee    ( ) ( posted at 12:44PM Thu, 25 October 2007  · @3099296

I figured you could use a loaded sphere for a gradiant sky, but isn't there some way that could be done node wise with the background, so transparency is retained for postwork?

Way too many people take way too many things way too seriously.

  bagginsbill    ( ) ( posted at 1:01PM Thu, 25 October 2007  · @3099307


Quote - > Quote - You probably also want to put the AO node on the casket too. It will do the right thing.

I don't have a casket. Where can I get one? Free stuff? I'll go look.

The coffin is by adp001

http://www.sharecg.com/pf/adp__

I will send you a link to my dirt texture.

 

Ah - I'm downloading it now. But meanwhile, I found some random box which i scaled up. I also found some random dirt texture which i put on a one-sided square inside the box. I'll show you the material I did for the dirt. I added some displacement so it looks less flat, in addition to doing the AO on it and the box and the ground.

I put a Poser Hi-res sphere in to give you a sense of scale. I'd use a figure but that will make my test renders long - i'm trying to go fast.

Here's my box of dirt without AO. Click for full size.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:02PM Thu, 25 October 2007  · @3099308


Here is the box of dirt with AO on dirt, box, and ground. Click for full size. Flip back and forth to compare.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:03PM Thu, 25 October 2007  · @3099309


Here's the dirt shader. Really simple. Color map, AO, and a Fractal_Sum to make it lumpy and uneven using displacement.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:06PM Thu, 25 October 2007  · @3099312

Quote - I figured you could use a loaded sphere for a gradiant sky, but isn't there some way that could be done node wise with the background, so transparency is retained for postwork?

 

I'm confused by that seeming contradiction. Either the background pixels are filled or they're not filled. How would you expect the sky to render but still be transparent?

If you intend to composite your figure onto a background in postwork, why would you want it to render a background?

Compositing with a sphere or a background square is going to fill every pixel and give you the background you want without any postwork, right? Why would you want to composite that with something else?


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  Acadia    ( ) ( posted at 1:10PM Thu, 25 October 2007 · edited on 1:12PM Thu, 25 October 2007 · @3099316

The AO one looks so much better because it now has some dimension to it.

One more question. I notice that you have the diffuse_value set to .3.  When using the AO node do you always want a lower than 1.0 value?  Everything I'm wanting to use this on currently has diffuse_value = 1.0  and when I change it to 0.3 the object becomes very dark in preview. Haven't rendered to see what it looks like yet, but it's really dark in preview.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



  bagginsbill    ( ) ( posted at 1:31PM Thu, 25 October 2007  · @3099326


The Diffuse_Color is multipled with the Diffuse_Value. I was using WHITE with .3 in the Diffuse_Value because I wanted a 30% gray and that's an easy way to do it. If you looked at my other ones, you'd see .7 or .8 or whatever. The point is to set the brightness of your object, it is easier to just set the Diffuse_Value to a number. I rarely use 1, since that means the object reflects 100% of the incoming light. This doesn't leave me much room to mess with lighting or the brightness of individual objects.

There's a common habit among people to always use a Diffuse_Value = 1, but I don't think that's a good idea. It limits your options and tends to make things too bright. It makes it hard to adjust the speculars in a realistic way. Nothing in the real world does 100% diffuse reflection of the incoming light. So get used to using lower numbers. However, in the end, the Diffuse_Value times the Diffuse_Color gives you two ways to lighten or darken something, in addition to actually raising or lowering your light intensities.

Meanwhile...

I got the coffin and your dirt. Nice coffin. I slapped some old wood texture on it. Here is the render without AO.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:32PM Thu, 25 October 2007  · @3099328


Here it is with AO.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:33PM Thu, 25 October 2007  · @3099330


Here's the dirt shader.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:35PM Thu, 25 October 2007  · @3099333


Here's the wood shader for the coffin.

I noticed that the lid is UV mapped stupidly. It repeated my texture. Oh well.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 1:36PM Thu, 25 October 2007  · @3099334


Here's the ground shader.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

  bagginsbill    ( ) ( posted at 2:00PM Thu, 25 October 2007  · @3099355


I love Poser. Slap figure, slap shader, slap pose, done.


Renderosity forum reply notifications have been wonky in the past. I'm testing the waters to see if it's working now. If you ask me something and I don't come back, it probably isn't. (Updated January 17, 2017)

 To create a post you must first sign in or register an account.

Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.