vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
478 stars 75 forks source link

Unit test LoadUniVRM fails #24

Closed bertt closed 4 years ago

bertt commented 5 years ago

Hi, I've noticed the unit test LoadUniVRM() fails. think because the tested file AliciaSolid_vrm-0.40.vrm has validation errors.

vpenades commented 5 years ago

Yes, I've been adding more validation checks, and it seems that file has malformed morph targets.

I've already reported it here: https://github.com/vrm-c/UniVRM/issues/315

vpenades commented 5 years ago

There's a general problem with glTF today, we could say there's two opposing forces:

On one side, you have developers that want to get working with glTF as soon as possible, so they skip a lot of validations when writing files.

On the other, glTF readers expect the files to be valid.

So in an environment full of invalid glTF files, you have two options:

  1. Be strict and catch invalid glTF files early, so users will report the issues to the appropiate glTF writers so they can fix them, at the cost of not being able to load many glTF files today.
  2. Be forgiving and try to load and amend malformed glTF files. It might look like a good idea because it lets you load most files today. But in the long run it will lead to an invironment full of malformed files floating around.