The Lod Manager is the main component in QuickLod.
It optimizes the calculation process handles changes made to the scene and works as bridge between the Lod Objects and Lod Sources.

There can be only one Lod Manager component in the scene.
If you want to change the active Lod Manager, you need to destroy the old one and create the new one.
If you want to select the current Lod Manager, you can do so by using the menu option:
Edit/Quick Lod/Select QuickLod Manager

All Lod Managers derive from the LodManagerBase.cs class, which already handles:

  • Registering and deregistering of all Lod Objects and Lod Sources
  • Handling of Lod Object position changes
  • Handling of Lod Source position changes
  • System management when InstantOC is available
  • Management of editor cameras for all viewports

Lod Manager Cubic

There is currently only one Lod Manager available, the LodManagerCubic.
This Lod Manager only updates a defined amount of objects per frame instead of all objects at once.
This frees the CPU for other tasks, and thanks to many optimizations, you won’t see much of this delayed update.

LodManagerCubic_GeneralSettings

General settings

You can define a global distance multiplier.
This distance multiplier is applied to all distances before calculating the lod level.
This can be used as a quality setting, or to export to different devises without changing all distances manually.

You can also define the amount of objects you want to update per frame.
This number is not always the exact amount of objects which are recalculated, as QuickLod won’t calculate more objects than necessary, and every active cell gets at least one update per frame.

Grid

Grid_Range

The LodManagerCubic uses a 3D grid to optimize the calculation process. That allows it to only recalculate objects which are inside the update range of any Lod Source.

In this simplified example, you see a grid with a Lod Source in the centre (Red dot).
The Lod Source has an update range which is indicated by the black circle.
Only cells inside the update range will be updated.

That reduces the amount of objects which need to be recalculated drastically.

Grid boundary and cell size

The grid is defined by a boundary, which again is defined by a start point and a size.
The cells of the grid can be scaled on all axes, but to prevent a memory overflow, you can’t have more than 500 cells per axis.

Grid_Boundary_Setup

  • Cell update interval
    You can define the interval in which the active cells and priority levels will be recalculated. This interval is in frames between each recalculation.
    A recalculation will only occur, when any lod source has actually moved and changed the cell in which it was.
  • Max cell deactivations
    After recalculating the newly active cells, the LodManagerCubic will deactivate the content of all cells no longer active. When the camera is moving fast and many cells need to be deactivated, this can cause a frame rate drop as many objects need to be deactivated at once.

    To prevent that, the LodManagerCubic stores which cells should be deactivated and only deactivates a bunch of them per frame.
    How many cells are deactivated per frame can be controlled with the “Max cell deactivations” value.

  • Clamp objects to grid
    As the grid has a limited size, it can happen that a lod object leaves its boundary.
    This shouldn’t happen normally, but you can still define how QuickLod should react in this case.
    With the option “Clamp objects to grid”, you can tell QuickLod to clamp all objects outside the boundary to the nearest cell. If you choose to deactivate this option, all objects outside the boundary will simply be ignored.

Priority levels

Also the Lod Manager uses priority levels for the cells.
By default, there are 4 priority levels, but this amount can be changed.
A cell which is nearby a Lod Source gets a lower priority number than a cell which is far away.
The lower the priority number, the more objects are updated per frame.
A cell with the priority number 0 gets the most updates.

This results in optimized update behaviour, as objects nearby the camera get updated more often than objects further away.
This is useful, as it reduces the visible impact of the delayed update a lot.

No delay

If you want to deactivate the delayed update and just update all objects at once, then you only need to set the “Updates per frame” to a really high number.
The Lod Manager won’t update more objects than available.
The delayed mode is recommended for performance reasons.

 

Editor settings

There are a bunch of editor settings, which can be used to find the cause of a problem, see how QuickLod works and optimize settings.

Grid_Boundary_Setup

  • Use sources
    Define whether the user created Lod Sources should be used in the editor or not.
    When activated, all user created Lod Sources will be used in the editor, else not.
    This option only works in edit mode.
  • Use viewport
    Define whether the scene views should be used as Lod Sources or not.
    When activated, all scene views will be used as Lod Sources, else not.
    This option only works in edit mode.
  • Viewport multiplier
    The distance multiplier to use for all viewport sources.
    This has only an effect when “Use viewport” is activated.
  • Viewport update distance
    The update distance for all viewport Lod Sources.
    Using the “Auto” option gives the best result.
    This has only an effect when “Use viewport” is activated.

Editor visualizations

Editor visualizations are limited to the LodManagerCubic.
Custom made Lod Managers can implement their own visualizations.

LodManagerCubic_EditorGizmos

  • Draw used cells
    Draws all cells which at least have one Lod Object inside.
  • Draw cell leve
    Draws the cell level for all used cells.
    The cell level is represented by a colour, where green stays for a low priority number and red stays for high priority number.
    Be aware that a low priority number has actually a higher priority.
  • Draw grid
    Draws the outline of the grid with the cell size visible.
  • Draw object cell
    Draws for all selected Lod Objects the cell in which they are.
  • Draw managed objects
    Redraws all managed Lod Objects with a specific material.
    This can be used to find objects which aren’t managed.
  • Managed objects material
    The material used to highlight the managed objects.
    Default: QLManagedObjects
  • Draw when deselected
    Also draw the visuals when the Lod Manager is not selected.
  • Draw in debug
    Also draw the visuals when in play mode.