warrenm / GLTFKit2

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

GPU instancing extension support? #54

Closed jessearmandse closed 4 months ago

jessearmandse commented 5 months ago

Hello,

I was trying to load a simple model that supports EXT_mesh_gpu_instancing, as can be seen in SimpleInstancing model.

Also, found out that there are at two fixes related to this from cgltf #185 and #216.

I applied those fixes, then tried to load the model again, but what I see is this instead:

Screenshot 2024-02-15 at 5 35 18 PM

However, the model can be loaded normally in three-gltf-viewer, as can be seen here:

Screenshot 2024-02-15 at 5 36 55 PM

Any idea what's wrong, and what could be done to load and render the same model?

warrenm commented 5 months ago

What's wrong is that we don't support EXT_mesh_gpu_instancing yet, and neither SceneKit nor RealityKit support instanced user attributes, so adding this will take some work.

warrenm commented 5 months ago

Preliminary support for mesh instancing is available as of 6c4d05d and will be incorporated in a forthcoming release. Any feedback welcome.

instancing
jessearmandse commented 5 months ago

Right, I discovered that it wasn't supported after looking through the GLTFSceneKit. Thanks for the quick response, I'll try out the changes.

warrenm commented 4 months ago

This enhancement has been incorporated into the 0.5.9 release.

This issue will be closed as completed in 7 days if no further feedback is received.

warrenm commented 4 months ago

Closing.