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

GLTFExporter: Fix normal computation with interleaved data. #20745

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 23, 2020

Related issue: -

Description

GLTFExporter exports normalized normal data. To ensure this, there are two functions that check normal attribute data and update them if necessary. However, this logic did not work for interleaved normal data so far.

@mrdoob mrdoob added this to the r123 milestone Nov 23, 2020
@mrdoob mrdoob merged commit 05778cf into mrdoob:dev Nov 23, 2020
@mrdoob
Copy link
Owner

mrdoob commented Nov 23, 2020

Thanks!

@ramirofages
Copy link

ramirofages commented Dec 2, 2020

One question, I'm getting the (probably) same error regarding the normal computation with interleaved attributes when loading a glb file. The error happens when you call applyMatrix4 on a BufferGeometry that contains interleaved attributes.

I noticed that this issue was fixed for the gltf exporter...is the gltfloader working correctly for this?

(btw applying a matrix4 directly on the interleaved attribute works correctly)

@donmccurdy
Copy link
Collaborator

As far as I know GLTFLoader handles interleaved data correctly — it certainly renders correctly in many of my tests. Notably GLTFLoader does not process the interleaved binary data, it just passes it into a three.js InterleavedBuffer object. If you're getting an error when doing further work on an interleaved BufferGeometry, I think you may need to file an issue with example code.

@ramirofages
Copy link

Okay thanks for the quick response, I will see if I can reproduce this outside of my project tomorrow

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