**BuildMeshLOD()**

**Syntax**

BuildMeshLOD(#Mesh, NbLOD, Distance.f, ReductionValue.f)

Build automatically one or several level of detail (LOD) for the mesh. The #Mesh will be replaced automatically with less complex mesh when displayed above the specified distance from the camera. If more precise LOD meshes are requiered, AddMeshManualLOD() can be used.

**Parameters**

MeshThe mesh to use. NbLODNumber of needed LOD for this mesh. DistanceThe minimum distance from the camera where the first LOD mesh will be used instead of #Mesh. For the next LOD meshs, the distance will be calculated using this formula: 'Distance / SqrF(1-ReductionValue)'. ReductionValueThe reduction to apply, between 0 (no reduction) and 1 (100% reduction).

Example: CreateMeshLodLevels(#Mesh, 3, 100, 0.75)

- The first reduction of the original mesh starts from 100 units of the camera, vertices number halved by 4 (75% reduction). - The second reduction of the original mesh starts from 200 units of the camera, vertices number halved by 16. - The third reduction of the original mesh starts from 400 units of the camera, vertices number halved by 64.

**Return value**

None.

**See Also**

CreateMesh(), AddMeshManualLOD()

**Supported OS **

All