Rendering optimization method and device for limited space operation simulation training system

By using improved visual volume elimination technology and linear octree LOD algorithm for rendering optimization in the restricted space operation training system, the problems of poor rendering effect and high cost of the traditional training system are solved, and efficient and economical simulation training is achieved. Effect.

CN118570383APending Publication Date: 2024-08-30SHANDONG HUAYU UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410701005.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The simulation scene rendering effect of the traditional restricted space operation training system is poor, and it is difficult to meet the performance requirements of the system in terms of rendering effect and rendering rate. The cost is high and the enthusiasm for learning cannot be fully mobilized.

Method used

Maya software is used for 3D modeling, and the model is imported into the Unity3D platform. The improved visual volume culling technology and linear octree LOD algorithm are used to render and optimize the terrain, characters and equipment models in the restricted space simulation scene, and build surrounds. box to adjust rendering parameters to improve rendering effect and speed.

Benefits of technology

It improves the comprehensive performance of the rendering effect and rendering rate of the three-dimensional simulation scene, ensures a high degree of reproducibility of the simulation training system, reduces the training cost, and enhances the training effect and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570383A
    Figure CN118570383A
Patent Text Reader

Abstract

The invention discloses a rendering optimization method and device for a limited space operation simulation training system, and belongs to the technical field of simulation training systems.The method comprises the steps that according to a real operation site of limited space operation, the size of an operation site of the limited space site, the size of each device in the site and the boundary dimension of an operator are obtained; carrying out three-dimensional modeling by using Maya software, and exporting a model as an fbx file; an fbx file, exported from the Maya software, of the model is imported into a new project in the Unity 3D platform; in the Unity 3D platform, using a Collider component to construct a bounding box for all the models; carrying out rendering optimization on a terrain model, a figure model and an equipment model in the limited space simulation scene by using an improved scene body elimination technology in a Unity 3D platform; and a linear octree LOD algorithm is used in the Unity 3D platform to process the model data. According to the method, the comprehensive rendering performance of the limited space operation simulation training system can be improved, and the performance requirements of the system in the aspects of rendering effect and rendering rate are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of simulation training systems, and in particular to a rendering optimization method and device for a confined space operation simulation training system. Background Art

[0002] Confined space refers to enclosed or semi-enclosed facilities and venues with limited space and restricted access. Confined space can be divided into three categories: above-ground confined space, underground confined space and closed (semi-enclosed) confined space. Among them, above-ground confined spaces mainly include fermentation tanks, ruins, granaries, silos, etc.; underground confined spaces mainly include underground pipelines, culverts, tunnels, culverts, pits, abandoned wells, cellars, biogas tanks, etc.; closed (semi-enclosed) confined spaces mainly include cabins, storage tanks, vehicle-mounted tanks, reaction towers (kettles), pressure vessels, boilers, etc. Confined space operations are the process in which professionally trained operators enter the confined space of a production enterprise to perform a series of operations. Confined space operations are characterized by small space, inability to work for a long time, and prone to safety accidents.

[0003] Traditional training for confined space operators mainly adopts classroom theoretical knowledge training, supplemented by on-site physical training. This training method has the following disadvantages: (1) The training effect is poor because the simulated confined space operation site is very different from the real confined space operation site and the restoration is poor. (2) The simulated confined space operation site does not have the conditions for repeated training experiments and the cost is high. (3) Classroom theoretical knowledge training cannot fully mobilize the learning enthusiasm of confined space operators.

[0004] With the development and popularization of virtual simulation technology, three-dimensional virtual simulation training systems have begun to play an important role in training in the medical, petrochemical and other industries. Therefore, how to use three-dimensional virtual simulation technology to simulate confined space operation scenarios and build a confined space operation simulation training system has become a research focus in the field of confined space operations.

[0005] Due to the small size, complex environment, and large number of equipment and parts in confined spaces, the rendering technology of the simulation scene is challenged when simulating the confined space operation scene using the confined space operation simulation training system. The existing model rendering technology is difficult to meet the needs of system simulation scene rendering, resulting in poor system restoration. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a rendering optimization method and device for a confined space operation simulation training system, so as to improve the comprehensive rendering performance of the confined space operation simulation training system and meet the performance requirements of the system in terms of rendering effect and rendering rate.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In one aspect, the present invention provides a rendering optimization method for a confined space operation simulation training system, comprising:

