CN114332438A - Three-dimensional scene partition loading method and device, computer equipment and storage medium - Google Patents

Three-dimensional scene partition loading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114332438A
CN114332438A CN202111661491.0A CN202111661491A CN114332438A CN 114332438 A CN114332438 A CN 114332438A CN 202111661491 A CN202111661491 A CN 202111661491A CN 114332438 A CN114332438 A CN 114332438A
Authority
CN
China
Prior art keywords
region
folder
name
dimensional scene
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111661491.0A
Other languages
Chinese (zh)
Inventor
雷伟刚
何超林
罗剑
李琦
刘阳
王东野
谢仁
李方宇
阎嘉琳
黄兆鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Digital Grid Technology Guangdong Co ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202111661491.0A priority Critical patent/CN114332438A/en
Publication of CN114332438A publication Critical patent/CN114332438A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application relates to a three-dimensional scene partition loading method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: dividing a three-dimensional scene to be loaded into at least one region according to a preset partition rule, drawing a corresponding cubic box for each region, labeling, respectively storing each labeled cubic box as a fbx model file and storing the fbx model file to a region folder corresponding to each region, processing the fbx model files region by region and outputting a processing result to the corresponding region folder, simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder, storing the unique id and the name of each region folder into a db database, and loading the three-dimensional scene to be loaded based on the region folders. By adopting the method, the computer can better run on a low-performance computer.

Description

