warrenm / GLTFKit2

A glTF 2.0 asset loader and exporter for Objective-C and Swift.
MIT License
150 stars 26 forks source link

Model broke app #41

Closed kourion11 closed 9 months ago

kourion11 commented 9 months ago

After recent updates, this model started dropping app... In gltfViever it also gives an error [Uploading CiroModel.glb.zip…]()

Снимок экрана 2023-10-11 в 14 00 21
warrenm commented 9 months ago

It looks like your sample asset didn't upload fully. Can you share another link?

kourion11 commented 9 months ago

It looks like your sample asset didn't upload fully. Can you share another link?

Sorry CiroModel.glb.zip

warrenm commented 9 months ago

By the way, with crashes like this, it's extremely helpful if you can share a complete backtrace instead of just the crash message.

kourion11 commented 9 months ago
Снимок экрана 2023-10-11 в 19 26 36

Thread 1: "*** -[__NSArrayM objectAtIndexedSubscript:]: index 9223372036854775807 beyond bounds [0 .. 35]"

kourion11 commented 9 months ago

By the way, with crashes like this, it's extremely helpful if you can share a complete backtrace instead of just the crash message.

I just had a problem with this model before, it displayed very strangely. Then after talking to a 3D modeler we realized that the problem was in the Color Attribute that was added in one of the 3D editors and after removing Color Attribute from the model everything worked fine.

Maybe this information will be useful in some way

warrenm commented 9 months ago

There's still something wrong with the rendering that I'll continue to investigate, but I've pushed a change that should fix the crash. Very sorry about that.

kourion11 commented 9 months ago

There's still something wrong with the rendering that I'll continue to investigate, but I've pushed a change that should fix the crash. Very sorry about that.

It's all right! Thank you for your work!

warrenm commented 9 months ago

I've implemented better handling of normalized integer accessors, which fixes the rendering errors I was seeing with this model. I would note that if you have a vertex color attribute whose contents is solid white for all vertices, it's wasteful to include it in the exported model. But at least now it will render correctly!

kourion11 commented 9 months ago

I've implemented better handling of normalized integer accessors, which fixes the rendering errors I was seeing with this model. I would note that if you have a vertex color attribute whose contents is solid white for all vertices, it's wasteful to include it in the exported model. But at least now it will render correctly!

It got better! Thank you!

warrenm commented 9 months ago

Thank you for your recent issue reports. You have an uncanny knack for exposing edge cases that I have long known to be problematic, but that I didn't have sufficient motivation to investigate.

warrenm commented 9 months ago

Is this issue fully resolved or is there some other action needed to resolve it?

kourion11 commented 9 months ago

Thank you for your recent issue reports. You have an uncanny knack for exposing edge cases that I have long known to be problematic, but that I didn't have sufficient motivation to investigate.

Glad I could help!

kourion11 commented 9 months ago

Is this issue fully resolved or is there some other action needed to resolve it?

Yeah, problem solved. Thank you!