Home Technical Talk

AO Across an Entire Environment.

polycounter lvl 18
Offline / Send Message
Steve Schulze polycounter lvl 18
I've got an old PSP res environment that I want to spruce up a bit for my portfolio. It's textured with loads of different textures, most of which are tiling. I'd like to do an ambient occlusion pass but this is proving to be a little more complicated than expected in Maya.
After going through loads of tutorials, none of which cover the final couple of key steps, I've gotten as far as making a new uv channel, doing a quick unwrap of the entire environment on to it and baking the AO map. What's my next step?

Replies

  • arshlevon
    Offline / Send Message
    arshlevon polycounter lvl 18
    Ambient occlusion shader method
    1. Save your scene as a new file to avoid losing any data.
    2. Set your renderer to mental ray.
    3. Set the background color to white and the global light to zero (everything is black).
    4. select all the objects and give them a standard material, set it's color to white.
    5. place an ambient/occlusion map in the self-ilumination slot (more samples for higher quality).
    6. delete all the lights in your scene (they are unnecessary for this)
    7. render.
    8. multiply this map over your standard render in photoshop
  • Steve Schulze
    Offline / Send Message
    Steve Schulze polycounter lvl 18
    So adding the AO in post is my only option? That kinda sucks, but I suppose it'll do in a pinch.
  • EarthQuake
    No thats definately not your only option, thats just the easist way if you just want it for a couple renders.

    I dont know what app you're using, but it should be fairly simple:
    1, make 2nd uv set for all of your objects(prefably one big image for everything
    2, bake the ao map
    3, use a shader/material that multiplies that result onto your texture
  • AnimeAngel
    You really only ever add it in post. you can do it other ways but best and easiest result is usaully with post
  • Microneezia
    Offline / Send Message
    Microneezia polycounter lvl 10
    Im commonly confused by the posts surrounding environment AO bakes. There are many different objects or mesh's created for an entire scene, some of them share a tiling diffuse, others have their own unique diffuse. Some of the objects will use the tiling diffuse and will also have their own specific unique normal/spec maps, then there are the additional bump/height/-x- maps ect, which is fine that seems all controllable to me.

    After all these objects are textured individually as I mention above, these objects are then combined or attached into a large super environment object (?) in order to bake out the AO on a different channel for the whole environment(?). How is this AO map applied in game when all these pieces are again seperately( i assume?) taken into a game engine with their own specific diffuse / normal / spec maps? I realize those maps are on a different channel but the AO was baked onto UV islands of the single attached super object so i dont understand how that map moves backwards to the previous seperated objects in the whole scene...

    I guess my question is: Once the environment is combined into one object in order to bake the AO will it from then on have to remain a single object? If not, how is this AO normally dealt with in the engine specifically?
  • EarthQuake
    AnimeAngel wrote: »
    You really only ever add it in post. you can do it other ways but best and easiest result is usaully with post

    If this is an asset for a game, you NEVER add it in post. If all you need is a render then yeah, you dont need to do anything more than post, but really if you want something that looks correct from any angle, and is actually close to what you would do in a production environment, using a 2nd uv slot is best.
  • EarthQuake
    Im commonly confused by the posts surrounding environment AO bakes. There are many different objects or mesh's created for an entire scene, some of them share a tiling diffuse, others have their own unique diffuse. Some of the objects will use the tiling diffuse and will also have their own specific unique normal/spec maps, then there are the additional bump/height/-x- maps ect, which is fine that seems all controllable to me.

    After all these objects are textured individually as I mention above, these objects are then combined or attached into a large super environment object (?) in order to bake out the AO on a different channel for the whole environment(?). How is this AO map applied in game when all these pieces are again seperately( i assume?) taken into a game engine with their own specific diffuse / normal / spec maps? I realize those maps are on a different channel but the AO was baked onto UV islands of the single attached super object so i dont understand how that map moves backwards to the previous seperated objects in the whole scene...

    I guess my question is: Once the environment is combined into one object in order to bake the AO will it from then on have to remain a single object? If not, how is this AO normally dealt with in the engine specifically?

    Short answer: It depends heavily on the engine/workflow/whathaveyou.

    Long answer:

    Some engines (like UE3) will automate some of this process for you, all you need to make sure is that your model has a 2nd uv channel for the LM, and probabbly something with the materials that tell it to generate, and display the LM.

    As far as combining everything onto one uv set, this is entirely up to you/the specs of your engine/project etc. Generally you would group things that go together into one image. Say you have a building built up of multiple materials, you would probabbly want to have this entire object share one lightmap, so you can easily make adjustments to the entire thing.
  • commander_keen
    Offline / Send Message
    commander_keen polycounter lvl 18
    use vertex color. Thats what you would actually use on the PSP.
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    don't listen to the "do it in post" people

    here are your 2 solutions:

    for verts

    - go to color>batch bake (mental ray)
    - set it from bake to: texture to bake to: vertex
    - change color mode to occlusion (tweak the other values if needed)
    - hit convert ( or convert and close)
    - right click your model choose color sets>color set editor
    - up in the menu go to display > selected > color channel material ambient + defuse

    DONE low fidelity but guaranteed to be psp compatible, artifact free, no need to uv map anything extra or fiddle with materials and its cheap.

    for light map ao ( i assume you already have your uv set and ao texture as you posted)


    -go into the material editor
    - choose every material one by one and hook your ao texture into the ambient slot
    -right click you model choose uv sets > uv linking
    -on the left side select your second UNIQUE uv map and at the same time highlight all the ao textures that are listed on the right
    -set render mode to HIGH QUALITY in your preferred view port

    DONE higher fidelity but might make other light setups in your scene look wrong, requires extra uv work, might not be compatible with your psp engine, might have artifacts, can not be previewed without high quality render mode.
  • glib
    Im commonly confused by the posts surrounding environment AO bakes. There are many different objects or mesh's created for an entire scene, some of them share a tiling diffuse, others have their own unique diffuse. Some of the objects will use the tiling diffuse and will also have their own specific unique normal/spec maps, then there are the additional bump/height/-x- maps ect, which is fine that seems all controllable to me.

    After all these objects are textured individually as I mention above, these objects are then combined or attached into a large super environment object (?) in order to bake out the AO on a different channel for the whole environment(?). How is this AO map applied in game when all these pieces are again seperately( i assume?) taken into a game engine with their own specific diffuse / normal / spec maps? I realize those maps are on a different channel but the AO was baked onto UV islands of the single attached super object so i dont understand how that map moves backwards to the previous seperated objects in the whole scene...

    I guess my question is: Once the environment is combined into one object in order to bake the AO will it from then on have to remain a single object? If not, how is this AO normally dealt with in the engine specifically?
    You generally have the workflow right. You would then have to cut these pieces back into their respective objects after the bake. This way they all maintain their second set of UVs.

    This would likely be either automated, or script-assisted in most studios. We were doing a lot of this sort of thing the last place I worked and had a MEL script that would let you select a bunch of discreet objects and try different automatic unwraps on a second uv set that it created for you, no combining required. Without something nice like that, we're stuck with the old-fashioned way.
  • vahl
    Offline / Send Message
    vahl polycounter lvl 18
    what EQ and warby said.
    NO post in game enviros unless it's a static render, if it's full 3d, bake all the way to second uvs or vertexcolors.
  • odium
    Offline / Send Message
    odium polycounter lvl 18
    Our engine has real time ambient occlusion and I have to say it really makes the game come alive.

    EDIT: Its not PSP though lol :p
  • ImSlightlyBored
    Offline / Send Message
    ImSlightlyBored polycounter lvl 13
    yeah, i think SSAO is also a possibility but its pretty rare at the moment (i think? i think cryengine2 has it, and xnormal, but thats it and i may be wrong. oh and doesnt gears2 use it, or was that auto AO lightmap bakes?) anyway, all that is just an off-topic aside, no use for psp.
  • MattW
    Offline / Send Message
    MattW polycounter lvl 16
    warby wrote: »
    don't listen to the "do it in post" people

    here are your 2 solutions:

    for verts

    - go to color>batch bake (mental ray)
    - set it from bake to: texture to bake to: vertex
    - change color mode to occlusion (tweak the other values if needed)
    - hit convert ( or convert and close)
    - right click your model choose color sets>color set editor
    - up in the menu go to display > selected > color channel material ambient + defuse

    DONE low fidelity but guaranteed to be psp compatible, artifact free, no need to uv map anything extra or fiddle with materials and its cheap.

    What software are you specifically referring to here?
  • Steve Schulze
    Offline / Send Message
    Steve Schulze polycounter lvl 18
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 19
    PSP is far too limited on memory, so you can ditch baked-texture AO altogether. Unless you have a very small environment that is. I'd bake the AO into the vert colors of the mesh.
  • Mark Dygert
    I think Vas is right, that's the only way to get any kind of AO onto the PSP on a per object basis. But then the bake won't be perfect as you'll need to try and control the shading and on low poly objects that can be tough, without adding more verts =/

    It's hard to say exactly which way to go for all hardware, so its good that everyone turned out in force to explain a few different ways. Nice going guys, you're all right! =)
  • AnimeAngel
    Ya sorry I misread your post. thought you were only doing still images for your portfolio
Sign In or Register to comment.