[0009] Step S101: According to the actual work site of the confined space operation, the size of the confined space on-site operation site, the size of each device in the site, and the size of the operator are obtained, and the terrain, people, and equipment in the confined space operation are 3D modeled using Maya software, and the model is exported as an fbx file;

[0010] Step S102: Import the fbx file of the model exported from the Maya software into a new project in the Unity3D platform;

[0011] Step S103: Using the Collider component in the Unity3D platform to construct bounding boxes for all models, and adjusting the radius and direction of all bounding boxes according to the size and direction angle of the models in the Unity3D platform; all models include terrain models, character models, and device models; wherein a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a cuboid bounding box is constructed for the device model;

[0012] Step S104: using the improved view volume culling technology in the Unity3D platform to optimize the rendering of the terrain model, character model and device model in the confined space simulation scene;

[0013] Step S105: Processing the model data using the linear octree LOD algorithm in the Unity3D platform.

[0014] In another aspect, the present invention provides a rendering optimization device for a confined space operation simulation training system, comprising:

[0015] The acquisition module is used to obtain the dimensions of the confined space site, the dimensions of each device in the site, and the dimensions of the operators based on the actual work site of the confined space operation, use Maya software to perform three-dimensional modeling of the terrain, people, and equipment in the confined space operation, and export the model as an fbx file;

[0016] Import module, used to import the fbx file of the model exported from Maya software into the new project in Unity3D platform;

[0017] A construction module is used to use the Collider component in the Unity3D platform to construct bounding boxes for all models, and adjust the radius and direction of all bounding boxes according to the size and direction angle of the model in the Unity3D platform; all models include terrain models, character models, and device models; a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a rectangular bounding box is constructed for the device model;

[0018] The optimization module is used to use the improved view volume culling technology in the Unity3D platform to optimize the rendering of terrain models, character models and equipment models in confined space simulation scenes;

[0019] The processing module is used to process the model data using the linear octree LOD algorithm in the Unity3D platform.

[0020] On the other hand, the present invention provides an electronic device, comprising: a shell, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the shell, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program code; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the above-mentioned method.

[0021] In yet another aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the above method.

[0022] The present invention has the following beneficial effects:

[0023] The rendering optimization method and device of the confined space operation simulation training system provided by the present invention use an improved view volume culling technology and combine it with a linear octree LOD algorithm to perform rendering optimization on the equipment models and character models in the simulation scene of the confined space simulation training system, thereby improving the comprehensive rendering performance of the rendering effect and rendering rate of the three-dimensional simulation scene and ensuring the high restoration of the simulation training system. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a flow chart of a rendering optimization method of a confined space operation simulation training system of the present invention;

[0025] Figure 2 A schematic diagram of a method embodiment of the present invention;

[0026] Figure 3It is a structural schematic diagram of a rendering optimization device of a confined space operation simulation training system of the present invention;

[0027] Figure 4 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION

[0028] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0029] The purpose of the present invention is to improve the traditional view volume culling technology and propose a rendering optimization method for a confined space operation simulation training system based on the linear octree LOD algorithm in view of the shortcomings of the current technology.

[0030] On the one hand, the present invention provides a rendering optimization method for a confined space operation simulation training system, such as Figure 1 As shown, including:

[0031] Step S101: According to the actual work site of the confined space operation, the size of the confined space on-site operation site, the size of each device in the site, and the size of the operator are obtained, and the terrain, people, and equipment in the confined space operation are 3D modeled using Maya software, and the model is exported as an fbx file;

[0032] In this step, the equipment can be flexibly set according to the specific site, for example, it may include intercoms, buildings, fire extinguishers, four-in-one detectors, pressure gauges, etc.

[0033] Step S102: Import the fbx file of the model exported from the Maya software into a new project in the Unity3D platform;

[0034] Step S103: Using the Collider component in the Unity3D platform to construct bounding boxes for all models, and adjusting the radius and direction of all bounding boxes according to the size and direction angle of the models in the Unity3D platform; all models include terrain models, character models, and device models; wherein a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a cuboid bounding box is constructed for the device model;

