Expert games tips: Generate more effective level of detail models
Antony Ward shows you how to optimise your polygon count to improve speed and response without making too many visual sacrifices
- Level of detail principles
- Reducing polygon counts
- Simulating detail
Building assets for games is a bit like packing a case for a long holiday – there’s never enough room to fit everything in. Put too much on screen at the same time and the game can grind to a halt. This is where level of detail (LOD) models can help. By switching to lower-resolution models as the character or object moves away from the camera, you can lighten the overall polygon count on the screen without sacrificing visual quality. In this tutorial, Antony Ward shows you how to get the best out of LOD models while keeping quality high and the frame rate solid.
01 The golden rule
There’s one rule that all level of detail models must live by: the total number of polygons in the lower LODs must not be greater than the polygon count of the highest LOD. For example, if you’re using four LODs and your most detailed model has a total of 5,000 polygons, the next LOD down should be around 3,000, the model after that would be 1,500, and the last one would be 500. If you have more than four LODs, the limits would have to be adjusted.
TOP TIP: Switch to lower-resolution models as your character moves further away from the camera
The further away a model appears to be, the fewer polygons it needs to have
02 Remember to zoom out
It’s important to remember that the in-game model you’re working on won’t be seen until it’s a certain distance away from the camera. The player will never get up close, so, as you work, make sure you’re zooming out all the time. This way you can better judge what can be sacrificed, and what can’t. Viewing a lower LOD up close will always give you a false sense of how it will look in-game.
As characters get smaller, gradually reduce their hands to mitten shapes
03 Hack away at the hands
Hands are an obvious place to chop out those polygons – they typically hold a lot and the digits are relatively small. Initially, reduce the round digits until they’re more of a diamond shape and then start to sacrifice them – not by deleting them, but by merging the fingers gradually until you end up with a basic mitten shape.
At a distance you won’t see eyes blink or a mouth smile, so you can afford to chop these right back
04 Facial animation
If your model has facial animation, this is another area to sacrifice. At a distance you won’t see eyes blink or a mouth smile, so chop this right back, but leave room for the jaw to open and close so some degree of animation is still available to the medium LODs. If using blend shapes or morph targets, simply ensure these are disabled.
05 Remove small details
At a distance from the camera and surrounded by a complex game environment, small details on your model’s surface just won’t be seen. Items such as buttons, belts or buckles can easily be removed and, if needed, you can always replace them by painting them back in on the texture page.
06 Remove small tangents
When you’re optimising a model, you should look out for geometry that doesn’t add to the overall shape, or help in deformation. The same rules can apply to LOD models. When reducing, look out for slight tangents in its silhouette that won’t be missed if flattened.
07 If it’s quicker, rebuild
If you’re working with a high-res model, reducing it manually can be a tedious task – so why not just rebuild the model? Use the high-res version as a reference and, once built, adjust its UVs to fit the existing texture page or bake the texture from the high-res model down onto your new set.
Swap out an object and replace it with a simpler model with an alpha map applied
08 Use alpha maps
A quick way to claw back some of those precious polygons is to replace an object with a much simpler model, with an alpha map applied. This is an essential approach for curved or round objects, such as wheels. Reducing the geometry alone would result in a boxy-looking model, but adding an alpha plane at either side is quick, painless and can keep the object looking round.
09 Watch those texture seams
It’s all very well chopping out polygons here and there, but it will also affect your UV seams. You may find that when you remove a complete edge ring you’re left with a glaring seam. Depending on the LOD you’re working on, this may not be an issue as it will be too far away to even notice, but try to adjust the UVs, or update the texture page as you go.
10 Fill out the shape
Things become reduced when you take something away from them. As you peel away the geometry of your character models, you may notice that the body and limbs are much thinner than when you started. To avoid this rapid weight loss, keep comparing the shape against the highest LOD. A good trick is to put the higher LOD into a display layer and set it to Reference. This will display just its wireframe, so you can refer to it as you work.
In Maya you could use the Transfer Maps tool to bake textures onto the lower LODs
11 Bake textures down
If the budget will allow it, and you’re struggling with texture warping and UV seams, you can always use a smaller texture page for your LODs. Once the model has been reduced, rework the UVs and then bake the diffuse map down onto the lower LODs. In Maya use the Transfer Maps tool.
12 Skeleton LODs
Polygons take up memory, as do the joints moving them around. It’s not always a good idea to completely replace a skeleton on the fly, but you could reduce its influence on the model. So, for example, on lower LODs where you’ve reduced the hands, make sure you remove the finger joints’ influences too. The same applies to facial animation.
13 Minimise the ‘pop’ factor
When playing a game you can always tell when LOD models have swapped because you see that tell-tale ‘pop’. The character will suddenly, and often drastically, change shape as the higher LOD is removed and its lower replacement is loaded. You may not be able to completely avoid this, but you can make it less obvious by constantly comparing it with its higher version and using reduction techniques.
14 Strip out texture passes
It’s not just polygons and joints that can be removed: you can also strip out textures, particularly extra texture passes such as a normal map, reflection or specular pass, which would only be effective on the higher LODs.
Use a Level of Detail group to hide and reveal objects at different distances
15 Use a LOD group
As you create your LODs you’ll naturally want to see that they change at the correct distances. Maya has a handy tool to help: going to Edit > Level Of Detail > Group will put your objects into groups, which you can then show and hide when at specific distances from the camera. This is a great way to help reduce the ‘pop’ effect mentioned earlier. As an added bonus, some game engines will take this group and use the information in-game, so you know what you see is what will be in the game.
16 Stagger your LODs
If your model is made up from a collection of parts – like a vehicle, for example – then you don’t need to restrict yourself to just three or four set distances for objects to switch at. For instance, if the vehicle will be viewed from behind for most of the time, set the front elements to drop to lower LODs earlier than those behind.
Lower-poly models can suffer if the normals aren’t set up properly
17 Surface normals
Lower-poly geometry, when not using a normal map, can suffer if the normals aren’t set up correctly. You may end up with edges appearing darker than they should be and a general reduction in quality as the models swap. When you’ve reached your desired polygon limit, make sure you also do a normals pass, softening and hardening key edges to reduce this effect.
Keep an eye out for quads being triangulated the wrong way on lower models when exported
18 Triangulate and flip edges
When exported, most models are triangulated as part of the process, and on higher-resolution models the result is generally fine. On lower-end models, however, you can suffer when a quad is triangulated the wrong way so that the surface appears concave, rather than convex. To prevent this, make sure you triangulate any suspicious areas, ensuring the edges will export how you want them to and not how the exporter thinks they should be.
About the author
Antony Ward has been developing games since the early 1990s. He’s worked for some of today’s top game studios and has also written three books and numerous tutorials
Develop stunning games! Discover the secrets of Method Studio’s epic Halo 4 trailer, make real-time CG with Unreal and CryEngine, build low-poly buildings, game levels and more
on Thursday, August 30th, 2012 at 2:55 pm under Guides, Tutorials.
You can subscribe to comments.
You can leave a comment, or trackback from your own site.
Tags: Assets, game, Games, level of detail, Maya, models, tips, tutorial