Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Normal map problem (messes up shadows+lighting)

Discussion in 'Editor & General Support' started by chaos1986, Mar 5, 2011.

  1. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    Applying normal maps (with and without specular) makes the shadows go inside-outy and the surface go really dark (when it should be really bright) what is up with that, It's always done this since 3.0 for me, I've tried reinstalling and different graphics card drivers, different areas are dark and others are bright, it just looks really messed up
     
    Last edited: Mar 5, 2011
  2. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    Hmm, it's possible one of the normal maps channels are inverted (try make a normal map from within Unity, see if it happens with that too).

    It's also possible you're not setting them as normal maps within Unity (an option that wasn't there/needed in 2.6.1) and without setting that, it does a similar effect to what you're describing, though you should see a warning notice under all effected normal maps in the material display.
     
    msmoyle likes this.
  3. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    How do you generate normals in Unity, also it's something to do with Tangents as dicking around with the options alters the result, I can't get it right though
     
  4. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    Unity 3 really does have a tun of problems, they should have spent longer testing these things before release. I never had these issues with 2.x
     
  5. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    Attachment
     

    Attached Files:

  6. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    To generate normal maps, get your height map (grayscale) and click on it once imported, go to the texture type dropdown list, select normal map, and select generate, change the options for depth etc. and it'll generate a nice clean and correctly made normal map for use in Unity. If that looks ok and your other normal maps don't, then their likely in need of a color channel to be flipped/inverted. Depends really.

    I find it to be quite stable, are you using 3.0, 3.1, 3.2 or 3.3? I think it's probably unanimous that 3.0 had it's problems, but 3.2 appears to be very stable (3.3 not so sure about though, but that did introduce a big deal for android developers, which might have issues that need ironing out).

    As for tangents, yeah if that's the problem then your model is missing them, but more often than not generating them within Unity can fix them, along with normals (all the same kinda dealy thing).
     
  7. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    done that, normal maps look like s**t in Unity, guess i'll have to work without them, specular on it's own looks great, second i generate normal maps they do work correctly with lighting but look really awful, and using my own (which work in 2 other engines fine and look great) look really messed up
     
    Last edited: Mar 5, 2011
  8. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    You're giving up? Why don't you post the problem objects/maps on here, so people can check them out? Normal maps have always "just worked" for me and I don't really understand what could be going wrong for you. I'm sure it's something very simple, a button that hasn't been pressed or an object missing some map or something.
     
  9. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I'm not allowed to post up the objects :(

    Normal maps look like really sort of organic, and specular normal maps have no (0) effect if theres a normal map on, yet with the same settings they work fine without... forget it!

    I'm going to have to find an alternative engine, i can't work with this, i thought Unity was supposed to be artist friendly, I've never had this many problems with such a simple thing in my 13 years of designing maps, levels and environments. All i can see is a road (excuse the pun) of problems :(
     
  10. chaos1986

    chaos1986

    Joined:
    Mar 29, 2009
    Posts:
    230
    I mean check this out. I can't even get it to be affected by point lights or the directional light, i mean COME ON, how does anyone expect to be able to designing anything of any quality with that.

    Unity is a great engine, but I need normal maps (for some effects we're adding in later to do with the weather)
     

    Attached Files:

    Last edited: Mar 5, 2011
  11. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    Ok, seriously? There isn't anything wrong with Unity. Or it's handling of normal maps. Something you're doing isn't right, and for 13 years of designing maps, levels and environments, I'm shocked that you would throw your arms up in the air so quickly and consider moving on to something else. :(

    Have you read the parts of the manual regarding textures, normal maps and importing art assets? Are you importing them correctly?

    Are you applying the normal map in the correct place?

    Have you got your display in vertex mode instead of forward or deferred?

    Are your lights setup correctly?

    Are you using incorrect shaders?

    Which version of Unity 3 are you using? You never said.

    What is your EXACT process for creating your normal maps?
     
  12. Frank Oz

    Frank Oz

    Joined:
    Oct 13, 2010
    Posts:
    1,561
    At the bottom, shader wants tangents. You mentioned that before. I take it going back and fiddling with the mesh settings for tangents and normals didn't get it working? If not, the problem lies in the 3D app you're using to export from. Which could be something isn't ticked in the .fbx exporter (I faintly recall there being some option for that in the Max exporter).
     
  13. JBC

    JBC

    Joined:
    Sep 4, 2010
    Posts:
    12
    I'm experiencing something similar having just migrated from 2.6 to 3.3.
    For us professionals that use the 'bluish' normal maps and not greyscale 'heightmaps', this normal map conversion is a pain. We actually programmed a hack for the AssetPostProcessor in the Editor that will just leave the normal map as a texture and not re-process it.
    Now here's the kicker: for JPG and PNG this is flipping the normals. For TGA everything is fine! I did an image comparison using software designed for that and there is no pixel difference, only on the compression!

    Quite annoying for now and I'm searching the forums for more info right now.

    UPDATE: found FO's normal map post (82652-Normal-maps- and-importing-them-correctly which confirms what I suspected about Unity's handling of compression. Looks like TGAs whenever possible as I cannot change the habits of 100's of artists to save alphas into their normals. :p
     
    Last edited: Apr 13, 2011
  14. junaid2pac

    junaid2pac

    Joined:
    Jul 12, 2013
    Posts:
    3
    thanks...that actually helped me out with a noobish problem
     
  15. msmoyle

    msmoyle

    Joined:
    Jul 15, 2013
    Posts:
    10
    10 years later you just helped me big time..
     
unityunity