vpenades / SharpGLTF

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

Validation before write #42

Closed torokze closed 4 years ago

torokze commented 4 years ago

Hi,

There should be a way to select the validation strictness before write because it is so slow. Something similar like during read. I wrote a gltf export for Revit and I have models to take more than an hour export time.

Thnx Zolee

vpenades commented 4 years ago

I could add a property to disable validation when writing...

Although I would recomend not disabling validation: There's still a large number of issues with glTF in general, and the only way to know it is through validation.

torokze commented 4 years ago

Validation is good during the development to produce proper gltf. After that it's not unnecessary but skippable.

vpenades commented 4 years ago

I've just added a Validation property into WriteSettings, so you can disable validation when writing setting it to "Skip".

It will be available on the next nuget package release. I hope this will improve write performance a bit.

torokze commented 4 years ago

Thnx!!

I've already commented out for the release. After I validated all my buffers, bufferviews and accessors. It is a huge performance boost.

Thnx again.