Home Technical Talk

ambient occlusion questions

polycounter lvl 4
Offline / Send Message
Benjam polycounter lvl 4
Hey Polycounters,

Just a quick question regarding ambient occlusion maps. When you bake an ambient occlusion map from either the high poly object or the normal one how do you set up the lighting usually? I watched a video tut where the the guy used a sky light/ambient light to bake out the map. Is that the general thing to do when baking the map or should i use spotlights or a couple of pointlights?

And should you always bake an occlusion map and overlay it in your texture?

Cheers guys!

Replies

  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    Honestly depends on your target use case. For most modern purposes you want your ambient occlusion as universal as possible, so a skylight is used. With light tracer engaged this basically performs a number of random raytraces and sees how many escape toward the sky, and how many hit another part of the scene. This means concave areas are more shaded generally. Most games engines can make good use of this and it means the asset will look "right" anywhere as the AO is quite generic, and not specific to the scene.

    However, there are cases in which you'll want custom lighting setups. I recently worked on a game for a platform that couldn't do very good lighting (no shadows, just directional light and ambient) and the object in question was always under spotlights and on a flat surface so I set up the ambient occlusion bake with a hemisphere of point lights. This wasn't really an ambient occlusion bake, but it had the desired effect; shading below and lots of faint, hard edged shadows as though under spotlights.

    There isn't a correct/incorrect way to do anything really. The main reason AO maps are good is that they shade joined areas of the mesh, for the most part draining out the lighting difference between one part and another. (such as a right angled, concave corner) They're also useful for displaying detail that for whatever reason (lighting, 90 degree angles) doesn't show up in the normal map.
  • Benjam
    Offline / Send Message
    Benjam polycounter lvl 4
    Ahhh i get it. thanks alot. I was also wondering if it was possible to bake a high res mesh to a low res mesh because i have a hi res phone box and i have normal mapped it but i need to bake the occlusion map from the high res to give it extra awesomeness. I am using 3ds max for this
  • Swizzle
    Offline / Send Message
    Swizzle polycounter lvl 16
    Ambient occlusion is a simulation of the shadows you get from your model being in only ambient lighting conditions, much the same as the kind of lighting you get with overcast skies. This has the effect of making cracks and crevices in your model darker to accentuate them.

    There are a few methods to do it, as you've mentioned, but using spot, directional, or omni/point lights will result in the wrong kind of shading. Using any sort of point lighting information will result in directional lighting being baked into your textures. This isn't necessarily bad and it's sometimes good for certain styles, but it's not AO.

    Most renderers these days have some sort of ambient occlusion shader or setup in them, though using sky lights is an effective way of getting ambient occlusion. You could also look into something like xNormal to bake AO.

    As for whether you should always use AO, that's completely at your discretion. AO can help ground details in your normal maps and make your model seem more solid, but overdoing it or using it the wrong way can just make your textures look dirty. When making organic models, sometimes it's helpful to colorize your AO so it doesn't look so harsh.
  • Blaisoid
    Offline / Send Message
    Blaisoid polycounter lvl 7
    I was also wondering if it was possible to bake a high res mesh to a low res mesh because i have a hi res phone box and i have normal mapped it but i need to bake the occlusion map from the high res to give it extra awesomeness

    you can do it in a same way as you bake normal maps. enable projection mapping, pick high poly and just choose lighting map instead of normals map when you add elements to bake.
  • cryrid
    Offline / Send Message
    cryrid interpolator
    I just use the AO shader in mental ray (rendermap/ultimapper in xsi) or the ao settings in xnormal / zbrush.
  • fearian
    Offline / Send Message
    fearian greentooth
    It's situational. With AO there is more you can play around with than a normal map. If you have an object that will always be on a wall, you can bake an AO pass with a plane against one side. Or a plane on the floor. Character artists sometimes bake an AO pass with the character in an inverted cone to get a gradient down their model from head to toe. This stuff is often done in engine at real time but can be very useful to have in the texturing phase.
  • Benjam
    Offline / Send Message
    Benjam polycounter lvl 4
    i am having a couple of issues with the ambient occlusion maps im trying to bake out. I am using mental ray and using the ambient occlusion MR element and baking them out at pretty high res. The resulting maps to me seem to be very weak. I watched a tutorial on 3d motive and followed what he did but i got a pretty crappy result. I place it over my texture and used multiply like the dude said to but the results i am getting look pretty weak. You cant see any defining shadows really and the front of the high poly object i am baking is not showing up?

    The guy who did the tutorial came out with a decent AO map. I cant figure out why mine is so crappy. Any ideas on how to do this better/completely different that would give me a better result? The images below are of my ambient map and the texture with it multiplied on top

    554246_10151139953447986_96662274_n.jpg

    302740_10151139953517986_198072171_n.jpg
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    AO maps for convex objects will come out almost completely white. Only concave/occluded areas will be shaded. What's the high poly look like?
  • Benjam
    Offline / Send Message
    Benjam polycounter lvl 4
    JamesWild

    The high poly looks like this and the entire object looks like the imager under that. should i bake the ambient occlusion map when the object has been combined together rather than doing it individually?

    77599_10151140079602986_1065895349_o.jpg

    176673_10151140096842986_2129068181_o.jpg
Sign In or Register to comment.