I’ve seen in some games that are wide open that certain parts of the environment are load and unloaded dynamically. An example of this would be distant trees, when you get slightly closer to them, they render, when you get a little farther away from them, they disappear. I understand this is used to save CPU cycles (right?).
If I have a large environment with a lot of 3D models in it in Unity, does it handle that type of rendering or will I have to write something for that myself? If so, please provide me some resources.
By the way, I’m relatively new to game development (a few months) so I’m sorry if my post sounds a little vague.
Ostensibly your camera clipping plane does that, and you’d pair it with something like distance fog… ye olde 3D games used both concepts and they are standard in Unity (save CPU & GPU)
It’s primarily for the GPU but it does help with the CPU as well as RAM.
Unity does provide some for you with the two biggest being LOD (Level of Detail) and Occlusion Culling. Both of these are important to learn as they’re useful in more than just large environments. Here’s a couple semi-recent tutorial videos explaining and showing off these systems.
What Unity doesn’t provide as far as I’m aware is a system for streaming content in and out of the level. You can build this yourself or you can use third party assets that do it for you.
The idea behind it is you have a script that loads and unloads chunks of the world (as well as loads and saves any changes made to those chunks) depending on how far away the player is from them.