# LOD-Switch example

This is the complete LOD-Switch example written in Python that utilized Maya's LOD-groups.

In the image below we can see the UI at the right. The first part is the settings-path to the Pipeline-file that will be used when creating the LODs. The "Show LOD chain"-checkbox will enable automatic LOD-switching once the LODs has been created. "Display LOD" will force a LOD-switch at the current camera distance. "LOD Aggressiveness" is more or less a distance-multiplier in case the computed distance needs to be adjusted in any direction. At last we have "Create LODs" which will start the process, and once completed will create LOD groups ready for switching. "Clear LODs" can be used to delete all newly created LODs / objects.

To the left we can see the generated LOD group, grey font means that the object is currently hidden, and white that is is visible.

LOD-Switch UI