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

Error with animated draco #365

Closed
soadzoor opened this issue Apr 27, 2018 · 5 comments
Closed

Error with animated draco #365

soadzoor opened this issue Apr 27, 2018 · 5 comments

Comments

@soadzoor
Copy link

Hi,

So today I played some time with the new draco feature. Everything seemed to work fine, expect for when I tried to compress animated gltfs:

Without draco:
without_draco

With draco:
with_draco

The validator on donmccurdy's viewer says the following error: Length of 0x004e4942 chunk is not aligned to 4-byte boundaries

When I export it as a gltf+bin (instead glb), the error is not showing up, but the visual artifact is the same. As well, as in the babylon sandbox. When I remove the -d from the command, the exported file's animation works well, so I'm pretty sure draco has something to do with it.

The command I use:
node bin/gltf-pipeline.js -i input/cube.gltf -s -d -b -o output/cube.glb

My files:
animation_test.zip

@lilleyse
Copy link
Contributor

Hm, it's a bit hard to tell if this is a rendering bug or a pipeline bug.

@FrankGalligan you might know better - if a model is draco-encoded and then draco-decoded will the indices stay in the same order? If not, I could see why there would be issues with Draco and morph targets together.

@FrankGalligan
Copy link
Contributor

So currently encoding a mesh with morph targets with default settings could cause errors as you observed. I'm going to make a change to gltf-pipeline to fix these types of files. The compression won't be as good as I'm going to force sequential encoding which will preserve the order.

Later on, we will make changes to properly handle animation and morph targets.

FrankGalligan pushed a commit to FrankGalligan/gltf-pipeline that referenced this issue May 1, 2018
Check if the primitive contians any morph targets. If it does, set sequential encoding to preserve the order of vertices.

This fixes CesiumGS#365
@FrankGalligan
Copy link
Contributor

@soadzoor I tested your files with #367 and it works for me.

@lilleyse
Copy link
Contributor

lilleyse commented May 1, 2018

Fixed in #367

Length of 0x004e4942 chunk is not aligned to 4-byte boundaries

This error seems to have been fixed at some point in the meantime.

@lilleyse lilleyse closed this as completed May 1, 2018
@soadzoor
Copy link
Author

soadzoor commented May 1, 2018

Great, thanks guys for the quick fix!

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

3 participants