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

Add Mesh Quantization support #192

Merged
merged 1 commit into from
Nov 22, 2023
Merged

Add Mesh Quantization support #192

merged 1 commit into from
Nov 22, 2023

Conversation

nevermemo
Copy link
Contributor

@nevermemo nevermemo commented Nov 16, 2023

This PR adds support for KHR_mesh_quantization extension. To handle geometry data, it retains normalized information for gltfAttribute and passes it to associated buffer. This does not work for animations directly so they are de-normalized after interpolations.

This PR partially addresses issue #89

PS: I added a change in serve/src/index.js so served page can be used with PixiJS DevTools.

@jnsmalm
Copy link
Owner

jnsmalm commented Nov 18, 2023

Wow, nice! Sorry for the late response, I'm quite busy right now. I'll take a look at this soon!

@jnsmalm
Copy link
Owner

jnsmalm commented Nov 22, 2023

@nevermemo Do you have any gltf models with this feature so we can add some tests for it?

@nevermemo
Copy link
Contributor Author

nevermemo commented Nov 22, 2023

@jnsmalm You can use AnimatedMorphCube-meshquant.glb @goldenratio shared in the issue. Model renders fine without the changes but animation weights are normalized so cube stretches to almost infinity.
For normalized primitives, I used testModelBlank.glb.zip. It is one of my experimentations using gltfpack. Vertexes render just fine but texture wrap is way off without the changes.
I used Model Viewer to compare and make sure it works as intended.

@jnsmalm
Copy link
Owner

jnsmalm commented Nov 22, 2023

@nevermemo Thanks for adding this! I'll create a new release after the weekend.

@jnsmalm jnsmalm merged commit 88b92fc into jnsmalm:develop Nov 22, 2023
1 check passed
@nevermemo
Copy link
Contributor Author

You are welcome. I have been using pixi3d for a while but I never had gone deep into the source code before. It is such an ingenious way of integrating 3d into pixijs using already existing tools and implementing many more. I really love your work and it is a pleasure to contribute to such an open source project.

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.

2 participants