Three-dimensional scene partition loading method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of modeling technologies, and in particular, to a method and an apparatus for partitioning and loading a three-dimensional scene, a computer device, a storage medium, and a computer program product.
Background
With the development of computer three-dimensional technology, a large number of three-dimensional scenes in the implementation of three-dimensional projects need to be displayed by low-end, medium-end and high-end computers. The three-dimensional scene display-based computer hardware has high requirements, but the performance of computer hardware inside a non-internet enterprise unit is generally poor, such as x250, even though the computer hardware is still labored on a low-performance machine after being processed by a traditional LOD algorithm, certain requirements are required for the computer hardware on the basis of LOD, such as that an x250 video card is an integrated video card, a cpu is i3 and a memory is 4g, because the scene complexity is high, a video memory born by the video card is converted into the memory on an x250 computer, and the frosting is more snow on the premise that the memory is not too much.
The LOD algorithm itself is limited and cannot be simplified all the time on the premise of maintaining the scene structure, which means that as the scene size increases, the data size is still a problem on a low-performance computer. Therefore, how to realize the loading and rendering of the complex three-dimensional scene on a low-performance computer becomes a problem to be solved urgently.
Disclosure of Invention
In view of the foregoing, there is a need to provide a three-dimensional scene partition loading method, apparatus, computer device, computer readable storage medium and computer program product, which can implement loading and rendering on a low-performance computer.
In a first aspect, the present application provides a three-dimensional scene partition loading method. The method comprises the following steps:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In one embodiment, the dividing the three-dimensional scene to be loaded into at least one region according to a preset partition rule, and the drawing and labeling a corresponding cube box for each region includes:
dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software;
and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
In one embodiment, before the processing the fbx model file region by region and outputting the processing result to the corresponding region folder, the processing further comprises:
generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
In one embodiment, before the processing the fbx model file region by region and outputting the processing result to the corresponding region folder, the processing further comprises:
traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region;
and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
In one embodiment, the processing the fbx model file region by region and outputting the processing result to the corresponding region folder includes:
processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas;
and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
In one embodiment, the loading the three-dimensional scene to be loaded based on the region folder includes:
and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
In a second aspect, the present application further provides a three-dimensional scene partition loading apparatus. The device comprises:
the partitioning module is used for partitioning the three-dimensional scene to be loaded into at least one region according to a preset partitioning rule, drawing a corresponding cubic box for each region and marking the cubic box;
the storage module is used for respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
the obtaining module is used for processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and meanwhile, obtaining the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and the loading module is used for loading the three-dimensional scene to be loaded based on the region folder.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
The three-dimensional scene partition loading method, the three-dimensional scene partition loading device, the computer equipment, the storage medium and the computer program product divide a three-dimensional scene to be loaded into at least one area according to a preset partition rule, draw and label a corresponding cubic box for each area, respectively store each labeled cubic box as an fbx model file, and stores to the region folder corresponding to each region, processes the fbx model file region by region and outputs the processing result to the corresponding region folder, meanwhile, the name of each cubic box, the unique id corresponding to each area and the name of each area folder are obtained and stored in the db database, the loading of the three-dimensional scene to be loaded is realized based on the area folders, the three-dimensional scene to be loaded is partitioned, and the traditional LOD algorithm is fused in each partition area, so that the three-dimensional scene can be better operated on a low-performance computer.
Drawings
FIG. 1 is a diagram of an application environment of a method for partitioned loading of a three-dimensional scene in an embodiment;
FIG. 2 is a flowchart illustrating a three-dimensional scene partition loading method according to an embodiment;
FIG. 3 is a flow diagram that illustrates the partitioning of a three-dimensional scene and the processing steps, under an embodiment;
FIG. 4 is a block diagram of an embodiment of a three-dimensional scene partition loading apparatus;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The three-dimensional scene partition loading method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In an embodiment, as shown in fig. 2, a three-dimensional scene partition loading method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, dividing the three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area, and labeling.
Specifically, taking a three-dimensional scene to be loaded as an example for the transformer substation to perform partitioning in 3dmax according to a preset partitioning rule, the partitioning is not any submodel selected in the scene, and the scene is reasonably partitioned according to power distribution areas, alternating current areas and direct current areas with different voltage levels on the premise of a region minimization principle. For example, after the power distribution areas of the 110kV off-station power supply, the 500kV power distribution areas, the direct current field power distribution areas, the extreme 1 low-end valve hall power distribution areas, the extreme 1 high-end valve hall power distribution areas, the extreme 2 low-end valve hall power distribution areas, and the extreme 2 high-end valve hall power distribution areas are determined, each area needs to construct a cubic box capable of covering the whole area through drawing, after the drawing is completed, the cubic box corresponding to each area is labeled with a corresponding name, and the name is consistent with the name of a folder stored in the area file.
And step 204, storing each marked cubic box as an fbx model file respectively, and storing the fbx model file to an area folder corresponding to each area.
Specifically, after labeling of the cube box is completed, the models of the respective regions are stored as separate fbx files respectively and placed in the folders corresponding to the respective region names, the region cube box stores one fbx file separately, and the remaining models are returned to the total map region and store one fbx model separately. Or the general graph and the building part are separated, a txt file is additionally needed to store the association relationship between each region model and the region box.
And step 206, processing the fbx model files region by region, outputting the processing result to a corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database.
Specifically, the fbx model file of each region is processed region by region, and the fbx model file is processed to generate a lod file and output the lod file to the corresponding region folder. And simultaneously acquiring the name of each cubic box, the unique id corresponding to each area and the name of each area folder, and storing the names into a db database, wherein each area is provided with an area box, each area box has a unique name, a program generates a unique id for each area box and stores the unique id into 3dtiles, and the area name information and the corresponding id information are stored into the db database for later use.
And 208, loading the three-dimensional scene to be loaded based on the region folder.
Specifically, after the fbx model file is processed, the three-dimensional scene to be loaded is loaded by loading the lod file in the region folder.
According to the three-dimensional scene partition loading method, a three-dimensional scene to be loaded is divided into at least one region according to a preset partition rule, a corresponding cube box is drawn and labeled for each region, each labeled cube box is stored as a fbx model file and is stored in a region folder corresponding to each region, the fbx model files are processed region by region and processing results are output to the corresponding region folders, meanwhile, the name of each cube box, the unique id corresponding to each region and the name of each region folder are obtained and stored in a db database, loading of the three-dimensional scene to be loaded is achieved based on the region folders, the three-dimensional scene to be loaded is partitioned, and a traditional LOD algorithm is fused in each partition region, so that the three-dimensional scene to be loaded can better run on a low-performance computer.
In one embodiment, the dividing the three-dimensional scene to be loaded into at least one region according to a preset partition rule, and the drawing and labeling a corresponding cube box for each region includes:
dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software;
and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
Specifically, when a three-dimensional scene to be loaded is partitioned, a three-dimensional scene model to be loaded is partitioned into at least one region according to the service region type based on 3dmax software, for example, the scene is reasonably partitioned according to power distribution regions, alternating current regions and direct current regions with different voltage levels according to a region minimization principle, after the partitioning is completed, corresponding cubic boxes are respectively drawn for the regions except a general diagram, the names of region folders are respectively marked for the cubic boxes, each region needs to be constructed into a cubic box capable of covering the whole region through drawing, after the drawing is completed, the name corresponding to the cubic box corresponding to each region is marked, and the name is consistent with the name of the folder stored in the region file.
In this embodiment, the three-dimensional scene model to be loaded is divided into at least one region according to the service region type based on 3dmax software, then corresponding cube boxes are respectively drawn for the regions except the general diagram, and names of region folders are respectively labeled for the cube boxes, so that partitioning, drawing and labeling of the three-dimensional scene to be loaded are realized, and conditions are created for further partitioning and loading.
In one embodiment, before the processing the fbx model file region by region and outputting the processing result to the corresponding region folder, the processing further comprises:
generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
Specifically, before processing the fbx model file region by region and outputting the processing result to the corresponding region folder, a txt file needs to be generated based on the name of the cube box corresponding to each region and the name of each region folder; the names of the cubic boxes corresponding to the regions in the txt file and the names of the folders of the regions correspond to one another, and the generated txt file facilitates reading when the partition model is loaded.
In this embodiment, before processing the fbx model file region by region and outputting the processing result to the corresponding region folder, a txt file is generated based on the name of the cubic box corresponding to each region and the name of each region folder, so that partition loading of each region file is realized, and service attributes can be better displayed by partition loading, so that a person who does not know the power service can quickly understand the use of each region and the distribution and association relationship of different service regions.
In one embodiment, before the processing the fbx model file region by region and outputting the processing result to the corresponding region folder, the processing further comprises:
traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region;
and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
Specifically, before processing the fbx model files region by region and outputting the processing result to the corresponding region folder, it is further required to traverse the folder in which the fbx model file corresponding to each region is located, obtain the fbx model path of each region, and read the txt file generated based on the name of the cube box corresponding to each region and the name of each region folder.
In this embodiment, before processing the fbx model file, the fbx model path of each region is obtained by traversing the folder where the fbx model file corresponding to each region is located, and the txt file generated based on the name of the cube box corresponding to each region and the name of the folder of each region is read, which is beneficial to realizing fast processing of the fbx model corresponding to each region, and can more accurately display a small amount of data just needed by regional loading according to business and customer requirements.
In one embodiment, the processing the fbx model file region by region and outputting the processing result to the corresponding region folder includes:
processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas;
and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
Specifically, when the fbx model files are processed region by region and the processing result is output to the corresponding region folder, the fbx model files corresponding to the regions are processed according to the regions to generate the lod files corresponding to the regions, after the fbx model files of all the regions are processed, the lod files corresponding to the regions are stored in the region folder corresponding to the regions, the region folder is not changed, and the content in the region folder is changed from the fbx model files to the 3 dtex files.
In this embodiment, the processing of the fbx model files of each region is realized by processing the fbx model files corresponding to each region by region, generating the LOD files corresponding to each region, and storing the LOD files corresponding to each region into the region folder corresponding to each region, and the processing can be better performed on a low-performance computer by partitioning the three-dimensional scene to be loaded and fusing a conventional LOD algorithm in each partitioned region.
In one embodiment, the loading the three-dimensional scene to be loaded based on the region folder includes:
and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
Specifically, when the loading of the three-dimensional scene to be loaded is realized based on the area folder, the load of the three-dimensional scene to be loaded is realized by loading the lod file in the area folder through preset loading software, for example, based on a pro program developed by ceium.
In the embodiment, the LOD files in the regional folder are loaded based on the preset loading software, so that the to-be-loaded three-dimensional scene is partitioned by partitioning the to-be-loaded three-dimensional scene, the traditional LOD algorithm is fused in each partitioned region, and the low-performance computer can better run.
The following embodiment will demonstrate a specific flow by taking a certain transformer substation as an example, fig. 3 is a flow diagram illustrating a process of partitioning a three-dimensional scene and processing steps in one embodiment, according to the method in fig. 3, the whole transformer substation is divided into 7 areas and 3 basic display areas, and then each area is constructed by a traditional LOD one by one.
In the embodiment, the gantry station is divided into 7 areas according to the service area; drawing a cubic box for each region except the general diagram, wherein a font is marked above each box, and the font content is the name of a region folder; counting the name of each region cube box and the name of a corresponding region folder, and storing the name into a txt file; storing data into a plurality of fbx by area folder into corresponding folders; traversing a folder where the partition data is located to obtain fbx model paths of 7 sub-regions; reading txt files corresponding to the names of the sub-regions and the names of the partition folders; recursion 7 sub-areas, processing the transformer substation partition model area by area, simultaneously obtaining the name of the sub-area cube box and the corresponding unique id and name of the sub-area folder, and storing the name into db.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the application also provides a three-dimensional scene partition loading device for realizing the three-dimensional scene partition loading method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so that specific limitations in one or more embodiments of the three-dimensional scene partition loading device provided below may refer to the limitations on the three-dimensional scene partition loading method in the foregoing, and details are not described here.
In one embodiment, as shown in fig. 4, there is provided a three-dimensional scene partition loading apparatus, including: a partitioning module 401, a storing module 402, an obtaining module 403, and a loading module 404, wherein:
the partitioning module 401 is configured to divide the three-dimensional scene to be loaded into at least one region according to a preset partitioning rule, draw a corresponding cubic box for each region, and label the cubic box;
a storage module 402, configured to store each labeled cubic box as an fbx model file, and store the fbx model file in an area folder corresponding to each area;
an obtaining module 403, configured to process the fbx model file region by region and output a processing result to a corresponding region folder, and obtain and store a name of each cube box, a unique id corresponding to each region, and a name of each region folder in a db database;
a loading module 404, configured to implement loading on the three-dimensional scene to be loaded based on the region folder.
In an embodiment, the partition module 401 is specifically configured to: dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software; and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
In one embodiment, the obtaining module 403 is further configured to: generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
In one embodiment, the obtaining module 403 is further configured to: traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region; and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
In one embodiment, the obtaining module 403 is further configured to: processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas; and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
In an embodiment, the loading module 404 is specifically configured to: and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
According to the three-dimensional scene partition loading device, a three-dimensional scene to be loaded is divided into at least one area according to a preset partition rule, a corresponding cube box is drawn and labeled for each area, each labeled cube box is stored as a fbx model file and is stored in an area folder corresponding to each area, the fbx model files are processed area by area and processing results are output to the corresponding area folder, meanwhile, the name of each cube box, the unique id corresponding to each area and the name of each area folder are obtained and stored in a db database, loading of the three-dimensional scene to be loaded is achieved based on the area folders, the three-dimensional scene to be loaded is partitioned, and a traditional LOD algorithm is fused in each partition area, so that the three-dimensional scene to be loaded can better run on a low-performance computer.
The modules in the three-dimensional scene partition loading device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a three-dimensional scene partition loading method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In one embodiment, the processor, when executing the computer program, further performs the steps of: dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software; and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
In one embodiment, the processor, when executing the computer program, further performs the steps of: generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
In one embodiment, the processor, when executing the computer program, further performs the steps of: traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region; and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
In one embodiment, the processor, when executing the computer program, further performs the steps of: processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas; and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
According to the computer equipment, a three-dimensional scene to be loaded is divided into at least one area according to a preset partition rule, a corresponding cubic box is drawn for each area and labeled, each labeled cubic box is stored as a fbx model file and is stored in an area folder corresponding to each area, the fbx model files are processed area by area and processing results are output to the corresponding area folder, meanwhile, the name of each cubic box, the unique id corresponding to each area and the name of each area folder are obtained and stored in a db database, loading of the three-dimensional scene to be loaded is achieved based on the area folders, the three-dimensional scene to be loaded is partitioned, and a traditional LOD algorithm is fused in each partitioned area, so that the three-dimensional scene to be loaded can better run on a low-performance computer.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In one embodiment, the computer program when executed by the processor further performs the steps of: dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software; and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
In one embodiment, the computer program when executed by the processor further performs the steps of: traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region; and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
In one embodiment, the computer program when executed by the processor further performs the steps of: processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas; and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
In one embodiment, the computer program when executed by the processor further performs the steps of: and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
The storage medium divides a three-dimensional scene to be loaded into at least one area according to a preset partition rule, draws a corresponding cubic box for each area and marks the cubic box, stores the marked cubic boxes as fbx model files respectively and stores the fbx model files in area folders corresponding to the areas, processes the fbx model files area by area and outputs processing results to the corresponding area folders, simultaneously obtains the name of each cubic box, the unique id corresponding to each area and the name of each area folder and stores the names in a db database, realizes loading of the three-dimensional scene to be loaded based on the area folders, partitions the three-dimensional scene to be loaded, and fuses a traditional LOD algorithm in each partition area, so that the three-dimensional scene to be loaded can better run on a low-performance computer.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
In one embodiment, the computer program when executed by the processor further performs the steps of: dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software; and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
In one embodiment, the computer program when executed by the processor further performs the steps of: generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
In one embodiment, the computer program when executed by the processor further performs the steps of: traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region; and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
In one embodiment, the computer program when executed by the processor further performs the steps of: processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas; and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
In one embodiment, the computer program when executed by the processor further performs the steps of: and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
According to the computer program product, a three-dimensional scene to be loaded is divided into at least one area according to a preset partition rule, a corresponding cube box is drawn and labeled for each area, each labeled cube box is stored as a fbx model file and is stored in an area folder corresponding to each area, the fbx model files are processed area by area and processing results are output to the corresponding area folder, meanwhile, the name of each cube box, the unique id corresponding to each area and the name of each area folder are obtained and stored in a db database, loading of the three-dimensional scene to be loaded is achieved based on the area folders, the three-dimensional scene to be loaded is partitioned, and a traditional LOD algorithm is fused in each partition area, so that the three-dimensional scene to be loaded can better run on a low-performance computer.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A partition loading method for a three-dimensional scene is characterized by comprising the following steps:
dividing a three-dimensional scene to be loaded into at least one area according to a preset partition rule, drawing a corresponding cubic box for each area and marking;
respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and simultaneously acquiring the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and loading the three-dimensional scene to be loaded based on the region folder.
2. The method according to claim 1, wherein the dividing the three-dimensional scene to be loaded into at least one region according to a preset partition rule, and the drawing and labeling of the corresponding cubic box for each region comprises:
dividing the three-dimensional scene model to be loaded into at least one region according to the service region type based on 3dmax software;
and drawing corresponding cubic boxes for the regions except the general diagram, and labeling the names of the region folders for the cubic boxes respectively.
3. The method of claim 2, wherein prior to the region-by-region processing the fbx model file and outputting the processing results to the corresponding region folder, further comprises:
generating a txt file based on the name of the cubic box corresponding to each region and the name of the folder of each region; and the name of the cubic box corresponding to each region in the txt file and the name of the folder corresponding to each region are in one-to-one correspondence.
4. The method of claim 3, wherein before processing the fbx model file region by region and outputting the processing results to the corresponding region folder, further comprises:
traversing the folder where the fbx model file corresponding to each region is located to obtain the fbx model path of each region;
and reading the txt file generated based on the name of the cubic box corresponding to each region and the name of the folder of each region.
5. The method of claim 1, wherein the region-by-region processing the fbx model file and outputting the processing results to a corresponding region folder comprises:
processing the fbx model files corresponding to the areas region by region to generate lod files corresponding to the areas;
and storing the lod files corresponding to the areas into the area folders corresponding to the areas.
6. The method of claim 1, wherein the loading the three-dimensional scene to be loaded based on the region folder comprises:
and loading the lod file in the area folder based on preset loading software to realize the loading of the three-dimensional scene to be loaded.
7. A three-dimensional scene partition loading apparatus, the apparatus comprising:
the partitioning module is used for partitioning the three-dimensional scene to be loaded into at least one region according to a preset partitioning rule, drawing a corresponding cubic box for each region and marking the cubic box;
the storage module is used for respectively storing each marked cubic box as an fbx model file and storing the fbx model file to an area folder corresponding to each area;
the obtaining module is used for processing the fbx model files region by region and outputting the processing result to the corresponding region folder, and meanwhile, obtaining the name of each cubic box, the unique id corresponding to each region and the name of each region folder and storing the names into a db database;
and the loading module is used for loading the three-dimensional scene to be loaded based on the region folder.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202111661491.0A 2021-12-30 2021-12-30 Three-dimensional scene partition loading method and device, computer equipment and storage medium Pending CN114332438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111661491.0A CN114332438A (en) 2021-12-30 2021-12-30 Three-dimensional scene partition loading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111661491.0A CN114332438A (en) 2021-12-30 2021-12-30 Three-dimensional scene partition loading method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114332438A true CN114332438A (en) 2022-04-12

