Hello! I am trying to mimic the effect there that https://globe.ertha.com/ is doing. They have there a hexasphere (a sphere made out of hexagons).
I would like to replicate that in my project too. I have managed to create an algorithm that generates the vertices coordinates for each triangle of the face and, in the end, managed to create the hexasphere. The issue is that I want to put there 25k hexagons. This means 25k draw calls and it is a lot (the fps are 24 in Chrome, 8 Firefox, and 10 Safari).
Can anyone help me out to suggest a better workaround? I was thinking of Instanciated mesh, but this is the case for geometries that repeat. I tried creating a model in Blender (that has 650 children - each child is a hexagon), but I get 650 draw calls, so I assume it would be the same for 25k. How can ertha get that good fps?
Here is how I have created the meshes:
Note: variable el from the map was a Float32Array that held the vertices array in such order that it created 6 triangles, so a face.
{
hexasphereFaceVertices.map(el => {
return <mesh
material={material}
>
return <bufferGeometry>
<bufferAttribute
attachObject={["attributes", "position"]}
array={el}
itemSize={3}
count={el.length / 3}
onUpdate={self => (self.verticesNeedUpdate = false)}
/>
</bufferGeometry>
</mesh>
})
}