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

GLTFLoader: Revert usage of computeTangents(). #21186

Merged
merged 1 commit into from Feb 3, 2021
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Feb 1, 2021

Related issue: #11438 (comment)

Description

It seems computing tangents currently breaks NormalTangentTest test asset. Reverting the change solves the issue for now.

I guess we have to find another way to fix double sided rendered models.

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I'm looking into the original issue a bit more now.

@mrdoob mrdoob added this to the r126 milestone Feb 3, 2021
@mrdoob mrdoob merged commit f5895e0 into mrdoob:dev Feb 3, 2021
@mrdoob
Copy link
Owner

mrdoob commented Feb 3, 2021

Thanks!

@WestLangley
Copy link
Collaborator

It seems computing tangents currently breaks NormalTangentTest test asset.

Calling computeTangents() outside the loader works fine.

When tangents are computed by the loader, this code block is executed, which flips normalScale.y.

/ping @elalish

@donmccurdy
Copy link
Collaborator

I've added an option generating MikkTSpace vertex tangents for any glTF file with an offline CLI here: https://gltf-transform.donmccurdy.com/cli.html ... for example:

gltf-transform tangents input.glb output.glb

It works on the web too (using WebAssembly) but MikkTSpace requires unwelding mesh vertices, so — similar to this PR — it's probably not something that we'd want to automatically apply to all glTF files.

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

Successfully merging this pull request may close these issues.

None yet

4 participants