XSI-Quick and Easy LOD Levels

Create LOD levels for your props quickly and improve performance!

XSI: Quick and Easy LOD Levels

Making some quick - and plentiful - LOD levels for your models to boost the in-game performance is only just a few button clicks away. There are no long exhaustive procedures to create the different levels of detail for your model, XSI has a function built into it that makes it almost effortless.

The example model I'll be using is that of the HL2 Combine model you can see on the right but I'll be treating it more like a static prop than an animated character through the tutorial. Its current triangle count is 3852 and I'll show you how we get that down to under 900 and still look like a combine soldier.

I'm using XSI Mod Tool version 7.5 and I'm assuming you already have some basic knowledge of the interface. I'll also be using the default layout so I don't lose anyone.


Now the actual tool/function that's used to help lower poly counts is called Polygon Reduction and can be found on the left menu under Modify > Poly. Mesh > Polygon Reduction

If you have your model selected and then use the Polygon Reduction function then it will apply the reduction to the entire model like so:

From a quick glance you can see that there are only 50% of the original polygons and it still resembles a combine soldier very well. However, applying the reduction to the entire model at once is only good once in a while - normally small reductions for the first few LOD levels.

What you really want to do is select the sections of the model you want to reduce piece by piece via the Raycast Selection or Rectangle Selection polygon options.

Now I'm just going to start again with the original model and show you some of the options you can do and use the hands as an example.

The default option is "Ratio Units" but just think of it as the 'Percent of Original' to remove. Quick and easy and all you have to do is move the slider up/down till your happy with the results.

Normally you will just use that, but in the event that you want to be extremely precise about the polycount on your models there are two more options that allow you to specify either the final vertex or triangle count. So if you wanted the hand to have just 40 polygons then you would just switch the mode from "Ratio" to "Final Triangle Count" and type in 40 like so:

To sum up the different reduction types:

  • Ratio allows you to set the amount of reduction as a percentage using the Ratio slider.

  • Final vertex count lets you set the number of vertices in the result using the Vtx Count slider.

  • Final triangle count lets you set the number of triangles (polygons after tessellation) in the result using the Tri Count slider.

With these basic tools you should now be able to easily modify your models to create several LOD levels and increase their performance in-game.

And like I said in the beginning, this tool is quite capable of taking that 3852 poly Combine soldier and turning it into a simple 900 poly Combine soldier with even more room to go lower with some spot touch-ups.

Just remember to export a new .smd file for each LOD level you want before you get too carried away as you should aim for a smooth transition from your most detailed model to the least detailed.


So thats how to use the automatic tools. There will be times where it doesn't do it quite like you want so manual is the way to go. Now to remove polygons manually I'm not talking about selecting them and hitting delete - necessarily anyways, I'm sure you could do that just as easily heh - but rather use another simple tool called the Tweak Component Tool.

With your model selected just hit M and you should see your pointer change a bit along with some new buttons in the bottom centre of the screen:

It's the third button that you should be interested in at this point as that toggles the weld points option in which you can just click on a point and drag it to a neighbour and they will weld together. A small word of warning though about doing it this way, regularly freeze your model as after doing a dozen or so point welds your system will be using a lot of memory and be really slow. Trust me you'll notice when this happens so just hit the freeze button occasionally when working in this fashion.


Now to compile all these separate smd files you have for each LOD level theres only a few small things to change within the .qc file.

A very simple qc file looks like this:

$modelname  "somefolder\model.mdl"
$body "body"    "model_ref.smd"
$staticprop
$surfaceprop    metal
$cdmaterials    "models\somefolder"

$sequence idle "model_idle.smd" loop fps 15

$collisionmodel "model-phys.smd" { $concave }

And to add in the various LOD smd files you've made there are a few simple lines to add:

$lod 5 //Distance from model in metres
{
      replacemodel "original.smd" "LOD_Replacement.smd"
}

You just cut/paste this little section for however many LOD smd's you've made for your model and change their distances:


$modelname    "somefolder\model.mdl"
$body "body"    "model_ref.smd"
$staticprop
$surfaceprop    metal
$cdmaterials    "models\somefolder"

$sequence idle "model_idle.smd" loop fps 15

$collisionmodel "modelphys.smd" { $concave }

$lod 5 //Distance from model in metres
{
      replacemodel "modelref.smd" "LODReplacement1.smd"
}
$lod 10 //Distance from model in metres
{
      replacemodel "modelref.smd" "LODReplacement2.smd"
}
$lod 15 //Distance from model in metres
{
      replacemodel "modelref.smd" "LODReplacement3.smd"
}

