First post here, I’m working on a visualisation based off this project - https://github.com/chrisrzhou/react-globe.
Here’s what it looks like atm:
This react-globe library positions interactive geo-located markers on a globe. My project ultimately needs to display close to 1000 images/markers. Progress has been pretty good so far, i’ve customised the module a fair bit to generate all the line markers (cone geometry) for each image as a single instance mesh (using instance butter attributes for the white/yellow colour variation).
I then create a planeBufferGeometry + MeshBasicMaterial mesh for each of the different images (loaded by textureloader, the plane mesh is sized to each images specific aspect ratio - they vary and aren’t of the power of 2).
These planeMeshes then get positioned correctly on top of their correct instanced cone. There’s even some logic to group the markers by geo-location proximity so that they can be evenly spaced vertically (instead of randomly) so they remain viewable/selectable instead of tightly stacked. The react-globe modules tweens to the clicked marker image and displays a tooltip and link so keeping the images selectable is important.
Performance with 800 images (~800 draw calls) isn’t actually too bad, fine on a gtx980 and really surprisingly pretty smooth on my samsung s9 android, less so on a macbook pro but that’s the increased resolution.
I’m after advice on what i can do next to improve performance, draw calls are ~800 for the separate planeMeshes and all the images are plain jpegs of around 600px, memory shoots up pretty quickly to 1.5GB, there’s some GPU leakage i guess as i need to restart a tab otherwise refreshes start dropping frames.
I tried a basis texture conversion on the clouds png texture supplied with the react-globe lib (5mb-1mb) which worked really well, but running the basis conversion on all the image jpeg’s (converted to png’s first) resulted in alot of black images and loss of saturation or darkening. Is Basis worth pursuing as a format to greatly lower my memory consumption here, or should I be looking to try a texture atlas/array? (if i can reliably generate a useable 800 image x 600px texture atlas/array?).
Ultimately the draw calls are still too high though (frustrum is culled) and not sure if instancing the planeMeshes and using some shader cleverness to get all the individual image textures in place would be able to keep the individual image interactivity?