Sign in to follow this  

Unity - Normals

This topic is 1048 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Edited by CGXel

Share this post


Link to post
Share on other sites

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.

Edited by ikarth

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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....

Edited by Gian-Reto

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

 

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.

Share this post


Link to post
Share on other sites

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 :)

Edited by CGXel

Share this post


Link to post
Share on other sites

This topic is 1048 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this