Home Unity

3DS Max Normals

Chubbydan
polycounter lvl 13
Offline / Send Message
Chubbydan polycounter lvl 13
Hi everyone,

I'll get straight into it,

Workflow is 3ds max 2013/15 & zbrush for generating models.

Using both FBX & OBJ formats I've exported to Unity and the normals come up with a seam everytimne.

I've looked in various places for a clear answer to this but all the proposed solutions don't seem to work.

Solutions I've tried are as follows;
- xnormal with and without the Unity Tangent Space calculator
- Handplane tool
- Zbrush settings flipping G and not etc.
- Messing about with the FBX settings in Unity to set the smoothing correctly
- Various Mip Map settings in both baked maps and in Unity

Truly at a loss at this point.

UV's are clean with no mirroring, geometry is not overcomplicated and have tried baking to various polycounts on the low to see if extra loops would solve. Maps are baked with X,Y,Z all positive for Unity.

UV_Seam.png

Map size in the image above is 1024, have tried various sizes. If anyones got any suggestions, most welcome.

Cheers,

Replies

  • Farfarer
    Is the texture set to be a normal map (and make sure you untick "generate from greyscale")?
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Hi Farfarer,

    Have done that too. I've seen a lot of the info you've posted on other threads and would appreciate your ideas on this matter. I looked at the xnormal unity tangent space add on you developed and it helps a lot but the seam in the previous image has been baked using the calculator. I noticed in another thread you use handplane now, could you comment on the workflow you use?

    cheers
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    UPDATE:

    I've experimented with various combinations of what has been recommended but problem is still there.

    UV_Seam_02.png

    Material is bumped specular which really highlights that there is a discrepency at the seam.

    The normal map applied in the above image was created by exporting OBJ from max 2015. Baking performed in Xnormal with and without the Unity tangenet space calculator ( both results are the same ) Handplane3D to convert the baked normal for Unity.

    Could anyone comment on their workflow with Max and Unity? About to try a maya bake and export process just to check if the problem is with max.

    Cheers,
  • Farfarer
    Basically I triangulate the mesh and export to FBX with "Split Per-Vertex Normals" enabled. (I don't use Max, but that's the equivalent).

    Then feed that FBX into Handplane with the object space bake. Convert it using the Unity preset.

    Take the very same FBX and the resulting tangent space map into Unity.

    In the mesh properties in Unity, set Normals to Calculate, bump up the Smoothing Angle to 180, set the Normals back to Import and set the Tangents to Calculate.

    Also ensure that the tangent space map is set to be a Normal map and that "Generate from Greyscale" is disabled.
  • Obscura
    Offline / Send Message
    Obscura grand marshal polycounter
    To me it looks like the problem is coming from somewhere else.
    Do you have smoothing splits at the uv splits? If yes, then the problem is coming from here. In a normal case you should not put hard edges on a organic models.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Hi guys,

    Obscura - I think you might be right about the problem coming from elsewhere, no smoothing splits however.

    Farfarer, thanks for the workflow explanation.

    I've tested an absolute blank normal map on the model and the seam still shows up. I've been using a Unity scene setup a colleague gave me along with a blank unity scene but could my setup be incorrect?

    The FBX is setup as recommended in your workflow. I'm going to investigate the scene setup.



    Cheers,
  • Farfarer
    I suspect this isn't an issue with Unity or Handplane/my xNormal plugin, but rather your mesh somehow.

    It's got an open edge or something. Can you upload the FBX?
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Cheers for taking the time;

    https://www.dropbox.com/s/owbk3e2sldkp2z0/Unity_Send.zip?dl=0

    These are the basic files I'm using to troubleshoot at this time. The FBX is simple spherical shape, a default NM, a simple baked NM with little details for checking.

    A programmer colleague of mine altered the lighting from forward to deferred which seemed to clear up the seam for this simple spherical shape. On trying this on a more complex shape however it was clear that the seam is still there.

    If I apply a blank diffuse shader onto the spherical model, no seam. If I apply a blank bumped diffuse, the seam shows up. By blank I mean no maps are plugged into the slots.

    The seam is much more apparent when using a bumped specular shader.

    As ever any advice is very much appreciated.
  • Farfarer
    Deferred does give fully correct tangent space normals in Unity. The forward pipeline has some issues, but not with seams - it's generally towards the centre of the triangles (slightly different transforms and unnormalized vectors give the errors).

    I'll have a look at your mesh and see if I can find what's up.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Brill,

    Just found this old thread where I'm experiencing the same thing that sogun experienced.

    http://www.polycount.com/forum/showpost.php?p=1931099&postcount=253
  • Refelix
    This is something that seems to have no clear way to fix. Surely this can not be an issue that has been overlooked for the past few years! If the seams do not appear in viewports of 3D programs then why do they show in Unity? Even when tangent space bake has been adjusted to suit it.

    It's a long shot but I discovered the following from a tutorial online...

    Re-normalizing the file with a photoshop filter or painting a (127, 127, 255) along both of the edges of the seam. This light blue color represents the vector that points straight out of the surface. If both edges of the seam are using this color, they'll match each other better. You might lose a little of your high res detail, but at least you won't have an ugly seam. I recommend only using this method if you really need it.

    Source:http://www.bencloward.com/tutorials_normal_maps12.shtml
  • Farfarer
    So as far as I can tell, that FBX isn't being exported with normals. That could be the issue?
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    That could be my mistake in sending the wrong file, I'll double check and I need to clear out all the test files I've been working on as it's bloated.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    I've checked the uploaded FBX and it seems like it has normals, can I ask how it shows up for you?
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Hi Farfarer & everyone,

    Can someone try these steps to attempt to replicate the problem please? Hoping I can find where this is coming from ie Unity version, file setup, etc.


    To summerise where I am at the moment with this;

    - Unity set to forward rendering
    - Sphere model has been UV mapped into two halfs and exported as FBX
    - When a blank diffuse shader is applied in Unity the sphere looks fine
    - When a blank bumped diffuse or bumped specular shader is applied a seam appears
    -Even if a blank normal map is plugged into the shader, seam still appears.

    Deferred rendering will get rid of this seam ( not when a bumped spec is applied ) but this is not an option for me on the project I'm working on.

    Any advice please?

    Cheers,
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    I keep finding threads relating to the same issue but none of the solutions seem to work;

    http://forum.unity3d.com/threads/seams-apparent-in-unity-when-i-put-on-my-mesh-s.96239/
  • Farfarer
    Hmm, I get an error saying it has malformed normals when I load it into Modo.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    hmmmmm indeed?

    I've tried replicating the fault with max and maya. I am concerned it had something to do with the export process but ive checked the fbx in both packages and seems fine, i'll try primitives from zbrush.

    Genuinely clutching at straws at this point.
  • Farfarer
    What are your FBX export settings?
  • Owers
    Offline / Send Message
    Owers polycounter lvl 10
    Personally I think the problem is with the Bumped Specular shader (or any surface shader that uses bump and specular). Something in the code it generates doesn't seem to calculate the normals accurately enough. Here's a comparison between Unity's Bumped Specular shader and a custom shader created in Shader Forge:
    01_unity4_shadernormals.jpg

    I also looked at it in Unity 5 beta and it seems absolutely fine with the new Standard shader. Strangely enough though, the Bumped Specular shader (which is kept for legacy reasons) looks better too. Here's a screenshot (forward rendering still):
    02_unity5_shadernormals.jpg

    I don't think there's anything wrong with your mesh or normal map. Maybe Unity's shaders are just giving you a bad result.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Thank you very much Owers, I'm going to get into testing this just now.
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Hi Owers,

    Popped into shader forge and manipulated one of the example shaders to include diffuse, normal and a value for the spec. Seam still apparent, would you mind sharing the custom shader attributes you've used?

    Cheers,
  • Chubbydan
    Offline / Send Message
    Chubbydan polycounter lvl 13
    Hi everyone,

    I can confirm that this is indeed a shader issue, a programmer colleague of mine has passed on a shader and now seam freeeeeeeeeeeeee!!!!!!!!!

    Big relief I must say, very surprised that this is the case with Unity all things considered but glad that there is a solution.

    Cheers,
Sign In or Register to comment.