Web Update 19.10.2024

LOD: Level of Detail

You are here:
Estimated reading time: 2 min

Level of Detail allows you to create an object that changes its geometric complexity or level of detail based on its size in the rendered image. You create multiple versions of the same object, each with different levels of detail, *group them together as one, and then run the Level of Detail tool, which automatically creates a special LOD controller as a visibility track. The LOD controller will then hide and reveal the objects in the group depending on their size in the rendered scene.(*3ds max)

 

The main purpose of this utility is to save time in rendering complex objects and in manipulating objects in the viewports. Since a portion of rendering speed is directly related to the number of faces that must be rendered in a scene, using the Level Of Detail utility lets you reduce the number of rendered faces as an object reduces its apparent size. In addition, you can use this utility to display a simple stand-in for a more complex object in the viewports. Since the stack is not calculated for objects hidden in the viewports, you can speed up viewport manipulation by using this utility to substitute complex stack objects with simple stand-ins.

Utilities panel > Utilities rollout > More button > Utilities dialog > Level of Detail

Direct instructions on how to work with the Level of Detail tool are here:

Minimum size
This is the minimum object size, after which it switches to less detailed geometry.

 

Maximum size
This is the maximum size of the object, after which it switches to more detailed geometry.

Here is an example of a LOD set that has three LOD levels: High poly , Mid poly , Low poly with the following min and max sizes:

 

Low poly:
Min Size: 0
Max. Size: 25

 

Medium poly:
Min Size: 25
Max Size: 50

 

High poly:
Min Size: 50
Maximum size: 100

In-game LOD looks like this:
The examples here use four LOD levels; as required

  • Use a texture atlas that is shared with a number of other assets that may be used in the same scene, and use a window library to store all textures and meshes.
  • LOD0, LOD1 and LOD2 share one highly detailed material unique to that asset.
  • LOD3 is the lowest LOD and will use common material.
  • LOD0 uses a highly detailed eye for detailed viewing.
  • LOD1 and LOD2 use medium distances.
  • For large objects (larger than a house), LOD3 should only be a few polygons.
  • For smaller objects, LOD3 doesn’t even require eyes.No

Mesh – One last option to cover before we wrap everything up is LOD without “display”. It is used to completely remove an item from the scene if it is far enough from view that we would not even notice it is missing.

 

This is achieved by creating one additional LOD transition distance versus the number of included meshes in the new “mesh-table-lod-transition-distances” window. E.g. They provide three LOD transition distances (indicating four LOD levels) but do not provide an input table for the last ship level.

kind                                           "scenery"
 trainz-build                             4.3
 mesh-detail-level-count                  4
 rotate-yz-range                          -180,180
 rotstep                                  1
 

 

mesh-table
 {

  lod0
  {
   mesh-season                          0
   mesh                                 "lod0.im"
   auto-create                          1
   lod-level                            0
   mesh-scale                           0.6,1.0
  }

 lod1
  {
  mesh-season                           0
  mesh                                  "lod1.im"
  auto-create                           1
  lod-level                             1
  mesh-scale                            0.6,1.0
  }

 lod2
  {
  mesh-season                           0
  mesh                                  "lod2.im"
  auto-create                           1
  lod-level                             2
  mesh-scale                            0.6,1.0
  }

 lod3
  {
  mesh-season                           0
  mesh                                  "lod3.im"
  auto-create                           1
  lod-level                             3
  mesh-scale                            0.6,1.0
  }
 }

Another possible LOD setting using a separate configuration file:

kind                                "scenery" 
trainz-build                             4.3 
rotate-yz-range                          -180,180 
rotstep                                  1
mesh-table
 {

  lod0
  {
   mesh-season                          0
   mesh                                 "body.lm"
   auto-create                          1
   mesh-scale                           0.6,1.0
  }

 lodw
  {
  mesh-season                           0
  mesh                                  "bodyw.lm"
  auto-create                           1
  mesh-scale                            0.6,1.0
  }
 }

season-selector
{
 above-snow-line 1

branch-true
 {
 output-season 2
 }

branch-false
 {
 season-range 0.25,0.75

branch-true
 {
 output-season 1
 }

branch-false
 {
 output-season 0
 }
 }
}

thumbnails
{
 0
 {
 image "screenshot.jpg"
 width 240
 height 180
 }
}

kuid-table
{
}
Konfigurace pro body.lm.txt

version     1.0

 offset = 0.01;
 calcPoit  = center;
 multiplier = 1.0;
 animationCutOff = 0.1;
 attachmentCutOff = 0.1;
 renderCutOff = 0.01;

mesh("0.075")
  {
    name="lod3.im";
  }

mesh("0.2")
  {
    name="lod2.im";
  }

mesh("0.8")
  {
    name="lod1.im";
  }

mesh("1.0")
  {
    name="lod0.im";
  }
Tags:
Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 4
Alpinetrainz
Logo
Shopping cart