1
\$\begingroup\$

I have a photogrammetry asset whose UV is, like most photogrammetry assets, a mess.

And when I import this asset into Unity, the texture shows clear borders at the place where the UV is not connected, forming many "patches":

enter image description here

Compare to the same region displayed in Maya (Surface Shader):

enter image description here

What caused this and is there a way to fix it?

(this is in Unity 2021.3.22f1, URP, default settings)

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Can you use an untextured material, to check whether this may be partly due to normals/lighting? \$\endgroup\$
    – DMGregory
    Commented Apr 12, 2023 at 19:38
  • \$\begingroup\$ @DMGregory Ahh I think you solved it, a blank shader does not have this effect, but adding a normal map makes it appear. I changed the normal setting from tangent to object and it disappeared. Thank you :D \$\endgroup\$ Commented Apr 12, 2023 at 19:44
  • 3
    \$\begingroup\$ Try posting an answer showing what setting you changed to fix the problem, which could help future searchers struggling with similar issues. It sounds like you have an object space normal map - showing an image of that map can help make this easier to diagnose, as tangent space normal maps usually have a distinctive pale blue look, while object space maps have a much larger colour contrast range. \$\endgroup\$
    – DMGregory
    Commented Apr 12, 2023 at 19:44

1 Answer 1

2
\$\begingroup\$

@DMGregory in the comment pointed out what to check and I was able to find and solve this problem.

My normal map was generated by photogrammetry software and looked like this:

enter image description here

In Shader Graph (since this one is using a shader graph), select normal, and in Graph Inspector, the Fragment Normal Space has 3 options. Mine was defaulted to Tangent, and after changing it to Object, the patches disappeared.

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ Hm, that does look like a tangent space normal map. Can you show what nodes you're using to compute the value that gets routed to that Normal pin? It's possible you converted to object space somewhere upstream from what we can see. \$\endgroup\$
    – DMGregory
    Commented Apr 12, 2023 at 20:27
  • \$\begingroup\$ @DMGregory upstream of the Normal input is a .jpg texture. That map was set to Tangent space by default and I have not changed it. The map was generated by the photogrammetry software developed by other people at my institution so I am not sure how it is implemented. \$\endgroup\$ Commented Apr 14, 2023 at 18:22
  • \$\begingroup\$ That may suggest a problem in how this mesh's tangents are defined. \$\endgroup\$
    – DMGregory
    Commented Apr 14, 2023 at 18:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .