by SolarPortal » 04 Dec 2015, 12:30
Our camera by default is doing this. This technique is known as Frustum Culling otherwise you would have no frames at all, rendering everything in the scene that you see or do not see.
As the camera moves around the scene, it turns the visibility of the meshes and entities that you do not see off until you look at them again. You might notice a pop when going from an unpopulated screen and turn around into a extremely populated view.
Here is a test, scroll away from your buildings so you can see them all in the scene, then take the frames looking at them. Afterwards, turn around with the camera so you are not looking at the buildings. You will notice that your framerate will increase considerably and this is the method that you have shown below.
In terms of distance, this is what we use the Far clip for.
Occlusion culling is the performance upgrade we need as this will only render visible objects. This means that if a wall occludes a mesh from the camera, then it is disabled meaning you can render very little and have many more objects.
Other systems to note for indoors are portal based systems which is based on doorways, but this technique is a little older than the occlusion culling techniques, but can produce fast results in indoor environments but cannot have outdoor with.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
Twitter: @SolarPortal
Instagram: @SolarPortal