Foilage Instancer Performance #536
-
Hello guys, I was hoping to get a bit of information on how the foliage instancer works before I start getting into my project. So in the example below, I've got 1k regions, the yellow is the player, the blue is a visibility range set for 512m for my mesh asset. Let's assume all regions have this mesh asset present. What is happening outside of the blue range, and at the red X? Are the MultiMesh nodes removed/ freed once you are out of the visibility range(or some other range)? At the red X there would be 1024 MultiMesh nodes to make up that region(i think), I am assuming they are not loaded when the player is at the yellow dot? I have tested covering about 6 regions densely with a 3 face mesh and it seemed very performant, I've got like 5 million instances placed and it's no sweat when using the visibility range. But I just wanted to understand what was happening. Maybe I am overthinking this. I did have some performance issues in my earlier prototypes, but I think that I had a misunderstanding of how visibility culling worked and that was my issue rather than the instancer. But that's why I was considering this method below: This is how I'm loading my content in chunks. Each region is a chunk that is made of cells. When the next chunk is approached it will add the adjacent chunk's cells to be processed. Then using the blue range, I was going to load or unload my cells, and use SimpleGrassTextured on each cell. This would allow me to unload the MultiMeshes from the memory entirely once out of range. The foilage instancer is so much more convenient though. With some extra advantages: Instancer seems like the way to go, was just unsure how a huge world would fare with no region streaming yet. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
So, I just painted my entire map with the mesh, 65000 draw calls when looking from above like this. In game with visibilty range set, smooth 60fps. Pretty awesome guys! I think my choice is pretty easy here. I'm still curious about how the loading and unloading range works when you have a few minutes, then I'll close this Thanks! |
Beta Was this translation helpful? Give feedback.
-
Data is stored in the region. MMIs are built on startup, or any force_update_mmis() call. MMIs are set with a visibility range for the engine to cull them. Nothing is freed while running currently. |
Beta Was this translation helpful? Give feedback.
Data is stored in the region. MMIs are built on startup, or any force_update_mmis() call. MMIs are set with a visibility range for the engine to cull them. Nothing is freed while running currently.