LodGroup
< VMDL
Jump to navigation
Jump to search
![English (en) English (en)](/w/images/3/37/Flag-en.png)
![Translate (Translate) Translate (Translate)](/w/images/a/a8/Flag-Translate.png)
LOD (level of detail) Groups provide a way to group meshes, and set the distance at which they display on screen. They are used primarily for performance reasons, where a complex model is switched out to a simpler model the farther it is from the camera.
Display
- LOD Groups are under the LOD Group List item in the outliner. Selecting a lod item will switch to that LOD in the viewport.
- The LOD menu also provides access to switching LOD's.
- Set AutoLod to mimic in engine LOD swithcing based on camera distance
![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)
Create
- Use the Model > Mesh > Add LOD Groups menu item.
Edit
- LOD groups are under the LOD Group List item in the outliner.
- Select a the LOD Group List item's green + button in the property editor to add a new group.
- Select a LOD item to edit in the property editor.
Data Structures
The vmdl lod group data looks like this
CVLODGroupListReference m_pLodGroupList = CVLODGroupListReference
{
LODGroupList_t* m_pObject = &LODGroupList_t_0
string m_sFileName = ""
}
m_pLodGroupList
The reference to the LODGroupList_t of the vmdl:
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
m_pObject | Pointer to the LODGroupList_t | LODGroupList_t* | ||
m_sFileName | content relative path to the external lod group list | string |
LODGroupList_t
A list of LODGroup_t elements. Looks like this in the vmdl:
LODGroupList_t LODGroupList_t_0
{
LODGroup_t[] m_lodGroups =
[
LODGroup_t
{
int m_flSwitchDistance = 0
string[] m_meshList =
[
]
},
LODGroup_t
{
int m_flSwitchDistance = 0
string[] m_meshList =
[
]
}
]
}
LODGroup_t
Attribute | Friendly Name | Description | Type | Default Value |
---|---|---|---|---|
m_flSwitchDistance | Switch Distance | Distance when the LOD becomes active | int | 0 |
m_meshList | Mesh List | A list of mesh names associated with this group | string[] |
![Tip.png](/w/images/thumb/4/45/Tip.png/9px-Tip.png)
![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)