Difference between revisions of "Uberlods documentation"

From Nexus Mods Wiki
Jump to: navigation, search
m
m
Line 17: Line 17:
 
*<span class="wikiexternallink">[[Uberlod_Vegetation_Documentation|Vegetation uberlods]]</span> - used only for vegetation. Creation is somewhat automatic.  
 
*<span class="wikiexternallink">[[Uberlod_Vegetation_Documentation|Vegetation uberlods]]</span> - used only for vegetation. Creation is somewhat automatic.  
 
*Brushes Uberlods - can be used for everything else. Requires more work but is more flexible.  
 
*Brushes Uberlods - can be used for everything else. Requires more work but is more flexible.  
 
 
  
  
Line 52: Line 50:
 
| Uberlod system update budget. Limits the amount of work uberlod system does per frame.
 
| Uberlod system update budget. Limits the amount of work uberlod system does per frame.
 
|}
 
|}
 
+
</div> </div> 
 
[[Category:Documentation]] [[Category:Kingdom Come Deliverance]]
 
[[Category:Documentation]] [[Category:Kingdom Come Deliverance]]

Revision as of 10:40, 18 February 2020


Uberlods are an optimization feature allowing us to switch multiple objects for one. This can potentially save thousands of drawcalls. 

To create an uberlod these steps are required:

  • Create uberlod object for all the desired objects in 3ds Max.
  • Merge all uberlod nodes into one object (whole village, for example).
  • Place a special uberlod object into the level, set it's uberlod mesh and area and properties.

There are two types of uberlods that are done a bit differently:

  • Vegetation uberlods - used only for vegetation. Creation is somewhat automatic.
  • Brushes Uberlods - can be used for everything else. Requires more work but is more flexible.


Console Variables

Variable Name Default Value Description
e_UberlodSystemMode 0
  • 0 - normal, automatic mode
  • 1 - uberlods do not switch automatically (but they may finish whatever work they were doing at the moment or react to other commands)
e_UberlodDistanceMargin 16 (meters) Uberlod switching has hysteresis. This means that in order for an uberlod with switching distance X to switch to the near state, observer must be X - e_UberlodDistanceMargin meters away from the uberlod and for the uberlod to switch to the far state, the observer must be X + e_UberlodDistanceMargin meters away from the uberlod. This is to prevent the uberlods to keep switching between the state in case the player happens to keep crossing the switching distance (in a fight, for example).
e_UberlodMinUpdateDistance 16 (meters) Minimal distance an observer has to move in order for the uberlods to start updating their state.
e_UberlodDistanceRatio 3 Multiplier for the actual uberlod switching distance. Needs to be set before level load in order to work correctly.
e_UberlodUpdateBudget 2000 Uberlod system update budget. Limits the amount of work uberlod system does per frame.