Now you'll have a rather simple optimized prop for use in your map. Keep in mind this example just deals with the basics, this tutorial should just be a stepping stone to more complex things. I would suggesting checking out the Valve Developer Wiki for more information and details about how to further control your models performance outside of basic static props as with the above qc file example.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

  • agent's Levels
    • P3: Peasant
      Points: 18,104
    • E1: Helper
      EF: 5
    • C2: Treehouse Member
    • A5: Veteran
      Account Age: 5 years
    Username
    agent
    Posted 4 years ago

    Nicely explicated.

    User Title
    Obnoxious.
  • Logan Dougall's Levels
    • P5: Peddler
      Points: 143,302
    • E6: Authority
      EF: 223
    • C5: Admin
    • A6: Elder
      Account Age: 7 years
    Posted 4 years ago

    I used it simply because it was a good highpoly example people would recognize, stated at the start I wasn't treating it like a animated character but just a static prop because as you say doing the entire model at once with the poly reducer would create issues with the model's envelope etc.

    So I finally got glasses..yay?
  • BlackHoleSon's Levels
    • P4: Worker
      Points: 45,879
    • E4: Teacher
      EF: 93
    • C1: Member
    • A5: Veteran
      Account Age: 6 years
    Posted 4 years ago

    Sorry i cannot rate this, i go to approve and get a never ending "checking for existing feedback..."

    User Title
    Stand still, I'm used to paper
  • RedRogueXIII's Levels
    • P1: Beggar
      Points: 789
    • E2: Guide
      EF: 20
    • C2: Treehouse Member
    • A6: Elder
      Account Age: 7 years
    Posted 4 years ago

    Good stuff, although ya should note not to overdo this technique for characters models since you can possibly mess up edge loops that help the model deform in animation.

    Could get away with it by reducing part by part and leaving the joints alone.

    const bool is_Failing = true;
  • BlackHoleSon's Levels
    • P4: Worker
      Points: 45,879
    • E4: Teacher
      EF: 93
    • C1: Member
    • A5: Veteran
      Account Age: 6 years
    Posted 4 years ago
    Posted by .Krusty What are LOD Levels?

    Level of detail levels.

    In simple terms, the amount of detail in a model is decreased when you are further away. Since a lot of detail is hardly noticeable, it is a good optimization measure. the less polygons rendered in front of you, the better your performance. this link has any info that wasn't covered here - but this tutorial is plenty sufficient.

    User Title
    Stand still, I'm used to paper
  • Logan Dougall's Levels
    • P5: Peddler
      Points: 143,302
    • E6: Authority
      EF: 223
    • C5: Admin
    • A6: Elder
      Account Age: 7 years
    Posted 4 years ago

    Posted by .Krusty

    What are LOD Levels?

    Level Of Detail. Overly complex model up close, really basic model far away, frames saved.

    So I finally got glasses..yay?
  • .Krusty's Levels
    • P3: Peasant
      Points: 10,577
    • E1: Helper
      EF: 5
    • C1: Member
    • A5: Veteran
      Account Age: 5 years
    Posted 4 years ago

    What are LOD Levels?

    HQ is HQ
  • BlackHoleSon's Levels
    • P4: Worker
      Points: 45,879
    • E4: Teacher
      EF: 93
    • C1: Member
    • A5: Veteran
      Account Age: 6 years
    Posted 4 years ago

    Handy tutorial. Provides people the means to optimize their game in a very good way.

    You also provided plenty of pictures and easy to understand .qc information.

    User Title
    Stand still, I'm used to paper

Credits

Submitter
Logan Dougall's Levels
  • P5: Peddler
    Points: 143,302
  • E6: Authority
    EF: 223
  • C5: Admin
  • A6: Elder
    Account Age: 7 years
(Creator/Co-creator)
Key Authors
Logan Dougall
Writer, Mapper, Lover,
Contributors
Valve Dev Wiki
QC Examples & General Info
Special Thanks
Graceful
Providing Caffeine

Rating

10.0/10
Based off 1 rating(s)

Additional Info

Genre
Compiling, Modelling
Difficulty Level
Beginner

Stats

Post Count
8
ViewCount
2,315
Date Added
4 years ago
Date Modified
1 year ago

Share

Embed Code
Code to use:

More embeddable images

Bookmark and Share