Model rendering method and device, equipment, storage medium and computer program product

By splitting the model, building an index structure, and merging and simplifying the process, the problem of low rendering efficiency of 3D models on the web was solved, and high-quality visualization and real-time interaction were achieved.

CN121982177APending Publication Date: 2026-05-05CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE M2M
Filing Date
2025-12-24
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing web-based 3D model rendering solutions focus on CPU scheduling and control, failing to fully utilize the parallel computing capabilities of GPUs. This results in low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization.

Method used

The model to be rendered is split, a spatial index structure is constructed, visible unit models are filtered, the level of detail is determined based on camera parameters, adjacent unit models are merged for simplification, and finally rendered.

Benefits of technology

By pre-splitting the model and building an efficient index structure, the amount of rendering data is reduced, and the local finesse is adjusted according to the camera position, achieving an optimal balance between rendering quality and performance, improving frame rate and reducing stuttering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121982177A_ABST
    Figure CN121982177A_ABST
Patent Text Reader

Abstract

The invention discloses a model rendering method and 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 parallel computing capability of a GPU (Graphics Processing Unit) is not fully utilized, and real-time interaction and high-quality visualization are difficult to support. The method comprises the steps of splitting a to-be-rendered model to obtain at least two unit models; 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 a spatial hierarchy corresponding to each visible unit model in the spatial index structure; according to the spatial hierarchy, determining the fineness corresponding to each visible unit model, and merging the visible unit models with the same fineness and adjacent positions to obtain a merged unit model; and performing simplification processing on the merging unit model, and performing rendering on the simplified merging unit model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technology, and in particular to a model rendering method, apparatus, device, storage medium, and computer program product. Background Technology

[0002] With the rapid development of technologies such as the Internet of Things, digital twins, and Web3D visualization, the efficient rendering of large-scale, high-precision 3D models on web pages has become an important requirement. Especially in scenarios such as smart cities, industrial simulation, and virtual displays, it is often necessary to load and render 3D models with massive numbers of triangular faces in the browser in real time, which places high demands on the rendering performance of web-based applications.

[0003] Currently, web-based 3D rendering primarily relies on WebGL technology. While WebGL offers cross-platform graphics rendering capabilities, its design places greater emphasis on CPU-side scheduling and control, underutilizing the parallel computing power of the GPU. When processing large-scale models, WebGL often faces issues such as low rendering efficiency and unstable frame rates, making it difficult to support real-time interaction and high-quality visualization.

[0004] In existing technologies, Level of Detail (LOD) techniques are commonly used to simplify models to improve rendering efficiency on the web. However, traditional LOD techniques often involve uniform detail adjustments to the entire model, lacking fine-grained processing of local model structures. When the model structure is complex and the details are unevenly distributed, this global LOD strategy struggles to achieve optimal rendering performance while maintaining visual quality.

[0005] Therefore, improving the rendering capability of large-scale 3D models on the Web has become a pressing technical problem that needs to be solved by existing technologies. Summary of the Invention

[0006] This application provides a model rendering method to address the problems of existing model rendering schemes that focus on CPU-side scheduling and control, do not fully utilize the parallel computing capabilities of GPUs, and suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization when processing large-scale models.

[0007] This application also provides a model rendering device to solve the problems of existing model rendering schemes that focus on CPU-side scheduling and control, do not make full use of GPU parallel computing capabilities, and have low rendering efficiency, unstable frame rate, and difficulty in supporting real-time interaction and high-quality visualization when processing large-scale models.

[0008] This application also provides a model rendering device to address the problem that existing model rendering schemes focus on CPU-side scheduling and control, which do not fully utilize the parallel computing capabilities of GPUs. When processing large-scale models, these schemes suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization.

[0009] This application also provides a computer-readable storage medium to address the problem that existing model rendering schemes focus on CPU-side scheduling and control, which do not fully utilize the parallel computing capabilities of GPUs. When processing large-scale models, these schemes suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization.

[0010] A computer program product is provided to address the problems of existing model rendering schemes that focus on CPU-side scheduling and control, which do not fully utilize the parallel computing capabilities of GPUs. When processing large-scale models, these schemes suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization.

