I have a (hopefully) rather neat little idea, I promise nothing like Minecraft, (lol), that I’m trying to figure feasibility on. Problem is, it needs to display about 1500 cubes at once…this is seemingly impossible…without a tricky workaround or some such. The more I think about it though, the more I realize Minecraft must actually be doing exactly this…displaying a ton of cubes with great performance- somehow!
Wondering if anyone has any insights on how this might work in Unity?
Thanks!
Use custom display functions -
Only display outside faces facing the camera; the Minecraft threads cover that aspect pretty well.
And/or if you CombineChildren them, they’ll just be 1500 * 8 = ~12000? vertices, and should work fine for a single mesh. That might not work well if they’re constantly updating, but if only one or two move per frame it could be an acceptable solution.
Hi Vincenti, thanks for the info!
Makes sense. I’ll dig around for those forums, too. Didn’t think the creator would have made so much public- but good to know!
The real issue is, I need to delete cubes in real-time too. I had already considered the merge-to-mesh idea, but then I would need to somehow swap between one mesh/many meshes whenever the user said “delete selected cubes”, not to mention selecting those cubes while it’s all one mesh…if that were possible somehow, it would probobly be my prefered method.
Then again, just a quick test, while my 1500 cubes were running at about 1FPS (lol) in 3DS Max viewport, is smoooth as butter in Unity viewport!
Have to assume mobile devices (an eventual target of this) would not do so well though…