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

Dedup causing animation errors #923

Closed
timothyallan opened this issue Apr 25, 2023 · 5 comments · Fixed by mrdoob/three.js#25976
Closed

Dedup causing animation errors #923

timothyallan opened this issue Apr 25, 2023 · 5 comments · Fixed by mrdoob/three.js#25976
Labels
bug Something isn't working external Problems or limitations traced back to other tools.

Comments

@timothyallan
Copy link

I've got an odd one where dedup causes an issue with one part of a model which is animated. Works great before dedup, afterwards, the animation is botched up.

Grab the .glb of this free model https://sketchfab.com/3d-models/medieval-fantasy-book-06d5a80a04fc4c5ab552759e9a97d91a , pop it into https://gltf.report/ , change the the default script to only include dedup and run it i.e.

await document.transform(
	// Remove duplicate vertex or texture data, if any.
	dedup(),
);

export the processed model, import into https://gltf-viewer.donmccurdy.com/ to get the animations going and look at the second flag animating on the tower.

@timothyallan timothyallan added the bug Something isn't working label Apr 25, 2023
@donmccurdy
Copy link
Owner

Hi @timothyallan, thanks for reporting the issue! I'm having trouble seeing a difference in the exported file - if that's obvious to you maybe we're getting different results somehow, could you share the resulting file? .ZIP files can be attached to github comments.

Or if it's less obvious I may need a screenshot or screencapture to see the issue.

@timothyallan
Copy link
Author

Ohh that's interesting, I didn't think it might be a platform dependent issue. I've attached the post dedup model + an mp4 so you can see the issue.

https://user-images.githubusercontent.com/1995135/234376589-3116cc47-df6c-4514-b2d1-1672acbd59d4.mp4
Medieval-v1.glb.zip

@donmccurdy
Copy link
Owner

donmccurdy commented May 2, 2023

I've reduced the model to a simplified version containing just the two flags, and the issue appears pretty clearly here:

MorphFlags.zip

Interestingly, I don't see the same problem when viewing the model in Babylon.js (https://sandbox.babylonjs.com/) so I think this may be an engine-related bug, occurring when a geometry is reused with different morph target animation. Will file a ticket on the three.js repository in a bit.

EDIT: Opened mrdoob/three.js#25976.

@donmccurdy
Copy link
Owner

Fixed in three.js upstream, should be available in the viewer after the next release or two. Thanks for the report!

@donmccurdy donmccurdy added external Problems or limitations traced back to other tools. and removed package:functions labels May 10, 2023
@timothyallan
Copy link
Author

Thanks Don, I appreciate all the work you do for the community!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external Problems or limitations traced back to other tools.
Projects
None yet
2 participants