KhronosGroup / KhronosGroup/glTF-CSharp-Loader

Disable Accessor.Count and BufferView.ByteStride validation

Open
#32 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
246
Forks
70
PR merge metrics
No merged PRs in 30d

Description

Some models exported from Google Poly have ´Accessor.Count´ and ´BufferView.ByteStride´ values set to 0 (zero).
Even tho, majority of GLTF 2 viewers are able to load these files, while C# loader throws an error.

It is easy to compute the final stride when these values aren't given by calculating it using the ´accessor.ComponentType´ and ´accessor.Type´ fields.

Can we make these validations optional or remove them at all?

There is a model exported from Google Poly attached.
[archive (3).zip](https://github.com/KhronosGroup/glTF-CSharp-Loader/files/5411286/archive.3.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the loader validation for Accessor.Count and BufferView.ByteStride, then reproduce the failure with the attached Google Poly archive. Check how the accessor ComponentType and Type are used for stride calculation; done means the model loads without the current validation error and the behavior is covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.