Family

ID=81018342

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111661491.0A Pending CN114332438A (en) 2021-12-30 2021-12-30 Three-dimensional scene partition loading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114332438A (en)

Similar Documents

Publication Publication Date Title
CN113901395B (en) Data processing method, data processing device, computer equipment and storage medium
CN110908697A (en) Resource packaging method, device, server and storage medium
JP7368623B2 (en) Point cloud processing method, computer system, program and computer readable storage medium
CN110908707A (en) Resource packaging method, device, server and storage medium
CN106022010A (en) File display method and device
CN114596423A (en) Model rendering method and device based on virtual scene gridding and computer equipment
CN116305895A (en) Product model generation method, device, computer equipment and storage medium
CN115344183A (en) Page sliding method, live broadcast page sliding method, device, equipment and medium
CN107391533A (en) Generate the method and device of graphic data base Query Result
CN117808980A (en) Map grid picture generation method, system, equipment and storage medium
CN114332438A (en) Three-dimensional scene partition loading method and device, computer equipment and storage medium
CN116258597A (en) Document processing method, device, computer equipment and storage medium
US9230022B1 (en) Customizable result sets for application program interfaces
CN114692056A (en) Target page generation method and device, computer equipment and storage medium
KR20200058205A (en) Automated symbolization of 1:25,000 map based on domestic geometric characteristic
CN114416235B (en) Document display method, device, computer equipment and storage medium
CN116226145A (en) Data interaction method, device, computer equipment and storage medium
CN116400922A (en) Interface guide schematic diagram generation method, device, computer equipment and storage medium
CN117348919A (en) Information configuration method, information configuration device, computer equipment and storage medium
CN118277026A (en) Virtual resource processing method, device, equipment, storage medium and program product
CN115878715A (en) Method and device for generating page display scheme and computer equipment
CN114332350A (en) Three-dimensional model display method and system, electronic equipment and storage medium
CN116150840A (en) Model generation method, device, apparatus, storage medium, and program product
CN117130606A (en) Front-end page configuration method, front-end page configuration device, computer equipment and storage medium
CN116450240A (en) Text file loading method, text file loading device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230410

Address after: Full Floor 14, Unit 3, Building 2, No. 11, Middle Spectra Road, Huangpu District, Guangzhou, Guangdong 510700

Applicant after: China Southern Power Grid Digital Grid Technology (Guangdong) Co.,Ltd.

Address before: Room 86, room 406, No.1, Yichuang street, Zhongxin Guangzhou Knowledge City, Huangpu District, Guangzhou City, Guangdong Province

Applicant before: Southern Power Grid Digital Grid Research Institute Co.,Ltd.

TA01 Transfer of patent application right