CN-121982177-A - Model rendering method, apparatus, device, storage medium, and computer program product
Abstract
The application discloses a model rendering method, a device, equipment, a storage medium and a computer program product, which are used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU (central processing unit) end, the utilization of the parallel computing capacity of a GPU (graphics processing unit) is insufficient, and real-time interaction and high-quality visualization are difficult to support. The method comprises the steps of splitting a model to be rendered to obtain at least two unit models, constructing a spatial index structure according to position information of each unit model, screening visible unit models from the spatial index structure according to camera parameters, determining corresponding spatial levels of each visible unit model in the spatial index structure, determining corresponding finesses of each visible unit model according to the spatial levels, merging the visible unit models with the same finesses and adjacent positions to obtain a merging unit model, simplifying the merging unit model, and rendering the simplified merging unit model.
Inventors
- LI YUANHAO
- Lin Guochi
- SHAO HUA
- LIU KUN
- YANG XI
- LI JIANGJIE
Assignees
- 中移物联网有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251224
Claims (10)
- 1. A model rendering method, comprising: splitting a model to be rendered to obtain at least two unit models corresponding to the model to be rendered; constructing a spatial index structure according to the position information of each unit model; Screening visible unit models from the spatial index structure according to camera parameters, and determining corresponding spatial levels of the visible unit models in the spatial index structure; Determining the corresponding fineness of each visible unit model according to the space hierarchy, and merging the visible unit models with the same fineness and adjacent positions to obtain a merged unit model; and simplifying the merging unit model, and rendering the simplified merging unit model.
- 2. The method of claim 1, wherein the splitting the model to be rendered to obtain at least two unit models corresponding to the model to be rendered specifically comprises: Obtaining vertex data of the model to be rendered; Extracting at least two feature points corresponding to the model to be rendered according to the geometric distribution features of the vertex data; Clustering the vertex data by taking the characteristic points as initial clustering centers to obtain at least two vertex clusters; and reconstructing each vertex cluster according to the original topological structure of the model to be rendered to obtain at least two unit models.
- 3. The method according to claim 1, wherein the spatial index structure is an octree, and the constructing the spatial index structure specifically includes: Determining a root node of the octree according to the position information of each unit model; dividing the cube space corresponding to the root node into eight equal-divided subspaces, and generating corresponding child nodes according to the subspaces; and determining the sub-nodes corresponding to the unit models until the number of the unit models contained in each sub-node meets the preset condition, and obtaining the spatial index structure.
- 4. A method according to claim 3, wherein said filtering visible element models from said spatial index structure according to camera parameters, in particular comprises: Acquiring the view cone parameters of the camera shooting the model to be rendered; traversing the spatial index structure, and judging whether subspaces corresponding to all the child nodes in the spatial index structure are intersected with the view cone or not; and determining a unit model contained in the child node intersected with the view cone as a visible unit model.
- 5. The method according to claim 4, wherein determining the corresponding fineness of each visible unit model according to the spatial hierarchy comprises: determining the distance between the camera and the subspace corresponding to the visible unit model; determining a proportional value of the distance and the corresponding size of the subspace; And determining the fineness corresponding to the visible unit model according to the proportion value.
- 6. The method according to claim 1, wherein the simplifying the merging unit model specifically includes: Determining edges contained in the merging unit model; for each edge of the merging unit model, determining the simplification cost of the edge according to the dot product result of the position vector difference and the normal vector of the two endpoints corresponding to the edge; And selecting a target edge to carry out collapse treatment according to the simplification cost, and completing the simplification treatment of the merging unit model.
- 7. A model rendering apparatus, characterized by comprising: The splitting unit is used for splitting the model to be rendered to obtain at least two unit models corresponding to the model to be rendered; The index structure construction unit is used for constructing a spatial index structure according to the position information of each unit model and respectively determining index identifiers corresponding to each unit model according to the spatial index structure; The screening unit is used for screening the visible unit models from the spatial index structure according to camera parameters and determining the corresponding spatial hierarchy of each visible unit model in the spatial index structure; The merging unit is used for determining the fineness corresponding to each visible unit model according to the space hierarchy, merging the visible unit models with the same fineness and adjacent positions to obtain merged unit models; And the rendering unit is used for simplifying the merging unit model and rendering the simplified merging unit model.
- 8. A model rendering apparatus comprising: processor, and A memory arranged to store computer executable instructions that, when executed, cause the processor to: splitting a model to be rendered to obtain at least two unit models corresponding to the model to be rendered; Constructing a spatial index structure according to the position information of each unit model, and respectively determining index identifiers corresponding to each unit model according to the spatial index structure; Screening visible unit models from the spatial index structure according to camera parameters, and determining corresponding spatial levels of the visible unit models in the spatial index structure; Determining the corresponding fineness of each visible unit model according to the space hierarchy, and merging the visible unit models with the same fineness and adjacent positions to obtain a merged unit model; and simplifying the merging unit model, and rendering the simplified merging unit model.
- 9. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the model rendering method of any of claims 1-6.
- 10. A computer program product comprising a computer program which, when executed by a processor, implements the model rendering method according to any one of claims 1-6.
Description
Model rendering method, apparatus, device, storage medium, and computer program product Technical Field The present application relates to the field of wireless communication technologies, and in particular, to a model rendering method, apparatus, device, storage medium, and computer program product. Background With the rapid development of technologies such as the Internet of things, digital twinning, web3D visualization and the like, efficient rendering of large-scale and high-definition three-dimensional models at a webpage end has become an important requirement. In particular, in scenes such as smart cities, industrial simulation, virtual display and the like, a three-dimensional model with a large number of triangular patches is often loaded and rendered in real time in a browser, and therefore high requirements are provided for rendering performance of a web terminal. Currently, web-side three-dimensional rendering relies primarily on WebGL technology. While WebGL provides cross-platform graphics rendering capabilities, it is more design-wise focused on the scheduling and control of the CPU side, making underuse of the GPU's parallel computing capabilities. When a large-scale model is processed, webGL often faces problems of low rendering efficiency, unstable frame rate and the like, and real-time interaction and high-quality visualization are difficult to support. In the prior art, in order to improve the rendering efficiency of the Web side, a Level of Detail (LOD) technology is generally adopted to simplify the model. However, the conventional LOD technology is mostly to perform unified detail adjustment on the whole model, and lacks of fine processing on the local structure of the model. Under the conditions of complex model structure and uneven detail distribution, the global LOD strategy is difficult to realize optimal rendering performance while guaranteeing visual quality. Therefore, how to improve the rendering capability of the large-scale three-dimensional model of the Web end becomes a technical problem to be solved urgently in the prior art. Disclosure of Invention The embodiment of the application provides a model rendering method which is used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU end, the utilization of the parallel computing capacity of a GPU is insufficient, the rendering efficiency is low, the frame rate is unstable, and real-time interaction and high-quality visualization are difficult to support when a large-scale model is processed. The embodiment of the application also provides a model rendering device which is used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU end, the utilization of the GPU parallel computing capacity is insufficient, the rendering efficiency is low, the frame rate is unstable, and real-time interaction and high-quality visualization are difficult to support when a large-scale model is processed. The embodiment of the application also provides model rendering equipment which is used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU end, the utilization of the GPU parallel computing capacity is insufficient, the rendering efficiency is low, the frame rate is unstable, and real-time interaction and high-quality visualization are difficult to support when a large-scale model is processed. The embodiment of the application also provides a computer readable storage medium which is used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU end, the utilization of the parallel computing capacity of the GPU is insufficient, the rendering efficiency is low, the frame rate is unstable, and the real-time interaction and high-quality visualization are difficult to support when a large-scale model is processed. A computer program product is used for solving the problems that the existing model rendering scheme focuses on the scheduling and control of a CPU end, the utilization of the parallel computing capacity of a GPU is insufficient, the rendering efficiency is low, the frame rate is unstable, and real-time interaction and high-quality visualization are difficult to support when a large-scale model is processed. The embodiment of the application adopts the following technical scheme: A model rendering method comprises the steps of splitting a model to be rendered to obtain at least two unit models corresponding to the model to be rendered, constructing a spatial index structure according to position information of each unit model, screening visible unit models from the spatial index structure according to camera parameters, determining a spatial level corresponding to each visible unit model in the spatial index structure, determining fineness corresponding to each visible unit model according to the spatial