[0035] Step S104: using the improved view volume culling technology in the Unity3D platform to optimize the rendering of the terrain model, character model and device model in the confined space simulation scene;

[0036] This step is used to simplify the model data being rendered, thereby increasing the rendering speed.

[0037] As an optional embodiment, step S104 may include:

[0038] Step A1: Programming is performed using C# in Visual Studio 2019 software according to the algorithm formula of the traditional view volume culling technology, and Visual Studio 2019 software is used as the code support engine of the Unity3D (specifically, Unity3D 2019.1.9f1) software platform;

[0039] Step A2: setting the view volume culling algorithm to a panoramic observation mode in the Unity software, and projecting the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the panoramic observation mode;

[0040] Step A3: Calculate the circumscribed sphere radius r1 of the cuboid bounding box and the circumscribed sphere radius r2 of the capsule bounding box under the panoramic observation mode projection of the viewing volume;

[0041] Step A4: according to the calculated r1 and r2, and setting the reference distance value Base, calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box in the projection of the viewing volume and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box;

[0042] In this step, the calculation formulas of LongDistance and ShortDistance can be respectively:

[0043] LongDistance=Base+2×(r1+r2);

[0044] ShortDistance=Base-1.5×(r1+r2).

[0045] The reference distance value Base can be flexibly set as needed, for example, it can be set to 2 cm.

[0046] Step A5: In Unity software, the view volume culling algorithm is set to the local observation mode, and the capsule bounding box and the cuboid bounding box of the model in the simulation scene are projected under the local observation mode;

[0047] Step A6: Calculate the circumscribed sphere radius r3 of the cuboid bounding box and the circumscribed sphere radius r4 of the capsule bounding box under the local observation mode projection of the viewing volume;

[0048] Step A7: Calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box in the projection of the viewing volume according to the calculated r3 and r4;

[0049] In this step, the calculation formulas of LongDistance and ShortDistance can be respectively:

[0050] LongDistance=3.5×(r3+r4);

[0051]

[0052] Among them, x and y are the direction coordinate ranges, and dx and dy are the differentials of x and y respectively.

[0053] Step A8: Use a C# program in Visual Studio 2019 software to determine the positional relationship between the viewpoint and the model bounding box in the Unity3D simulation scene. If the viewpoint is outside the bounding box, a panoramic observation mode of the frustum culling technology is used, and the distances of the projection near and far planes calculated in step A4 are set in the C# program; if the viewpoint is inside the bounding box, a local observation mode of the frustum culling technology is used, and the distances of the projection near and far planes calculated in step A7 are set in the C# program;

[0054] Step A9: Start the Unity project, open the C# program file of the frustum culling technology in the Unity project, and execute the C# program of the improved frustum culling technology.

[0055] Step S105: Processing the model data using the linear octree LOD algorithm in the Unity3D platform.

[0056] This step is used to optimize the resource allocation of the computer GPU during model rendering, thereby increasing the rendering rate and optimizing the rendering effect.

[0057] As an optional embodiment, step S105 may include:

[0058] Step B1: Program using C# in Visual Studio 2019 software according to the algorithm formula of linear octree LOD technology;

[0059] Step B2: Restart the Unity project, open the C# program file of the linear octree LOD algorithm in the Unity project, and execute the C# program of the linear octree LOD algorithm.

[0060] In summary, the rendering optimization method of the confined space operation simulation training system of the present invention uses an improved view volume culling technology and combines the linear octree LOD algorithm to optimize the rendering of the device model and the character model in the simulation scene of the confined space simulation training system, thereby improving the comprehensive rendering performance of the rendering effect and rendering rate of the three-dimensional simulation scene and ensuring the high degree of restoration of the simulation training system.

[0061] The comparison of rendering indicators before and after rendering optimization is shown in Table 1:

[0062] Table 1 Comparison of rendering indicators before and after rendering optimization

[0063]

[0064] Among them, triangles are the storage form of the rendering primitives of the model in the simulation system. The fewer triangles there are, the less memory the computer RAM occupies; the system frame rate is the number of frames transmitted per second during the rendering of the simulation scene in the system. The larger the value, the clearer the rendered picture; the rendering time is the time consumed by the computer GPU to successfully render the simulation scene within the camera perspective in Unity. The smaller the value, the shorter the time it takes to render the same model and the faster the rendering rate.

