Level of detail

From Valve Developer Community
Jump to: navigation, search

LODs are important.

Automating the process

Regarding automating the process... Don’t.

Using your favorite software’s reduce poly command isn’t going to cut it. If you want good LODs, it takes time and the human touch. There may be some tools out there that do it right, but I haven’t come across them yet so I’d like to talk about the old fashioned and more human approach.

The following image is an example of a bad LOD. The thing popped right out of a modeling package. Only took one button press. It looks pitiful.

Look at it. Don’t avert your eyes. Sad crumpled up LOD. Half the faces, one tenth the awesome. Not good.

Lod 001.jpg

Sharing verts

When we create LODs we try to keep some things consistent between the parent and children geometry. These things are: Vertex Positions, Normals, UVs, Weighting, and Tangents.

If those things are shared between an object and it’s child – then the memory footprint is lower. That’s good.

I’ll give you an really easy example and then walk through applying this to the Sniper Rifle above.

Lod 002.jpg

Notice how none of the LOD have vertices that don’t match the predecessors? That’s because I only removed edges and vertices from the model. I never collapsed edges, or removed UVs on the perimeter of a UV shell.

The normals were also preserved because I locked the edges. This is the equivalent of not recreating smoothing groups or changing face/vert normals. Different applications handle this wildly differently, but it’s all the same in the end – maintain those normals.

From a parent to an LOD, these elements almost never match up perfectly. That’s ok. But they need to match as close as possible to keep the object cheap.

We understand that collapsing edges is sometimes better for the shape. It’s fine to do that when you need to preserve the integrity of the object. When you collapse edges, the models vertices won’t line up and thus will add memory. Be conservative and thoughtful about those choices.

How many LODs should you create and how low should you go?

Try to half the object on each iteration. The larger your initial object, the more LODs you’ll want (or perhaps just the higher the reduction in each LOD).

Hats or Miscs are fine with one or two.

Weapons or high poly hats/miscs should have two or three.

Once an item is around 500 triangles, you can stop. That’s pretty low.

Make sure to do your LODs after you’ve completed the art. Any changes on the high level need to be reflected in the LODs, so it’s not smart to do them before you’ve ironed out your design.

Good places to remove detail

Here is a list of easy offenders. I’m using the sniper rifle as an example and will walk through it.

Really small details

These are small. They will be missed, but not forgotten. It’s best when these aren’t connected to the mesh. You can easily delete them and forget them. Wait, that’s right. Don’t ever forget them. But you can delete them.

Lod 003.jpg

32 triangles. Gone in the blink of an eye.

Lod 004.jpg

End caps on cylinders

These could have been deleted in the first place, but while I’m talking about reduction, let’s include them for elimination.

Lod 005.jpg

Reducing Edges on Cylinders

This is easy and works best on cylinders with powers of 2. (16 > 8 > 4) Bonus knowledge: build your objects with this sorts of cylinders and you’ll be happier in the end.

Lod 006.jpg

Concave areas or insets

These are good to eliminate because they don’t alter the silhouettes in some cases (or do little to alter a silhouette at distance)

Lod 007.jpg

Lod 008.jpg

  • Note that on this stalk, I added a few verts. This is a small price to pay for the smiting of one’s enemies.

Lod 009.jpg

At this point, I’ve take the object from 7,048 triangles to 5.434 triangles without even making any tough choices.


This will usually affect the silhouette of an item if it’s been spent well in the first place, but it’s also a necessary evil of poly reduction / LOD’ing to remove these.

Remove them and don’t blink. If you blink, the polys will know you’re scared. And you’re not scared. You’re making LODs like a real Mann.

Lod 010.jpg

Lod 011.jpg

Try to remove edges that don’t affect the mass or silhouette too much. Every vert/edge you eliminate will change the object, but corners, high points, and borders are usually unsafe to remove (both for UVs and for shape). If you’ve built the object thoughtfully, it should be easy to find subdivisions that you can remove without ruining the look.

Beveled Edges

If you’ve UV’ed well, these should come out pretty easily. The will change the lighting indeed, but some of them have got to come out of the LODs.

Lod 012.jpg

Lod 013.jpg

Lod 014.jpg

Bevels, we were sad to see you go but no man is an island. We’re down to about 4.5k. Only 1,000 Triangles to go.

Small edges

When I made these screws, I figured they’d be deleted out of the LOD, but In order to keep some of the detail I’m going to drop the edges out and then use a reduced version of the faces in the next LOD. Judge this on a case by case basis. To me, currently, they look like 224 triangles I don’t need.

Lod 015.jpg

Lod 016.jpg

In summation for the first LOD

I flew around the model a few more time and plucked the low hanging fruit. Now I have the first LOD completed at 3,494 triangles. Down from 7,048. This is acceptable. I’ll now rename the object with a “_lod_01” on the end of it.

Lod 017.jpg

Additional Levels of Detail

For the next LOD, repeat the process but be twice as aggressive as you were before. This should yield roughly half the polys (or less if you’re particularly cut-throat). In the second LOD, things like circles become diamonds:

Lod 018.jpg

In this particular case, if I’d have painted those screws into the texture, I could have eliminated the cards altogether, but I wanted more resolution for them, so they were separate.

Lod 019.jpg

Say goodbye to round things in your second LOD. "Goodbye round things."

Lod 020.jpg

On this LOD I’m going to go ahead and collapse some edges. This will create some new verts, but it’s negligible at this point. You’ll find that once you get to the lowest levels of detail, you’ll be collapsing edges or removing faces in order to get the vertex count down. You’ll have to be very aggressive on your last LOD, but if you’ve set your distances well, it should look ok.

It’s an art form, so methodology will differ from artist to artist. Don’t worry about it being perfect, but do worry about it being adequate and good.

Lod 021.jpg

Lod 022.jpg

Lod 023.jpg

Lod 024.jpg

Here are the objects at distance to show you just how little difference is noticed (unless you're a damned robot, in which case, as stated before - you suck at LOD'ing. It takes a real Mann to make good LODs.)

Poly count: 6,970 > 3,428 > 1,375 > 499

LOD distances for this one ended up being set at 14, 20, and finally 35.