Download

When Should I Use LODs? Any other optimization tips?

Hello, I am working on a level for my game and I think I should think about optimizing. I know LOD Plays a big role in this. My question is, How should I be using them?
Should I reserve them for only my high poly meshes? Should i Use LOD on everything? What would you consider High Poly?

For multiple meshes I know I can use instancing but does this work with physics objects? Does it restrict me from drag and drop placement in the world?

I haven’t begun to think about lighting but Im sure it comes with its own bundle of optimization theory.
**What are the main concepts I should should teach myself to achieve an optimized game? **

Thank you!!

Well optimization is always a good thing but with Unreal 4 the question is not so much “if” but “when” and what should be done as to a nearly completed level based on the sum total of what is being rendered per frame and not so much as to a given object that may or may not require a decrease in fidelity based on the assumption that in all cases the use of LOD = and increase in performance.

As a primer this is a good starting point.

https://www.youtube.com/watch?v=-csRxRj_zcw

By creating a recorded sample you will be able to track what is occurring per frame and what is actually taking up the bulk of the rendering resources per object with out guessing or assuming that degradation is automatically required.

Overall though geometry is no longer the issue that it use to be and with continued hardware improvements your kids will one day ask you “Dad whats a polycount?” but still today the resource hit to keep an eye on is the number of draw calls per refresh so it’s no uncommon to LOD the materials and not so much the geometry that it’s applied to.

Gee thanks alot, Exactly The info and resource I needed

If models are displayed always in same distance from the camera then you pretty much won’t need LOD.
You need LODs when vertices are trying to occupy the same pixel on screen.

Familiarize yourself with a modeling program (if you aren’t already), even a few months w/ using Blender casually will be good. The ability to edit other people’s meshes can go a long a way. I’ve gotten into the habit of atleast editing the billboards from asset packs that I’ve downloaded off the unreal market. For some reason people like to sell assets that consist of 80% transparent models (which create overdraw problems). With some basic modeling skills you can fix the overdraw issues by cutting out the transparent areas (in exchange for a slightly higher poly count).

For example: I downloaded a free tree pack and the furthest LOD for the trees were a typical square shaped billboard made up of 2 triangles. I replaced it with my own billboard that had very little overdraw and consisted of 14 triangles. In return I got an increase from 37ish fps to 43ish fps in the specific area that I was testing in my level (this was tested with my old laptop that had a gtx 750m).

Being able to create your own LODs is nice as well. UE4’s automatic LOD generator does a good job for certain things, but sometimes you want more control. With my grass, on LOD2+ I completely chopped off the triangles at the top of the mesh. Doing so removed a “few” grass blades, but at that distance it’s almost impossible to notice anyways. I don’t remember the exact increase that I got, but my shader complexity view screen went from pink-white to mostly green. I think my grass goes up to LOD4 or LOD5 and get’s LOD’d to a single triangle at very, very far distances.

To further iterate on this. Let’s say you have foliage in your level that factors in a wind effect. If in your master material you create a switch node right before your wind vertex instructions plug into “world position offset”, you can will get some gains simply by disabling the wind effect (through a 2nd instance of your 1st material instance) on your further out LODs. The wind effect isn’t noticeable at a distance anyways so there’s no quality loss.

There’s no one-size fits all response to this, it depends on a number of factors including your target spec or target platform. If you’re on console and you think tri counts are a bottleneck, turn on stat engine. If you’re approaching final quality passes and your tri count is hovering above 6,000,000 the you might want to hop into your primitive stats browser and see if there’s any low hanging fruit that can be optimised.
@FrankieV makes an excellent point, there’s other types of LODs to consider and often optimising materials and section counts are overlooked. There’s skeletal LOD as well.

Because no team has unlimited money or time it’s useful to make sure you’re targeting the right performance problem, otherwise you’re potentially throwing money away for little benefit. If your geometry doesn’t need LODing don’t do it.