Advertisement

Unity - Normals

Started by March 05, 2015 02:12 AM
5 comments, last by CGXel 9 years, 10 months ago

Why does my normal map looks so bad in Unity and really good on Marmoset Toolbag?

(I expected it to look different in Unity, but not this bad)

Look how in Unity I can see the original edges of the mesh, and on Marmoset they're hiden by the Normal map (on other 3D programs like Maya those edges are hiden too)

1b368cd9d0aacf76ca91cc994902a070.png36d070fc8f917f641eca9cc0e7142e81.png1f5aad89005b6712f6e05e4e99d04b9f.png

My normal settings

0d305d4a35d893407f487c6f977870fb.png

My Unity scene just has the mesh and a directional light (tried point light and doesn't look any better)

Am I doing something wrong or that's how the normals are supposed to look like in Unity?

Edit:

Unchecked "Create from Gray Scale" and changed the Format to "Compressed"

But if someone has some tips to make it look even better please share it with me smile.png (even tho it already looks like what I had on Marmoset)

02d476fd69637d4f72936f445833e9ca.png

Don't tell me I can't do it.

Looks like you already found it, but for future reference for everyone else: "Create from gray scale" is for creating a normal map from a height map.

Advertisement

For reference, you can also have a lot of trouble if your art tools use different tangents/binormals than Unity. For best results, you should export your tangents/binormals from your art program and tell unity to import then rather than regenerating them.

Disclaimer: I am at work, so I cannot see the images... I am trying to guess here what could be the problem, so bear with me...

1) Be aware that the green channel might be flipped depending on how your art programm handles the normal map.

For example, in 3D Coat, CrazyBump or Substance Designer, if I export the normal map directly from them without exporting as Unity normalmap (possible in 3DC since 4.1), I need to manually flip the green channel in Photoshop or gimp to make the normale compatible to Unity.

Same thing, the other way round, if I import a Unity normal map to any of these program (though again, 3DC asks since 4.1 if the green channel should be flipped on import).

2) Be aware that blender (If you use that to create or edit your models) has a very weird way of doing smooth shading, that can collide with pretty much every other 3D Program or engine out there. It could be that different tools handle the weird way smooth shaded blender models are setup differently, maybe the Marmoset tool is more fogiving.

(Blender cannot save vertex normals it seems, they always get calculated, thus your control over smooth shading in Blender is much less than in other applications where you can set vertex normals manually. Because of that, hard seams are done by adding a vertex instead of just adding avertex normal. Can lead smooth shading getting broken if for example a 3DC model is imported to blender)

3) make sure you play around with the tangents settings. Try and error....

For reference, you can also have a lot of trouble if your art tools use different tangents/binormals than Unity. For best results, you should export your tangents/binormals from your art program and tell unity to import then rather than regenerating them.

Sorry I don't understand what you mean, like importing the normal map besides pasting it into the project folder?, I'm kinda slow sad.png

Disclaimer: I am at work, so I cannot see the images... I am trying to guess here what could be the problem, so bear with me...

Thank you Reto :D don't sweat it!, thank you for the information :) will add those to my notes

Don't tell me I can't do it.

For reference, you can also have a lot of trouble if your art tools use different tangents/binormals than Unity. For best results, you should export your tangents/binormals from your art program and tell unity to import then rather than regenerating them.

Sorry I don't understand what you mean, like importing the normal map besides pasting it into the project folder?, I'm kinda slow sad.png

If you select your imported art asset in the editor, you should see a tab with lots of options pop up on the right side of the editor (in the default view). The same tab where you can scale your mesh asset.

If you go down to the middle part, you should see two dropdowns, these are the binormals (I think) and the tangents... you can select either import or generate. If you can, always select import.

What they do, they are some of the meshparts that directly influence how your normal map displays. Without them bumped shaders do not work, that is why Unity has the option of calculating them isntead of importing (if you mesh comes without them). The calculated ones might differ from the ones you got in your external application, which might explain the differenes.

Advertisement

So basically it should look like this always?
35b73be80f38bf911abb17ec3eebcbcb.png

The options are:

Normals = Import, Calculate, None
Tangents = Calculate, None

Edit:

Tested it, I guess I understood it wrong and only Normals should be set to "Import", becasue if I set Tangents to "None" the texture looks wrong

Thanks for the explanation :)

Don't tell me I can't do it.

This topic is closed to new replies.

Advertisement