[0065] The present invention is described in detail below with reference to specific embodiments.

[0066] Underground pipeline operation is a type of confined space operation. Taking underground pipeline operation as an example, the model in the simulation scene of the confined space operation simulation training system is rendered and optimized.

[0067] The rendering optimization method of the confined space operation simulation training system of this embodiment is as follows: Figure 2 As shown, including:

[0068] Step 1: Based on the actual operation site of underground pipeline confined space operation, obtain the size of the underground pipeline confined space operation site, the size of each equipment in the site, and the size of the operator, use Maya software to perform 3D modeling of the terrain, people, intercom, buildings, valves, pipelines, tripods, butterfly valves, pressure gauges, bulletin boards, etc. in the underground pipeline confined space operation, and export the model as an fbx file;

[0069] Step 2: Import the fbx file of the model exported from Maya software into the new project in Unity3D platform;

[0070] Step 3: Use the Collider component in the Unity3D platform to build bounding boxes for all models, and adjust the radius and direction of all bounding boxes according to the size and direction angle of the model in the Unity3D platform; all models include terrain models, character models, and device models; a capsule bounding box is built for the character model, a terrain bounding box is built for the terrain model, and a rectangular bounding box is built for the device model;

[0071] Step 4: Use the improved view volume culling technology in the Unity3D platform to optimize the rendering of the terrain model, character model and equipment model in the confined space simulation scene to streamline the rendered model data and thus increase the rendering rate. The specific steps are as follows:

[0072] 4-1 Use C# to program in Visual Studio 2019 software according to the algorithm formula of traditional view volume culling technology, and use Visual Studio 2019 software as the code support engine of Unity3D 2019.1.9f1 software platform;

[0073] The frustum culling technology is to delete the spatial data to be processed from the perspective of visibility. The data inside the frustum is the spatial data within the range of human vision in the three-dimensional world, which needs to be retained; otherwise, it will be eliminated. The spatial data outside the frustum in the scene of the simulation system will not be displayed on the screen. Therefore, the use of frustum culling technology can simplify the spatial data of the model and reduce the size of the data block entering the rendering stage, thereby significantly improving the rendering efficiency of the graphics while ensuring the generation of the correct image.

[0074] 4-2 Set the view volume culling algorithm to the panoramic observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the panoramic observation mode;

[0075] 4-3 Calculate the circumscribed sphere radius r1 of the cuboid bounding box and the circumscribed sphere radius r2 of the capsule bounding box under the panoramic observation mode projection of the viewing volume;

[0076] 4-4 Based on the r1 and r2 calculated in 4-3, and setting the base distance value Base to 2 cm, calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box in the projection of the viewing volume and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box according to formula (1) and formula (2) respectively;

[0077] LongDistance=Base+2×(r1+r2) Formula (1)

[0078] ShortDistance=Base-1.5×(r1+r2) Formula (2)

[0079] 4-5 Set the view volume culling algorithm to the local observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the local observation mode;

[0080] 4-6 Calculate the circumscribed sphere radius r3 of the cuboid bounding box and the circumscribed sphere radius r4 of the capsule bounding box under the local observation mode projection of the viewing volume;

[0081] 4-7 Based on r3 and r4 calculated in 4-6, calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box in the projection of the viewing volume and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box according to formula (3) and formula (4) respectively;

[0082] LongDistance=3.5×(r3+r4) Formula (3)

[0083]

[0084] Among them, x and y are the direction coordinate ranges, and dx and dy are the differentials of x and y respectively.

[0085] 4-8 Use C# program in Visual Studio 2019 software to determine the positional relationship between the viewpoint and the model bounding box in the Unity3D simulation scene. If the viewpoint is outside the bounding box, the panoramic observation mode of the frustum culling technology is adopted, and the distances of the projected near and far planes calculated by equations (1) and (2) in 4-4 are set in the C# program; if the viewpoint is inside the bounding box, the local observation mode of the frustum culling technology is adopted, and the distances of the projected near and far planes calculated by equations (3) and (4) in 4-7 are set in the C# program;

[0086] 4-9 Start the Unity project, open the C# program file of the frustum culling technology in the Unity project, and execute the C# program of the improved frustum culling technology;

