LWRP Procedural Generated Terrain Optimization

Hi all, so I have a procedurally generated world, which is limited to 100x100 block. My machine is powerful enough to run this world over 200fps however some older machines can’t and I feel like I should optimize this a bit more. I’ve searched about this a bit and I’ve enabled GPU Instantiating for materials which improved FPS.

Now the question is, I’ve seen something called “Mesh combining” to optimize more. What are the pros and cons of this system? Player can interact with tiles, events can happen and tiles can get destroyed. How will I destroy spesific tile mesh if I combine all? Thanks for all answers.


(Try not to mind the black gaps, under of tiles are empty right now.)

Hi

Look at tech behind game like Minecraft

They all have chunks of ( (x, y, z) 16x16x16 or 16x256x16 ) blocks and on generation create 1 solid mesh per chunk and on update just regenerate mesh for chunk entirely.

Oh, so for example after a tile gets destroyed, instead of trying to remove it from chunk’s mesh I just remove it and rebuild the mesh am I right?

yes :slight_smile:

1 Like

Just an update: I’ve managed to write my custom chunk based system. Here is 1.250.000 blocks on scene with over 600FPS. It feels so good to optimize things :stuck_out_tongue:

5 Likes