A Practical Guide On Normal Mapping For Games

2

Replies

  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    New update is up. I tried to put together a Troubleshooting section with some examples of common problems and quick steps on how to prevent almost all of the issues before they happen.

    If you have any suggestions on what to add in Troubleshooting, I'm all ears.
  • Farfarer
    Offline / Send Message
    Farfarer Polycount Sponsor
    "In tangent space coordinates, a face normal (N) direction is used for Z axis on the coordination system."

    Just a head up that this is (usually) a vertex normal, rather than a face normal (although 3DSMax DOES orthogonalise it's tangents/bitangents to a "faceted" face normal, rather than the vertex normal).
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 13
    "Make sure your low poly mesh is watertight."

    This is a false statement and can cause people to put in a ton of work that isn't necessary.

    This guide has a ton of useful information in it. Keep at it!
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    Quack! wrote: »
    "Make sure your low poly mesh is watertight."

    This is a false statement and can cause people to put in a ton of work that isn't necessary.

    This guide has a ton of useful information in it. Keep at it!

    By watertight I just meant that there are no problems with it. Sorry, if it's confusing.

    I reworded it as "has no topology issues", hope that makes more sense. Updated :) Thanks for noticing.
  • polozad
    Offline / Send Message
    polozad polycounter lvl 9
    Ok, SuperFranky, I owe you. Your guide literally saved my mind, there were a gradient artifacts and baking with 16bit tiff removed them. Thank you, man.
    Screenshot2015-01-20124123.png
    Screenshot2015-01-20124131.png
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    You're welcome :) I'm glad you've found this guide useful.
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 6
    @SuperFranky

    After describing skewmesh method, you are mentioning this in the description of method two:
    1. Prepare two meshes: one without additional edge loops (your final game model) and a baking model with edge loops.

    Can you elaborate on that? "Baking model" implies UVs, but until today I was absolutely sure you can't add loops to an unwrapped model, since that changes vertex indices and vertex counts and therefore breaks your UV mapping in areas you drop loops into. Are you saying it's actually possible to insert loops and do stuff like chamfers after unwrapping, with vertices of those new elements auto-calculating proper UVs for themselves?

    ____

    Aside from that, is there any difference at all between Push and Projection modifiers for the purpose of pushing geometry to make a cage? Projection has more controls but as far as I see we are only using it's push functionality anyway.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    bac9-flcl wrote: »
    @SuperFranky

    After describing skewmesh method, you are mentioning this in the description of method two:



    Can you elaborate on that? "Baking model" implies UVs, but until today I was absolutely sure you can't add loops to an unwrapped model, since that changes vertex indices and vertex counts and therefore breaks your UV mapping in areas you drop loops into. Are you saying it's actually possible to insert loops and do stuff like chamfers after unwrapping, with vertices of those new elements auto-calculating proper UVs for themselves?

    ____

    Aside from that, is there any difference at all between Push and Projection modifiers for the purpose of pushing geometry to make a cage? Projection has more controls but as far as I see we are only using it's push functionality anyway.

    Well, you do many things with an unwrapped mesh. Adding or deleting loops does absolutely no damage to your UVs. Of course, you can't delete faces or whatever without it affecting your UVs, but cuts and inserts will be fine.

    Good thing about using Projection is that it work export and import cages, for one. It's just convenient because you can push by a single vertice, and that offers a bit more control than Push. And if you want to work directly on a polygonal cage, just Export it from the modifier and do your work.
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 6
    Goddamnit, you are right :D

    CabFzuIl.jpg

    This is pretty liberating!
  • Chromogen
    Edit: Never mind I missed the Photoshop example link.

    On the regarding combining Normal Maps can you just overlay the top normal map in Photoshop and uncheck the blue channel? That was the way I was taught and just wanted to make sure it was valid.
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 13
    Chromogen wrote: »
    Edit: Never mind I missed the Photoshop example link.

    On the regarding combining Normal Maps can you just overlay the top normal map in Photoshop and uncheck the blue channel? That was the way I was taught and just wanted to make sure it was valid.

    That is the old way to do it.

    The better way is found here:

    Method: http://vincentcallebaut.com/CombineNormal.html


    Interactive Example of why just Overlaying is bad: http://blog.selfshadow.com/sandbox/normals.html
  • MDiamond
    Offline / Send Message
    MDiamond polycounter lvl 6
    I have a question regarding normal maps and the "Smoothing Angle" setting.In Modo the default is 40 and Max I believe is 35. To bake normal maps, whats the best practice for this value, leave at default, change to 180 or another value depending on the object?

    Edit: Nevermind, found out that 180 seems the way to go.
  • Eric Chadwick
    Finally got some time to read this doc. It's great! I'm really glad you put this together, and are sharing it with the community.

    It would be nice if you added attributions. For example some of the text is lifted right out of our wiki. This is not a bad thing, it would just be nice.

    And images too... the 2nd image, with the torus knot and the RGB channels, I made this. The sloped extrusions one is by Krzysztof "Hatred" Dolas. I saw an Earthquake one in there too.

    We need to update our wiki page on normal maps, clean out a lot of the mess in there, update and clarify. I would love to get some help with this, would you be willing to edit? It's totally cool if you don't want to though.
  • beefaroni
    Offline / Send Message
    beefaroni polycounter
    Reading through now and I have 1 quick thing.

    For triangulation in 3ds Max, I prefer to use the "Turn to Poly" modifier and constrain it to 3 faces.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    beefaroni wrote: »
    Reading through now and I have 1 quick thing.

    For triangulation in 3ds Max, I prefer to use the "Turn to Poly" modifier and constrain it to 3 faces.

    Is there any difference from my method? It's just as simple.
  • Eric Chadwick
    Yeah the modifier method is better since it's non-destructive. You can edit via edgeloops below it in the stack, or delete it completely to get back to your editable model.

    In the section where you're talking about smoothing groups, you start calling them polygroups but that's a zbrush term.
  • beefaroni
    Offline / Send Message
    beefaroni polycounter
    Yeah the modifier method is better since it's non-destructive. You can edit via edgeloops below it in the stack, or delete it completely to get back to your editable model.

    Ya. Also, before I start baking and I want to quickly test the cage, I'll add a push modifier on top of the "turn to poly" so I can have a custom material set that really shows where the cage isn't pushing large enough. Super non destructive so I can go back and edit the LP whenever.

    3855f16c81196d1addf8d981ae241d70.png

    e75ad3cce259195e73466f442c149605.png
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    beefaroni wrote: »
    Ya. Also, before I start baking and I want to quickly test the cage, I'll add a push modifier on top of the "turn to poly" so I can have a custom material set that really shows where the cage isn't pushing large enough. Super non destructive so I can go back and edit the LP whenever.

    3855f16c81196d1addf8d981ae241d70.png

    e75ad3cce259195e73466f442c149605.png

    That's interesting, thanks for the info.
    In the section where you're talking about smoothing groups, you start calling them polygroups but that's a zbrush term.

    brain fart, sorry for that:poly142:
  • oxygencube
    Offline / Send Message
    oxygencube polycounter lvl 8
    Thank you! The polycount community really never ceases to amaze me. So many great resources shared of free. Thanks for this guide. As somebody who is more artist than technical this made understanding some of the mathematical concepts easy to digest and apply.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 7
    oxygencube wrote: »
    Thank you! The polycount community really never ceases to amaze me. So many great resources shared of free. Thanks for this guide. As somebody who is more artist than technical this made understanding some of the mathematical concepts easy to digest and apply.

    I'm just happy I didn't waste my time for nothing :) I'm glad you've found this useful.
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 3
    Hey man, just wanted to say I've had a lot of issues with baking normals and I've spend a lot of time searching out like you mentioned when I stumbled on this thread. Read through the whole thing this morning and it definitely helped.

    I think you need to add some info on exploding meshes and when you'd want to take that approach.

    I did want to ask what causes faceting and blocky edges? You mentioned smoothing groups, but that's a Max thing and I'm in Maya. Thanks again for putting this together.
  • beefaroni
    Offline / Send Message
    beefaroni polycounter
    @ArtbyV - Maya still uses smoothing groups. It's just hardened vs. softened normals. After you create UVs, run this script.

    http://www.polycount.com/forum/showthread.php?t=52722&page=2
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 3
    beefaroni wrote: »
    @ArtbyV - Maya still uses smoothing groups. It's just hardened vs. softened normals. After you create UVs, run this script.

    http://www.polycount.com/forum/showthread.php?t=52722&page=2

    I figured they were similar, but I wasn't entirely sure (never used Max). I typically do the painstaking process of doing it by hand, but this script did a much better job than me and fixed a lot of issues. Thanks a bunch! Still having some issues though. I'll start a new thread. Don't want to threadjack here.
  • charliecromo
    Offline / Send Message
    charliecromo polycounter lvl 4
    Thanks SuperFranky for taking the time to write this guide!
  • skyline5gtr
    Offline / Send Message
    skyline5gtr polycounter lvl 5
    Wanted to chime in as well with a big thanks, really helped concepts
  • Bartalon
    Offline / Send Message
    Bartalon polycounter lvl 8
    If you split a UV shell, you need to also move the new segments away from each other otherwise you will still get weird issues around the seams. If you leave them in place you still get the problem of "no room to breathe" when it comes to pixel information.
  • Ladygrace
    Offline / Send Message
    Ladygrace polycounter lvl 5
    This is amazing to read and is helping me understand how to get it to work properly but i am currently having issues in maya. I am trying to use hard edges like what is used in the document. I have cut my edges and spread them apart and now i get issues with the seams once the normal has been baked in X-Normal. Can someone help me understand what i am doing wrong. (I have done it with smoothing the edges but i get gradients which i dont want to have) 
    The picture below shows the issue
  • Tzur_H
    Offline / Send Message
    Tzur_H polycounter lvl 5
    bake using a cage, it will fix your issue.  I'd highly recommend that you read the great 2 sticky threads about normal maps in this forum section

  • Treidge
    Offline / Send Message
    Treidge polycounter lvl 8
    Great write-up on normal mapping. I've compared the doc to my own notes on this subject and found some topics that could be added to it/additionally covered, to get an even wider scope.

    1. There was a lot of discussion on beveling lowpoly edges for the purpose of normal mapping. Some summary on beveling would be great: when to bevel, when to not, how bevels affect vertex count, what are alternatives to beveling edges — that kind on things. It's a bit tricky to gather all the information on this, as it is scattered across half of dozen important topics in Technical Talks, but would be helpful to have it in one place.

    2. Face-weighted normals. This is not new, but I believe this is something that many would find interesting as it can help to achieve even better results with normals. Discussed in this thread: http://polycount.com/discussion/85809/face-weighted-normals

    3. Follow-up to the previous one: custom-edited vertex normals. How one may want to edit vertex normals "manually" and what are the implications of that (pros and cons). Probably mention that this is somewhat "destructive" and generally should be avoided.

    4. Round corners and baking them to normal map. Discussed here: http://polycount.com/discussion/71995/tip-zero-effort-beveling-for-normal-maps. This probably should be marked as some kind of "additional reading", as it seems to be pretty complicated and confusing to beginner artists. Still some may find it interesting and would like to investigate it further.

    5. Some additional info on 2D Workflow, taken directly form wiki here: http://wiki.polycount.com/wiki/Normal_map#2D_Workflow. Specifically mention that normals created from 2D will work best when tiled on surfaces uniformly oriented in UV space (walls, terrain, microsurface.), as rotated UV shells require special conditions in normal maps and for the best result 3D baking is necessary. Also can mention that hybrid approach to baking can be used — bake large and medium size details in 3D and add microdetails (microsurface) from 2D.

    6. Add to the part about floaters that a library of small shapes ("widgets") can be developed, rendered and stored for later use, to save time for future normal maps. Things like "standard" screws, pipes, ports, shaped indentions, and likes. This is pretty obvious when you think about it now, but could be not so obvious for beginners.

    7. Add MightyBake to the list of baking tools. Really great baker, especially for Maya users.

    8. Expand on interpenetrating lowpoly meshes and how close-together parts can cause baking artifacts if one isn't careful enough with his cage (adjacent surfaces will capture each other). Mention that technique of baking lowpoly objects separately often called "exploding a mesh". Mention that now there is some tools that can bake interpenetrating objects like this without "exploding" them, using some kind of "tagging" system — like Material ID, name matching or similar. For example, Substance and Knald can do that.

    9. Mention possible aliasing issues coming from overlaps in highpoly during a bake and from intersecting geometry on lowpoly in-game. Highpoly aliasing can be fixed via supersampling, lowpoly — by making a contiguous lowpoly mesh. Taken from here: http://wiki.polycount.com/wiki/Texture_Baking#Anti-Aliasing

    That'll probably make it the most complete one-place source of information on the normal mapping around. :smile: 
  • Eric Chadwick
    Excellent writeup! We have some of those things on the wiki here, but there's only so much time in the day. 
    http://wiki.polycount.com/wiki/Texture_Baking#Baking_Workflow
    I would love it if people were able and willing to help edit the wiki. It's a community resource for all.
  • Treidge
    Offline / Send Message
    Treidge polycounter lvl 8
    I would love it if people were able and willing to help edit the wiki. It's a community resource for all.
    True. Although my post was written specifically in regard to the doc compiled by SUPERFRANKY, expanding the wiki would be always welcome. In fact, it is already a great help, as it covers pretty much every major topic out there. Some general editing, streamlining and additional examples wouldn't hurt, though.

    Speaking of me personally, I don't feel like I'm (yet) confident enough in my knowledge to put it up on the wiki, but I would make sure to come back to it once I get more practice and thourough experience witn normals.
  • Eric Chadwick
    Well, no one should be worried about whether they are competent enough to paste stuff on the wiki. It's not gospel. As you know, everything on the web should be examined with a skeptical eye. But the cool thing about the wiki is everything can be edited by anyone, so it's truly a collaborative process. That's why I encourage everyone to add things. It's truly a community resource, by and for.
  • Treidge
    Offline / Send Message
    Treidge polycounter lvl 8
    So, what do I do to start editing the wiki? For example, while I was lurking inside it I've seen a bunch of spam pages that I don't mind to delete in my spare time. However, as an anonymous user I can't edit or delete wiki pages, and I don't have an existing account; can't create a new one, as it is restricted to the Administrators group. A bit of a problem, as it seems.

    How do I get an account to be able to edit wiki?
  • Eric Chadwick
    We had to lock new accounts to sort out a spam problem. But I can add a new account for you. Just message me 2 things... the username you would like to use, and your email address (for password recovery).
  • huffer
    Offline / Send Message
    huffer interpolator
    Ladygrace said:
    This is amazing to read and is helping me understand how to get it to work properly but i am currently having issues in maya. I am trying to use hard edges like what is used in the document. I have cut my edges and spread them apart and now i get issues with the seams once the normal has been baked in X-Normal. Can someone help me understand what i am doing wrong. (I have done it with smoothing the edges but i get gradients which i dont want to have) 
    The picture below shows the issue
    How much edge padding are you using?
  • 19ulrich90
    Offline / Send Message
    19ulrich90 polycounter lvl 3
    Awesome thread, I'm just learning about normal maps baking, thought I would share tutorial which helped me understand the process and it explains how to solve a lot of errors that occure in bakes.

  • arcamargo
    Thank you very much for this guide, I was having a lot of trouble to understand this subject :D
  • bentraje
    Offline / Send Message
    bentraje polycounter lvl 2
    Thank you for sharing.!
2
Sign In or Register to comment.