Home Technical Talk

Unity Normals/Tangents Problem

interpolator
Offline / Send Message
Shrike interpolator
Hello guys

I really need help, Im going totally crazy with the unity import options, I have no idea what it wants from me

And sometimes when I change the normal/tangent settings, it keeps old settings that are disabled and things like that and the more I change them, the more they seem to break or keep a history

pic2.PNG

pic1.PNG

I have huge black artifacts on nearly all of my assets

First I thought I needed special lightmaps or something, but depending on the options they shade fine, just that one part shades fine with some options and the other with the others

And what is it with the normal texture texture mode ? Im just really confused and I tried every setting in every variant . depending what I take it displays the normals wrong or not at all, and for some I need to invert Y and for others I dont have to.

Can anyone share his workflow please ? I just want to import my assets and apply normals properly so I get the right shading.

Replies

  • Farfarer
    Options
    Offline / Send Message
    Give this a try;

    https://gist.github.com/Farfarer/6903839

    It should automatically set up your assets to have the correct settings when Unity imports them.

    Oh, and for the normal texture mode, it'll set it to compress the textures as swizzled DXT5 (or as regular RGB for mobile) - the UnpackNormals macro in the shader will take care of converting them to a proper normal map in the shader.

    So for your normal maps, you want to set it's type to "Normal" in the inspector, but ensure you untick "Generate from greyscale" otherwise it'll try and use your existing normal map as a heightmap and convert that into a normal map.
  • AlecMoody
    Options
    Offline / Send Message
    AlecMoody ngon master
    Yeah, Jame's script will set things up correctly. However, your errors may not go away since they appear to be caused by something else. How is your scene lighting set up?
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    Ah thank you guys, Gotta try this out
    It seems that the errors are there until I bake the assets down with the beast lightmapper, this seems very unhandy to me. I will try out the script before I go on
  • Farfarer
    Options
    Offline / Send Message
    On the default shaders, light mapping will remove all dynamic lights from affecting the mesh, leaving them lit only by the lightmap - that's why you see the errors vanish; the normal maps and mesh normals aren't having an effect on the lighting.
Sign In or Register to comment.