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

Normalize normals and quaternions. #51194

Closed
wants to merge 1 commit into from

Conversation

fire
Copy link
Member

@fire fire commented Aug 2, 2021

Part of a series of pr requests improving gltf2 export.

Can be back ported.

Part of #51132

@fire fire requested a review from a team as a code owner August 2, 2021 17:02
@fire fire force-pushed the gltf-vertex-normalize branch 4 times, most recently from ea23a40 to 812a697 Compare August 2, 2021 17:39
@fire fire marked this pull request as draft August 2, 2021 17:42
@Calinou Calinou added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:3d topic:export labels Aug 2, 2021
@Calinou Calinou added this to the 4.0 milestone Aug 2, 2021
tangent.x = tarr[(i * 4) + 0];
tangent.y = tarr[(i * 4) + 1];
tangent.z = tarr[(i * 4) + 2];
attribs.write[i] = tangent;
Copy link
Member Author

Choose a reason for hiding this comment

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

@BastiaanOlij Can you review this? I think this is incorrect.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not 100% sure... If I recall the w/a is used on tangents and will be either 1.0 or -1.0 depending on whether the direction of the cross product needs to be flipped to create the bitangent/binormal vector. This saves having to maintain both vectors.

So simply discarding the value in order to encode it seems like a sure way to cause problems...

@fire
Copy link
Member Author

fire commented Aug 9, 2021

Superseded by: #50019

@fire fire closed this Aug 9, 2021
@fire fire deleted the gltf-vertex-normalize branch August 9, 2021 08:39
@akien-mga akien-mga added archived and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants