Performance Optimizations

From Mod Wiki

Once you have a map fully textured and detailed it may be necessary to do an optimization pass to improve performance, especially for the minimum system requirements.

Step 1: Detail brush pass to reduce unnecessary triangle splits

  • LOD Groups that were previously separated into smaller groups to stop splits can now be combined with a proper DETAIL brush setup. The outcome should be less polys and less draws. (stairs are a good candidate here)
  • Brushes in Detail Groups only split geometry in the same detail group
  • Brushes in Detail Groups can still be cut by other non-detail geometry

Step 1.5: Model optimizations

  • This is ongoing as issues are noted but we highlighted many models that were unnecessarily high in polys. Many examples featured tiny bevels less than 1 game unit that wouldn't be missed, and contributed to high triangle counts in the scene.
  • We've created "_lowpoly" versions of many GDF and Strogg Base assets that greatly reduces the amount of polys.
  • Where possible and overall map memory permitting, use minDist versions to reduce LOD popping but render much less polys at a great distance

Step 2: Choose buildings to close up and turn into facades

  • To reduce batches at a great distance turn off unique door and window textures at a short distance.
    • Use a brush or simple patch mesh with the same texture as in the base LOD Group and vertex colour to mimic the door or window at a distance.
    • Examples: maps/references/area22/, maps/references/area22/
  • Adjust the clip where possible to completely engulf the façade building.
  • Be sure to delete any out-dated speakers from "" and manually delete the entity from <mapname>_soundeditor.entities in TextPad. To find the speaker, use it’s origin from "" and search for that text string in TextPad.

Step 3: Delete dense detail

  • We’ve done a general culling pass to delete any small detail that clutters up the scene and contributes to high poly counts while not offering much to gameplay
  • If there are four hanging lights, delete two ... if there are five barrels, delete three ... delete some trees and bushes, etc

Step 4: Reduce collision

  • Overhead pipes have been made non-solid and given a less-tessellated collision_metal counterpart
  • Very small or thin brushes have been made nonsolid
  • Some models have had their collision meshes optimized

Step 5: "Rendermodel only" flag on brushes and patches engulfed in clip

  • There is a new editor option that allows you to select all the clip brushes and then select all the geometry inside of them so that you can quickly apply the "Rendermodel only" flag (see "GSS & Tools" email from Monday 23 April for full details).
  • In some cases the clip brushes can be slightly extended to engulf a bit more detail that could be flagged

Step 6: DrawSpec

  • Apply drawSpecmed to lights to turn them off on minspec config.
    • Apply this key to any non-fill lights or detail lights that do not affect gameplay
    • During this pass, it is also a good idea to tweak the maxVisDist value of lights. Light_interior defaults to 3072 units but this can be greatly reduced depending on the layout of corridors. In some cases, this will help with triangle numbers while outside because the lights aren’t visible but are still being rendered beyond an open window
  • Set med on a LOD group’s drawSpec field to turn this group off on minspec config.
    • Decal LOD groups should be turned off for minspec. In many cases, the lower texture settings for minspec leave the decals looking too blurry and smudged to be missed.
      • Since most decal LOD groups turn off after 4096 units, this won’t affect the long views in a map but it has an impact in and around buildings and interiors.
    • Small vegetation mapobjects (usually instanced) that are too small to be worth an imposter can be turned off for minspec config
  • Set med on a LOD group’s shadowSpec field to turn off shadows from this group on minspec config.
    • In many cases, shadows can be turned off on a trims & detail LOD group without affecting the major silhouette of the building.

See Also