[0011] The embodiments of this application adopt the following technical solutions: A model rendering method includes: 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 based on the position information of each unit model; filtering visible unit models from the spatial index structure according to camera parameters, and determining the spatial level corresponding to each visible unit model in the spatial index structure; determining the level of detail corresponding to each visible unit model according to the spatial level, and merging visible unit models with the same level of detail and adjacent positions to obtain a merged unit model; simplifying the merged unit model, and rendering the simplified merged unit model.

[0012] A model rendering apparatus includes: a splitting unit for splitting a model to be rendered to obtain at least two unit models corresponding to the model to be rendered; an index structure construction unit for constructing a spatial index structure based on the position information of each unit model; a filtering unit for filtering visible unit models from the spatial index structure based on camera parameters and determining the spatial level corresponding to each visible unit model in the spatial index structure; a merging unit for determining the level of detail corresponding to each visible unit model based on the spatial level and merging visible unit models with the same level of detail and adjacent positions to obtain a merged unit model; and a rendering unit for simplifying the merged unit model and rendering the simplified merged unit model.

[0013] A model rendering device, comprising: The processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform the following operations: splitting the model to be rendered to obtain at least two unit models corresponding to the model to be rendered; constructing a spatial index structure based on the position information of each unit model; filtering visible unit models from the spatial index structure based on camera parameters, and determining the spatial level corresponding to each visible unit model in the spatial index structure; determining the level of detail corresponding to each visible unit model based on the spatial level, and merging visible unit models with the same level of detail and adjacent positions to obtain a merged unit model; simplifying the merged unit model, and rendering the simplified merged unit model.

[0014] A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including multiple applications, cause the electronic device to perform the following operations: 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 based on the position information of each unit model; filtering visible unit models from the spatial index structure based on camera parameters, and determining the spatial level corresponding to each visible unit model in the spatial index structure; determining the level of detail corresponding to each visible unit model based on the spatial level, and merging visible unit models with the same level of detail and adjacent positions to obtain a merged unit model; simplifying the merged unit model, and rendering the simplified merged unit model.

[0015] A computer program product includes a computer program that, when executed by a processor, performs the following: 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 based on the position information of each unit model; filtering visible unit models from the spatial index structure based on camera parameters, and determining the spatial level corresponding to each visible unit model in the spatial index structure; determining the level of detail corresponding to each visible unit model based on the spatial level, and merging visible unit models with the same level of detail and adjacent positions to obtain a merged unit model; simplifying the merged unit model, and rendering the simplified merged unit model.

[0016] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: Using the model rendering method provided in this application embodiment, when model rendering is required, the model to be rendered can first be split to obtain at least two unit models corresponding to the model to be rendered. Based on the position information of each unit model, a spatial index structure is constructed. Visible unit models are selected from the spatial index structure according to camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined. Then, based on the spatial level, the refinement corresponding to each visible unit model is determined, and visible unit models with the same refinement and adjacent positions are merged to obtain a merged unit model. Finally, the merged unit model is simplified, and the simplified merged unit model is rendered. The model rendering method provided in this application has two advantages. First, by pre-dividing the model to be rendered into multiple unit models and constructing an efficient spatial index structure, the visible unit models can be quickly and accurately filtered and the non-visible unit models can be eliminated through the cooperation of the camera's view frustum and the spatial index structure during rendering, thereby greatly reducing the amount of data sent to the rendering pipeline. Second, based on the unit models and spatial index structure after model division, the method provided in this solution can independently determine the required level of detail for each local area according to the relative position and distance between the camera and the local area of ​​the model, and merge and simplify adjacent unit models of the same level of detail. This ensures that areas close to the camera and visually important maintain high detail, while areas far away or less visually important are reasonably simplified. While ensuring overall visual realism, the number of vertices and triangles required for rendering a single frame is effectively reduced, achieving the optimal balance between rendering quality and performance. By combining these two aspects, the rendering load on the GPU is fundamentally reduced, making it possible to render large-scale complex 3D models smoothly in real time on web pages or mobile devices, significantly improving the frame rate and reducing stuttering. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a schematic diagram illustrating a specific process of a model rendering method provided in an embodiment of this application; Figure 2 This is a diagram showing the effect of splitting the model to be rendered according to the splitting method provided in the embodiments of this application; Figure 3 This is a schematic diagram illustrating a specific structure of a spatial index structure provided in an embodiment of this application; Figure 4 This is a schematic diagram of the visible unit model filtered according to the filtering method provided in the embodiments of this application; Figure 5This is a schematic diagram of the merged unit model obtained after processing according to the merging simplification method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the specific structure of a model rendering device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the specific structure of a model rendering device provided in an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] This application provides a model rendering method to address the problems of existing model rendering schemes that focus on CPU-side scheduling and control, do not fully utilize the parallel computing capabilities of GPUs, and suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization when processing large-scale models.

