LOD model performance research

A few months ago LordTrilobite asked me if I could port some models he made. In the progress we also stumbled across the LOD- feature. After a few tests I came to the conclusion that they dont really help performance and are not worth the time and effort.
To support that claim I finally made up a few test- models and maps.
In the following Post I show how the models where made and how they were tested.

First off are the models themselfs (or rather their LOD- models). I colored their texture to show what props are LOD and what are not (tests have been done with only one texture and it got the same results).

The regular prop (green):A fairly high detail model with a 1024 x 1024 texture that uses a normal map and the “$phong” parameter

http://i.imgur.com/3FbsmwK.jpg[/t]

The models .qc file:


$modelname "lordtrilobite\starwars\props\lod_test\barrel_scarif1_static_nolod.mdl"
$model "Body" "barrel_scarif1_ref.smd"

$cdmaterials "lordtrilobite\starwars\props\lod_test\"


$surfaceprop "metal_barrel"

$sequence "idle" "barrel_scarif1_ref.smd" fps 1 loop

$collisionmodel "barrel_scarif1_phys.smd"
{
$Mass 180
}

$staticprop

The textures .vmt file:


"VertexLitGeneric"

//Model and texture created by LordTrilobite
//Model ported by KingPommes
{
	"$basetexture"		"lordtrilobite/starwars/props/lod_test/barrel_scarif1_green"
	"$bumpmap"			"lordtrilobite/starwars/props/lod_test/barrel_scarif1_NRM"

	"$normalmapalphaenvmapmask"	"1"

	"$Phong"			"1"
	"$PhongBoost"			"4.6"
	"$phongexponent"		"23.8"
	"$PhongFresnelRanges"		"[.05 .5 1]"
}


The first LOD variation (yellow): a low poly model with the same texture as the regular prop

[t]http://i.imgur.com/7Tj4YYh.jpg[/t]

The added lines in the models .qc file:


$lod 50
{
	replacemodel "barrel_scarif1_ref.smd" "barrel_scarif1_lod1.smd"
	replacematerial "barrel_scarif1_green" "barrel_scarif1_yellow"
}

The second LOD variation (red): a low poly model with a 256 x 256 texture with no shader parameters whatsoever

[t]http://i.imgur.com/MsJQeAv.jpg[/t]

The added lines in the models .qc file:


$lod 50
{
	replacemodel "barrel_scarif1_ref.smd" "barrel_scarif1_lod1.smd"
	replacematerial "barrel_scarif1_green" "barrel_scarif1_red"
}

The textures .vmt file:


"VertexLitGeneric"

//Model and texture created by LordTrilobite
//Model ported by KingPommes
{
	"$basetexture"			"lordtrilobite/starwars/props/lod_test/barrel_scarif1_red"
}

Heres how the models got tested:
I made up a map for no LOD and each LOD variation (prop_static and prop_physics). Fraps was used to track the Min, Max and Average fps during a timespan of 60s. To make each test the same the “start recoring” button was bound to “e” and a func_tracktrain with a seat on it would drive the player around the map.
[t]http://i.imgur.com/ytzX5el.jpg[/t][t]http://i.imgur.com/xTa92RQ.jpg[/t][t]http://i.imgur.com/E2QY2js.jpg

And finally: THE RESULTS
As you can see LOD has little to no effect on performance. If anyone can name me a situation where LOD makes a huge difference I would be very interested to hear that.

(values are fps)

Lod makes a difference when there is a hardware bottleneck, specifically on old computers. Many gmod players still use old computers.

More importantly, lods can be used to lower the ammount of drawcalls. If a model with 3 or 4 materials can be loded down to 1 material without fancy shaders that makes a huge difference. The emphasis here is transparency! For dynamic animated models you can reduce the nr of bones too!

The hl2 citizens are a great example of lod use

[editline]5th August 2017[/editline]

Foliage also greatly benefits from lods because they decrease overdraw