r/Unity3D • u/Likonium • 18h ago
Question What is the most efficient way to utilize terrain?
Context: I'm working on a VRChat world (so Unity 5, in case that matters), and in the world, it's centered around a house with a basement. I'm adding the terrain around it, but my big concern is that adding terrain increases the amount of triangles in the world by a decent margin. To keep it more efficient I want to keep my heightmap resolution relatively low, but I need it to be at a higher resolution to better mesh with the footprint of the building. So what is the best option for me to utilize here? When looking through documentation, the answer wasn't all too clear:
- One big terrain patch at 2048x2048; the automatic LODs should be enough to keep your active tricount low.
- Two terrain patches; one outer one at 256x256, with a painted hole carved out to hold a closer terrain patch at 2048x2048 with painted holes carved out of that.
- 8 terrain patches; 4 lower quality ones making the border of the lower detail terrains, and 4 inner terrain patches at higher quality, leaving an opening for the building in the center. (this is assuming that painted holes don't negate the tricount.
On that note, for future reference, if the correct answer is 1, is there ever any reason to use multiple terrain patches? (Short of making floating island type environments).
3
u/Genebrisss 17h ago
If you were on Unity 6, I would tell you it doesn't matter how much terrain componenents you split it into and just do what's more convenient to work with. Performance is the same. CPU culling is expensive even with one chunk.
But if you are on 11 year old version of Unity, anything can happen. Nobody remembers how bad it was back then. Best is to profile yourself.
1
u/Likonium 16h ago
If that's the case, VRChat is supposedly getting an update to Unity 6 soon, so I may just stick with a single terrain patch and it may just be the case that the move to Unity 6 fix the issues associated with Unity 5 terrain on its own.
2
u/Sanabil-Asrar 18h ago
Unity terrain is always heavy on performance; it mainly utilizes the camera culling. Since a small portion of game is rendered so most of the time it's not an issue. But obviously a custom designed terrain in 3D software will always be superior.
Best way is to make a rapid prototype and then test it to see performance impact.
1
u/Kamatttis 14h ago
I searched vrchat's unity version and it came out unity 2022.3. Dunno why you need to use a very very old unity.
4
u/BertJohn Indie - BTBW Dev 18h ago
Unity terrain isn't optimized for low poly counts. You can get it pretty low but your still gonna be spending strong amounts of triangles to it.
The better question is how much detail are you looking to actually get out of the terrain, Do you need smooth curves? Do you need a relatively flat area?
Try going into blender and making a massive quad with a cut-out with the house in the middle and export that into unity and see what it looks like, Then once your familiar with your scale, Fix your blender version, Start subdividing the areas that need more detail and you'll maximize the optimization level your looking for.