3D Tiles & Custom Culling - Performance Issues
I'm making a top-down VR game where you control a small avatar.
The world is basically all 3D plane tiles and I'm planning to have tens of thousands of tiles in a level. I currently made one master material and created a material instance for each new tile texture (so eventually I will have thousands of MI) - not sure how performant this is.
Since most tiles are very different, I can't use instanced sm's since each has different materials right? They have to be individual SM's, even if it's 10,000 planes with a simple two-sided material on it in VR along with other low poly meshes (houses, trees, etc). Bigger problem is in VR the player can look horizontally and try to view the whole map in one go.
So what I need most is to have the tiles (and SM's) cull depending on the avatar's position, not the VR camera. Is there a way to do this? And as a bonus, am I able to call custom functions when a mesh is culled (like spawn a particle as a spawn/despawn effect)?
The only way I can think of is adding a giant box collision around the player that sends an interface message to all things touched. However, that means each tile and object needs to be an actor with an interface attached - is this too crazy on performance?
Follow this question
Once you sign in you will be able to subscribe for any updates here