vpenades / SharpGLTF

glTF reader and writer for .NET Standard
MIT License
454 stars 72 forks source link

[BUG] Load glb file #143

Closed Omega1975 closed 1 year ago

Omega1975 commented 2 years ago

SharpGLTF library used downloaded 06/05/2022

The attached gltf file checked with gltfvalidator is ok.

if loaded ModelRoot model = SharpGLTF.Schema2.ModelRoot.Load ("28_TS_BluGhiaccio_20cm.glb");

i have an error

StackTrace

in SharpGLTF.Schema2.ReadContext._FilterErrors(ValueTuple`2 mv) in SharpGLTF.Schema2.ReadContext.ReadTextSchema2(Stream stream) in SharpGLTF.Schema2.ReadContext.ReadSchema2(String resourceName) in Pi_glTF.MergeGlb.MergeModels(cGLB glb) in C:\TEMP\Pubblica\PigrecoSE\Net\Pi_glTF\Pi_glTF\MergeGlb.cs: riga 183 in Pi_glTF.WriteGLTF.DoWork(BackgroundWorker worker, DoWorkEventArgs doWorkEventArgs) in C:\TEMP\Pubblica\PigrecoSE\Net\Pi_glTF\Pi_glTF\WriteGLTF.cs: riga 333

error message ModelRoot '0x00' is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0.Model generated by <> seems to be malformed;

Source

SharpGLTF.Core

28_TS_BluGhiaccio_20cm.zip r

vpenades commented 2 years ago

@Omega1975 I've tried it and it loads fine; maybe it's been recently corrected, so I would suggest you to try compiling the library from source and checking again.