[0087] Step 5: After simplifying the model data in the simulation scene using the improved view volume culling technology, the linear octree LOD algorithm is used to process the model data in the Unity3D platform to optimize the resource allocation of the computer GPU during the model rendering process, thereby increasing the rendering rate and optimizing the rendering effect. The specific steps are as follows:

[0088] 5-1 Use C# to program in Visual Studio 2019 software according to the algorithm formula of linear octree LOD technology;

[0089] LOD technology is the abbreviation of Levels of Detail technology, including linear binary tree LOD technology, linear quadtree LOD technology and linear octree LOD technology. LOD technology determines the level of detail of different model rendering according to the position and importance of the model in the three-dimensional simulation system. The importance of the model in the simulation system determines the distance from the model position to the viewpoint. LOD technology gives more details to the model whose position is close to the viewpoint in the system, and conversely gives relatively few details to the model whose position is far from the viewpoint in the system, thereby optimizing the resource allocation of model rendering, improving rendering efficiency and optimizing rendering effects. Among them, the linear quadtree LOD algorithm is used to optimize the rendering of two-dimensional space; the linear octree LOD algorithm is used to optimize the rendering of three-dimensional space; the linear binary tree LOD algorithm is generally used together with the linear quadtree LOD algorithm or the linear octree LOD algorithm.

[0090] 5-2 Restart the Unity project, open the C# program file of the linear octree LOD algorithm in the Unity project, and execute the C# program of the linear octree LOD algorithm.

[0091] In view of the rendering problems existing in the simulation scene of the traditional confined space operation simulation training system, the present invention creatively improves the view volume culling technology in the virtual simulation technology and combines it with the linear octree LOD algorithm. By optimizing the rendering of the simulation scene, the comprehensive rendering performance of the system in terms of rendering effect and rendering speed is improved, so that it can better meet the needs of confined space operation simulation training. This innovative method not only solves the problems of poor training effect and high training cost existing in the traditional training method, but also greatly improves the training effect and efficiency of the confined space operation simulation training system.

[0092] The rendering optimization method of the confined space operation simulation training system proposed in the present invention has wide practicability in practical applications. Confined space operations involve many industries, such as tunnels, culverts, cabins, underground pipelines, etc. With the strictness of my country's occupational skill standards and the improvement of confined space operation safety laws and regulations, the technical requirements for confined space operators in their operations have become more stringent, which provides urgency for improving the professional skills of confined space operators through training. By adopting the rendering optimization method of the present invention, various confined space operation scenes can be simulated in a virtual environment, allowing trainees to conduct actual combat simulations in a safe environment, improving their ability to deal with emergencies and dangerous environments, thereby reducing the risk of accidents.

[0093] The market demand for confined space operation training continues to grow. This is because the safety requirements for confined space operations are getting higher and higher, and the requirements of enterprises for training quality are also increasing. However, traditional training methods have many limitations and cannot meet the needs of modern enterprises for confined space operator training. Therefore, there is a great market demand for confined space operation simulation training systems based on virtual simulation technology.

[0094] From the perspective of economic benefits, the rendering optimization method of the present invention can effectively reduce the cost of confined space operation training. Traditional training methods require the construction of expensive simulation scenes and require a large amount of manpower and material resources, while the use of virtual simulation technology for training can greatly save costs. At the same time, by improving the training effect, the possibility of accidents is reduced, thereby reducing the losses of the enterprise. Therefore, the present invention can not only improve the training effect, but also bring significant economic benefits.

[0095] On the other hand, the present invention provides a rendering optimization device for a confined space operation simulation training system, such as Figure 3 Said, including:

[0096] The acquisition module 11 is used to obtain the size of the confined space site, the size of each device in the site, and the size of the operator according to the actual work site of the confined space operation, use Maya software to perform three-dimensional modeling of the terrain, people, and equipment in the confined space operation, and export the model as an fbx file;

[0097] Import module 12, used to import the fbx file of the model exported from Maya software into the newly created project in Unity3D platform;

[0098] Construction module 13 is used to construct bounding boxes for all models using Collider components in the Unity3D platform, and adjust the radius and direction of all bounding boxes according to the size and direction angle of the models in the Unity3D platform; all models include terrain models, character models, and device models; wherein a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a rectangular bounding box is constructed for the device model;

