Alright so I am working on an (oculus) flying game and having a bit of difficulty hitting my fps targets.
I hit 75 fps no problem when looking at the sky or ground, but take a big hit when looking right at the horizon. I am thinking this is due to my huge landscape (it fills the entire sky sphere)
I know back in the original playstation days devs used fog to compensate for the hardware’s inability to render a high polygon count. Is something similar possible in UE4?
I was thinking of something along the lines of creating a sphere around the player character with a scene depth fog effect to cull pixels very far away from the camera.
Is this a viable strategy ? I don’t know much about how fog is handled under the hood. It would be great if someone could tell me this isn’t (or is!) going to work before I try to code it.
Hi! You can use Cull Distance Volumes to cull some objects in the background. Basically, you setup the distances and the minimum bounding box of objects that are not culled at that distance. In your setup, you could put an entire scene in this volume and cull landscape components if the distance is, for example, larger than 1km. (so distance 100000 cull all object sizes). Then you should compensate by adding fog to all objects so they appear white when far from camera (so even if rendered, they are white as fog). I guess atmospheric scattering could account for that, but they might be more straightforward approach to this. In either case, you could also do it manually in the shader by adding emissive color to objects far away if nothing else work. This should seamlessly cull object far away and transition others to fog value. Additionally, you might need to add some particle fog effects to have more volumetric effect (but this costs additional performance due to overdraw and sprites don’t work well with VR as I have heard).
Alternatively, you can just setup level of details for all objects that can appear in the distance and reduce the overload on them. But first you must figure out if you are pixel or vertex bound (if fps changes when changing resolution, you are probably pixel bound). If you are pixel bound, LODs won’t help you much (maybe for shadows).