Welcome to Black Liquid Software

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

ShockPuppet

Ambient Occlusion (AO)

50 posts in this topic

I made a video on AO and Banished.

Some important information:

  • AO needs to use UVW channel 2
  • Make sure your textures are not applied to your mesh, and that you are using just a basic light grey material. The default material in 3d studio max is fine.
  • I am using 3D studio Max, but the principle is the same for all 3d editing software
  • Because im using Nvidia Mental Ray renderer, I choose "Ambient Occlusion (MR)" in the video for the "Output". You will choose "Diffuse" or "Lighting Map" if you dont have an AO selection in your software. It works just the same as long as you put a white (255) light in your scene.

 

 

 

 

3 people like this

Share this post


Link to post
Share on other sites

Thanks you alot Shock !!!

 

i have 2 questions:

i saw a light source placed... whatever on the scene ground ... Does it really have no importance where it is placed in the scene ? i would have think it should have been place in front of the building in an angle x-y and maybe at 45 degrees in the air (kinda place where the sun would have been ....)

 

2nd question :

i usually always texture every pieces before i move them to their designed spot so when my mesh is ok, everything is already textured out ... Do I need to save and paint everything with a grey neutral color ... do my rendering, and then cancel back the recolorations to my original textures ?

1 person likes this

Share this post


Link to post
Share on other sites

@Ketchup

The skylight can go anywhere it doesn't matter where it is placed, it is not a direction of light beam, but a full area light from every direction. 

For the materials, they are the correct grey by default, just turn off the bitmap texture while you do the render :)

2 people like this

Share this post


Link to post
Share on other sites

ok, thanks !

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for that, but unfortunately it seems that there is not a single option that is consistent between blender and 3dsmax! 

The UV channels for example. In Blender you can add as many UV views as you wish, however they are called 'UV' then 'UV.001" "UV.002" etc. You can rename them, so when Banished looks for channel 2, does that mean it is looking for a UV map that is specifically called UV Channel 1 and UV Channel 2, or is it just the second one in the list?

I also read that the AO in Blender is not dependent on lighting in the scene, perhaps this isn't true.

The video did give me some ideas of things to play around with, so I'll see if I can get something that works.

Share this post


Link to post
Share on other sites

Hi @ShockPuppet would you mind sharing some screen shots of some buildings with AO applied as a texture?

Share this post


Link to post
Share on other sites

@Necora sure when I'm off my phone I'll do a with and without comparison.

I'm using AO for a variety of visual tricks, other than light/dark it's snow manipulation.

Any particular area of AO interest you?

Share this post


Link to post
Share on other sites

Well, I'm trying to figure out what I a doing wrong with mine. I am using just a white png at the moment, but would like to get a proper AO going on the buildings. The white png works, but it lacks definition, and when I added it to the new crops I made, they are really dark in the light and glowing in the dark. With buildings when I add a proper baked AO, it keeps coming out too dark, no matter what I do. I've tried removing all materials and textures, adding a plane beneath the model, adding sunlight above the model, it seems to make hardly any difference to the AO. Plus, having to load it up in game each time to see the difference is a pain. That is why if I could see a screen shot of a model, a simple house or barn will do, in 3ds max with AO applied as a texture, I can see what is meant to be dark and what is meant to be light, how dark is dark and how light is light, and can play around with my settings to get something similar. 

So for now a basic light:dark AO would be good. 

Edited by Necora

Share this post


Link to post
Share on other sites
24 minutes ago, Necora said:

Plus, having to load it up in game each time to see the difference is a pain

You know that the modkit can see changes you make on the fly? If you load up your mod in the modkit, then Alt-Tab out, and then change something about your building, then Alt-Tab back into the game, it should have changed the building instantly. It's really handy for checking things like sprites/tooltips/drop down menu items. But it should work for model changes and textures, too.

I've never tried it with crops, but you should give it a go.

1 person likes this

Share this post


Link to post
Share on other sites

I did not, but thanks that makes life way easier. It works with AO, doesn't work with changing materials, you have to re-build for that.

So after some playing around, esp. with the hint above from Kralyerg, I think I've got something pretty respectable...

From this..

Screenshot44.jpg

To this..

Screenshot51.jpg

I'd still like to see those screen shots though Shock if you don't mind.

1 person likes this

Share this post


Link to post
Share on other sites
2 hours ago, Necora said:

I'd still like to see those screen shots though Shock if you don't mind.

im currently fighting my pc for supremacy, apparently it doesnt like doing a hundred things at once. i'll get them up soon, might even do a video its better

1 person likes this

Share this post


Link to post
Share on other sites

No AO:

dKjWQe.jpg

 

 

With AO

KFNDnc.jpg

 

ignore the backs of the blades thats just in viewport lighting

 

see how the base is darker at the seam where the platform is? and its like a smooth gradient blend

 

 

1 person likes this

Share this post


Link to post
Share on other sites

Another With AO

1pngWITH.png

 

And without:

withoutAO.png

1 person likes this

Share this post


Link to post
Share on other sites

Thanks, those help a lot. So here are mine...