[0099] The optimization module 14 is used to use the improved view volume culling technology in the Unity3D platform to optimize the rendering of the terrain model, the character model and the device model in the confined space simulation scene;

[0100] The processing module 15 is used to process the model data using the linear octree LOD algorithm in the Unity3D platform.

[0101] The device of this embodiment can be used to perform Figure 1The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.

[0102] Preferably, the optimization module 14 may include:

[0103] The first programming submodule is used to perform programming in C# in Visual Studio 2019 software according to the algorithm formula of the traditional view volume culling technology, and use Visual Studio 2019 software as the code support engine of the Unity 3D software platform;

[0104] The first projection submodule is used to set the view volume culling algorithm to a panoramic observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the panoramic observation mode;

[0105] The first calculation submodule is used to calculate the circumscribed sphere radius r1 of the cuboid bounding box and the circumscribed sphere radius r2 of the capsule bounding box under the projection of the panoramic observation mode of the viewing volume;

[0106] The second calculation submodule is used to calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box in the projection of the viewing volume according to the calculated r1 and r2 and the set reference distance value Base;

[0107] The second projection submodule is used to set the view volume culling algorithm to a local observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the local observation mode;

[0108] The third calculation submodule is used to calculate the circumscribed sphere radius r3 of the cuboid bounding box and the circumscribed sphere radius r4 of the capsule bounding box under the local observation mode projection of the viewing volume;

[0109] The fourth calculation submodule is used to calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box in the projection of the viewing volume according to the calculated r3 and r4;

[0110] The setting submodule is used to use the C# program in the Visual Studio 2019 software to determine the positional relationship between the viewpoint and the model bounding box in the Unity3D simulation scene. If the viewpoint is outside the bounding box, the panoramic observation mode of the view volume culling technology is adopted, and it is set in the C# program according to the distance of the projection near and far planes calculated by the second calculation submodule; if the viewpoint is inside the bounding box, the local observation mode of the view volume culling technology is adopted, and it is set in the C# program according to the distance of the projection near and far planes calculated by the fourth calculation submodule;

[0111] The first execution submodule is used to start the Unity project, open the C# program file of the view volume culling technology in the Unity project, and execute the C# program of the improved view volume culling technology.

[0112] Preferably, in the second calculation submodule, the calculation formulas of LongDistance and ShortDistance are respectively:

[0113] LongDistance=Base+2×(r1+r2);

[0114] ShortDistance=Base-1.5×(r1+r2);

[0115] And / or, in the fourth calculation submodule, the calculation formulas of LongDistance and ShortDistance are respectively:

[0116] LongDistance=3.5×(r3+r4);

[0117]

[0118] Among them, x and y are the direction coordinate ranges, and dx and dy are the differentials of x and y respectively.

[0119] Preferably, the processing module 15 may include:

[0120] The second programming submodule is used to program using C# in Visual Studio 2019 software according to the algorithm formula of the linear octree LOD technology;

[0121] The second execution submodule is used to restart the Unity project, open the C# program file of the linear octree LOD algorithm in the Unity project, and execute the C# program of the linear octree LOD algorithm.

[0122] The present invention also provides an electronic device, Figure 4 The schematic diagram of the structure of the electronic device of the present invention can realize the present invention Figure 1The process shown is as follows Figure 4 As shown, the electronic device may include: a housing 41, a processor 42, a memory 43, a circuit board 44 and a power supply circuit 45, wherein the circuit board 44 is arranged inside the space enclosed by the housing 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; the power supply circuit 45 is used to supply power to various circuits or devices of the electronic device; the memory 43 is used to store executable program codes; the processor 42 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 43, so as to execute the method described in any of the aforementioned method embodiments.

[0123] For details on the specific execution process of the above steps by the processor 42 and the steps further executed by the processor 42 by running the executable program code, please refer to the present invention. Figure 1 The description of the illustrated embodiment will not be repeated here.

[0124] This electronic device exists in many forms, including but not limited to:

[0125] (1) Mobile communication devices: These devices are characterized by their mobile communication functions and their main purpose is to provide voice and data communications. These terminals include: smart phones (such as iPhone), multimedia phones, functional phones, and low-end phones.