[0020] The execution subject of the model rendering method provided in this application embodiment may be, but is not limited to, at least one of a model rendering server, a video processing server, and a video rendering server; in addition, the execution subject of the method may also be the system or application (APP) itself running on these servers.

[0021] For ease of description, the following description uses the model rendering system as the execution subject of this method as an example to introduce its implementation. It should be understood that using the model rendering system as the execution subject is merely an illustrative example and should not be construed as a limitation of the method.

[0022] Based on the aforementioned model rendering system, a schematic diagram illustrating the specific implementation process of the model rendering method provided in this application is shown below. Figure 1 As shown, the main steps include the following: Step 11: Split the model to be rendered to obtain at least two unit models corresponding to the model to be rendered; In one implementation, step 11 may include: acquiring vertex data of the model to be rendered; extracting at least two feature points corresponding to the model to be rendered based on the geometric distribution characteristics of the vertex data; using the feature points as initial cluster centers to cluster the vertex data to obtain at least two vertex clusters; and reconstructing each vertex cluster based on the original topology of the model to be rendered to obtain at least two unit models.

[0023] Specifically, in the embodiments of this application, the model rendering system can perform the splitting of the model to be rendered according to the following sub-steps, including: Sub-step 1101: Obtain the vertex data of the model to be rendered; Specifically, the model rendering system can read the model file of the model to be rendered, parse out the set V of three-dimensional coordinates (x, y, z) of all vertices in the model to be rendered, and then use the parsed set V as the vertex data of the model to be rendered.

[0024] Sub-step 1102: Based on the geometric distribution characteristics of the vertex data, extract at least two feature points corresponding to the model; In one implementation, the model rendering system can use an Intrinsic Shape Signatures (ISS) algorithm to extract feature points, which may specifically include the following process: S121. For each vertex P in the vertex set V... i Define a neighborhood of fixed radius r around it, and obtain all vertices within the neighborhood.

[0025] S122. Calculate the covariance matrix Cov of all vertices in the neighborhood; Specifically, the covariance matrix Cov can be determined according to the following formula [1]: [1] Where μ is the centroid of the neighborhood point and N is the number of neighborhood points.

[0026] S123. Perform eigenvalue decomposition on the covariance matrix Cov obtained by executing S122 to obtain eigenvalues ​​λ1, λ2, λ3, where λ1 ≥ λ2 ≥ λ3.

[0027] S124. Calculate the vertex P based on its eigenvalues. i The significance measure; For example, the product of λ2 and λ3 can be used to determine the vertex P. i The saliency measure is used. The vertex with the highest saliency is retained as a candidate feature point.

[0028] S125. Perform non-maximum suppression in the local space to remove redundant candidate feature points. The points that are ultimately retained constitute the vertex P. i The set of feature points F.

[0029] Sub-step 1103: Using the feature points obtained by performing the above sub-step 1102 as the initial cluster centers, cluster the vertex data; In one implementation, the model rendering system may employ the K-means clustering algorithm, where K is the desired number of unit models, and may specifically include the following process: S131. Use the feature point set F as the initial cluster center.

[0030] S132. For each non-feature vertex in the vertex set V, calculate its distance to all cluster centers; Specifically, in one implementation, the distance can be calculated by weighting the Euclidean distance and the angle between the normal vectors. For example, in the embodiments of this application, the distance from non-feature point vertices to all cluster centers can be calculated according to the following formula [2]: [2] Where D represents the distance from non-feature point vertices to all cluster centers, α and β are weighting coefficients, and n p and n c These are the normal vectors of the vertices and cluster centers, respectively.

[0031] S133. Assign each vertex to the cluster containing the nearest cluster center.

[0032] S134. Recalculate the geometric center of all vertices in each cluster as the new cluster center.

[0033] S135. Repeat steps S132 to S134 until the change in cluster centers is less than the preset threshold or the maximum number of iterations is reached, to obtain the final vertex cluster set k.

[0034] Sub-step 1104: Based on the original topology of the model to be rendered, reconstruct each vertex cluster to obtain at least two unit models.

[0035] In one implementation, for each vertex cluster k, the model rendering system can reconstruct the model according to the following process: S141. From the triangular patch index of the original model, select all triangular patches whose three vertices belong to the vertex cluster k.

[0036] S142. For triangular faces spanning different clusters, the model rendering system can use a weighted region growing algorithm. For example, a connection graph of the triangular faces can be constructed, and the boundary triangular faces can be reasonably allocated to adjacent clusters using factors such as normal vector continuity and side length, in order to maintain the integrity of the unit model boundary.

[0037] S143. Collect the vertex and index information of all triangles assigned to vertex cluster k, reconstruct an independent unit model, and inherit the UV coordinates, normals, and other attributes of the original model. In one implementation, the effect of splitting the model to be rendered according to the above method is as follows: Figure 2 As shown.

[0038] It should also be noted that, in addition to the above-mentioned methods for splitting the model to be rendered, the model rendering system can also use surface curvature-based segmentation methods and semantic-based segmentation methods to split the model to be rendered.

[0039] Step 12: Construct a spatial index structure based on the location information of each unit model; In one implementation, the model rendering system can efficiently organize and manage a large number of unit models obtained after splitting by constructing a spatial index, thereby accelerating the subsequent processing flow.

[0040] In this embodiment of the application, the model rendering system can construct the spatial index structure based on an octree structure. The specific construction process is as follows: Sub-step 1201: Determine the root node of the octree based on the position information of each unit model; Specifically, the model rendering system can determine the spatial bounding box (AABB) of all unit models and use this bounding box as the root node of the octree, representing the spatial extent of the entire model scene.

[0041] Sub-step 1202: Recursively partition the space.

[0042] Specifically, starting from the root node, the system sequentially determines whether the current node needs to be further divided according to the preset partitioning criteria.

[0043] The preset division judgment condition is: the number of unit models contained in the current node is greater than the preset threshold, or the spatial size of the current node is greater than the preset value.

[0044] Sub-step 1203: When the judgment result obtained by executing sub-step 1202 indicates that partitioning is required, the cube space represented by the current node is divided along the midpoints of the three axes X, Y, and Z to obtain eight sub-cube spaces of equal size, and a child node is created for each sub-space.

[0045] Sub-step 1204: Determine the sub-nodes corresponding to each of the unit models; Specifically, for the element models contained in the current node, each element model is assigned to one or more child nodes based on the relationship between the center point of its bounding box and the subspace. Typically, an element model is only assigned to the child node whose bounding box intersects the deepest (or completely contains) its bounding box.

[0046] Sub-step 1205: For each newly generated child node, recursively repeat sub-steps 1201-1204 until all nodes meet the stopping partitioning condition. Finally, each leaf node is associated with one or more unit models, resulting in a spatial index structure. In one implementation, the spatial index structure constructed according to the above method is as follows: Figure 3 As shown.

[0047] Step 13: Filter visible unit models from the spatial index structure according to camera parameters, and determine the spatial level corresponding to each visible unit model in the spatial index structure; Specifically, in one implementation, the model rendering system can complete the filtering of visible unit models according to the following sub-steps: Sub-step 1301: Obtain the view frustum parameters of the camera that captures the model to be rendered; In this embodiment of the application, the camera refers to the camera that captures the model to be rendered. The obtained camera parameters include, but are not limited to, the following: 1. The position of the camera in the world coordinate system. camera Camera orientation and the frustum defined by the near plane, far plane, vertical field of view (FOV), and aspect ratio. camera .

[0048] Sub-step 1302: Traverse the spatial index structure and determine whether the subspace corresponding to each child node in the spatial index structure intersects with the view frustum; Specifically, the model rendering system can make the judgment according to the following process: S321. Starting from the root node, determine whether the spatial bounding box of the current node intersects with the camera's view frustum; S322. If they do not intersect, then the unit models contained in the node and all its child nodes are not visible, and the branch is skipped directly.

[0049] S323. If they intersect, check if the current node is a leaf node.

[0050] If it is a leaf node, all unit models associated with that node are marked as "visible unit models," and the spatial hierarchy of that node in the octree is recorded. In one implementation, the visible unit models selected according to the above method are as follows: Figure 4 as shown

[0051] If it is a non-leaf node, recursively execute the above S321~S323 for all its child nodes.

[0052] Step 14: Determine the fineness corresponding to each visible unit model according to the spatial level determined by executing Step 13, and merge the visible unit models with the same fineness and adjacent positions to obtain a merged unit model; In one implementation, the model rendering system can determine the fineness corresponding to each of the visible unit models by a method based on the ratio of distance to node size, including: determining the distance between the camera and the subspace corresponding to the visible unit model; determining the ratio value of the distance to the size corresponding to the subspace; and determining the fineness corresponding to the visible unit model according to the ratio value.

[0053] Specifically, in one implementation, the model rendering system can determine the fineness corresponding to each visible unit model according to the following sub-steps, including: Sub-step 1401: Calculate the distance Dis from the camera position to the center of the bounding box of the node space.

[0054] Sub-step 1402: Obtain the size of the bounding box of the node space, for example, its diagonal length BBox size .

[0055] Sub-step 1403: Calculate the ratio value Ratio according to the following formula [3]: [3] Sub-step 1404: Compare the Ratio value with a set of preset level thresholds {T1, T2,...}. For example, if Ratio>T1, it can be determined that the fineness corresponding to the unit model is low; if T2<Ratio ≤ T1, it can be determined that the fineness corresponding to the unit model is medium; if Ratio ≤ T2, it can be determined that the fineness corresponding to the unit model is high. The fineness is strongly correlated with the spatial level. Usually, deeper levels will obtain higher fineness ratings at the same distance.

[0056] After determining the fineness corresponding to each visible unit model through the above sub-steps, the model rendering system can group all visible unit models according to their determined fineness. For the unit models within the same fineness group, by judging whether their corresponding octree leaf nodes are sibling nodes in the tree structure or whether their spatial bounding boxes are adjacent, it is judged whether they are adjacent in position; for multiple unit models with the same fineness and adjacent in position, the model rendering system can merge them into a merged unit model.

[0057] Specifically, in this embodiment of the application, the model rendering system can perform a merging operation according to the following process, including: The vertex buffers and index buffers of each unit model are sequentially concatenated. At the concatenation boundary, duplicate vertices are detected and merged into a single vertex. Simultaneously, all affected face indices are updated to ensure correct model topology. Furthermore, for the merged large model, its average normal and other properties can be recalculated uniformly to achieve a smoother rendering effect. In one implementation, the simplification effect of merging according to the above method is as follows: Figure 5 As shown.

[0058] Step 15: Simplify the merged unit model obtained by performing Step 14 above, and render the simplified merged unit model.

[0059] In one implementation, the model rendering system can use an edge collapse algorithm to simplify the merged unit model, including: determining the edges contained in the merged unit model; for each edge of the merged unit model, determining the simplification cost of the edge based on the dot product of the position vector difference between the two endpoints of the edge and the normal vector; and selecting a target edge for collapse processing based on the simplification cost to complete the simplification of the merged unit model.

[0060] Specifically, in one implementation, the model rendering system can be simplified according to the following sub-steps, including: Sub-step 1501: Determine the edges contained in the merged unit model; Specifically, all unique edges can be extracted directly from the triangular facet index of the model.

[0061] Sub-step 1502: Calculate the simplified cost of each edge in parallel; In one implementation, for an edge e connecting vertices v1 and v2, its simplification cost can be determined according to the following formula [4]: [4] Where ||v1 - v2|| is the length of the edge, and n1·n2 is the dot product of the normal vectors of the two vertices.

[0062] Sub-step 1503: Based on the simplification cost, select target edges for collapse. A target simplification rate or cost threshold can be set, and the edges with the lowest cost are selected for collapse.

[0063] Sub-step 1504: Perform edge collapse operation.

[0064] For a selected edge (v1, v2), collapse it into a new vertex v. newThe position, normal, UV, and other properties of the new vertex can be obtained by linear interpolation of v1 and v2.

[0065] According to the new vertex v new Update the model topology so that all faces that were previously connected to v1 or v2 are now connected to v2 instead. new And delete the degenerate patches caused by the collapse.

[0066] After completing the simplification process by executing the above sub-steps, the model rendering system can bind the simplified final vertex data, index data, material and texture information to the WebGPU rendering pipeline, set the rendering state, bind the Uniform buffer, pass the camera matrix, lighting parameters, etc., submit drawing commands, and the WebGPU drives the GPU to complete the final rasterization and shading of the model, thereby completing the final rendering of the model to be rendered.

[0067] Using the model rendering method provided in this application embodiment, when model rendering is required, the model to be rendered can first be split to obtain at least two unit models corresponding to the model to be rendered. Based on the position information of each unit model, a spatial index structure is constructed. Visible unit models are selected from the spatial index structure according to camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined. Then, based on the spatial level, the refinement corresponding to each visible unit model is determined, and visible unit models with the same refinement and adjacent positions are merged to obtain a merged unit model. Finally, the merged unit model is simplified, and the simplified merged unit model is rendered. The model rendering method provided in this application has two advantages. First, by pre-dividing the model to be rendered into multiple unit models and constructing an efficient spatial index structure, the visible unit models can be quickly and accurately filtered and the non-visible unit models can be eliminated through the cooperation of the camera's view frustum and the spatial index structure during rendering, thereby greatly reducing the amount of data sent to the rendering pipeline. Second, based on the unit models and spatial index structure after model division, the method provided in this solution can independently determine the required level of detail for each local area according to the relative position and distance between the camera and the local area of ​​the model, and merge and simplify adjacent unit models of the same level of detail. This ensures that areas close to the camera and visually important maintain high detail, while areas far away or less visually important are reasonably simplified. While ensuring overall visual realism, the number of vertices and triangles required for rendering a single frame is effectively reduced, achieving the optimal balance between rendering quality and performance. By combining these two aspects, the rendering load on the GPU is fundamentally reduced, making it possible to render large-scale complex 3D models smoothly in real time on web pages or mobile devices, significantly improving the frame rate and reducing stuttering.

[0068] In one embodiment, this application also provides a model rendering apparatus to address the problems of existing model rendering schemes that focus on CPU-side scheduling and control, failing to fully utilize the parallel computing capabilities of the GPU. These schemes suffer from low rendering efficiency, unstable frame rates, and difficulty in supporting real-time interaction and high-quality visualization when processing large-scale models. A schematic diagram of the specific structure of this model rendering apparatus is shown below. Figure 6 As shown, it includes: a splitting unit 61, an index structure building unit 62, a filtering unit 63, a merging unit 64, and a rendering unit 65.

[0069] The splitting unit 61 is used to split the model to be rendered to obtain at least two unit models corresponding to the model to be rendered. The index structure construction unit 62 is used to construct a spatial index structure based on the position information of each unit model, and to determine the index identifier corresponding to each unit model based on the spatial index structure. The filtering unit 63 is used to filter visible unit models from the spatial index structure according to camera parameters, and determine the spatial level corresponding to each visible unit model in the spatial index structure. The merging unit 64 is used to determine the level of detail corresponding to each visible unit model according to the spatial hierarchy, and merge visible unit models with the same level of detail and adjacent positions to obtain a merged unit model. The rendering unit 65 is used to simplify the merged unit model and render the simplified merged unit model.

[0070] In one embodiment, the splitting unit 61 is specifically used for: acquiring vertex data of the model to be rendered; extracting at least two feature points corresponding to the model to be rendered based on the geometric distribution characteristics of the vertex data; using the feature points as initial cluster centers to cluster the vertex data to obtain at least two vertex clusters; and reconstructing each vertex cluster based on the original topology of the model to be rendered to obtain at least two unit models.

[0071] In one embodiment, the spatial index structure is an octree. The index structure construction unit 62 is specifically used to: determine the root node of the octree according to the position information of each unit model; divide the cube space corresponding to the root node into eight equally divided subspaces, and generate corresponding child nodes according to the subspaces; determine the child nodes corresponding to each unit model until the number of unit models contained in each child node meets the preset condition, and obtain the spatial index structure.

[0072] In one embodiment, the filtering unit 63 is specifically used for: obtaining the frustum parameters of the camera that captures the model to be rendered; traversing the spatial index structure and determining whether the subspace corresponding to each child node in the spatial index structure intersects with the frustum; and determining the unit model contained in the child node that intersects with the frustum as a visible unit model.

[0073] In one embodiment, the merging unit 64 is specifically used for: determining the distance between the camera and the subspace corresponding to the visible unit model; determining the ratio of the distance to the size corresponding to the subspace; and determining the level of detail corresponding to the visible unit model based on the ratio.

[0074] In one implementation, the merging unit 64 is specifically used for: determining the edges contained in the merging unit model; for each edge of the merging unit model, determining the simplification cost of the edge based on the dot product of the position vector difference between the two endpoints of the edge and the normal vector; and selecting a target edge for collapse processing based on the simplification cost to complete the simplification processing of the merging unit model.

[0075] Using the model rendering apparatus provided in this application embodiment, when model rendering is required, the model to be rendered can first be split to obtain at least two unit models corresponding to the model to be rendered. Based on the position information of each unit model, a spatial index structure is constructed. Visible unit models are selected from the spatial index structure according to camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined. Then, based on the spatial level, the refinement corresponding to each visible unit model is determined, and visible unit models with the same refinement and adjacent positions are merged to obtain a merged unit model. Finally, the merged unit model is simplified, and the simplified merged unit model is rendered. The model rendering apparatus provided in this application has two advantages. First, by pre-dividing the model to be rendered into multiple unit models and constructing an efficient spatial index structure, it enables the rapid and accurate filtering of visible unit models and the elimination of non-visible unit models during rendering through the cooperation of the camera's view frustum and the spatial index structure, thereby greatly reducing the amount of data sent to the rendering pipeline. Second, based on the unit models and spatial index structure after model division, the method provided in this solution can independently determine the required level of detail for each local area according to the relative position and distance between the camera and the local area of ​​the model, and merge and simplify adjacent unit models of the same level of detail. This ensures that areas close to the camera and visually important maintain high detail, while areas far away or less visually important are reasonably simplified. While ensuring overall visual realism, it effectively reduces the number of vertices and triangles required for rendering a single frame, achieving the optimal balance between rendering quality and performance. By combining these two aspects, the rendering load on the GPU is fundamentally reduced, making it possible to render large-scale complex 3D models smoothly in real time on web pages or mobile devices, significantly improving the frame rate and reducing stuttering.

[0076] Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 7 At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0077] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0078] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0079] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a model rendering device at the logical level. The processor executes the program stored in memory and specifically performs the following operations: The model to be rendered is split into at least two unit models corresponding to the model to be rendered; a spatial index structure is constructed based on the position information of each unit model, and the index identifier corresponding to each unit model is determined based on the spatial index structure; visible unit models are filtered from the spatial index structure according to camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined; the refinement corresponding to each visible unit model is determined based on the spatial level, and visible unit models with the same refinement and adjacent positions are merged to obtain a merged unit model; the merged unit model is simplified, and the simplified merged unit model is rendered.

[0080] The above is as stated in this application. Figure 7The method for model rendering electronic devices disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0081] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0082] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device including multiple applications, enable the portable electronic device to perform... Figure 1 The model rendering method shown in the embodiment is specifically used to perform the following operations: The model to be rendered is split into at least two unit models corresponding to the model to be rendered; a spatial index structure is constructed based on the position information of each unit model, and the index identifier corresponding to each unit model is determined based on the spatial index structure; visible unit models are filtered from the spatial index structure according to camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined; the refinement corresponding to each visible unit model is determined based on the spatial level, and visible unit models with the same refinement and adjacent positions are merged to obtain a merged unit model; the merged unit model is simplified, and the simplified merged unit model is rendered.

[0083] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0089] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0091] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A model rendering method, characterized in that, include: The model to be rendered is split to obtain at least two unit models corresponding to the model to be rendered. Based on the location information of each unit model, a spatial index structure is constructed; Visible unit models are selected from the spatial index structure based on camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined. Based on the spatial hierarchy, the level of detail corresponding to each visible unit model is determined, and visible unit models with the same level of detail and adjacent positions are merged to obtain a merged unit model. The merged unit model is simplified, and the simplified merged unit model is rendered.

2. The method according to claim 1, characterized in that, The process of splitting the model to be rendered to obtain at least two unit models corresponding to the model to be rendered specifically includes: Obtain the vertex data of the model to be rendered; Based on the geometric distribution characteristics of the vertex data, extract at least two feature points corresponding to the model to be rendered; Using the feature points as initial cluster centers, the vertex data is clustered to obtain at least two vertex clusters; Based on the original topology of the model to be rendered, each vertex cluster is reconstructed to obtain at least two unit models.

3. The method according to claim 1, characterized in that, If the spatial index structure is an octree, then the construction of the spatial index structure specifically includes: The root node of the octree is determined based on the position information of each unit model. The cube space corresponding to the root node is divided into eight equally divided subspaces, and corresponding child nodes are generated according to the subspaces. The child nodes corresponding to each unit model are determined until the number of unit models contained in each child node meets the preset conditions, thus obtaining the spatial index structure.

4. The method according to claim 3, characterized in that, The step of filtering visible unit models from the spatial index structure based on camera parameters specifically includes: Obtain the view frustum parameters of the camera that captured the model to be rendered; Traverse the spatial index structure and determine whether the subspace corresponding to each child node in the spatial index structure intersects with the view frustum; The element models contained in the child nodes that intersect with the view frustum are determined as visible element models.

5. The method according to claim 4, characterized in that, The step of determining the level of detail corresponding to each visible unit model based on the spatial hierarchy specifically includes: Determine the distance between the camera and the subspace corresponding to the visible unit model; Determine the ratio of the distance to the corresponding size of the subspace; The level of detail corresponding to the visible unit model is determined based on the stated ratio.

6. The method according to claim 1, characterized in that, The simplification process for the merged unit model specifically includes: Determine the edges contained in the merged unit model; For each edge of the merged unit model, the simplification cost of the edge is determined based on the dot product of the position vector difference between the two endpoints of the edge and the normal vector. Based on the simplification cost, target edges are selected for collapse processing to complete the simplification of the merged unit model.

7. A model rendering device, characterized in that, include: A split unit is used to split the model to be rendered, so as to obtain at least two unit models corresponding to the model to be rendered. An index structure construction unit is used to construct a spatial index structure based on the location information of each unit model, and to determine the index identifier corresponding to each unit model based on the spatial index structure. The filtering unit is used to filter visible unit models from the spatial index structure according to camera parameters, and to determine the spatial level corresponding to each visible unit model in the spatial index structure. The merging unit is used to determine the level of detail corresponding to each visible unit model according to the spatial hierarchy, and merge visible unit models with the same level of detail and adjacent positions to obtain a merged unit model. A rendering unit is used to simplify the merged unit model and render the simplified merged unit model.

8. A model rendering device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the following operations: The model to be rendered is split to obtain at least two unit models corresponding to the model to be rendered. Based on the location information of each unit model, a spatial index structure is constructed, and based on the spatial index structure, the index identifier corresponding to each unit model is determined respectively; Visible unit models are selected from the spatial index structure based on camera parameters, and the spatial level corresponding to each visible unit model in the spatial index structure is determined. Based on the spatial hierarchy, the level of detail corresponding to each visible unit model is determined, and visible unit models with the same level of detail and adjacent positions are merged to obtain a merged unit model. The merged unit model is simplified, and the simplified merged unit model is rendered.

9. A computer-readable storage medium storing one or more programs, which, when executed by an electronic device including a plurality of applications, cause the electronic device to perform the model rendering method as described in any one of claims 1-6.

10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the model rendering method as described in any one of claims 1-6.