Large amounts of similar geometry

I need to display large amounts of similar geometry (e.g. cubes, sphere, cylinders). Each shape would have the same mesh, just translated, scaled, or rotated. It might have different attributes like color.

Below is simple example of doing this in a loop for a 50x10x50 grid:

It starts to drag after this (7fps in the example)

What I want to get closer to is 1000x1000x1000 (but 100x100x100 would work). Can you suggest some better technique to doing this? I’ve seen a few folks play with voxels in babylon.js which might be a similar problem.

Instances would be the way to go:

1 Like

That is the ticket. Thanks!

1 Like

@burhop : You might want to have a look at this video by Deltakosh:

Fun With Instances

So you can see how to add colour variation to your instances.

Stay Safe, gryff :slight_smile:


Or Solid Particle System - Babylon.js Documentation

1 Like

Haha! It is like @Deltakosh knew I was going to ask this question :slight_smile:

1 Like