Home Technical Talk

Pro Spec and AO Map Creation tips [req]

CYCOMYKOTRON
polycounter lvl 17
Offline / Send Message
CYCOMYKOTRON polycounter lvl 17
Can I get some pro tips on creating spec maps for games?

I've heard of people creating them from normal maps as well as from diffuse maps. I'm unsure what is the best method. Also, What areas in general are best to be brighter and darker?

Also, AO maps, i've found that they add a strange look in Maya and other engines. Can someone explain the best way to make use of AO maps in games?

Thanks!

Replies

  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    An AO map baked from a high poly onto a low poly basically gives you non-directional lighting - what you would see on an overcast day with light coming from all directions. Multiplied with your spec and diffuse (use artistic discretion) it'll make your high poly's details visible in places where the lighting isn't strongly contasted such as in ambient lit scenes. A few minutes and I'll post a difference render one with AO one without.

    It's also useful for seeing where your high poly's details are on the unwrap so you can paint the correct colours on.
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    z5eUL.png
    On the left is flat grey multiplied by a Max AO map with a Max normal map, AO directly connected to specular, dynamically lit in UDK.

    On the right is flat grey with a Max normal map and a white specular map.

    Having a proper AO map somewhere in the mix just makes the finished product look more like a solid object and less like a pile of polygons.
  • BARDLER
    Offline / Send Message
    BARDLER polycounter lvl 12
    This helped me a lot with texturing
    http://eat3d.com/texturing
  • CYCOMYKOTRON
    Offline / Send Message
    CYCOMYKOTRON polycounter lvl 17
    Sorry I didn't mention it.. but i'm mostly looking for the face... Where are areas that should mostly be lighter... etc... are AO maps really necessary in a game engine with self shading objects/characters? DO many engines have that nowadays?
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    Baked AO maps raytrace off the high polygon mesh, which is why they take time to produce (depends upon baker) while the realtime game engine does not know that the high polygon mesh exists. Things like UDK's SSAO smudge-o-vision are useful for making environments look more like solid worlds than intersecting objects, but not for capturing fine detail.
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    In theory, yes, Engine are able to do that, but the problem is that you need to create the Post-Process effect to account for Normal Maps to give the detail, which not many people do, and which frankly can look very noisy if not done correctly. I think so far UE4 is the only engine that is going to account for that?

    Almost every single engine has a 'lite' version of AO as James said, they account for distance between objects on a small scale, and only the polygons, not the micro detail of textures themselves, hence why many models can look flat without abit of shading done by hand.

    With that said, I honestly feel like AO simply doesn't cut it anymore, simply pasting it in your Diffuse and calling it a day. It doesn't make sense (especially for, if I read you correctly, faces and other organic objects) where they scatter the light, adding in a static AO will just make it look really tacky in more cases then one.

    I instead bake out the Cavity Map, since they don't broadly darken your textures, and instead darken the really tight small details, which play really well with AO in most engines as they're not fighting light information for the human eye, especially on light scatter friendly objects.

    If you really want to get fancy, you can do what the guys at Naughty-Dog did, which is anything that is in the shadows shows the AO bake ontop of your diffuse, and anything in the light doesn't.

    As for making them, I suggest baking out your Cavity/AO maps, if you're hand painting them, then you're already putting in said detail.

    As for Specs, many people just greyscale their Diffuse and call it a day, I much prefer using my Cavity and this process here: http://www.modwiki.net/wiki/Start_a_Specular_map_with_a_Normal_map to generate my Spec Maps in a way that makes sense.
  • JamesWild
    Offline / Send Message
    JamesWild polycounter lvl 8
    I'm seeing no difference between that fairly long and complex procedure and just taking the blue channel, inverting it and auto levels. You're basically acting as if there's lights on the X+, X-, Y+ and Y- axes and adding them up.
  • cw
    Offline / Send Message
    cw polycounter lvl 17
    ao applied to directly lit surfaces can look a bit 'grubby' or dirty - it theoretically should be applied only in ambient (shadowed) areas, but since many angines do not handle irradiance and bounced light in any case it is all a bit of a bodge towards a better looking result!

    It definitely helps to bake it out and then use it as appropriate for your taste and engine of choice. :)
  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    Ace-Angel: "Just" greyscaling the diffuse and "calling it a day" is the wrong way to do a spec map - it's sloppy at best but I prefer to call it "plain stupid". Greyscaling the dif is just the first step of so many more.

    What I do is that I copy my entire diffuse group in Photoshop, greyscale it (Hue Saturation layer) and then I work layer by layer, adjusting everything - removing and adding layers, using a lot of levels-layers, HueSat-layers, Curves etc, changing blend modes for wear and tear, dirt, and so on. Also important: color. You can't make a material such as gold without a yellow spec and a brown diffuse (unless ofc you are going for a cartoony style and just paint highs and lows onto the diffuse).

    Ofc there are many ways of doing a spec, but "just" greyscaling is - like I put it: stupid.
  • EarthQuake
    Ace-Angel wrote: »
    hence why many models can look flat without abit of shading done by hand.

    Oh god.
    As for Specs, many people just greyscale their Diffuse and call it a day,
    OH GOD NO.
    I much prefer using my Cavity and this process here: http://www.modwiki.net/wiki/Start_a_Specular_map_with_a_Normal_map to generate my Spec Maps in a way that makes sense.
    You can do this easily in crazybump by pasting in your normals and upping the "enhance detail" slider, what I generally use for a "cavity map". Though this just helps to add a bit of pop, or is used for creating selection masks for various effects, I would never call it "generating a spec map".

    Also... hand painting ao and generating spec maps, lol wut.
    What I do is that I copy my entire diffuse group in Photoshop, greyscale it (Hue Saturation layer) and then I work layer by layer, adjusting everything - removing and adding layers, using a lot of levels-layers, HueSat-layers, Curves etc, changing blend modes for wear and tear, dirt, and so on. Also important: color. You can't make a material such as gold without a yellow spec and a brown diffuse (unless ofc you are going for a cartoony style and just paint highs and lows onto the diffuse).

    Ofc there are many ways of doing a spec, but "just" greyscaling is - like I put it: stupid.

    More or less this, but remember that diffuse, spec and normals all work together. Spec isn't something you tag on at the end but something you should be working on the entire time. Not sure if thats what you mean't by copy over from your diffuse or not(ie: copy when you diffuse is "done").


    As far as AO:
    Highpoly exploded bake multiplied
    +
    Lowpoly combined bake(with bits that need to animate removed) multiplied
    +
    CB cavity map overlayed at 50%

    over diffuse and spec.

    (check brink assets in my signature for what this looks like, the lowpoly untextured shots are just AO).
  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    EarthQuake wrote: »
    More or less this, but remember that diffuse, spec and normals all work together. Spec isn't something you tag on at the end but something you should be working on the entire time. Not sure if thats what you mean't by copy over from your diffuse or not(ie: copy when you diffuse is "done").
    Yes ofc - working in parallel is the right way to go.
    I don't start working on my spec until I'm about halfway done with the diffuse though - but that's just a matter of taste I guess...

    I can't see your signature btw - you know why? :(
  • dirigible
    Offline / Send Message
    dirigible polycounter lvl 8
    Simply using a greyscale version of your diffuse map is sometimes the best way to do things, BUT ONLY FOR THROWAWAY ASSETS. The method is fast and cheap, since it doesn't require any extra work or texture memory, but it does not make the asset look as good as it could.

    Likewise, using a greyscale specular map (1 channel) is also sometimes the best way to do things. It's faster because you don't have to worry about adjusting colors, and it's cheaper because 1 channel takes less memory than 3 channels.

    The best looking spec map will always be 3 channels, made with lots of love, and with a good gloss map to back it up. But not every asset calls for that much work and that many channels of texture memory.

    As for workflow, I actually like to make my diffuse map completely (while thinking about spec, of course), then while I am working on my spec map I will go back and tweak things in the diffuse to compensate.

    Oh, and a little trick I've started using is multiplying sections of my diffuse on top of my spec (adjusting the spec strength to compensate, of course). This can be done easily in a material editor, using a 1 bit mask. It can let you get important color information into the spec without requiring an entire 3 channel spec map. Of course it does mean more material functions. Everything is a tradeoff.
  • D4V1DC
    Offline / Send Message
    D4V1DC polycounter lvl 18
    I can't see your signature btw - you know why? :(
    Top near banner

    Welcome [your SN]
    User CP

    Settings & Options, Edit Options

    Thread Display Options, Visible Post Elements

    [x]Show Signatures (Check me!):poly136:
  • Torch
    Offline / Send Message
    Torch polycounter
    Just a slight correction:-
    Ace-Angel wrote: »
    As for Specs, many people just greyscale their Diffuse and call it a day... which is why they no longer have jobs in the industry.
    :D
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    dirigible wrote: »
    Simply using a greyscale version of your diffuse map is sometimes the best way to do things, BUT ONLY FOR THROWAWAY ASSETS. The method is fast and cheap, since it doesn't require any extra work or texture memory, but it does not make the asset look as good as it could.

    Likewise, using a greyscale specular map (1 channel) is also sometimes the best way to do things. It's faster because you don't have to worry about adjusting colors, and it's cheaper because 1 channel takes less memory than 3 channels.

    The best looking spec map will always be 3 channels, made with lots of love, and with a good gloss map to back it up. But not every asset calls for that much work and that many channels of texture memory.

    As for workflow, I actually like to make my diffuse map completely (while thinking about spec, of course), then while I am working on my spec map I will go back and tweak things in the diffuse to compensate.

    Oh, and a little trick I've started using is multiplying sections of my diffuse on top of my spec (adjusting the spec strength to compensate, of course). This can be done easily in a material editor, using a 1 bit mask. It can let you get important color information into the spec without requiring an entire 3 channel spec map. Of course it does mean more material functions. Everything is a tradeoff.

    never rationalize poor workflows with "time constraints". it takes minutes to make a spec map that looks infinitely better than a diffuse desaturation, even if it's not the best it will be better than that.

    grayscale in alpha does not take less texture memory due to how dxt compression works. in fact, two full color dxt1 textures are the same size as dxt5 with grayscale alpha. http://www.opengl.org/wiki/S3_Texture_Compression

    as eq mentioned, all the maps work together--thus working on all the maps simultaneously is the fastest and most logical way to texture.

    ive been awake too long
  • dirigible
    Offline / Send Message
    dirigible polycounter lvl 8
    Racer,
    A 1 channel map can be greypacked with other 1 channel maps, so that multiple textures can be put into a single image file. For instance, I can have one 3 channel targa that stores specular (red channel), transparency (green channel), and emissive (blue channel). So yeah, a greyscale spec map can certainly save memory, as long as I pack it in with something else. You can even put a greyscale texture in the blue channel of your normal map (though there are reasons not to). This is ignoring different compression settings such as TC_Greyscale (in udk), which are designed for making greyscale images look better while using less memory.

    My reason for making my diffuse fully before working on my spec is that I can duplicate my diffuse folder, rename it spec, and start adjusting layers without spending any time making sure my diffuse and specular match each other. Otherwise I have to be modifying two different sets of layers, which are often nearly identical. For instance if I were altering a dirt layer for both spec and diffuse at the same time, I would need to alter one, then make a selection of that layer and alter the other based off of that selection. Doesn't sound like much, but it adds a lot of time when you wind up tweaking dozens of layers, dozens of times.
  • Deadly Nightshade
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    Well I still think it's a bad idea to desaturate the diffuse straight off "just to get a quick spec". Why? Because the levels in the greyscale will be totally OFF. Things that are white in the diffuse will get extreme specularity and shine like hell even if the material is supposed to be something like paper remains on a brick wall (poster). There are tons of other examples I can give but bottom line is that the highlights (bright colors) in the diffuse will have high specularity even if you want it or not (and vice versa with black colors/shadows). I mean, if I want a quick spec then sure, I can throw on a HueSat -layer and desat the whole thing, but then why not spend 5 minutes tweaking all your layers with curves, levels and selected color? It's just sloppy.
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    dirigible wrote: »
    Racer,
    A 1 channel map can be greypacked with other 1 channel maps, so that multiple textures can be put into a single image file. For instance, I can have one 3 channel targa that stores specular (red channel), transparency (green channel), and emissive (blue channel). So yeah, a greyscale spec map can certainly save memory, as long as I pack it in with something else. You can even put a greyscale texture in the blue channel of your normal map (though there are reasons not to). This is ignoring different compression settings such as TC_Greyscale (in udk), which are designed for making greyscale images look better while using less memory.

    My reason for making my diffuse fully before working on my spec is that I can duplicate my diffuse folder, rename it spec, and start adjusting layers without spending any time making sure my diffuse and specular match each other. Otherwise I have to be modifying two different sets of layers, which are often nearly identical. For instance if I were altering a dirt layer for both spec and diffuse at the same time, I would need to alter one, then make a selection of that layer and alter the other based off of that selection. Doesn't sound like much, but it adds a lot of time when you wind up tweaking dozens of layers, dozens of times.

    yes, i've worked with "packed" grayscale textures on a few titles and every time i wished i just had colored specular and no gloss at more than one point during the projects. while it's true you can save vram with a "packed" texture, you need to put in more work to separate materials and give them color. many accent materials become impossible to represent properly without colored spec as well, and pretty dynamic color variation goes out the window.

    oh, also that's not to say it CAN'T look good, just that it takes more effort to look good and all your color has to be on the diffuse.

    i used to be of the same mindset as you--make diffuse first and duplicate/tweak for fast specular and gloss. then i started blocking out materials first and it made a LOT more sense to work on them at the same time. i know my/eq/per's spec and gloss have lots of unique layers on them and look radically different from the diffuse, creating a material that's very light reactive.

    you tend to use a lot less layers when you're working like that, so creating all the maps simultaneously gives you a more dynamic result in less time. spending all that time trying to make just your diffuse look good on its own then shoehorning in a spec map after all that work requires more time and more layers to manage for ultimately a less reactive result.
  • EarthQuake
    Disregarding actual content creation, here is a breakdown of the technical aspects. What you're doing is trading quality for memory savings.

    So, in order of best quality to most efficient(yes the various methods are inversely proportional).

    1. Full color spec with gloss in alpha channel, 32 bit image, compressed is twice as larger as #2
    2. Full color spec, gloss set via material, 24 bit image
    3*. Spec, Gloss and something else (Emmisive**, Alpha***, etc) packed into a single 24 bit image, same size as #2
    4. Specular derivative from diffuse map, usually with some contrast adjustments etc via shader. Essentially free memory wise. Can be useful for extremely simple textures where you're only representing 1 material type per image

    * Only viable if your asset actually requires 3 additional maps
    ** Emmisive can often be sized down 1 or 2 notches, saving 4x and 16x what an additional full color texture would cost. Color Emmisive can be useful as well
    *** Alpha generally shouldn't be applied to full assets for performance reasons, but instead a smaller secondary material with a smaller texture. You don't want to run alpha sorting on an asset that is 95% opaque, only on the section that actually needs alpha.
Sign In or Register to comment.