Home Technical Talk

Simple Normal Map Problem

Aured
polycounter lvl 2
Offline / Send Message
Aured polycounter lvl 2
I've recently sculpted in some details in ZBrush and created a high poly insect model. After that, I made a low-poly, optimised mesh and baked the normal maps in xNormal. The problem I'm having is that the normal maps do not reflect properly: in picture A, with a standard material applied, the light reflects dead centre of the eye, while when the light is placed in the same position of the normal mapped material, it reflects at the top right of the eye rather than the centre. Does anyone know what might be causing this? 


Replies

  • Aured
    Options
    Offline / Send Message
    Aured polycounter lvl 2
  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    Have you tried checking the color profile that is used to display the normal map? If I recall correctly, normal maps should be saved in linear space and, hence, no sRGB-conversion is necessary. It might be that some unwanted conversion is taking place here (or missing, depending on if the texture is stored in linear or gamma space) and screwing up the values.
  • Aured
    Options
    Offline / Send Message
    Aured polycounter lvl 2
    Hi Derra. I'm not sure what you mean. I'll post the normal map below if that helps. 
  • Aured
  • Aured
    Options
    Offline / Send Message
    Aured polycounter lvl 2
    Well, I just tried the model in UE4 and the loghting works fine. It's Mayas view thing that was ruining it. Thread over I guess. 
  • CharacterCarl
    Options
    Offline / Send Message
    CharacterCarl greentooth
    Thanks Aured. From what I can tell the normal map itself is correct. The problem is how the app you're using interprets it. What 3D package are you using to display the model?
    I can reconstruct your error when I enable sRGB Color Space inside Marmoset. So I would suggest you look for a similar option inside your software:

  • Aured
    Options
    Offline / Send Message
    Aured polycounter lvl 2
    I tried this too, it worked. Thanks so much. Can you explain what sRGB is? 
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    In games sRGB refers to the gamma correction taken on an image.

    As a rule of thumb, you want to author your textures in the color space that they will be represented in engine.

    A simple way to think about it, is that if you make a texture with sRGB on, then you are choosing color values that you are interpreting with your eye. You look at a wall, and you say thats about 200,200,200 off white. So your Base Color/Albedo will be created in sRGB or sRGB on.

    When sRGB is off, you are in linear space. Color values increase in straight fashion rather then a curve. That means, again as a rule of thumb, if your texture represents DATA, you want to be in Linear space, or sRGB off. Roughness, AO, Normals, Height, etc are textures that contain a data set, therefore should be Linear or sRGB off.

    With all of that said, you can author and display your textures in whatever space you want, as long as they match between what you authored and what you displayed.  
    For most cases in game dev:
    Base Color/Albedo = sRGB on.
    Normals,AO,Height,Roughness,Curvature,etc = sRGB off.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Also, UE4 auto-detects the normal map and keeps it linear, so srgb will be disabled on import (which is what you want for data maps. For the roughness/metal/ao you will have to do this manually and set them to linear colour(provided they are packed)I advise packing these 3 maps into 3 separate channels of a single texture.

    Because the shading is encoded/decoded as data in your normal map it has to be viewed in the same tangent basis as it was baked. That's why baking /viewing between synced applications always looks correct and doesn't require swizzling /channel flipping. Same thing applies for the colour space it is baked/viewed in (always linear)
Sign In or Register to comment.