Search Unity

Normal Mapping is definately a-must! (in my opinion)

Discussion in 'General Discussion' started by MJohnson24, Oct 30, 2014.

  1. MJohnson24

    MJohnson24

    Joined:
    Jan 24, 2014
    Posts:
    388
    Dear users of unity,
    I have been creating hundreds of models throughout these past months and never got into using "normal maps" at all. (and I regret it now!)

    For all people new to unity, and new to 3D modelling, who are making assets and such; I definitely recommend including normals. I did not include any for a while, and see why my packs were not selling at first. But updates have been made, and i'm very happy with the outcomes.

    Anybody looking for extra tutorials on making normal maps very easy, let me know!
    Here is just a basic pillar from my "Dungeon and Cemetery Kit" soon to be released:
    upload_2014-10-30_12-43-51.png
     
  2. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    I thought it was common snese and knowledge to use normsl mappkng for majority of objects
     
    JovanD likes this.
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We've decided to move away from normal maps for a lot of the current game. The issue with the pic above is the fact you've not baked the normal map in with diffuse, which would be a correct comparison. Then you would see almost zero difference.

    Also that image there is probably the worst example for normal maps - non organics. Normal maps excel when you use them for organics, to give the impression of a much higher polycount than it actually is.
     
  4. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Who has? Your team?

    Not so. I find normal maps to be just as useful (if not more) for non-organics.
     
    JovanD and MJohnson24 like this.
  5. TheSniperFan

    TheSniperFan

    Joined:
    Jul 18, 2013
    Posts:
    712
    @hippocoder Until you move the lightsource that is.
     
    Tomnnn likes this.
  6. MJohnson24

    MJohnson24

    Joined:
    Jan 24, 2014
    Posts:
    388
    Well yes, maybe not the "best" pic as an example. And also, is common sense to use normals for most objects etc.

    Just stating that people should use them if not already. Im just one of thousands of artists, and did want this post to be for others to say who is right or wrong, so my apologies.

    Just showing an easy way to do it, for those with not much experience!
     
  7. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Like almost everything, depends on the need. We don't use them, but we also don't use lights. :)
     
    NomadKing and MJohnson24 like this.
  8. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Normal maps... just a fancy lighting trick :p

    It's certainly a must if you're taking advantage of lighting and textures. I'm taking a class next semester on shaders! The models will all be textureless and a solid color, and the shader will do all of the detail and color that is seen at runtime.
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    If the lighting is static and you use a lot of unique, non-tiling textures, you can certainly bake "fake normal shading" into the diffuse and it looks great.

    For everything else, normals are pretty great. Even for simple things like rounded corners.
     
  10. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Some Ninja game Disney is making I don't know about?
     
  11. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    Could be ambient light that never changes. Maybe self illuminating objects?
     
  12. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Heh. Nope, Commander. No lights. Certainly a challenge when creating vfx, though. :)
     
  13. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    No ambient either, and illumination. All in art.
     
    hippocoder likes this.
  14. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yes, normal maps are overrated when placed next to awesome art. We tend to model the detail in instead, which looks far nicer. This is trivial with box like shapes in the OP, but for organics we use the occasional normal map. And, moving lights are far less common than you expect in games, and gunshot/fx flashes are so brief it doesn't contribute well enough.
     
    AcidArrow likes this.
  15. smd863

    smd863

    Joined:
    Jan 26, 2014
    Posts:
    292
    Well, sure, but you still want awesome art and detailed models when using normal maps. Awesome art won't get any worse with normal maps; it will just improve dynamic lighting cues making its underlying awesomeness more apparent at runtime.

    The trade-off is really "static vs dynamic" not "awesomeness vs normal maps". On a spectrum of dynamic/expensive to static/cheap you have pixel shader to vertex shader to CPU to pre-calculated, and you generally want to shift things as far to the right as you can get away with*.

    Baking normals maps (or your high poly model directly) to diffuse is a big performance win because you can shift the work from the pixel (very expensive) to pre-calculated (essentially free). You will, of course, lose specular highlights and the ability to change the lighting colour, direction, and intensity at runtime. Whether that performance and quality trade-off is good or bad is a judgement call based on the type of game you're creating and your other design/hardware constraints.

    * Normal maps themselves are actually a counter-example. In that case, however, you are saving the CPU/vertex shader the work of dealing with potentially millions or billions of vertices by baking them down into a texture which the GPU can handle per-pixel relatively easily.
     
    AcidArrow and 0tacun like this.
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Execution is much faster with 50-100k more verts than using normals for PowerVR hardware in our game, so we're sparing with the normal maps. During this process we found that normal maps didn't always improve the visual quality. For some things, they simply don't for example where lighting is fixed. So there is no point.

    For desktop and console, yes. Not for mobile. dot in frag is really quite punishing for these devices we've found.
     
  17. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Did you ever look into textures vs vertex colors?
     
  18. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We aren't particularly using vertex colours. We use textures, and lots of them. I don't think you understand what I'm saying. I meant higher polygon meshes as opposed to using normal mapping for pvr architecture.
     
  19. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    No, I understand. But for many models a higher detailed mesh would allow for vertex colors to work as a texturing alternative and give a nice performance boost(Of course it depends on the visual style)
     
  20. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No there's not much benefit from using vertex colours instead of a texture. The texture is usually a fixed cost for the fragment shader, and pvr will prefetch this texture anyway. So unless you're using a ton of textures, there's not really a performance gain from using vertex colour only. You'd save a multiply at best after the initial lookup (which was likely prefetched).

    For a typical GPU you would probably not see much difference.
     
  21. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Our stuff is pretty small on the screen to begin with, but we found similar. Using slim shaders lets us boost the polycount quite a bit.
     
    hippocoder likes this.
  22. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    I think you're gonna S*** bricks when you find out there are height/parallax maps too
     
    randomperson42, marcipw and Zomby138 like this.
  23. Jingle-Fett

    Jingle-Fett

    Joined:
    Oct 18, 2009
    Posts:
    614
    What the are you talking about, normal maps are more than great for non-organic stuff. I mean you can model all the detail if you want but...
    For example, this here asset which I made a couple years ago was baked from a 100k-ish poly model..down to a 12 triangle cube. Put the textures on a simple 2D plane and you're down to 2 triangles. For the performance cost of just one of the high poly ones you could have thousands of these cubes, while using less memory to boot. I can't fathom any case where the high poly version would yield better performance in this particular situation, even using PVR technology (mind you though I've never used PVR before so you probably have more experience than I do on that front).

    greeble cube 02.jpg
     
    Last edited: Oct 31, 2014
  24. GGnore-AlanSmithee

    GGnore-AlanSmithee

    Joined:
    Jul 22, 2014
    Posts:
    12
    Hi!

    I am somewhat new to graphics programming (shader programming) and was under the impression that in general doing these sort of operations would (always) be faster on the GPU. Even to the point where the GPU is even being used to do performance intensive calculations that are completely unrelated to rendering.

    Am i missunderstanding you, or are you saying that this assumption is incorrect, or is the case of normal maps an exception?

    Thanks in advance for the clarifycation!
     
  25. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    I was very happy to read about how the normal maps are improved in the Unity 5 Standard shader. Guess normals will now show details in areas of bounced light (i.e. the unlit areas of ambient light). Right now, the normal details almost completely fade out in those unlit areas. I have to also say, normals are a must on static geometry and props as well, not just characters or organics.
     
  26. MJohnson24

    MJohnson24

    Joined:
    Jan 24, 2014
    Posts:
    388
    Well I do love that fact using ambient lighting with no other light source, and using non-organic normal maps, come out to be a nice result!

    I created a scene with a bunch of specular diffused pillars, walls, etc. And turned the directional light off so there was just ambient lighting. I attached a spotlight my First Person Controller, and the results were quite cool, because, yes, normals do not show much, or at all, in ambient lighting, but when you walk up close with spotlight in hand, its almost like secret or hidden messages, or pictures, are shown and appear! Great for a "dark based game" or horror even.
     
  27. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    We probably would model a lot of it since the side looks remarkably flat. If you submit 1000 verts, it's pretty much going to take the same amount of time as a cube. Any modern GPU throws out verts like nobody's business. But it's a balancing act - we do use normals, just selectively for the hardware we target. It looks better especially at grazing angles, to use geometry.

    So yes, I think your cube is a poor example, and breaks the illusion of normal mapping. This is why we focus on the silhouette first then normal mapping provides the necessary detail. This way is particularly well suited to organics or complex surfaces.

    I do understand the point you're trying to make, but it's a point that would not get approved in our game due to the side of it being completely flat. You would need to add some form of silhouette or more verts. But yeah, I get the point you are making - that it can improve things with lighting. That's obvious, and we never said we wouldn't use normal maps, only that a box on it's own should have more geometry.



    To clarify on my earlier comments - again - we do use normal maps, but selectively. We think that people ignore geometry more than is necessary in this day and age, and we think people abuse normal maps and end up with a substandard image within the actual game so it's important to achieve a balance. Likewise, it's important to not rely on PBR for everything, since this is slow and wasteful. Just opinion of course, and everyone likes to approach game dev a little differently.
     
    Last edited: Oct 31, 2014
  28. Deleted User

    Deleted User

    Guest

    @hippocoder , you can multiply the NM's by a constant and that helps a lot. It's a compromise, I personally don't like NM alone, it's great when you start doing height displacement / parallax mapping. Although it starts to become heavy due to to material complexity, so it's up to the technical artists to decide what's the best trade off.

    Either more polys or PM..
     
  29. ChaosWWW

    ChaosWWW

    Joined:
    Nov 25, 2009
    Posts:
    470
    I'm just going to reinforce what that OP said. Normal maps definitely make your models look better and you should use them. Just look at any 3d AAA game that you think looks good, and notice how everything has a normal map. And if you are using a modern 3d workflow, you want to bake details anyway. If you are baking lighting information into your diffuse you might as well bake a normal map as well, it costs hardly any of your time for a really good result.

    You might think that for hand painted work you don't need a highpoly model, but that's not even really true any more. For example, Blizzard's work in World of Warcraft uses highpoly models, even though they don't use normal maps. I'm betting they would use normal maps if their engine supported it, though (WoW is really old). Proof: http://www.polycount.com/forum/showthread.php?t=125737

    Of course, there are specific scenarios where normal maps might not be necessary, considering your art style. For realism, though, nearly every texture should have a normal map. Certain types of hand painted work or heavy stylization might not require normal maps. A lot of stylized work can look really good with normal maps, though. See Dota 2 or Team Fortress 2 as some examples off the top of my head.

    Overall if you are serious about 3D art then don't just take my word or anyone else in this thread. Ask yourself which games you think look really good. Analyze them and see what they do. Take that knowledge with you to use in your own art, and seek out any breakdowns or articles that explain their process. Also seek out professionals in the field, as they have had to deal with the realities of game production and probably know what they are talking about.
     
  30. MJohnson24

    MJohnson24

    Joined:
    Jan 24, 2014
    Posts:
    388
    You definitely said it straight forward, ChoasWWW, because yes it is true, it all comes down to preference, ive always made high detail in my models, but lately have been resorting to more detail in the textures and normals rather than the 3D models. Either way I love art, and will always love art in any for that it comes! :)
     
  31. willemsenzo

    willemsenzo

    Joined:
    Nov 15, 2012
    Posts:
    585
  32. Deleted User

    Deleted User

    Guest

    Still normal maps lack, even in AAA it lacks.. The only company I've seen do it right is CryTek which uses POM for everything and it looks gorgeous. If you're going AAA or 3D for PC / console in this day and age with hardware as it is on the precipice of another generation there is no excuse when millions of polys aren't an issue neither is POM.. NM's are ok, but it's just the start.

    Skyrim looks so much better with a POM mod. For mobile Etc. yeah stick to NM only.
     
  33. Jingle-Fett

    Jingle-Fett

    Joined:
    Oct 18, 2009
    Posts:
    614
    Well the point I'm making with this cube is to show that normal mapping is perfectly fine for hard surface stuff just as much as organics. Not that it doesn't break down when viewed at extreme angles. All normal maps look flat when viewed at extreme angles. That's the nature of using normal maps, it's a tradeoff. It should go without saying that higher priority objects generally should get more geo modeled on.

    You're arguing that this one particular asset is a "poor example" simply because it would not get approved for your game in particular...but this asset wasn't made for your game and your project has different needs than the project it was made for. Your project doesn't need it to be a 12 triangle cube, mine did. That doesn't take away from the fact that it looks a lot better with normal maps than without, assuming no geometry changes were allowed. But we can agree to disagree.

    If you were to do the same thing and make an organic meat cube and bake it down to a 12 triangle cube like this one (and baking anything to that low poly is a more extreme case), you'd still have the exact same problem of the object looking flat at extreme angles. It wouldn't magically look better just because it's organic instead of hard surface, that's what I'm getting at.
     
  34. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Multipliying a NormalMap will make it darker or brigther (increase or decrease the encoded direction) which results in wrong lighting behavior. If you want to increase/decrease the depth of the pixel (or how deep your surface will appear) you have to do it only on the blue channel (after the decoding phase). :rolleyes:
    PS: Parallax mapping is another story. :D
     
  35. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
     
    MJohnson24 likes this.
  36. Deleted User

    Deleted User

    Guest

    Yes, that is just stating the obvious. POM is the way to go and I'll expect to see more of it upcoming..
     
  37. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    What's the performance hit from POM?
     
  38. JovanD

    JovanD

    Joined:
    Jan 5, 2014
    Posts:
    205
    Who gives a hoot when it looks so Jesus F***ing Christ Virgin Mary F***ing good!
     
    Deleted User and MJohnson24 like this.
  39. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,369
    Compared to standard Parallax Mapping will depends on how many samples you do (to get deeper). But it's costly by around 3 times.