Class Continuous LOD Algorithm for Lightweight WebGL Rendering Optimization

WebGL is one of the most promising implementations of 3D visualization and can be accessed across platforms. However, rendering a large scene using WebGL requires a lot of computational overhead because every vertex of the model in the scene needs to be calculated. Traditional WebGL rendering solutions include discrete and continuous Levels of Detail (LOD) algorithms. Discrete algorithms display models with different details in segments, causing the problem of model mutation. Although continuous algorithms can generate models with similar details to solve the problem of model mutation, the model distortion problem is introduced when the model details are low. In this paper, a Class Continuous LOD (CCLOD) algorithm for lightweight rendering is proposed, which dynamically adjusts model details according to the visual distance, and reduces the computational overhead of rendering by reducing model details while keeping consistent visual effect. In order to solve the problem of model mutation and distortion in the LOD algorithm, the CCLOD algorithm puts forward relevant constraints on the process of adjusting model details. According to these constraints, a collapse proportion generation algorithm is proposed. The collapse proportion is generated by using the distance between objects, and the low-cost triangles of the model are deleted according to the collapse proportion to generate a model with continuous details. It makes the transition between multi-level models smoother to avoid model mutation and limits the max-imum collapse ratio to avoid model distortion. Experimental results show that compared with the traditional LOD algorithm, the CCLOD algorithm reduces the number of triangles by 12.66% and the video memory usage by 17.5%.