Rendering method and device for three-dimensional model of power equipment, equipment and storage medium
By adjusting rendering parameters based on device performance data and using the hierarchical elimination algorithm, the problem of poor display effects of traditional rendering methods in different systems is solved, and the rendering effect and parameter accuracy of the 3D model are improved.
Patent Information
- Application Number
- CN202410531263.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-10-01
AI Technical Summary
Traditional rendering methods have the problem of poor display effects in different display systems, making it difficult to effectively improve the rendering effect of 3D models.
By obtaining the three-dimensional model to be rendered, the initial rendering parameters are determined based on the device performance data, the layer elimination algorithm is used for initial rendering, the rendering effect is evaluated, and the parameters are adjusted to improve the display effect.
It improves the rendering effect of 3D models in different display systems, ensures that rendering parameters match the system better, and improves the accuracy and display effect of rendering parameters.
Smart Images

Figure CN118736079A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a rendering method, device, equipment and storage medium for a three-dimensional model of electric power equipment. Background Art
[0002] The 3D model resource management platform is a platform that supports platform managers to upload various 3D models related to power equipment. Users can search and purchase 3D models suitable for their own application scenarios through the 3D model management platform, and conduct research on power equipment based on the 3D model. Moreover, in the process of researching power equipment based on 3D models, users can render and display the 3D model of the power equipment through the display system to intuitively view the various performances of the power equipment.
[0003] However, when traditional rendering methods are applied to different display systems, there is a problem of poor display effect. Summary of the invention
[0004] Based on this, it is necessary to provide a rendering method, device, equipment and storage medium for a three-dimensional model of power equipment that can improve the display effect of the three-dimensional model in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for rendering a three-dimensional model of an electric power device, comprising:
[0006] Acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to the device performance data;
[0007] Performing initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtaining and displaying the rendered three-dimensional model;
[0008] Evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0009] According to the evaluation result, target rendering parameters are determined.
[0010] In one embodiment, the initial rendering of the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain the rendered three-dimensional model includes:
[0011] Performing initial rendering on the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain an initial three-dimensional model;
[0012] The initial three-dimensional model is formatted to obtain the rendered three-dimensional model.
[0013] In one embodiment, the evaluating the display effect of the rendered three-dimensional model to obtain the evaluation result includes:
[0014] Determining whether the data of the rendered three-dimensional model is complete;
[0015] If it is complete, determining the display smoothness of the rendered three-dimensional model to obtain the evaluation result;
[0016] If it is incomplete, the data of the rendered three-dimensional model is repaired by a polynomial interpolation algorithm, and based on the repaired data, the step of determining whether the data of the rendered three-dimensional model is complete is returned.
[0017] In one embodiment, determining whether the data of the rendered three-dimensional model is complete includes:
[0018] Obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display;
[0019] The first checksum and the second checksum are compared for consistency to determine whether data of the rendered three-dimensional model is complete.
[0020] In one embodiment, the performing consistency comparison on the first checksum and the second checksum to determine whether the data of the rendered three-dimensional model is complete includes:
[0021] When the first checksum is consistent with the second checksum, determining that data of the rendered three-dimensional model is complete;
[0022] When the first checksum is consistent with the second checksum, it is determined that data of the rendered three-dimensional model is incomplete.
[0023] In one embodiment, determining the display smoothness of the rendered three-dimensional model includes:
[0024] The display fluency of the rendered three-dimensional model is determined according to the rendering speed and system resource occupancy rate of the rendered three-dimensional model.
[0025] In one embodiment, determining target rendering parameters according to the evaluation result includes:
[0026] If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters;
[0027] If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned to be executed.
[0028] In a second aspect, the present application also provides a rendering device for a three-dimensional model of an electric power device, comprising:
[0029] An acquisition module, used to acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to device performance data;
[0030] A rendering module, used to perform initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtain and display the rendered three-dimensional model;
[0031] An evaluation module, used to evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0032] The determination module is used to determine target rendering parameters according to the evaluation result.
[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0034] Acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to the device performance data;
[0035] Performing initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtaining and displaying the rendered three-dimensional model;
[0036] Evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0037] According to the evaluation result, target rendering parameters are determined.
[0038] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:
[0039] Acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to the device performance data;
[0040] Performing initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtaining and displaying the rendered three-dimensional model;
[0041] Evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0042] According to the evaluation result, target rendering parameters are determined.
[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0044] Acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to the device performance data;
[0045] Performing initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtaining and displaying the rendered three-dimensional model;
[0046] Evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0047] According to the evaluation result, target rendering parameters are determined.
[0048] The rendering method, device, equipment and storage medium of the three-dimensional model of the above-mentioned power equipment obtains the three-dimensional model to be rendered, and determines the initial rendering parameters of the three-dimensional model according to the equipment performance data, performs initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, obtains and displays the rendered three-dimensional model; evaluates the display effect of the rendered three-dimensional model to obtain an evaluation result, and then determines the target rendering parameters according to the evaluation result. The initial rendering parameters determined according to the equipment performance parameters have a higher matching degree with the corresponding display system, thereby improving the display effect of the three-dimensional model displayed by the display system, and the initial rendering parameters are adjusted according to the evaluation result of the display effect to determine the target rendering parameters, further improving the accuracy of the rendering parameters, thereby improving the display effect of the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 A diagram of an application environment of a method for rendering a three-dimensional model of electric power equipment in one embodiment;
[0051] Figure 2 A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in one embodiment;
[0052] Figure 3 A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in another embodiment;
[0053] Figure 4A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in another embodiment;
[0054] Figure 5 A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in another embodiment;
[0055] Figure 6 A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in another embodiment;
[0056] Figure 7 A schematic diagram of a flow chart of a method for rendering a three-dimensional model of electric power equipment in another embodiment;
[0057] Figure 8 The present invention is a structural block diagram of a device for rendering a three-dimensional model of electric power equipment in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The rendering method of the three-dimensional model of the power equipment provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in FIG. 1 , the computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store rendering data of a three-dimensional model of power equipment. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a rendering method of a three-dimensional model of power equipment is implemented.
[0060] Those skilled in the art will understand that Figure 1The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0061] In one embodiment, Figure 2 As shown, a method for rendering a three-dimensional model of an electric power device is provided, and the method is applied to Figure 1 The following is an example of a server in the example, including:
[0062] S201, obtaining a three-dimensional model to be rendered, and determining initial rendering parameters of the three-dimensional model according to device performance data.
[0063] Among them, device performance data may include graphics card performance, video memory capacity, processor performance, memory capacity and storage device speed; initial rendering parameters include color parameters, transparency parameters, material attribute parameters and lighting effect parameters of the three-dimensional model.
[0064] In the embodiment of the present application, a mapping relationship between device performance indicators and rendering setting parameters is pre-established, such as a mapping relationship between graphics card performance and rendering quality and frame rate, a mapping relationship between video memory capacity and model complexity and texture quality, a mapping relationship between processor performance and rendering speed, a mapping relationship between memory capacity and rendering stability, a mapping relationship between storage device speed and model loading and saving speed, etc. Device performance data and a 3D model to be rendered are obtained, so as to determine the initial rendering parameters of the 3D model according to the mapping relationship between the device performance indicators and the rendering setting parameters.
[0065] Optionally, the device performance parameters may be pre-stored in the server, or the server may send a data acquisition request to the target terminal to acquire the device performance parameters. Optionally, the server may be a three-dimensional model resource management platform.
[0066] Exemplarily, the device performance data may include a graphics card performance of NVIDIA GeForce GTX1080, a video memory capacity of 8GB, a processor performance of Intel Core i7-8700K, a main frequency of 7GHz, a memory capacity of 16GB, a storage device speed of SSD, a read speed of 550MB / s, a write speed of 500MB / s, etc., and the graphics card performance level can be determined to be A. According to the pre-established mapping relationship between graphics card performance and rendering quality and frame rate, it can be determined that a grade A graphics card corresponds to high-quality rendering, and a grade A graphics card can achieve smooth rendering at 60 frames per second; according to the pre-established mapping relationship between video memory capacity and model complexity and texture quality, it can be determined that a video memory capacity of 8GB supports a model of medium complexity, and a video memory capacity of 8GB High-quality texture rendering can be achieved; based on the pre-established mapping relationship between processor performance and rendering speed, it can be determined that a 7GHz processor can achieve a faster rendering speed; based on the pre-established mapping relationship between memory capacity and rendering stability, it can be determined that 16GB of memory can support stable rendering operations; based on the pre-established mapping relationship between storage device speed and model loading and saving speed, it can be determined that a read speed of 550MB / s can achieve fast model loading, and that a write speed of 500MB / s can achieve fast model saving. Furthermore, 3dsMax can be used to adjust the rendering settings of the three-dimensional model of the power equipment, thereby adjusting the color parameters, transparency parameters, material property parameters and lighting effect parameters to achieve a rendering effect suitable for the performance of the device.
[0067] S202, performing initial rendering on the three-dimensional model according to initial rendering parameters and a layer culling algorithm, and obtaining and displaying the rendered three-dimensional model.
[0068] In an embodiment of the present application, according to the structure of the three-dimensional model, a quadtree or octree space partitioning algorithm is used to construct a hierarchical structure, and the three-dimensional model is divided into several nodes. Further, according to the position and viewpoint of the camera, the camera's view cone is calculated, so that the hierarchical culling algorithm is used, starting from the root node, to traverse the entire scene hierarchy. At each level of the node, if the bounding volume of the node does not intersect with the camera's view cone, the node and its child nodes are culled and not rendered. If the bounding volume of the node is completely contained in the camera's view cone, the node and its child nodes are marked as visible. If a node intersects with the camera's view cone according to the result of the traversal, check whether the bounding volume of the node's child nodes is contained in the camera's view cone; if a leaf node intersects with the camera's view cone according to the result of the traversal, the leaf node and the object it represents need to be rendered. Optionally, for leaf nodes marked as visible, Unity3D is used to render them.
[0069] For example, if the three-dimensional model includes 100 nodes, the quadtree algorithm is used to divide the model into multiple hierarchical structures, the camera position is (0, 0, 0), the viewpoint is (0, 0, -10), and the near plane, far plane, left plane, right plane, upper plane and lower plane of the camera's view cone are calculated. If the camera's viewing angle is 60 degrees and the projection method is perspective projection, the camera's view cone can be calculated based on the camera position and viewpoint. Further, the entire scene hierarchy is traversed from the root node. For each node, check whether its bounding volume intersects with the camera's view cone. If it does not intersect, the node and its child nodes are removed and not rendered; if a node's bounding volume is completely contained in the camera's view cone, the node and its child nodes are marked as visible. For example, during the traversal process, the bounding volumes of 30 nodes intersect with the camera's view cone, of which 20 nodes have bounding volumes completely contained in the camera's view cone. These nodes and their child nodes will be marked as visible, and these leaf nodes will be rendered.
[0070] S203, evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result.
[0071] In an embodiment of the present application, the rendered three-dimensional model is sent to a display system, and the display effect of the rendered three-dimensional model is evaluated by the display system to determine an evaluation result.
[0072] Optionally, the display smoothness of the rendered three-dimensional model can be evaluated. If the rendered three-dimensional model is displayed smoothly, the evaluation result is passed; if the rendered three-dimensional model is not displayed smoothly, the evaluation result is failed; alternatively, the clarity of the rendered three-dimensional model can be evaluated. If the clarity of the rendered three-dimensional model is greater than or equal to a preset clarity, the evaluation result is passed; if the clarity of the rendered three-dimensional model is less than the preset clarity, the evaluation result is failed.
[0073] S204: Determine target rendering parameters according to the evaluation result.
[0074] In an embodiment of the present application, if the evaluation result is passed, the initial rendering parameters are determined as the target rendering parameters; if the evaluation result is failed, the initial rendering parameters are adjusted, and the three-dimensional model is initially rendered based on the adjusted initial rendering parameters, and the display effect of the rendered three-dimensional model is evaluated to obtain an evaluation result.
[0075] In the above-mentioned rendering method of the three-dimensional model of the power equipment, the three-dimensional model to be rendered is obtained, and the initial rendering parameters of the three-dimensional model are determined according to the equipment performance data, the three-dimensional model is initially rendered according to the initial rendering parameters and the layer culling algorithm, and the rendered three-dimensional model is obtained and displayed; the display effect of the rendered three-dimensional model is evaluated to obtain an evaluation result, and then the target rendering parameters are determined according to the evaluation result. The initial rendering parameters determined according to the equipment performance parameters have a higher matching degree with the corresponding display system, thereby improving the display effect of the three-dimensional model displayed by the display system, and the initial rendering parameters are adjusted according to the evaluation result of the display effect to determine the target rendering parameters, which further improves the accuracy of the rendering parameters, thereby improving the display effect of the three-dimensional model.
[0076] In one embodiment, an implementation of the above S202 is provided, such as Figure 3 As shown, the above “performing initial rendering of the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain a rendered three-dimensional model” includes:
[0077] S301, performing initial rendering on the three-dimensional model according to rendering parameters and a layer culling algorithm to obtain an initial three-dimensional model.
[0078] In an embodiment of the present application, according to the structure of the three-dimensional model, a quadtree or octree space partitioning algorithm is used to construct a hierarchical structure, and the three-dimensional model is divided into several nodes. Further, a hierarchical culling algorithm is used to perform initial rendering on the three-dimensional model to obtain an initial three-dimensional model.
[0079] S302: Formatting the initial three-dimensional model to obtain a rendered three-dimensional model.
[0080] In an embodiment of the present application, the initial three-dimensional model is formatted. Optionally, the initial three-dimensional model data can be formatted according to the OpenGL format specification. Further, an application programming interface (API) is used to call the formatted three-dimensional model data of the power equipment to a cross-platform interface, and data feedback is obtained from the cross-platform interface to confirm that the data has been successfully uploaded. The uploaded data is analyzed to determine whether there is data loss or deformation. If the data is normal, it is archived and stored; if the data is incorrect, the format conversion is performed again.
[0081] In this embodiment, the 3D model is initially rendered according to the rendering parameters and the layer culling algorithm, and the initial 3D model is formatted to obtain a rendered 3D model, so that the rendered 3D model is easier to verify and back up.
[0082] In one embodiment, an implementation of the above S203 is provided, such as Figure 4 As shown, the above “evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result” includes:
[0083] S401, determine whether the data of the rendered three-dimensional model is complete; if complete, execute S402; if incomplete, execute S403.
[0084] In an embodiment of the present application, the rendered three-dimensional model is sent to a display system and stored. Based on the three-dimensional model data before being sent to the display system and the three-dimensional model data after being sent to the display system, it is determined whether the data of the rendered three-dimensional model is complete. If the data of the three-dimensional model is complete, there is no need to process the data of the three-dimensional model, and the rendered three-dimensional model can be further evaluated. If the data of the three-dimensional model is incomplete, the data of the three-dimensional model needs to be repaired.
[0085] S402, determining the display smoothness of the rendered three-dimensional model and obtaining an evaluation result.
[0086] As an optional implementation, the three-dimensional model can be evaluated by using preset components to obtain the display fluency of the three-dimensional model, thereby determining the evaluation result of the three-dimensional model based on the display fluency of the three-dimensional model.
[0087] Optionally, the display smoothness of the rendered three-dimensional model is determined based on the rendering speed and system resource occupancy of the rendered three-dimensional model. The rendering speed can be evaluated by recording the number of frames rendered per second of the rendered three-dimensional model and the average frame rate, and the system resource occupancy can be obtained through real-time monitoring through the API. The system resource occupancy can include the central processing unit (CPU) utilization, memory occupancy, and video memory occupancy. Further, the rendering speed and system resource occupancy are trained and predicted using a support vector machine regression model, that is, the rendering speed and system resource occupancy are used as feature information, and the display smoothness is used as the target variable for training and prediction, so that the display smoothness of the rendered three-dimensional model is obtained according to the prediction results of the support vector machine regression model.
[0088] Exemplarily, the number of frames rendered per second is recorded. Assuming that the number of frames recorded in a period of time is [60, 58, 62, 59, 63], the average frame rate can be calculated as (60+58+62+59+63) / 5=61 frames / second. Furthermore, the system resource utilization rate is monitored in real time through the API, and the CPU utilization rate is 50%, the memory utilization rate is 4GB, and the video memory utilization rate is 1GB. The rendering speed and system resource utilization rate are trained and predicted using the support vector machine regression model, that is, the rendering speed and system resource utilization rate are used as features, and the display fluency is used as the target variable. When the support vector machine regression model has been trained and the prediction result is that the display fluency is 85%, it can be concluded that the display fluency of the rendered three-dimensional model is 85% based on the prediction result of the support vector machine regression model.
[0089] Optionally, when the display smoothness of the rendered three-dimensional model is greater than a preset threshold, the evaluation result can be determined as a good display effect; when the display smoothness of the rendered three-dimensional model is not greater than the preset threshold, the evaluation result can be determined as a poor display effect.
[0090] S403, repairing the data of the rendered three-dimensional model by using a polynomial interpolation algorithm, and returning to execute determining whether the data of the rendered three-dimensional model is complete based on the repaired data.
[0091] In an embodiment of the present application, a polynomial interpolation algorithm is used to infer the values of missing data points based on the relationship between known data points, and the data is repaired or completed, so as to re-determine whether the data of the rendered three-dimensional model is complete based on the repaired data.
[0092] In this embodiment, the rendered three-dimensional model is continuously evaluated when the data of the rendered three-dimensional model is complete, and the data of the rendered three-dimensional model is restored when the data is incomplete, thereby improving the stability and rendering effect of the rendered three-dimensional model.
[0093] In one embodiment, an implementation of the above S401 is provided, such as Figure 5 As shown, the above “determining whether the data of the rendered 3D model is complete” includes:
[0094] S501, obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display.
[0095] S502: performing consistency comparison between the first checksum and the second checksum to determine whether data of the rendered three-dimensional model is complete.
[0096] In an embodiment of the present application, a SHA-256 algorithm is used to perform an integrity check on the data of the rendered three-dimensional model. Specifically, a first checksum of the data is obtained at the sending end before the data is transmitted, and the first checksum value is attached to the data of the three-dimensional model for transmission together. After receiving the data, the receiving end recalculates the second checksum of the three-dimensional model and compares it with the attached first checksum value to verify the integrity of the data.
[0097] In this embodiment, the data of the rendered three-dimensional model is determined according to the first checksum and the second checksum, thereby improving the reliability of the data of the three-dimensional model.
[0098] In one embodiment, an implementation of the above S502 is provided, such as Figure 6 As shown, the above “comparing the first checksum with the second checksum for consistency to determine whether the data of the rendered three-dimensional model is complete” includes:
[0099] S601, when the first checksum is consistent with the second checksum, determining that the data of the rendered three-dimensional model is complete.
[0100] S602: When the first checksum is consistent with the second checksum, determine that data of the rendered three-dimensional model is incomplete.
[0101] In an embodiment of the present application, if the first checksum is consistent with the second checksum, the data of the rendered three-dimensional model is not lost during the data transmission process, and the data of the rendered three-dimensional model is complete; if the first checksum is inconsistent with the second checksum, the data of the rendered three-dimensional model is lost during the data transmission process, and the data of the rendered three-dimensional model is incomplete.
[0102] In this embodiment, by performing consistency judgment on the first checksum and the second checksum, it is determined whether the data of the rendered three-dimensional model is complete. The method is simple, easy to implement and not prone to errors.
[0103] In one embodiment, an implementation of the above S204 is provided, such as Figure 7 As shown, the above “determining target rendering parameters according to the evaluation results” includes:
[0104] S701: If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as target rendering parameters.
[0105] In the embodiment of the present application, when the evaluation result indicates that the display effect is good, indicating that the display effect of the three-dimensional model has reached the expected effect, there is no need to adjust the initial rendering parameters, and the initial rendering parameters can be used as the target rendering parameters.
[0106] S702: If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of returning to perform initial rendering of the three-dimensional model according to the initial rendering parameters and the layer culling algorithm is performed.
[0107] In an embodiment of the present application, if the evaluation result indicates that the display effect is not good, the layer culling algorithm parameters that need to be adjusted are determined according to the display fluency evaluation results under different parameter settings, including the division method of the three-dimensional model detail level, the setting of the distance threshold, and the strategy for switching the three-dimensional model of power equipment, etc., and the parameters in the layer culling algorithm are adjusted to determine the parameter combination that maximizes the display fluency as the adjusted initial parameters, and based on the adjusted initial parameters, return to execute the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the layer culling algorithm.
[0108] Optionally, for each set of parameter adjustments, the three-dimensional model is displayed using the adjusted hierarchical culling algorithm on the same hardware platform to obtain display smoothness indicators, including rendering speed and system resource occupancy rate, and the hierarchical culling algorithm parameter settings that maximize display smoothness are selected as the optimal parameters for use in the actual three-dimensional model display system.
[0109] For example, if the three-dimensional model contains 100 power equipment, each device has a different level of detail division method, the distance threshold can be set to 1 meter, 5 meters and 10 meters, and the switching strategy of the three-dimensional model of the power equipment can be set to switch a device every 1 second. Further, on the same hardware platform, the three-dimensional model is displayed using a hierarchical culling algorithm with different parameter settings, and the average time required to render each power device is recorded. The level of detail division method is set to high, medium and low. For example, the distance threshold is 1 meter, the switching strategy is to switch a device every 1 second, and the rendering speed is recorded as rendering 10 devices per second. The three-dimensional model of the power equipment is displayed using a hierarchical culling algorithm with different parameter settings, and the CPU and memory resource occupancy of the system during the display process is recorded; or, the level of detail division method is set to high, medium and low, the distance threshold is 5 meters, the switching strategy is to switch a device every 1 second, and the CPU resource occupancy rate is recorded as 30%, and the memory resource occupancy rate is 500MB. By statistically analyzing the above indicators, the display fluency evaluation results under different parameter settings can be obtained, and the level of detail culling algorithm parameters that need to be adjusted can be determined.
[0110] In this embodiment, the target rendering parameters are determined based on the evaluation results, so that the target rendering parameters are more closely matched with the receiving end, thereby improving the rendering effect of the three-dimensional model.
[0111] Based on all the above embodiments, a method for rendering a three-dimensional model of an electric power device is also provided, the method comprising:
[0112] S1, obtaining a three-dimensional model to be rendered, and determining initial rendering parameters of the three-dimensional model according to device performance data.
[0113] S2, performing initial rendering on the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain an initial three-dimensional model.
[0114] S3, formatting the initial three-dimensional model to obtain a rendered three-dimensional model.
[0115] S4, obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display.
[0116] S5, when the first checksum is consistent with the second checksum, it is determined that the data of the rendered three-dimensional model is complete; when the first checksum is consistent with the second checksum, it is determined that the data of the rendered three-dimensional model is incomplete. If it is complete, execute S6; if it is incomplete, execute S7.
[0117] S6: If complete, determine the display smoothness of the rendered three-dimensional model according to the rendering speed and system resource occupancy rate of the rendered three-dimensional model to obtain an evaluation result.
[0118] S7: If it is incomplete, repair the data of the rendered three-dimensional model by using a polynomial interpolation algorithm, and return to determine whether the data of the rendered three-dimensional model is complete based on the repaired data.
[0119] S8, if the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters; if the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned.
[0120] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0121] Based on the same inventive concept, the embodiment of the present application also provides a rendering device for a three-dimensional model of electric power equipment for implementing the rendering method for a three-dimensional model of electric power equipment involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of the rendering device for one or more three-dimensional models of electric power equipment provided below can refer to the limitations of the rendering method for the three-dimensional model of electric power equipment above, and will not be repeated here.
[0122] In one embodiment, Figure 8 As shown, a rendering device for a three-dimensional model of an electric power device is provided, comprising: an acquisition module 10, a rendering module 11, an evaluation module 12 and a determination module 13, wherein:
[0123] The acquisition module 10 is used to acquire the three-dimensional model to be rendered and determine the initial rendering parameters of the three-dimensional model according to the device performance data.
[0124] The rendering module 11 is used to perform initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtain and display the rendered three-dimensional model.
[0125] The evaluation module 12 is used to evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result.
[0126] The determination module 13 is used to determine the target rendering parameters according to the evaluation result.
[0127] In one embodiment, the rendering module 11 includes: a rendering unit and a processing unit, wherein:
[0128] The rendering unit is used to perform initial rendering on the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain an initial three-dimensional model.
[0129] The processing unit is used to format the initial three-dimensional model to obtain a rendered three-dimensional model.
[0130] In one embodiment, the evaluation module 12 includes: a first determination unit, a second determination unit and a repair unit, wherein:
[0131] The first determining unit is used to determine whether the data of the rendered three-dimensional model is complete.
[0132] The second determination unit is used to determine the display fluency of the rendered three-dimensional model in a complete state to obtain an evaluation result.
[0133] The repair unit is used to repair the data of the rendered three-dimensional model by a polynomial interpolation algorithm in the case of incompleteness, and return to determine whether the data of the rendered three-dimensional model is complete based on the repaired data.
[0134] In one embodiment, the above-mentioned first determination unit is specifically used to obtain a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and display; perform a consistency comparison on the first checksum and the second checksum to determine whether the data of the rendered three-dimensional model is complete.
[0135] In one embodiment, the above-mentioned first determination unit is specifically used to determine that the data of the rendered three-dimensional model is complete when the first checksum is consistent with the second checksum; and determine that the data of the rendered three-dimensional model is incomplete when the first checksum is consistent with the second checksum.
[0136] In one embodiment, the first determining unit is specifically configured to determine the display smoothness of the rendered three-dimensional model according to the rendering speed and system resource occupancy rate of the rendered three-dimensional model.
[0137] In one embodiment, the rendering unit 11 includes: a third determining unit and an adjusting unit, wherein:
[0138] The third determining unit is configured to use the initial rendering parameters as target rendering parameters when the evaluation result indicates that the display effect is good.
[0139] The adjustment unit is used to adjust the initial parameters according to the display smoothness value contained in the evaluation result when the evaluation result indicates that the display effect is not good, and return to the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm based on the adjusted initial parameters.
[0140] Each module in the above-mentioned rendering device of the three-dimensional model of the power equipment can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.
[0141] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0142] Obtaining a 3D model to be rendered, and determining initial rendering parameters of the 3D model according to device performance data;
[0143] Perform initial rendering on the 3D model according to initial rendering parameters and a layer culling algorithm, and obtain and display the rendered 3D model;
[0144] Evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0145] According to the evaluation results, the target rendering parameters are determined.
[0146] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0147] Performing initial rendering on the three-dimensional model according to rendering parameters and a layer culling algorithm to obtain an initial three-dimensional model;
[0148] The initial three-dimensional model is formatted to obtain a rendered three-dimensional model.
[0149] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0150] Determine whether the data of the rendered 3D model is complete;
[0151] If it is complete, the display smoothness of the rendered three-dimensional model is determined to obtain an evaluation result;
[0152] If it is incomplete, the data of the rendered three-dimensional model is repaired by a polynomial interpolation algorithm, and based on the repaired data, the process returns to determine whether the data of the rendered three-dimensional model is complete.
[0153] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0154] Obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display;
[0155] The first checksum and the second checksum are compared for consistency to determine whether the data of the rendered three-dimensional model is complete.
[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0157] When the first checksum is consistent with the second checksum, determining that the data of the rendered three-dimensional model is complete;
[0158] When the first checksum is consistent with the second checksum, it is determined that the data of the rendered three-dimensional model is incomplete.
[0159] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0160] The display smoothness of the rendered 3D model is determined based on the rendering speed and system resource usage of the rendered 3D model.
[0161] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0162] If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters;
[0163] If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned.
[0164] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0165] Obtaining a 3D model to be rendered, and determining initial rendering parameters of the 3D model according to device performance data;
[0166] Perform initial rendering on the 3D model according to initial rendering parameters and a layer culling algorithm, and obtain and display the rendered 3D model;
[0167] Evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0168] According to the evaluation results, the target rendering parameters are determined.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] Performing initial rendering on the three-dimensional model according to rendering parameters and a layer culling algorithm to obtain an initial three-dimensional model;
[0171] The initial three-dimensional model is formatted to obtain a rendered three-dimensional model.
[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0173] Determine whether the data of the rendered 3D model is complete;
[0174] If it is complete, the display smoothness of the rendered three-dimensional model is determined to obtain an evaluation result;
[0175] If it is incomplete, the data of the rendered three-dimensional model is repaired by a polynomial interpolation algorithm, and based on the repaired data, the process returns to determine whether the data of the rendered three-dimensional model is complete.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0177] Obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display;
[0178] The first checksum and the second checksum are compared for consistency to determine whether the data of the rendered three-dimensional model is complete.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] When the first checksum is consistent with the second checksum, determining that the data of the rendered three-dimensional model is complete;
[0181] When the first checksum is consistent with the second checksum, it is determined that the data of the rendered three-dimensional model is incomplete.
[0182] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0183] The display smoothness of the rendered 3D model is determined based on the rendering speed and system resource usage of the rendered 3D model.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters;
[0186] If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned.
[0187] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0188] Obtaining a 3D model to be rendered, and determining initial rendering parameters of the 3D model according to device performance data;
[0189] Perform initial rendering on the 3D model according to initial rendering parameters and a layer culling algorithm, and obtain and display the rendered 3D model;
[0190] Evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result;
[0191] According to the evaluation results, the target rendering parameters are determined.
[0192] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0193] Performing initial rendering on the three-dimensional model according to rendering parameters and a layer culling algorithm to obtain an initial three-dimensional model;
[0194] The initial three-dimensional model is formatted to obtain a rendered three-dimensional model.
[0195] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0196] Determine whether the data of the rendered 3D model is complete;
[0197] If it is complete, the display smoothness of the rendered three-dimensional model is determined to obtain an evaluation result;
[0198] If it is incomplete, the data of the rendered three-dimensional model is repaired by a polynomial interpolation algorithm, and based on the repaired data, the process returns to determine whether the data of the rendered three-dimensional model is complete.
[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0200] Obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display;
[0201] The first checksum and the second checksum are compared for consistency to determine whether the data of the rendered three-dimensional model is complete.
[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0203] When the first checksum is consistent with the second checksum, determining that the data of the rendered three-dimensional model is complete;
[0204] When the first checksum is consistent with the second checksum, it is determined that the data of the rendered three-dimensional model is incomplete.
[0205] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0206] The display smoothness of the rendered 3D model is determined based on the rendering speed and system resource usage of the rendered 3D model.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters;
[0209] If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned.
[0210] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0211] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0212] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for rendering a three-dimensional model of an electric power device, characterized in that: The method comprises: Acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to the device performance data; Performing initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtaining and displaying the rendered three-dimensional model; Evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result; According to the evaluation result, target rendering parameters are determined.
2. The method according to claim 1, characterized in that The initial rendering of the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain a rendered three-dimensional model includes: Performing initial rendering on the three-dimensional model according to the rendering parameters and the layer culling algorithm to obtain an initial three-dimensional model; The initial three-dimensional model is formatted to obtain the rendered three-dimensional model.
3. The method according to claim 1, characterized in that The evaluating the display effect of the rendered three-dimensional model to obtain an evaluation result includes: Determining whether the data of the rendered three-dimensional model is complete; If it is complete, determining the display smoothness of the rendered three-dimensional model to obtain the evaluation result; If it is incomplete, the data of the rendered three-dimensional model is repaired by a polynomial interpolation algorithm, and based on the repaired data, the step of determining whether the data of the rendered three-dimensional model is complete is returned.
4. The method according to claim 3, characterized in that The determining whether the data of the rendered three-dimensional model is complete includes: Obtaining a first checksum of the three-dimensional model after rendering and before display, and a second checksum of the three-dimensional model after rendering and after display; The first checksum and the second checksum are compared for consistency to determine whether data of the rendered three-dimensional model is complete.
5. The method according to claim 4, characterized in that The performing consistency comparison between the first checksum and the second checksum to determine whether the data of the rendered three-dimensional model is complete includes: When the first checksum is consistent with the second checksum, determining that data of the rendered three-dimensional model is complete; When the first checksum is consistent with the second checksum, it is determined that data of the rendered three-dimensional model is incomplete.
6. The method according to claim 3, characterized in that The determining the display smoothness of the rendered three-dimensional model includes: The display fluency of the rendered three-dimensional model is determined according to the rendering speed and system resource occupancy rate of the rendered three-dimensional model.
7. The method according to claim 1, characterized in that Determining target rendering parameters according to the evaluation result includes: If the evaluation result indicates that the display effect is good, the initial rendering parameters are used as the target rendering parameters; If the evaluation result indicates that the display effect is not good, the initial parameters are adjusted according to the display smoothness value contained in the evaluation result, and based on the adjusted initial parameters, the step of performing initial rendering of the three-dimensional model according to the initial rendering parameters and the hierarchical culling algorithm is returned to be executed.
8. A rendering device for a three-dimensional model of an electric power equipment, characterized in that: The device comprises: An acquisition module, used to acquire a three-dimensional model to be rendered, and determine initial rendering parameters of the three-dimensional model according to device performance data; A rendering module, used to perform initial rendering on the three-dimensional model according to the initial rendering parameters and the layer culling algorithm, and obtain and display the rendered three-dimensional model; An evaluation module, used to evaluate the display effect of the rendered three-dimensional model to obtain an evaluation result; The determination module is used to determine target rendering parameters according to the evaluation result.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