[0126] (2) Ultra-mobile personal computer devices: These devices fall into the category of personal computers, have computing and processing capabilities, and generally also have mobile Internet access features. These terminals include: PDA, MID and UMPC devices, such as iPad.

[0127] (3) Portable entertainment devices: These devices can display and play multimedia content. They include audio and video players (such as iPods), handheld game consoles, e-books, smart toys, and portable car navigation devices.

[0128] (4) Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0129] (5) Other electronic devices with data interaction functions.

[0130] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any of the above method embodiments are implemented.

[0131] The present invention also provides an application program, which is executed to implement the method provided by any method embodiment of the present invention.

[0132] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0133] Each embodiment in this specification is described in a related manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. For the convenience of description, the description of the above device is divided into various units / modules according to their functions and described separately. Of course, when implementing the present invention, the functions of each unit / module can be implemented in the same or one or more software and / or hardware.

[0134] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A rendering optimization method for a confined space operation simulation training system, It is characterized in that include: Step S101: According to the actual work site of the confined space operation, the size of the confined space on-site operation site, the size of each device in the site, and the size of the operator are obtained, and the terrain, people, and equipment in the confined space operation are 3D modeled using Maya software, and the model is exported as an fbx file; Step S102: Import the fbx file of the model exported from the Maya software into a new project in the Unity3D platform; Step S103: Using the Collider component in the Unity3D platform to construct bounding boxes for all models, and adjusting the radius and direction of all bounding boxes according to the size and direction angle of the models in the Unity3D platform; all models include terrain models, character models, and device models; wherein a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a cuboid bounding box is constructed for the device model; Step S104: using the improved view volume culling technology in the Unity3D platform to optimize the rendering of the terrain model, character model and device model in the confined space simulation scene; Step S105: Processing the model data using the linear octree LOD algorithm in the Unity3D platform.

2. The method according to claim 1, It is characterized in that The step S104 includes: A1: Use C# to program in Visual Studio 2019 software according to the algorithm formula of traditional view volume culling technology, and use Visual Studio 2019 software as the code support engine of Unity3D software platform; A2: Set the view volume culling algorithm to panoramic observation mode in Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under this panoramic observation mode; A3: Calculate the circumscribed sphere radius r1 of the cuboid bounding box and the circumscribed sphere radius r2 of the capsule bounding box under the panoramic observation mode projection of the viewing volume; A4: According to the calculated r1 and r2, and the base distance value Base is set, the distance LongDistance from the clipping far plane to the geometric center of the bounding box in the frustum projection and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box are calculated; A5: Set the view volume culling algorithm to local observation mode in Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under this local observation mode; A6: Calculate the circumscribed sphere radius r3 of the cuboid bounding box and the circumscribed sphere radius r4 of the capsule bounding box under the local observation mode projection of the viewing volume; A7: Based on the calculated r3 and r4, calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box in the frustum projection and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box; A8: Use C# program in Visual Studio 2019 software to determine the positional relationship between the viewpoint and the model bounding box in the Unity3D simulation scene. If the viewpoint is outside the bounding box, the panoramic observation mode of the frustum culling technology is adopted, and the distance of the projection near and far planes calculated in step A4 is set in the C# program; if the viewpoint is inside the bounding box, the local observation mode of the frustum culling technology is adopted, and the distance of the projection near and far planes calculated in step A7 is set in the C# program; A9: Start the Unity project, open the C# program file of the frustum culling technology in the Unity project, and execute the C# program of the improved frustum culling technology.

3. The method according to claim 2, It is characterized in that In step A4, the calculation formulas of LongDistance and ShortDistance are respectively: LongDistance=Base+2×(r1+r2); ShortDistance=Base-1.5×(r1+r2); And / or, in step A7, the calculation formulas of LongDistance and ShortDistance are respectively: LongDistance=3.5×(r3+r4); Among them, x and y are the direction coordinate ranges, and dx and dy are the differentials of x and y respectively.

4. The method according to claim 1, It is characterized in that The step S105 comprises: B1: Use C# to program in Visual Studio 2019 software according to the algorithm formula of linear octree LOD technology; B2: Restart the Unity project, open the C# program file of the linear octree LOD algorithm in the Unity project, and execute the C# program of the linear octree LOD algorithm.

