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.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Meshes imported from blender with same material are different shades(URP)

Discussion in 'Editor & General Support' started by TheGoldenDragon730, Dec 3, 2022.

  1. TheGoldenDragon730

    TheGoldenDragon730

    Joined:
    Jul 12, 2018
    Posts:
    3
    So Im trying to import some meshes from blender. Im trying to keep thing symmetrical, so I mirrored certain objects, like the legs and "wings" of the mesh im showing. I did not do this using the blender mirror modifier. I did this by creating a duplicate, applying the mirror option in blender, which just flips the object, and then making its position on one axis the inverse on of the original object(-1 to 1, that kind of thing). The materials look normal in blender, most being single solid colors. However, when I import it into unity, I noticed that the meshes were different shades of the same colors. The first thing I tried was creating new materials within unity that were roughly the same color, but the problem persisted. Im going to included an image to show the problem.

    I would also like to note that 1. this also happens with other objects that undergo a similar process when it comes to mirroring, and 2. When I first imported it into unity, the normals on the objects that were the wrong color were inverted, despite not being inverted in blender. They were still the wrong color though.

    One of the models facing this issue(the left leg, with the exception of the foot, is whats messed up. The foot on the right is messed up. The wing on the right is messed up too). Thanks for any help.

    Screenshot 2022-11-26 140849.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,962
    It's probably normals or even the face windings, since you say that you flipped it.

    Go back into Blender and verify / flip the normals / faces so everything is consistent.

    Most Shaders / Materials in Unity only render one side of each triangle.

    Here's how to see which sides in Blender so you can flip them around:

    backface_culling.png
     
  3. TheGoldenDragon730

    TheGoldenDragon730

    Joined:
    Jul 12, 2018
    Posts:
    3
    when I do that, the normals are flipped in unity. Thats while I flipped them in the first place.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,962
    There's two things here.

    - the normals for lighting (data on each vertex), which looks like what might be wrong
    - the "normals" as implied by face winding.

    One affects shading, one affects it even being visible with a standard shader.
     
  5. TheGoldenDragon730

    TheGoldenDragon730

    Joined:
    Jul 12, 2018
    Posts:
    3
    How would I fix the normals for lighting then? I genuinely havent heard about that. Thanks
     
  6. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,962
    I usually don't... you CAN... in Blender... just look up vertex normal painting.

    Instead I usually just set my model imports to ask Unity recalculate normals, and then I set the slider angle to zero for lowpoly, or higher for smoother stuff.