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

Wrong UV values #236

Open
MathisEngels opened this issue Dec 1, 2023 · 1 comment
Open

Wrong UV values #236

MathisEngels opened this issue Dec 1, 2023 · 1 comment

Comments

@MathisEngels
Copy link

Hi.

When I use gltfjsx, the UV of an object gets replaced with wrong values.
For example :
Original.glb file :
image

As you can see on the above picture, Table as UV and the first 3 are : 0.4732959568500519, 0.8645936250686646, 0.2926514446735382

Now I run npx [email protected] .\scene1-rigid.glb -T -f png -k -j on the file.
This is what I get :
image

UV for "Table001" are changing for 0.0625 (for the 152 values).
0.0625 never appear in the original UV array.

Note: If you wonder why instanceUVs and instanceNames arrays goes from 30 to 10 in size, it's because there is instancedMeshes.

TLDR : UV array after using gltfjsx gets changed to an array filled with a random value.

Files :
scene1.zip

@donmccurdy
Copy link
Member

Depending on the configuration of the optimization pipeline, glTF Transform may reorder vertices, eliminate some vertices, or change the numerical values of vertex attributes. The intention of the optimizations is that the scene should look the same, while being represented in a more compact way. If the model does not look visually the same, that could be a bug we could investigate. If you require that no vertex data change in any way, then little optimization is possible, and you probably need to skip the -T flag.

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