Without AO - in 'solid' mode (texture mode without a texture is just pure white). Note that materials are applied here, but the 'Diffuse' has been turned to pure white and intense. If you bake AO with the 'normalized' button ticked, it forces it to ignore the materials, so you don't have to remove materials to bake AO (so the internet tells me...).

WithoutAO1.jpg

And with AO - in 'texture mode' so you can see how it fits.

WithAO.jpg

 

The solid gray in blender is still darker than in yours, not sure if that makes much of a difference but I have made it as 'white' as I know how. Removing materials will actually make the solid building darker.

I have not inverted this AO map, and it was unwrapped using the 'Smart UV Project' unwrap option. 

My bake settings were - Margin 10px, Samples 10, distance 10m. I have not tried changing any of these settings to see what difference it makes. 

 

I think the UV unwrap was actually the most important change I made between this AO and the terrible ones of earlier attempts. Using the 'Smart UV Project' option keeps the correct proportion of all faces, where as I did try the 'Unwrap' and 'Lightmap Pack' options before. 'Unwrap' seems to result in a lot of overlapping faces in the UV map, while 'Lightmap' makes everything a nice even square. It fits it all in, but when the whole oblong face is reduced to a tiny square, any detail is lost and what should be a small shadow either doesn't show up, or ends up covering half the face in dark shadow. I did not change the finer details in the 'Smart UV Project' UI, because I have no idea what they mean!

 

How much of an effect does the AO have on the lighting of the building in game? I've noticed with a pure white AO, certain crops are far too dark during the sun periods and far too light during the rain periods. Will a good AO even this out?

Share this post


Link to post
Share on other sites
32 minutes ago, Necora said:

How much of an effect does the AO have on the lighting of the building in game? I've noticed with a pure white AO, certain crops are far too dark during the sun periods and far too light during the rain periods. Will a good AO even this out?

a huge difference, and yeah a proper AO will help crops during the various summer and winter and rain conditions.

1 person likes this

Share this post


Link to post
Share on other sites

Necroing on an old subject but how does the AO map manipulate snow?

I know some modders are just using a white pic as placeholder and don't bother with AO at all. In my current project i just baked the AO map and overlayed it onto the texture map in GIMP, thus having only one file (plus the white AO Placeholder at 16x16) and saving space while still having the look of AO. What's the downside to this approach?

Share this post


Link to post
Share on other sites

Posted (edited)

@jesta I actually don't know how to do this, when Shock mentioned it just went straight over my head and I could not even think about how it can effect shadows and snow at the same time independently. 

However, I did just try to make a road texture. When I made it, it would become so snow covered in the winter, that you could not see it. The mod kit did throw up a warning when it was built, saying that the texture I used had an all white alpha channel. So I changed this to a transparent alpha channel, and the roads now show up in the winter. That leads me to think that maybe the snow covering is due to the alpha channel of the AO not the baked AO itself?

I think this might be something worth playing around with. Perhaps, open the AO in gimp. Then copy the AO into another layer, so you have two identical layers. Then, in the bottom later invert the picture, so the black areas (edges... shadows) become white. Set the new black areas (the old white areas) to transparent, and save it. Then it might give you some cool snow effects, if it works the same as a road.

I have not tried it, and I could (probably am) be completely and utterly wrong, but after making the road perhaps this is how it works. It will be cool if it does!

 

As for the white AO, I used to use it too when I could not get AO to work. However, it does interact with the lighting of the game. Without the AO, I find that in 'rain' the buildings are very bright and in 'sun' they are quite washed out. The AO tempers this, as it interacts with the environment lighting in the game as it changes between seasons. So in 'sun', the AO results in stronger shadows on your model, while in 'rain' it diminishes a bit. It adds more definition to the model, that you will not get with a pure white AO or with an overlaid AO.

Edited by Necora
2 people like this

Share this post


Link to post
Share on other sites

Posted (edited)

9 hours ago, Necora said:

@jesta I actually don't know how to do this, when Shock mentioned it just went straight over my head and I could not even think about how it can effect shadows and snow at the same time independently. 

However, I did just try to make a road texture. When I made it, it would become so snow covered in the winter, that you could not see it. The mod kit did throw up a warning when it was built, saying that the texture I used had an all white alpha channel. So I changed this to a transparent alpha channel, and the roads now show up in the winter. That leads me to think that maybe the snow covering is due to the alpha channel of the AO not the baked AO itself?

This bit ... this wins the day :)  I have a few road mods with roads that I use every map, but they all 'white out' in Winter.  
Maybe a future update of road mods may read this info and update the roads with this tip. :D
Excellent sleuthing @Necora :D

Edited by QueryEverything
1 person likes this

Share this post


Link to post
Share on other sites

@QueryEverything yup the problem is that usually when the mod kit throws up a warning, it is an error and it cannot continue to build the mod. This one isn't an error, it is a little line that pops up telling you the texture transparency is all white, but continues to build. So if you are not looking, it goes so quick, you'll miss it. I only saw it because the only thing I was trying to build was one road texture, so only had a few lines in the mod kit build so saw it right away, then just assumed that was what was causing the winter white out.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now