Open hybridherbst opened 4 years ago
After some investigation, it appears:
The usdview artifacts are due to our failure to tag the mesh as subdivScheme="none", which triggers usdview to recompute normals on render
The ARQL artifacts seem to be a bug present in iOS 13.x and is fixed in 14 beta
I've been trying to find the root cause for this myself but haven't been successful in doing so. UV seams in meshes cause visible seams along normals in USD and USDZ files exported with usd-unity.
It's clear that vertices need to be split in places where UV seams are but the resulting normals should be identical, resulting in smooth shading independent of UV seams.
My assumption so far is that it has something to do with normal interpolation behaviour; Blender sets that explicitly to "faceVarying" while Unity leaves it as default.
Reproduction cases: https://glitch.com/edit/#!/usd-normals-bug (you can directly download the usdz files from the "assets" section in Glitch)
Reproduction from Unity: NormalsBugs.unitypackage.zip
Import these, export as USD or USDZ. Import them in Blender or anything else that can export USDZ and try again.
Note that re-importing the corrupt files in Unity looks correct, so some logic seems to be wrong in both import and export.
Ground truth in Unity (these are smoothed cubes; the left one has 3x3 quads per face, the others 1x1. The left one has a deliberately shitty UV layout to show the issues better. UV layout should not affect shading at all if no textures are used.)
Exported from Unity:
Same file, exported from Blender:
For simple shapes, it's the same, visible edges along all UV seams:
For complex shapes, also, but much less visible since there's more going on - this is where I originally found the issue - note the vertial line along the center:
Reimporting them with usd-unity looks correct, which I believe points to different defaults being in the spec and used by Unity for some interpolation: