Industrial model rendering method and device, medium and program product

By splitting primitive types and performing three-stage cascaded culling on industrial models, combined with magnification and mesh shader processing, the problems of low memory usage and GPU utilization in industrial model rendering are solved, achieving efficient and infinitely precise model display.

CN121962384APending Publication Date: 2026-05-01BEIJING GLORY PKPM TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING GLORY PKPM TECH CO LTD
Filing Date
2026-01-16
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing industrial model rendering methods have multiple bottlenecks in terms of high precision, high efficiency, and stable support for large-scale models, including high memory usage, large CPU computation, low GPU utilization, and insufficient visibility culling.

Method used

By obtaining the primitive type of the industrial model, it is split into initial parametric mesh pieces and subjected to three cascaded culling using an amplified shader. Combined with a mesh shader for fine-grained culling and discretization, the industrial model is rendered.

Benefits of technology

It reduces the memory usage of industrial software, improves the utilization of GPU computing power, enhances overall display performance, and supports infinite precision display and efficient iterative feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962384A_ABST
    Figure CN121962384A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses an industrial model rendering method and device, a medium and a program product. The method comprises the steps of obtaining a primitive type corresponding to an industrial model, splitting the industrial model according to the primitive type, and obtaining each initial parameterized grid piece and corresponding control point data; performing three-cascade elimination on each initial parameterized grid piece according to the control point data through an amplification shader, obtaining a target parameterized grid piece, performing drawing instruction distribution on the target parameterized grid piece, and obtaining each target thread unit corresponding to the target parameterized grid piece and a drawing instruction corresponding to each target thread unit; and through each target thread unit, performing discrete processing on the target parameterized grid piece according to the corresponding drawing instruction based on the grid shader to obtain triangular grid data. The occupation of a video memory in industrial software can be reduced, refined elimination and infinite precision display of a single entity are realized, and the utilization rate of GPU computing power by the industrial software can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

An industrial model rendering method, device, medium, and program product. Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an industrial model rendering method, device, medium, and program product. Background Technology

[0002] The core idea of ​​meshlet technology is to divide a 3D model into smaller geometric units, consisting of a small number of vertices and triangles, called meshlets, in order to improve rendering efficiency and optimize performance, and better adapt to the parallel processing capabilities of modern graphics processing units (GPUs).

[0003] Currently, existing industrial model rendering methods typically employ frustum culling and Levels of Detail (LOD) techniques for real-time rendering of massive amounts of high-precision models. However, the design goal of frustum culling and LOD technology is to render massive static geometry in real time. In industrial software design environments, it is difficult to adapt to the core requirements of "high precision, high efficiency, and stable support for large-scale models," and it has multiple bottlenecks: First, the solution based on high-precision static triangular meshes suffers from excessive memory usage due to the massive amount of vertex and index data. It is also limited by the discrete approximation characteristics of triangular meshes for continuous geometry, resulting in inherent fitting errors and an inability to support infinite precision, making it difficult to meet the needs of industrial-grade fine-grained expression. Second, the geometric discretization method relying on the central processing unit (CPU) not only causes stuttering during loading due to the large amount of computation, but also increases memory usage when the discretized data is transmitted to the GPU via bandwidth. Furthermore, the serial waiting between the CPU and GPU significantly reduces GPU utilization. Third, the visibility culling is insufficient, failing to achieve fine-grained filtering. A large number of invisible primitives cause invalid GPU rendering, resulting in low frame rates and stuttering when displaying large-scale models, which is out of sync with the workflow requirements of "efficient iteration and real-time feedback" in industrial design. Summary of the Invention

[0004] This invention provides an industrial model rendering method, device, medium, and program product, which can reduce the memory usage of industrial software, achieve fine-grained culling of single entities and infinite precision display, improve the utilization rate of GPU computing power in industrial software, and enhance the overall display performance of industrial software.

[0005] According to one aspect of the present invention, an industrial model rendering method is provided, comprising:

[0006] Obtain the primitive type corresponding to the industrial model, and split the industrial model according to the primitive type to obtain the initial parameterized mesh pieces and corresponding control point data;

[0007] By amplifying the shader, the initial parameterized meshes are cascaded three times according to the control point data to obtain the target parameterized meshes, and drawing instructions are assigned to the target parameterized meshes to obtain the target thread units corresponding to the target parameterized meshes and the drawing instructions corresponding to each target thread unit.

[0008] Each target thread unit performs discrete processing on the target parameterized mesh patch based on the mesh shader according to the corresponding drawing instructions to obtain triangular mesh data, and renders the industrial model based on the triangular mesh data.

[0009] According to another aspect of the present invention, an industrial model rendering apparatus is provided, comprising:

[0010] The industrial model splitting module is used to obtain the primitive type corresponding to the industrial model, and split the industrial model according to the primitive type to obtain the initial parametric mesh pieces and the corresponding control point data.

[0011] The drawing instruction allocation module is used to perform three cascaded culling of each initial parameterized mesh piece according to the control point data through the amplified shader to obtain the target parameterized mesh piece, and to allocate drawing instructions to the target parameterized mesh piece to obtain each target thread unit corresponding to the target parameterized mesh piece, and the drawing instructions corresponding to each target thread unit.

[0012] The mesh discretization module is used to discretize the target parameterized mesh according to the corresponding drawing instructions through each target thread unit, based on the mesh shader, to obtain triangular mesh data, and to render the industrial model based on the triangular mesh data.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the industrial model rendering method according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program for causing a processor to execute and implement the industrial model rendering method according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the industrial model rendering method described in any embodiment of the present invention.

[0019] The technical solution of this invention involves obtaining the primitive type corresponding to the industrial model, splitting the industrial model according to the primitive type, and obtaining initial parametric mesh pieces and corresponding control point data. Using an amplifying shader, each initial parametric mesh piece undergoes three cascaded culling operations based on the control point data to obtain target parametric mesh pieces. Drawing instructions are then allocated to the target parametric mesh pieces to obtain each target thread unit corresponding to the target parametric mesh piece, as well as the drawing instructions corresponding to each target thread unit. Through each target thread unit, the target parametric mesh pieces are discretized based on the corresponding drawing instructions using a mesh shader to obtain triangular mesh data. The industrial model is then rendered based on the triangular mesh data. By combining the Meshlet technology concept, splitting the industrial model according to the primitive type, and employing amplifying shaders and mesh shaders from modern graphics pipelines, fine-grained culling, drawing instruction allocation, and mesh piece discretization are performed on the GPU based on control point data. This reduces the GPU memory usage in industrial software, achieves fine-grained culling of single entities and infinite-precision display, improves the utilization rate of GPU computing power in industrial software, and enhances the overall display performance of industrial software.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 is a flowchart of an industrial model rendering method according to Embodiment 1 of the present invention;

[0023] Figure 2 is a schematic diagram of the splitting effect of different primitive types according to Embodiment 1 of the present invention;

[0024] Figure 3 is a schematic diagram of the splitting effect of different primitive types according to Embodiment 1 of the present invention;

[0025] Figure 4 is a schematic diagram of parameterized Meshlet segmentation provided according to Embodiment 1 of the present invention;

[0026] Figure 5 is a flowchart of an industrial model rendering method provided according to Embodiment 2 of the present invention;

[0027] Figure 6 is a schematic diagram of a three-stage cascaded elimination provided according to Embodiment 2 of the present invention;

[0028] Figure 7 is a flowchart illustrating the drawing instruction allocation method provided in Embodiment 2 of the present invention;

[0029] Figure 8 is a flowchart of another industrial model rendering method provided according to Embodiment 2 of the present invention;

[0030] Figure 9 is a structural schematic diagram of an industrial model rendering device provided according to Embodiment 3 of the present invention;

[0031] Figure 10 is a schematic diagram of the structure of an electronic device that implements the industrial model rendering method of this invention. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first," "second," "modification," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] Example 1

[0035] Figure 1 is a flowchart of an industrial model rendering method provided in Embodiment 1 of the present invention. This embodiment is applicable to industrial model rendering in an industrial software design environment. The method can be executed by an industrial model rendering device, which can be implemented in hardware and / or software. Typically, the industrial model rendering device can be configured in an electronic device, such as a computer device or a server. As shown in Figure 1, the method includes:

[0036] S110. Obtain the primitive type corresponding to the industrial model, and split the industrial model according to the primitive type to obtain the initial parameterized mesh pieces and corresponding control point data.

[0037] The industrial model can be a parametric representation of an industrial software design to be rendered. In this embodiment, the industrial model can be divided into various types of parametric primitives that can be decomposed into parametric meshlets, based on their respective representation methods. Specifically, after obtaining the current industrial model, its corresponding parametric features can be extracted, and the primitive type corresponding to the industrial model can be obtained based on the preset mapping relationship between parametric features and primitive types, as well as the currently extracted parametric features.

[0038] In this embodiment, a mapping relationship between primitive types and basic types can be pre-defined. After determining the current primitive type, the matching basic type can be determined by searching the pre-defined mapping relationship. Then, the industrial model is split based on this basic type to obtain the initial parametric mesh patch of the corresponding basic type. The parametric mesh patch can be a split region represented parametrically using control point data. The basic type can include polygons, Bezier surfaces, and circles, etc. For each initial parametric mesh patch after splitting, key control points can be extracted and parametrically represented to obtain the corresponding control point data. A corresponding control point extraction method can be pre-defined for each basic type of parametric mesh patch.

[0039] Optionally, splitting the industrial model according to the primitive type to obtain initial parametric mesh patches and corresponding control point data may include:

[0040] Based on the primitive type, a splitting strategy is obtained, and the industrial model is split based on the splitting strategy to obtain each initial parameterized mesh piece and its corresponding primitive type;

[0041] Based on the primitive type, obtain the control point data corresponding to each of the initial parameterized mesh patches.

[0042] In this embodiment, a differentiated splitting strategy can be adopted for different primitive types. The splitting strategies corresponding to different primitive types can be the same or different. The splitting strategy is used to limit the primitive types that can be split. Specifically, a mapping relationship between primitive types and splitting strategies is preset. When the current primitive type is obtained, the current splitting strategy is determined by looking up the preset mapping relationship, and the industrial model is split according to the splitting strategy to obtain initial parametric mesh patches of various primitive types.

[0043] Then, based on the current primitive type and the preset mapping relationship between primitive types and control point extraction methods, the control point extraction method corresponding to each initial parametric mesh is determined. Finally, based on the determined control point extraction method, control points are extracted for each initial parametric mesh to obtain the corresponding control point data. For example, the initial parametric mesh of a polygon can extract vertex coordinates as control point data; the initial parametric mesh of a Bezier surface can extract the vertex coordinates and weight information of the surface control mesh as control point data; the initial parametric mesh of a circle can extract the center, radius, and boundary sampling point coordinates as control point data; and the initial parametric mesh of a quadrilateral can extract the coordinates of the four vertices and the stretching direction vector as control point data. All control point data is aggregated and stored in a vertex buffer (VBuffer) that can be directly accessed by the GPU, and associated with metadata such as primitive type and topological constraint relationship.

[0044] Optionally, primitive types can include polyhedra, spheres, tori, cylinders, cones, frustums, and / or extruded bodies. Based on the construction logic of the industrial model, these can be categorized into seven primitive types: polyhedra, spheres, tori, cylinders, cones, frustums, and extruded bodies. The core parameters for each primitive type are predetermined, such as the center coordinates and radius of a sphere, and the path curve and cross-sectional shape of an extruded body. The decomposition strategies corresponding to different primitive types are shown in Table 1. The polyhedron is divided into n polygonal meshlets based on the relationship between its face groups. Spheres and tori are divided into n Bezier surface meshlets based on latitude and longitude lines. Cones are divided into n Bezier surface meshlets and one circular meshlet. Cylinders and frustums are divided into n Bezier surface meshlets and two circular meshlets (top and bottom faces). Extruded bodies are divided into n polygonal meshlets along the extrusion path, ensuring uniform spatial distribution and continuous boundaries for each meshlet. The splitting effects for different primitive types are shown in Figures 2 and 3. Taking a sphere as an example, the parametric meshlet segmentation is illustrated in Figure 4, where control points are used to parametrically represent the meshlets.

[0045] Table 1. Splitting strategies for different primitive types

[0046]

[0047] S120. Using an amplified shader, the initial parameterized meshes are cascaded and eliminated three times based on the control point data to obtain target parameterized meshes. Drawing instructions are assigned to the target parameterized meshes to obtain each target thread unit corresponding to the target parameterized meshes and the drawing instructions corresponding to each target thread unit.

[0048] To further optimize culling efficiency and reduce subsequent invalid meshlet discretization and rendering costs, this embodiment performs three cascaded culling checks during the Amplification Shader (AS) preprocessing of the initial parametric meshes. These three cascaded culling checks are, in sequence, clip space culling, backface culling, and normalized device coordinate (NDC) space sub-pixel culling. Specifically, the AS reads the control point data of each initial parametric mesh from the VBuffer, and based on this control point data, performs three fine-grained culling checks on the GPU to accurately select visible meshes as target parametric meshes. Then, the number of idle thread units and the meshlet discretization precision requirement are obtained. Based on this precision requirement and the preset correspondence between the precision requirement and the number of triangle discretizations, the current number of triangle discretizations is obtained. Next, based on the number of idle thread units, the current number of triangle discretizations is evenly distributed among the idle thread units to obtain the discretization range corresponding to each idle thread unit. Finally, the idle thread unit is used as the target thread unit, and drawing instructions corresponding to each target thread unit are generated according to the determined discrete range. These drawing instructions may include information such as the primitive type, control point index, and discrete range of the target parameterized mesh.

[0049] S130. Through each target thread unit, the target parameterized mesh patch is discretized according to the corresponding drawing instructions based on the mesh shader to obtain triangular mesh data, and the industrial model is rendered according to the triangular mesh data.

[0050] In this embodiment, after receiving the corresponding drawing instruction, the target thread unit can call the Mesh Shader (MS) to perform real-time discretization of the target parameterized mesh patch based on the drawing instruction, directly generating triangular mesh data for rasterization. Specifically, when performing real-time discretization, the MS first parses the drawing instruction to obtain information such as primitive type, control point index, and discretization range, and reads the corresponding control point data and related information such as topological constraints from the VBuffer according to the control point index. Then, it can obtain the current discretization algorithm based on the current primitive type and the preset mapping relationship between primitive type and discretization algorithm. Finally, based on the current discretization algorithm, it can discretize the target parameterized mesh patch according to the control point data, topological constraints, and discretization range to obtain triangular mesh data. This embodiment does not specifically limit the discretization algorithm.

[0051] The triangular mesh data, which may include vertex coordinates and normals of the triangle faces, is cached within the GPU and then directly output to the rasterization stage without CPU intervention. Simultaneously, it ensures that the discrete data format meets the processing requirements of the subsequent pixel shader, providing complete geometric data support for the final rendering. Rendering industrial models based on triangular mesh data is an existing technology, and this embodiment does not impose specific limitations on it.

[0052] The technical solution of this invention involves obtaining the primitive type corresponding to the industrial model, splitting the industrial model according to the primitive type, and obtaining initial parametric mesh pieces and corresponding control point data. Using an amplifying shader, each initial parametric mesh piece undergoes three cascaded culling operations based on the control point data to obtain target parametric mesh pieces. Drawing instructions are then allocated to the target parametric mesh pieces to obtain each target thread unit corresponding to the target parametric mesh piece, as well as the drawing instructions corresponding to each target thread unit. Through each target thread unit, the target parametric mesh pieces are discretized based on the corresponding drawing instructions using a mesh shader to obtain triangular mesh data. The industrial model is then rendered based on the triangular mesh data. By combining the Meshlet technology concept, splitting the industrial model according to the primitive type, and employing amplifying shaders and mesh shaders from modern graphics pipelines, fine-grained culling, drawing instruction allocation, and mesh piece discretization are performed on the GPU based on control point data. This reduces the GPU memory usage in industrial software, achieves fine-grained culling of single entities and infinite-precision display, improves the utilization rate of GPU computing power in industrial software, and enhances the overall display performance of industrial software.

[0053] Example 2

[0054] Figure 5 is a flowchart of an industrial model rendering method provided in Embodiment 2 of the present invention. This embodiment is a further refinement of the above technical solution, and the technical solution in this embodiment can be combined with one or more of the above implementation methods. As shown in Figure 5, the method includes:

[0055] S210. Obtain the primitive type corresponding to the industrial model, and split the industrial model according to the primitive type to obtain the initial parameterized mesh pieces and corresponding control point data.

[0056] S220. Using an amplified shader, an initial bounding box corresponding to each of the initial parametric mesh pieces is generated based on the control point data. A clipping space is generated based on the initial bounding box. Based on the clipping space, each of the initial parametric mesh pieces is initially culled to obtain each candidate parametric mesh piece.

[0057] In this embodiment, the three-stage cascaded culling can be illustrated as shown in Figure 6. First, clipping space culling is performed. Specifically, the AS (Automatic System) first automatically generates an axis-aligned bounding box (AABB) corresponding to the initial parametric mesh based on the control point data, serving as the initial bounding box. Then, it reads the model matrix (M matrix), view matrix (V matrix), and projection matrix (P matrix) from the CBuffer, and transforms the coordinates of each corner point of the initial bounding box to the clipping space based on the read matrices. Next, by comparing the xyz values ​​of the corner points with the homogeneous coordinate w values, initial parametric meshes completely outside the clipping space are directly culled, while partially or fully visible initial parametric meshes are retained as candidate parametric meshes.

[0058] S230. Based on the control point data, obtain the control point normal vector corresponding to each candidate parameterized mesh patch, and perform visual space transformation on the control point normal vector to obtain the transformed normal vector.

[0059] Next, after the initial clipping space culling is completed, backface culling is performed. Specifically, first, the control point normal vectors corresponding to the candidate parametric mesh patches are extracted, and then transformed to the View space using the V matrix to obtain the transformed normal vectors.

[0060] S240. Calculate the angle between the transformed normal vector and the viewing direction, and perform secondary elimination on each candidate parameterized mesh according to the angle to obtain each intermediate parameterized mesh.

[0061] Then, calculate the angle between the transformation normal vector and the viewing direction, and determine whether the angle is greater than 90 degrees. If it is, it means that the back of the current candidate parametric mesh is facing the camera, so the current candidate parametric mesh is directly deleted; otherwise, the current candidate parametric mesh is retained and used as an intermediate parametric mesh, so that only the effective parametric mesh facing the front is retained.

[0062] S250. Convert the initial bounding box corresponding to each of the intermediate parameterized mesh pieces to the standardized device coordinate space, obtain the standard space bounding box, and obtain the screen projection area corresponding to the standard space bounding box.

[0063] Finally, NDC space sub-pixel culling is performed. Specifically, based on the spatial transformation matrix, the initial bounding box corresponding to the intermediate parameterized mesh patch is transformed to NDC space to obtain the standard bounding box. Then, based on the center point coordinates of the standard bounding box, as well as parameters such as screen resolution and camera distance, the screen projection area corresponding to the standard bounding box is calculated.

[0064] S260. Based on the screen projection area, each intermediate parameterized mesh is culled three times to obtain a target parameterized mesh. Drawing instructions are assigned to the target parameterized mesh, and each target thread unit corresponding to the target parameterized mesh and the drawing instructions corresponding to each target thread unit are obtained.

[0065] Finally, it is determined whether the screen projection area is less than a preset threshold (such as 1 pixel). If so, the current intermediate parameterized mesh is identified as a sub-pixel-level invisible meshlet and discarded; otherwise, it is retained. In this way, the final target parameterized meshlet can be obtained, which can be passed to the subsequent drawing instruction allocation stage through the payload.

[0066] Optionally, allocating drawing instructions to the target parameterized mesh patch and obtaining each target thread unit corresponding to the target parameterized mesh patch, as well as the drawing instructions corresponding to each target thread unit, may include:

[0067] Based on the screen projection area and the mapping relationship between the preset projection area range and the multi-level of detail, the multi-level of detail corresponding to the target parameterized mesh is obtained, and based on the multi-level of detail, the number of discrete triangles corresponding to the target parameterized mesh is obtained.

[0068] Based on the number of discrete triangles and the preset number of triangles, obtain each target thread unit corresponding to the target parameterized mesh patch, and the drawing instruction corresponding to each target thread unit.

[0069] In this embodiment, for the target parameterized mesh after cascaded culling, drawing instructions can be allocated based on full GPU thread load. The flow of the drawing instruction allocation method is shown in Figure 7. Specifically, a mapping relationship between the projected area range and the LOD level can be preset. For example, a projected area > 100 pixels corresponds to LOD0, 50-100 pixels corresponds to LOD1, etc. After obtaining the screen projected area of ​​the target parameterized mesh, the LOD level corresponding to the target parameterized mesh can be determined by judging which projected area range the screen projected area falls into, thereby clarifying the corresponding discrete precision requirements.

[0070] Next, based on the determined LOD level and the preset correspondence between LOD level and the number of discrete triangles, the number of discrete triangles corresponding to the target parameterized mesh patch can be determined. For example, the correspondence between LOD level and the number of discrete triangles can be that a higher LOD level (details first) corresponds to a larger number of discrete triangles, and a lower LOD level (performance first) corresponds to a smaller number of discrete triangles, ensuring that the discretization results meet accuracy requirements while controlling computational load.

[0071] The preset number of triangles can be determined according to the MS hardware paradigm, typically 85 (255 vertices). Specifically, the discrete number of triangles can be divided by the preset number of triangles to obtain the quotient, which is then used as the number of thread units to allocate. A corresponding number of thread units are randomly selected from the available thread units as target thread units. Next, the discrete number of triangles is allocated within each target thread unit, determining the discrete number range for each target thread unit as the discrete range. Finally, drawing instructions corresponding to each target thread unit can be generated based on the determined discrete range.

[0072] AS can call the DispatchMesh interface to allocate drawing instructions to the GPU Warp thread, specify the discrete range, control point index and output target buffer of each thread unit, ensure that the GPU thread runs at full load and avoids wasting computing power.

[0073] Optionally, based on the number of discrete triangles and a preset number of triangles, obtaining each target thread unit corresponding to the target parameterized mesh patch, and the drawing instruction corresponding to each target thread unit, may include:

[0074] Based on the number of discrete triangles and the preset number of triangles, the discrete task of the target parameterized mesh patch is divided into multiple standard tasks, and the discrete range corresponding to each standard task is obtained.

[0075] Obtain each idle thread unit, and allocate each standard task in each idle thread unit; obtain each target thread unit corresponding to the target parameterized mesh piece, and the target standard task corresponding to each target thread unit.

[0076] Based on the target standard task corresponding to each target thread unit and the discrete range corresponding to each standard task, a drawing instruction corresponding to each target thread unit is generated.

[0077] In this embodiment, a preset number of triangles is used as a standard task. This allows the discrete task of the target parameterized mesh patch, originally corresponding to a discrete number of triangles, to be split into standard tasks corresponding to the preset number of triangles. Simultaneously, the discrete range corresponding to each standard task can be determined based on the order of splitting. Next, idle thread units are selected from all thread units based on their load. Further, the standard tasks of all target parameterized mesh patches are evenly distributed among the idle thread units, resulting in target thread units for each target parameterized mesh patch and the target standard tasks assigned to each target thread unit. Finally, based on the target standard tasks corresponding to each target thread unit and the discrete range corresponding to each standard task, the discrete range corresponding to each target thread unit is determined. Combining the discrete range, primitive type, LOD level, control point index, and other information, the drawing instructions corresponding to the target thread unit are generated.

[0078] The advantage of the above settings is that they can improve thread utilization and computing power utilization.

[0079] S270. Through each target thread unit, the target parameterized mesh patch is discretized according to the corresponding drawing instructions based on the mesh shader to obtain triangular mesh data, and the industrial model is rendered according to the triangular mesh data.

[0080] Optionally, by using each target thread unit to discretize the target parameterized mesh patch according to the corresponding drawing instructions based on the mesh shader, and obtaining triangular mesh data, the following may be included:

[0081] Based on the primitive type corresponding to the target parameterized mesh, the discretization strategy corresponding to the target parameterized mesh is obtained. Then, through each target thread unit, the target parameterized mesh is discretized according to the corresponding drawing instructions and discretization strategy based on the mesh shader to obtain triangular mesh data.

[0082] In this embodiment, the MS can execute a targeted discretization strategy based on the primitive type corresponding to the target parameterized mesh patch. Specifically, for polygonal target parameterized mesh patches, triangulation algorithms are used to generate triangular faces according to the vertex order; for circular target parameterized mesh patches, uniformly distributed triangular faces are generated based on the sampling density corresponding to the center, radius, and LOD; for quadrilateral target parameterized mesh patches, they are directly split into two triangular faces; for Bezier surface target parameterized mesh patches, a surface subdivision algorithm is executed according to the control point positions and weight constraints to generate triangular faces according to the current discretization range, ensuring surface smoothness.

[0083] The technical solution of this invention involves using an amplified shader to generate initial bounding boxes corresponding to each of the initial parametric mesh pieces based on the control point data. A clipping space is then generated based on the initial bounding boxes, and the initial parametric mesh pieces are initially culled based on the clipping space to obtain candidate parametric mesh pieces. Next, the control point normal vectors corresponding to each candidate parametric mesh piece are obtained based on the control point data, and these control point normal vectors are transformed in visual space to obtain transformed normal vectors. The angle between the transformed normal vector and the viewing direction is calculated, and the candidate parametric mesh pieces are then culled a second time based on this angle to obtain intermediate parametric mesh pieces. Meshlets; the initial bounding boxes corresponding to each intermediate parameterized meshlet are transformed to normalized device coordinate space to obtain standard bounding boxes, and the screen projection area corresponding to the standard bounding boxes is obtained; each intermediate parameterized meshlet is culled three times according to the screen projection area to obtain target parameterized meshlets, and drawing instructions are allocated to the target parameterized meshlets to obtain each target thread unit corresponding to the target parameterized meshlet, and the drawing instructions corresponding to each target thread unit; by performing three meshlet-level culling, the pipeline transmission of invalid primitives can be significantly reduced, and the effective utilization of the GPU can be improved.

[0084] In one specific implementation of this embodiment, the process of the industrial model rendering method can be shown in Figure 8. Specifically, on the CPU side, the industrial model is decomposed, the parametric solid model is broken down into parametric meshlets, and the corresponding control points are extracted. Then, on the GPU side, the ActionScript (AS) performs three cascaded culling operations on the initial parametric meshlets and allocates drawing instructions. The Rendering Studio (MS) then performs real-time discretization of the visible meshlets according to the drawing instructions, directly generating triangular mesh data.

[0085] In this invention, (1) the parametric representation reduces memory usage and bandwidth, thereby increasing the capacity of industrial software: Traditional techniques rely on static triangular meshes to store geometric data, which requires a large amount of memory and puts a heavy burden on bandwidth transmission. This invention uses key control points to parametrically represent Meshlets, requiring only lightweight parameter data such as control points and primitive types to be stored, without the need to pre-store complete triangular meshes, thus significantly reducing memory usage and data transmission volume. At the same time, the volume of parametric data is much smaller than that of static meshes, reducing bandwidth consumption between the CPU and GPU, allowing industrial software to support larger model sets and avoiding storage and transmission bottlenecks caused by excessive data volume.

[0086] (2) Real-time discretization of Meshlets based on parameterized entities, requiring no preprocessing, offering greater flexibility and display accuracy: Existing technologies require preprocessing such as cluster segmentation and LOD generation, necessitating recalculation after dynamic modifications, and their accuracy is limited by triangular mesh fitting errors. This invention performs real-time discretization operations on parameterized Meshlets via Mesh Shader on the GPU, eliminating the need for offline preprocessing, and allowing for immediate refresh of the display after design parameter modifications. Furthermore, the discretization accuracy can be dynamically adjusted via LOD, theoretically supporting infinite precision display, accurately matching the high-precision requirements of industrial software for geometric shapes, and avoiding the accuracy loss caused by static meshes.

[0087] (3) Supports entity-level culling for better display efficiency: Traditional industrial software has insufficient culling strength, resulting in excessive invalid GPU rendering, low frame rate, and operation lag. This invention performs three cascaded culling processes in the Amplification Shader (clipping space visibility culling, view space backface culling, and NDC space subpixel culling), directly filtering visible meshlets on the GPU side, significantly reducing invalid primitives entering the subsequent rendering pipeline. Meshlet-level fine-grained culling accurately filters invisible content, reduces the pressure of invalid GPU rendering, significantly improves the display frame rate of large-scale models, and avoids operation lag.

[0088] (4) Fully utilizes the characteristics of modern GPU hardware paradigm to improve GPU utilization and rendering efficiency: Traditional technology relies on CPU discrete geometry, resulting in low GPU utilization and bandwidth limitations. This invention adopts the modern graphics pipeline architecture of Amplification Shader and Mesh Shader, completing the processes of segmentation, culling, discretization, and rendering entirely on the GPU, reducing the collaborative overhead between the CPU and GPU. At the same time, based on the characteristics of GPU Warp threads, drawing instructions are allocated in groups of 85 triangles (255 vertices) to ensure that the GPU threads run at full load, maximizing the utilization of GPU parallel computing capabilities, solving the problem of insufficient GPU utilization in traditional technology, and significantly improving the overall rendering efficiency of industrial software.

[0089] Example 3

[0090] Figure 9 is a schematic diagram of an industrial model rendering device provided in Embodiment 3 of the present invention. As shown in Figure 9, the device includes: an industrial model splitting module 310, a drawing instruction allocation module 320, and a mesh discretization module 330; wherein,

[0091] The industrial model splitting module 310 is used to obtain the primitive type corresponding to the industrial model, and split the industrial model according to the primitive type to obtain each initial parametric mesh piece and the corresponding control point data.

[0092] The drawing instruction allocation module 320 is used to perform three cascaded eliminations on each initial parameterized mesh piece according to the control point data through the amplified shader to obtain the target parameterized mesh piece, and to allocate drawing instructions to the target parameterized mesh piece to obtain each target thread unit corresponding to the target parameterized mesh piece, and the drawing instructions corresponding to each target thread unit.

[0093] The mesh discretization module 330 is used to discretize the target parameterized mesh according to the corresponding drawing instructions through each target thread unit, based on the mesh shader, to obtain triangular mesh data, and to render the industrial model based on the triangular mesh data.

[0094] The technical solution of this invention involves obtaining the primitive type corresponding to the industrial model, splitting the industrial model according to the primitive type, and obtaining initial parametric mesh pieces and corresponding control point data. Using an amplifying shader, each initial parametric mesh piece undergoes three cascaded culling operations based on the control point data to obtain target parametric mesh pieces. Drawing instructions are then allocated to the target parametric mesh pieces to obtain each target thread unit corresponding to the target parametric mesh piece, as well as the drawing instructions corresponding to each target thread unit. Through each target thread unit, the target parametric mesh pieces are discretized based on the corresponding drawing instructions using a mesh shader to obtain triangular mesh data. The industrial model is then rendered based on the triangular mesh data. By combining the Meshlet technology concept, splitting the industrial model according to the primitive type, and employing amplifying shaders and mesh shaders from modern graphics pipelines, fine-grained culling, drawing instruction allocation, and mesh piece discretization are performed on the GPU based on control point data. This reduces the GPU memory usage in industrial software, achieves fine-grained culling of single entities and infinite-precision display, improves the utilization rate of GPU computing power in industrial software, and enhances the overall display performance of industrial software.

[0095] Optionally, the industrial model splitting module 310 is specifically used to obtain a splitting strategy according to the primitive type, and split the industrial model based on the splitting strategy to obtain each initial parameterized mesh piece and the corresponding primitive type.

[0096] Based on the primitive type, obtain the control point data corresponding to each of the initial parameterized mesh patches.

[0097] Optional primitive types include polyhedra, spheres, tori, cylinders, cones, frustums, and / or extruded bodies.

[0098] Optionally, the drawing instruction allocation module 320 is specifically used to generate an initial bounding box corresponding to each of the initial parametric mesh pieces according to the control point data through the magnifying shader, generate a clipping space according to the initial bounding box, and perform the first culling of each of the initial parametric mesh pieces based on the clipping space to obtain each candidate parametric mesh piece.

[0099] Based on the control point data, obtain the control point normal vector corresponding to each candidate parameterized mesh patch, and perform visual space transformation on the control point normal vector to obtain the transformed normal vector;

[0100] Calculate the angle between the transformation normal vector and the viewing direction, and perform secondary elimination on each candidate parameterized mesh based on the angle to obtain each intermediate parameterized mesh.

[0101] The initial bounding boxes corresponding to each of the intermediate parameterized mesh pieces are transformed to the standardized device coordinate space to obtain the standard space bounding box, and the screen projection area corresponding to the standard space bounding box is obtained.

[0102] The intermediate parameterized mesh pieces are eliminated three times based on the screen projection area to obtain the target parameterized mesh piece.

[0103] Optionally, the drawing instruction allocation module 320 includes:

[0104] The discrete quantity acquisition unit is used to obtain the multi-level of detail corresponding to the target parameterized mesh based on the screen projection area and the mapping relationship between the preset projection area range and the multi-level of detail, and to obtain the discrete quantity of the triangular face corresponding to the target parameterized mesh based on the multi-level of detail.

[0105] The drawing instruction acquisition unit is used to acquire each target thread unit corresponding to the target parameterized mesh patch, and the drawing instruction corresponding to each target thread unit, based on the number of discrete triangles and the preset number of triangles.

[0106] Optionally, the drawing instruction acquisition unit is specifically used to split the discrete task of the target parameterized mesh into multiple standard tasks according to the discrete number of triangles and the preset number of triangles, and to obtain the discrete range corresponding to each standard task.

[0107] Obtain each idle thread unit, and allocate each standard task in each idle thread unit; obtain each target thread unit corresponding to the target parameterized mesh piece, and the target standard task corresponding to each target thread unit.

[0108] Based on the target standard task corresponding to each target thread unit and the discrete range corresponding to each standard task, a drawing instruction corresponding to each target thread unit is generated.

[0109] Optionally, the mesh discretization module 330 is specifically used to obtain the discretization strategy corresponding to the target parameterized mesh according to the primitive type corresponding to the target parameterized mesh, and to perform discretization processing on the target parameterized mesh based on the mesh shader according to the corresponding drawing instructions and discretization strategy through each target thread unit to obtain triangular mesh data.

[0110] The industrial model rendering apparatus provided in this embodiment of the invention can execute the industrial model rendering method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0111] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0112] Example 4

[0113] Figure 10 illustrates a schematic diagram of an electronic device 40 that can be used to implement embodiments of the present invention. The electronic device 40 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 40 may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0114] As shown in Figure 10, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from the storage unit 48 into the RAM 43. The RAM 43 can also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0115] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0116] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as industrial model rendering methods.

[0117] In some embodiments, the industrial model rendering method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the industrial model rendering method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to execute the industrial model rendering method by any other suitable means (e.g., by means of firmware).

[0118] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), system-on-a-chip (SoCs), complex programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0119] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0120] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 40, which includes: a display device (e.g., a cathode ray tube or liquid crystal display) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device 40. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0122] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0123] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact via a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server.

[0124] This embodiment may also include a computer program product, which includes a computer program that, when executed by a processor, implements the industrial model rendering method provided in any embodiment of the present invention.

[0125] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0126] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. An industrial model rendering method, characterized in that, include: The process involves obtaining the primitive type corresponding to the industrial model, splitting the industrial model according to the primitive type, and obtaining initial parametric mesh pieces and corresponding control point data. Using a magnifying shader, the initial parametric mesh pieces are subjected to three cascaded culling operations based on the control point data to obtain target parametric mesh pieces. Drawing instructions are then assigned to the target parametric mesh pieces to obtain target thread units corresponding to the target parametric mesh pieces, as well as the drawing instructions corresponding to each target thread unit. Through each target thread unit, the target parametric mesh pieces are discretized based on the corresponding drawing instructions using a mesh shader to obtain triangular mesh data. Finally, the industrial model is rendered based on the triangular mesh data.

2. The method according to claim 1, characterized in that, The industrial model is split according to the primitive type to obtain each initial parametric mesh piece and corresponding control point data, including: obtaining a splitting strategy according to the primitive type, and splitting the industrial model according to the splitting strategy to obtain each initial parametric mesh piece and corresponding primitive type; obtaining control point data corresponding to each initial parametric mesh piece according to the primitive type.

3. The method according to claim 1 or 2, characterized in that, Primitive types include polyhedra, spheres, tori, cylinders, cones, frustums, and / or extruded bodies.

4. The method according to claim 1, characterized in that, The process involves using an amplified shader to perform a three-stage cascaded culling of the initial parametric meshes based on the control point data to obtain target parametric meshes. This includes: generating initial bounding boxes for each initial parametric mesh based on the control point data using the amplified shader; generating clipping spaces based on the initial bounding boxes; performing a first culling of the initial parametric meshes based on the clipping spaces to obtain candidate parametric meshes; obtaining control point normal vectors for each candidate parametric mesh based on the control point data; performing a visual space transformation on the control point normal vectors to obtain transformed normal vectors; calculating the angle between the transformed normal vector and the viewing direction; performing a second culling of the candidate parametric meshes based on the angle to obtain intermediate parametric meshes; transforming the initial bounding boxes for each intermediate parametric mesh to a standardized device coordinate space to obtain a standard bounding box; obtaining the screen projection area corresponding to the standard bounding box; and performing a third culling of the intermediate parametric meshes based on the screen projection area to obtain the target parametric mesh.

5. The method according to claim 4, characterized in that, The process involves allocating drawing instructions to the target parameterized mesh, obtaining each target thread unit corresponding to the target parameterized mesh, and the drawing instructions corresponding to each target thread unit. This includes: obtaining the level of detail (LDD) corresponding to the target parameterized mesh based on the screen projection area and a preset mapping relationship between the projection area range and the LLD level; obtaining the number of discrete triangle faces corresponding to the target parameterized mesh based on the LLD level; and obtaining each target thread unit corresponding to the target parameterized mesh and the drawing instructions corresponding to each target thread unit based on the number of discrete triangle faces and a preset number of triangle faces.

6. The method according to claim 5, characterized in that, Based on the number of discrete triangles and a preset number of triangles, obtain each target thread unit corresponding to the target parameterized mesh patch, and the drawing instructions corresponding to each target thread unit, including: splitting the discrete task of the target parameterized mesh patch into multiple standard tasks based on the number of discrete triangles and the preset number of triangles, and obtaining the discrete range corresponding to each standard task; obtaining each idle thread unit, and allocating each standard task in each idle thread unit, obtaining each target thread unit corresponding to the target parameterized mesh patch, and the target standard task corresponding to each target thread unit; generating the drawing instructions corresponding to each target thread unit based on the target standard task corresponding to each target thread unit and the discrete range corresponding to each standard task.

7. The method according to claim 1, characterized in that, Each target thread unit performs discretization processing on the target parameterized mesh patch based on the mesh shader according to the corresponding drawing instructions to obtain triangular mesh data. This includes: obtaining the discretization strategy corresponding to the target parameterized mesh patch according to the primitive type corresponding to the target parameterized mesh patch, and then performing discretization processing on the target parameterized mesh patch based on the mesh shader according to the corresponding drawing instructions and discretization strategy through each target thread unit to obtain triangular mesh data.

8. An electronic device, characterized in that, The electronic device includes: at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the industrial model rendering method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the industrial model rendering method according to any one of claims 1-7.

10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the industrial model rendering method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Scene model rendering method and device thereof, electronic equipment and storage medium

    CN113178014A

  • Geometric body rapid rendering method based on GPU (Graphic Processing Unit) driving

    CN114581596A

  • Power grid equipment model discrete rendering method, electronic equipment and storage medium

    CN117786913A

  • Graphics processor, graph drawing method, chip and electronic equipment

    CN119809912A