Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misaligned Normal Maps after .glb-export #639

Closed
Kredithaichen opened this issue Nov 19, 2021 · 1 comment
Closed

Misaligned Normal Maps after .glb-export #639

Kredithaichen opened this issue Nov 19, 2021 · 1 comment

Comments

@Kredithaichen
Copy link

What happened?

After exporting a .fbx-file from Unity using UnityGLTF via the ExportGLB selected button the resulting .glb file had its normal maps all misaligned. The diffuse maps were all perfectly right and looked like expected. The alignment issue only extends to the normal maps. It seems like they are flipped along one axis.

I verified the issue in Babylonjs sandbox and Gestaltor respectively and both show the normal maps incorrectly, so the problem occurs at some point during export.
It appears that the problem is fixed auto-magically by applying the gltf-transform CLI, so it might be a sanitizing step that fails.

What did I do?

  • I imported an FBX-file into Unity
    • with the UnityGLTF-package,
    • as well as the UniversalRP-package installed.
  • I extracted the textures via the .fbx-importer
    • placed them in a folder named 'Textures' right in the Assets-folder
  • I selected the .fbx-file in the scene hierarchy
  • I hit 'ExportGLB selected'
    • under the GLTF-tab in the toolbar
  • later I imported the .glb at runtime, that's when I noticed the problem, but as pointed out, the problem was verified in external, independent tools.

What did I expect to happen?

I expected the exported .glb-file to have the same material data as the scene object I exported.

Attachments

The resulting .glb-file: Link to Google Drive
A minimal example project to reproduce the project: Link to Google Drive

Screenshots:

UnityUnlit
BabylonJS
Gestaltor
UnityNormalMaps
UnityLit

@hybridherbst
Copy link
Collaborator

Should be fixed in the prefrontal cortex fork (and this PR: #644)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants