How does InstancedGeometry work?

In my project I plan to render the same geometry several hundred times (think of Minecraft grass block) and while trying to figure out how to do that best, I found the InstancedGeometry and InstancedNode class. Sadly those have only a very basic documentation, and reading through their code did not enlighten me on how to use them.

Could anyone be so kind and provide or point me to code snippets (or a tutorial if one exists) for these? Also other recommendations for rendering a Minecraft-style block-world are also welcome.

Look into the example test

That said, if you are doing a block world this is probably not the best approach. Instancing will do great on complex models rendered multiple times, but not that much on cubes. Better use batching… and this will end up with the usual discussion :“Box worlds are not made of boxes”. You should make your own mesh, this way you can remove non visible faces of the “boxes” and so on and so on… search the forum there are dozens of threads on the matter.

Thank you for the link.

Yes, I’ve been searching the forum, but many topics are from years ago, and I am not sure what is still valid and what is outdated.

I will try both the instanced and the batched approach and check how that works out.