5. A rendering optimization device for a confined space operation simulation training system, It is characterized in that include: The acquisition module is used to obtain the dimensions of the confined space site, the dimensions of each device in the site, and the dimensions of the operators based on the actual work site of the confined space operation, use Maya software to perform three-dimensional modeling of the terrain, people, and equipment in the confined space operation, and export the model as an fbx file; Import module, used to import the fbx file of the model exported from Maya software into the new project in Unity3D platform; A construction module is used to use the Collider component in the Unity3D platform to construct bounding boxes for all models, and adjust the radius and direction of all bounding boxes according to the size and direction angle of the model in the Unity3D platform; all models include terrain models, character models, and device models; a capsule bounding box is constructed for the character model, a terrain bounding box is constructed for the terrain model, and a rectangular bounding box is constructed for the device model; The optimization module is used to use the improved view volume culling technology in the Unity3D platform to optimize the rendering of terrain models, character models and equipment models in confined space simulation scenes; The processing module is used to process the model data using the linear octree LOD algorithm in the Unity3D platform.

6. The device according to claim 5, It is characterized in that The optimization module includes: The first programming submodule is used to perform programming in Visual Studio 2019 software using C# according to the algorithm formula of the traditional view volume culling technology, and use Visual Studio 2019 software as the code support engine of the Unity3D software platform; The first projection submodule is used to set the view volume culling algorithm to a panoramic observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the panoramic observation mode; The first calculation submodule is used to calculate the circumscribed sphere radius r1 of the cuboid bounding box and the circumscribed sphere radius r2 of the capsule bounding box under the projection of the panoramic observation mode of the viewing volume; The second calculation submodule is used to calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box in the projection of the viewing volume according to the calculated r1 and r2 and the set reference distance value Base; The second projection submodule is used to set the view volume culling algorithm to a local observation mode in the Unity software, and project the capsule bounding box and the cuboid bounding box of the model in the simulation scene under the local observation mode; The third calculation submodule is used to calculate the circumscribed sphere radius r3 of the cuboid bounding box and the circumscribed sphere radius r4 of the capsule bounding box under the local observation mode projection of the viewing volume; The fourth calculation submodule is used to calculate the distance LongDistance from the clipping far plane to the geometric center of the bounding box and the distance ShortDistance from the clipping near plane to the geometric center of the bounding box in the projection of the viewing volume according to the calculated r3 and r4; The setting submodule is used to use the C# program in the Visual Studio 2019 software to determine the positional relationship between the viewpoint and the model bounding box in the Unity3D simulation scene. If the viewpoint is outside the bounding box, the panoramic observation mode of the view volume culling technology is adopted, and it is set in the C# program according to the distance of the projection near and far planes calculated by the second calculation submodule; if the viewpoint is inside the bounding box, the local observation mode of the view volume culling technology is adopted, and it is set in the C# program according to the distance of the projection near and far planes calculated by the fourth calculation submodule; The first execution submodule is used to start the Unity project, open the C# program file of the view volume culling technology in the Unity project, and execute the C# program of the improved view volume culling technology.

7. The device according to claim 6, It is characterized in that In the second calculation submodule, the calculation formulas of LongDistance and ShortDistance are respectively: LongDistance=Base+2×(r1+r2); ShortDistance=Base-1.5×(r1+r2); And / or, in the fourth calculation submodule, the calculation formulas of LongDistance and ShortDistance are respectively: LongDistance=3.5×(r3+r4); Among them, x and y are the direction coordinate ranges, and dx and dy are the differentials of x and y respectively.

8. The device according to claim 5, It is characterized in that The processing module comprises: The second programming submodule is used to program using C# in Visual Studio 2019 software according to the algorithm formula of the linear octree LOD technology; The second execution submodule is used to restart the Unity project, open the C# program file of the linear octree LOD algorithm in the Unity project, and execute the C# program of the linear octree LOD algorithm.

9. An electronic device, It is characterized in that The electronic device comprises: a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is placed inside the space enclosed by the housing, and the processor and the memory are arranged on the circuit board; the power supply circuit is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory is used to store executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute any of the methods described in claims 1 to 4 above.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement any of the methods described in claims 1-4.