KhronosGroup / glTF-Sample-Assets

To store all models and other assets related to glTF
257 stars 30 forks source link

Inconsistent normal map of DamagedHelmet.gltf #59

Open harokyang opened 4 years ago

harokyang commented 4 years ago

DamagedHelmet.gltf did not contain tangent attributes, so we can only perturb normal with generated TBN

glTF 2.0 specified the normal vectors using OpenGL convention which means +X is right and +Y is up direction By looking into the normal map image, the light should coming from the top-right corner

But if you take a look at Default_normal.jpg, the light directions are inconsistent at different location

U This is the R channel of normal map image Due to the right coming light, the ring part on the left should be raised and the triangle on the right should be hollow

V Now let's take a look at the G channel, if the ring is raised, then the light should coming from above, but if the triangle is hollow, the light should coming from below

And there are more inconsisitent parts all the place

So either the normal map was baked incorrectly, or the gltf file miss the precomputed tangent attributes to handle different normal direction

DRx3D commented 7 months ago

@emackey @echadwick-artist : Is this something that needs to be addressed? If so, the issue will be transferred to Sample-Assets. If not, it will be closed by 27 Nov. No response indicates that the issue will be closed.

emackey commented 7 months ago

This is a correct and detailed assessment of what's wrong with parts of the normal map in that model. But this particular model was just someone's early attempt to learn Substance Painter. I don't think anyone working with Khronos has the original source material or Substance Painter project to make meaningful changes here, unfortunately.

emackey commented 7 months ago

Or I suppose someone could attempt to invert the G channel on the offending triangle, and just not worry about the rest of the map. That might be a slight improvement....

Nevermind, I found several smaller details in the map that also have the vectors confused in a similar manner.

lexaknyazev commented 7 months ago

This should be transferred and a note should be added to this model in the new repo.

echadwick-artist commented 7 months ago

I can take a look at this and see if there are any quick fixes to apply.