CN117392300A - Interaction method, system, equipment and medium for 3D digital method exhibition hall - Google Patents

Interaction method, system, equipment and medium for 3D digital method exhibition hall Download PDF

Info

Publication number
CN117392300A
CN117392300A CN202311478355.7A CN202311478355A CN117392300A CN 117392300 A CN117392300 A CN 117392300A CN 202311478355 A CN202311478355 A CN 202311478355A CN 117392300 A CN117392300 A CN 117392300A
Authority
CN
China
Prior art keywords
scene
exhibition hall
node
target
level
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
CN202311478355.7A
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.)
Guangdong Power Grid Co Ltd
Original Assignee
Guangdong Power Grid 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 Guangdong Power Grid Co Ltd filed Critical Guangdong Power Grid Co Ltd
Priority to CN202311478355.7A priority Critical patent/CN117392300A/en
Publication of CN117392300A publication Critical patent/CN117392300A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a method, a system, equipment and a medium for interaction in a 3D digital method exhibition hall, which comprise the following steps: determining a target exhibition hall data path, performing multi-detail level preprocessing on the digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file; performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file; and loading, rendering and drawing scene data according to the latest scene index data file. According to the method, interaction of the 3D digital method exhibition hall is realized through data preprocessing, multithreading processing and the like, rendering performance of the 3D digital method exhibition hall is improved, and the method provided by the invention can realize the technical scheme of browsing and operating the three-dimensional model of the digital method exhibition hall without additionally installing complicated 3D software, so that the 3D model manufacturing process is greatly simplified, and the manufacturing cost is reduced.

Description

Interaction method, system, equipment and medium for 3D digital method exhibition hall
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a system, equipment and a medium for interaction in a 3D digital exhibition hall.
Background
Along with the development of informatization, digital method treatment is increasingly developed, the application of a 3D model is more and more widespread, especially in the field of exhibition and exhibition, in the law treatment exhibition hall, in order to exhibit the stereoscopic effect of exhibits or scenes, a 3D model is required to be manufactured, the digital method treatment 3D exhibition hall mainly digitizes various types of information related to the common law propaganda, the education exhibition hall of legal information is popularized to related personnel in the form of a 3D exhibition hall by using the technology such as virtual reality, the effect of the current online exhibition hall in the aspect of achievement exhibition is increasingly prominent, however, because of the limitation of professional software, the interaction of the traditional exhibition hall is mostly based on the 2D plane technology, and meanwhile, due to a series of reasons such as monotonous interaction expression form, weaker interaction function and the like of the traditional exhibition hall, the development of the online exhibition hall has a plurality of problems, the manufacturing process is complicated and the cost is high, the prior art is mostly provided with specific plug-ins, the installation plug-ins can influence the cross-platform and stability of web pages, the large quantity of model data processing has relatively high performance requirements, especially the limitation of the application of the system in the mobile terminal web pages, and the current online exhibition hall is only suitable for the 3D game, and the prior art is not suitable for the game 3D of the general purpose of the special game industry.
Disclosure of Invention
The invention provides a 3D digital method exhibition hall interaction method, a system, equipment and a medium, which solve the technical problems that the traditional method exhibition hall interaction is mainly based on a 2D plane technology, has high development cost and cannot be suitable for a 3D digital method exhibition hall.
In order to solve the technical problems, the invention provides a method, a system, equipment and a medium for interaction in a 3D digital exhibition hall.
In a first aspect, the invention provides a 3D digital method of exhibition hall interaction, the method comprising the steps of:
determining a target exhibition hall data path, performing multi-level-of-detail preprocessing on digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file;
performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file;
and loading, rendering and drawing scene data according to the latest scene index data file.
In a further embodiment, the step of determining a target exhibition hall data path and performing multi-level of detail preprocessing on the digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and creating a target scene index data file includes:
responding to target exhibition hall data path selection operation performed by a user according to three-dimensional model data of each digital method exhibition hall, and identifying and recording all the block tiles under the selected target exhibition hall data path;
acquiring the number of CPU cores, and determining the number of sub-threads for calculation according to the number of CPU cores and the number of tiles;
dynamically distributing the computing task of each sub-thread in the computing process according to the number of the sub-threads and the current computing process;
after the sub-thread acquires the calculation task, analyzing the calculation task to obtain task information, wherein the task information at least comprises detail level information; the level of detail level information at least comprises minimum level of detail level information and maximum level of detail level information;
constructing an index tree by utilizing a depth-first algorithm according to the level information of the detail level, and cutting the index tree by utilizing a breadth-first search algorithm according to the node attribute of the index tree to obtain an optimal index tree of each block tile;
and merging the optimal index tree of each block tile into a scene tree array, and converting the scene tree array into a target scene index data file with a preset data format.
In a further embodiment, the step of determining the number of sub-threads for calculation based on the number of CPU cores and the number of tiles comprises:
comparing the number of CPU cores with the number of tiles in blocks, and if the number of CPU cores is larger than the number of tiles in blocks, taking the number of tiles in blocks as the number of sub-threads for calculation; and if the number of the CPU cores is smaller than the number of the partitioned tiles, taking the number of the CPU cores as the number of the sub-threads for calculation.
In a further embodiment, the step of constructing an index tree using a depth-first algorithm based on the level of detail information comprises:
restoring the minimum detail level information and the maximum detail level information to obtain a complete detail level hierarchical structure;
obtaining the number of nodes of the complete quadtree according to the level information of the detail level and a node model constructed in advance;
and taking the node level of the node in the complete detail level hierarchical structure as the node depth, and constructing an index tree layer by adopting a depth priority algorithm until the node number of the index tree reaches the node number of the complete quadtree.
In a further embodiment, the step of generating the latest scene index data file by performing scene update on the target scene index data file according to the current viewpoint or scene change parameter includes:
detecting the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed according to the current viewpoint or scene change parameters; the position relation between the segmented tiles and the view cone comprises that the segmented tiles are in the view cone, the segmented tiles intersect with the view cone and the segmented tiles are outside the view cone;
screening out the to-be-displayed block tiles according to the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed;
calculating the optimal model resolution of the to-be-displayed segmented tiles, and mapping optimal detail level information according to the optimal model resolution and a detail level list;
and selecting optimal nodes to be displayed from all the to-be-displayed blocked tiles according to the optimal level of detail information, comparing the optimal nodes to be displayed with nodes being displayed in a current scene to obtain scene node comparison results, and updating all nodes in the target scene index data file according to the scene node comparison results to generate the latest scene index data file.
In a further embodiment, the calculation formula of the best model resolution is:
where lodRes represents the optimal model resolution; n represents the number of tiles in a block; tileSize represents the tile size of the tile; d represents the distance between the viewpoint and the center of the projection area; alpha represents the angle of view; pixel represents the number of screen pixels.
In a further embodiment, the step of selecting the optimal node to be displayed from all the tiles to be displayed according to the optimal level of detail level information comprises:
judging whether the level of the current node is a target level from the root node according to the optimal detail level information, if so, adding the current node and the brother nodes thereof into an optimal node queue to be displayed; otherwise, judging whether the current node contains the child node, if so, judging whether the level of the child node is a target level; if the current node does not contain the child nodes, judging whether the child nodes of the brother nodes of the current node are target levels in sequence until all the brother nodes are judged to be finished.
In a second aspect, the present invention provides a 3D digital therapeutic exhibition hall interaction system, the system comprising:
the data preprocessing module is used for determining a target exhibition hall data path, performing multi-detail level preprocessing on the digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file;
the scene updating module is used for performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file;
and the scene drawing module is used for loading and rendering and drawing scene data according to the latest scene index data file.
In a third aspect, the present invention also provides a computer device, including a processor and a memory, where the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the computer device performs steps for implementing the method.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored therein a computer program which when executed by a processor performs the steps of the above method.
The invention provides a 3D digital method exhibition hall interaction method, a system, equipment and a medium, wherein the method comprises the steps of determining a target exhibition hall data path, performing multi-detail level preprocessing on digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file; performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file; and loading, rendering and drawing scene data according to the latest scene index data file. Compared with the prior art, the method realizes the digitization and online conversion of the digital exhibition hall through the technologies of data preprocessing, multithreading processing, local node updating and the like, greatly improves the rendering performance of the 3D digital exhibition hall, improves the participation and interactivity of users, and improves the user experience, and meanwhile, the method provided by the invention can realize the browsing and operation of the three-dimensional model of the digital exhibition hall without installing complicated 3D software, and reduces the development cost.
Drawings
FIG. 1 is a schematic flow chart of a 3D digital method exhibition hall interaction method provided by an embodiment of the invention;
fig. 2 is a schematic diagram of an application scene frame of a 3D digital method exhibition hall according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a 3D digital exhibition hall function design provided by an embodiment of the invention;
FIG. 4 is a schematic diagram of a multi-level of detail preprocessing process provided by an embodiment of the present invention;
FIG. 5 is a schematic view of clipping an index tree according to an embodiment of the present invention;
FIG. 6 is a schematic view of a scene tree structure provided by an embodiment of the present invention;
FIG. 7 is a schematic view of a perspective projection view of a vertebral body structure according to an embodiment of the present invention;
FIG. 8 is a block diagram of a 3D digital method exhibition hall interaction system provided by an embodiment of the invention;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following examples are given for the purpose of illustration only and are not to be construed as limiting the invention, including the drawings for reference and description only, and are not to be construed as limiting the scope of the invention as many variations thereof are possible without departing from the spirit and scope of the invention.
Referring to fig. 1, an embodiment of the present invention provides a 3D digital method exhibition hall interaction method, which can be applied to a Web-based 3D model browsing and interaction system, as shown in fig. 1, and the method includes the following steps:
s1, determining a target exhibition hall data path, performing multi-detail level preprocessing on digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file.
In a specific embodiment, the Web-based 3D model browsing and interaction system uploads and displays the 3D model created by the user in real time at the browser end, so that the user can display and interact the 3D model in a more visual and vivid manner, as shown in fig. 2, a 3D exhibition hall scene adopted in the embodiment mainly comprises a camera, a light source, a model and the like, and the 3D exhibition hall application frame is used as a basic prototype for expansion and extension, and the specific embodiment is as follows:
embedding a library file of the 3D exhibition hall using a < script > tag, and finding an element for WebGL rendering in a page and storing in a container variable;
initializing a 3D exhibition hall renderer object renderer, associating the renderer object with a Canvas, and adding the renderer object into a < div > container as a DOM subelement;
creating a scene (scene), and adding objects to the scene: a camera (camera) defining a viewing angle for viewing a scene and a light source (light) determining a hue and a darkness of the environment; the present embodiment adds model objects to the scene, which are typically composed of Mesh (Mesh) and Material (Material), with high-level objects having Texture (Texture) maps.
Rendering the scene, binding the scene (scene) and the camera (camera) by calling a render method of the renderer, and processing scene drawing.
As shown in fig. 3, the 3D exhibition hall adopted in the present embodiment mainly adopts technologies such as data preprocessing and scene updating to implement functional design, wherein, for LOD (Level of Detail) hierarchical structures of three-dimensional model data of a digital method exhibition hall, the present embodiment establishes index information of LOD paging through a design data preprocessing program so as to process different levels of detail on the basis of the index information, and simultaneously builds metadata files in a preprocessing stage to save related information such as spatial coordinate reference, tile size and LOD level of a model, the present embodiment adopts an ActiveX control data acquisition object model based on an IE browser, realizes interaction with a user through a Web-based 3D model browsing and interaction system interface so as to obtain three-dimensional model data of each digital method exhibition hall, the user can freely select a file path for storing three-dimensional model data of a target digital method exhibition hall according to requirements, and realizes switching of different method exhibition halls.
Responding to target exhibition hall data path selection operation performed by a user according to three-dimensional model data of each digital method exhibition hall, and identifying and recording all the block tiles under the selected target exhibition hall data path;
acquiring the number of CPU cores, and determining the number of sub-threads for calculation according to the number of CPU cores and the number of tiles;
dynamically distributing the computing task of each sub-thread in the computing process according to the number of the sub-threads and the current computing process;
after the sub-thread acquires the calculation task, analyzing the calculation task to obtain task information, wherein the task information at least comprises detail level information; the level of detail level information at least comprises minimum level of detail level information and maximum level of detail level information;
constructing an index tree by utilizing a depth-first algorithm according to the level information of the detail level, and cutting the index tree by utilizing a breadth-first search algorithm according to the node attribute of the index tree to obtain an optimal index tree of each block tile;
and merging the optimal index tree of each block tile into a scene tree array, and converting the scene tree array into a target scene index data file with a preset data format.
In order to describe the target scene index data file generation process in detail, the following will describe the process in detail through a specific embodiment, it needs to be described that, because the three-dimensional model data volume of the digital exhibition hall is relatively large and the data volume of each block tile is different, the required computation time is also different, so, in order to improve the program running efficiency and implement the overall optimal time, avoid blocking the activity of the main thread, the embodiment distributes the computation process to the sub-threads, and dynamically distributes the computation task of each core according to the computation process, i.e. not determining the computation task queue of each core in advance, but dynamically distributes the computation task of each core in the computation process, when the computation task of one sub-thread is completed, the task waiting in the data source stack is immediately assigned to the thread until the data source stack is empty, the task distribution is completed, and for the implementation of dynamic distribution, since the reasonable number of sub-threads is an important factor for improving the program efficiency and fully playing the hardware level, and the computation performance of hardware is mainly determined by the number of cores of the CPU (central processing unit), therefore, in the embodiment comprehensively considers the number of the cores required for the CPU and the number of the sub-threads to determine the number of the sub-threads in the number of the detail tiles according to the number of the steps of the CPU tiles, as shown in fig. 4: comparing the number of CPU cores with the number of tiles in blocks, and if the number of CPU cores is larger than the number of tiles in blocks, taking the number of tiles in blocks as the number of sub-threads for calculation; and if the number of the CPU cores is smaller than the number of the partitioned tiles, taking the number of the CPU cores as the number of the sub-threads for calculation.
In this embodiment, after the sub-thread obtains the computing task, an index construction process is performed in the sub-thread, where the index construction process is a process of reorganizing three-dimensional model data according to a structure of a quadtree spatial index, in the index construction process, the embodiment orderly organizes nodes of different LOD levels of each tile block to record node paths and name information, and calculates information of surrounding balls, and the process of implementing index construction by each sub-thread is as follows: the main thread sends the calculation task distributed to the sub thread-X to the sub thread in the form of calculation task structure variables, the sub thread analyzes the calculation task structure variables to obtain task information, and the task information at least comprises detail Level (LOD) grade information and block tile path information; the level of detail level information at least comprises minimum level of detail level information and maximum level of detail level information; after level of detail (LOD) level information is obtained, an index tree is constructed by using a depth-first algorithm according to the level of detail level information, and in this embodiment, the specific process of constructing the index tree by using the depth-first algorithm according to the level of detail level information includes:
restoring the minimum level of detail level information and the maximum level of detail level information to obtain a complete level of detail hierarchical structure as data preparation;
obtaining the number TreeCount of the nodes of the complete quadtree as a mark for judging whether the index is constructed or not according to the level information of the detail level and a node model constructed in advance, wherein the calculation formula of the node model is as follows:
wherein TreeCount represents the number of nodes; max (max) LOD Representing maximum level of detail level information; min LOD Representing minimum level of detail level information; gamma represents the breadth of the index tree, and in this embodiment, since the index tree is constructed based on a quadtree, gamma=4.
The Node level of the Node in the complete detail level hierarchical structure is used as the Node depth, a depth priority algorithm is adopted to build an index tree layer by layer until the Node number of the index tree reaches the number of the nodes of the complete quadtree, specifically, the embodiment adopts a DF algorithm (depth priority algorithm) to build a quadtree, wherein the Node depth is the LOD level where the Node is located, the breadth is 4, the three-dimensional model data format adopted by the system is in the form of OBJ+MTL+JPG, only an OBJ file is read in the construction process of each Node, calculation is carried out, other attribute information of the Node is perfected according to the Node data structure, if the OBJ file is empty or does not exist, the Node is marked as empty (Null), after the Node attribute information is added, the Node is added into a child Node (child Node) array of a father Node, then the child Node (child Node) array of the Node is built until the child Node of the lowest layer is built, the next Brother Node information is reconstructed according to the previous process, and the quadtree number of the Node is completely built until the quadtree number of the quadtree is completely reduced, namely, the quadtree is completely built after the quadtree is completely reduced by the Node number of the quadtree is completely built.
Because the tiles located at the boundary may not contain data when the tiles are divided into fine LODs, that is, some nodes not containing data are Null nodes (NullNode), as shown in fig. 5, the nodes with numbers of "3" are Null, and Null nodes also appear in the nodes with numbers of "0" and "2", and the child thread still contains these Null nodes when constructing the complete quadtree, so after the quadtree is constructed, the present embodiment also needs to perform clipping of the quadtree to achieve the purposes of optimizing the data structure, reducing memory occupation and accelerating scene search.
After a series of processes such as calculation task allocation, sub-thread data processing, quadtree clipping and the like, an optimal index tree of each tile block can be obtained, in this embodiment, the independent optimal index tree of each tile block is merged into a scene tree (sceneTree) array to generate a scene tree, fig. 6 is an exemplary diagram of a scene tree structure provided in this embodiment, each element in the scene tree sceneTree is an optimal index tree of each tile block, and the scene tree sceneTree is converted from the array into a preset data format, for example: and converting the scene tree SceneTree into a JSON character string from the array, and storing the JSON character string to the local.
S2, carrying out scene updating on the target scene index data file according to the current viewpoint or scene change parameters, and generating the latest scene index data file.
In this embodiment, the step of performing scene update on the target scene index data file according to the current viewpoint or the scene change parameter, and generating the latest scene index data file includes:
detecting the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed according to the current viewpoint or scene change parameters; the position relation between the segmented tiles and the view cone comprises that the segmented tiles are in the view cone, the segmented tiles intersect with the view cone and the segmented tiles are outside the view cone;
screening out the to-be-displayed block tiles according to the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed;
calculating the optimal model resolution of the to-be-displayed segmented tiles, and mapping optimal detail level information according to the optimal model resolution and a detail level list; the calculation formula of the optimal model resolution is as follows:
where lodRes represents the optimal model resolution; n represents the number of tiles in a block; tileSize represents the tile size of the tile; d represents the distance between the viewpoint and the center of the projection area; alpha represents the angle of view; pixels represent the number of screen pixels;
selecting an optimal node to be displayed from all the tiles to be displayed according to the optimal level of detail information, comparing the optimal node to be displayed with a node being displayed in a current scene to obtain a scene node comparison result, updating all nodes in the target scene index data file according to the scene node comparison result to generate a latest scene index data file, wherein in the embodiment, the step of selecting the optimal node to be displayed from all the tiles to be displayed according to the optimal level of detail information comprises the following steps:
judging whether the level of the current node is a target level from the root node according to the optimal detail level information, if so, adding the current node and the brother nodes thereof into an optimal node queue to be displayed; otherwise, judging whether the current node contains the child node, if so, judging whether the level of the child node is a target level; if the current node does not contain the child nodes, judging whether the child nodes of the brother nodes of the current node are target levels in sequence until all the brother nodes are judged to be finished.
In a specific embodiment, when a user switches a scene or a viewpoint position moves, view data in the scene is correspondingly changed, the view data is not removed from the view cone, the view cone space is newly added and displayed, when the viewpoint distance changes, a proper LOD level is updated immediately, a task of scene updating calculation of a 3D exhibition hall is put into a sub-thread to be performed, thus the blockage of a main thread is avoided, the speed of data updating and scene drawing is accelerated, and in the embodiment, the calculation process of scene updating is divided into four parts of view cone detection, LOD level judgment, optimal node selection and node updating, namely: firstly, judging whether the segmented tiles are in a view cone or intersect the view cone, obtaining a segmented tile list in a view field, calculating the distance between the segmented tiles in the view field and a camera, judging optimal detail level information (optimal LOD level information), wherein in the same picture, the detail levels of different objects which can be observed by human eyes are different, LOD levels are different, required processing resources are different, and the finer requirements are higher; selecting an optimal node according to the optimal detail level information; the nodes to be displayed are compared with the nodes being displayed, so that new nodes are added and old nodes are removed, and the specific implementation process of scene updating is as follows:
as shown in fig. 7, in the present embodiment, perspective projection is adopted, the angle of view is 45 °, and fig. 7 shows three positional relationships between the three-dimensional model and the cone of view: in the view cone, intersecting the view cone and outside the view cone, the embodiment only needs to judge the position relation between the surrounding ring of each tile and the view cone, in order to accelerate the calculation process and improve the hit rate of selection, the system firstly judges whether the tile in the current view (i.e. in the view cone) still exists in the next view (i.e. in the view cone) after the change of the view angle, then judges whether the tile not in the current view (i.e. outside the view cone) enters the next view (i.e. in the view cone) after the change of the view angle, thereby screening out the tile to be displayed, and in the scene updating process, although the embodiment screens out the tile to be displayed, no LOD level information is given, so that the optimal node to be displayed needs to be calculated is determined, since the view point change is related to the LOD model resolution change, namely when the view point is far away, the model resolution is lower; when the viewpoint is near, the model resolution is higher, and according to the principle, the embodiment selects the optimal LOD node to be displayed, and the specific flow steps are as follows:
calculating the distance d between a camera and the center of a block tile (the center of the block tile is represented by a surrounding circle), calculating the optimal model resolution (lodRes) according to the distance d between the camera and the center of the tile (the center of the block tile is represented by the surrounding circle), mapping optimal detail level information according to the optimal model resolution (lodRes) and an LOD level table, judging whether the current node level is a target level or not from a root node according to the optimal detail level information, if so, adding the current node into an optimal node queue to be displayed, and adding brother nodes of the current node into the optimal node queue to be displayed; otherwise, judging whether the current node contains the child node, if so, judging whether the level of the child node is a target level; if the child node does not exist, judging whether the child node of the brother node of the current node is a target level in sequence until all the brother nodes are judged to be finished, and ending the process;
the judgment of the target level is sequentially carried out on each to-be-displayed block tile, until all to-be-displayed block tiles are judged, the whole judgment process is ended, a node updating process is entered, in the node updating process, in order to reduce data interaction and improve the efficiency of scene drawing, the embodiment reclassifies all nodes by comparing node information forming a current scene and a next scene, and the nodes are divided into three parts of nodes which do not need to be changed, newly added nodes and nodes which need to be removed, wherein model data which exist in the scene and still exist in the next scene, namely the nodes which do not need to be changed are not processed; loading the newly added node return main thread; for nodes needing to be removed, the nodes are returned to the main thread, removed from the scene and destroyed from the memory.
S3, loading, rendering and drawing scene data according to the latest scene index data file.
In this embodiment, after the nodes for scene update return to the main thread, the model data in the scene are processed immediately, the newly added display content is loaded and rendered, the removed content is removed and destroyed, and the memory is released for other data for standby.
The implementation of the invention provides a 3D digital method exhibition hall interaction method, which comprises the steps of determining a target exhibition hall data path, performing multi-detail level preprocessing on digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file; performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file; and loading, rendering and drawing scene data according to the latest scene index data file. The method provided by the embodiment of the invention can accelerate the three-dimensional model through the technologies of WebGL, data preprocessing, multithreading, local node updating and the like, and can realize the technical scheme of browsing and operating the three-dimensional model of the digital method exhibition hall without additionally installing complicated 3D software, thereby greatly simplifying the 3D model manufacturing process and reducing the manufacturing cost.
It should be noted that, the sequence number of each process does not mean that the execution sequence of each process is determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
In one embodiment, as shown in fig. 8, an embodiment of the present invention provides a 3D digital method exhibition hall interaction system, the system comprising:
the data preprocessing module 101 is used for determining a target exhibition hall data path, performing multi-detail level preprocessing on the digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file;
the scene updating module 102 is configured to perform scene updating on the target scene index data file according to the current viewpoint or the scene change parameter, and generate an up-to-date scene index data file;
and the scene drawing module 103 is used for loading and rendering and drawing scene data according to the latest scene index data file.
For specific limitations regarding a 3D digital exhibition hall interaction system, reference may be made to the above-mentioned limitations regarding a 3D digital exhibition hall interaction method, and details thereof are not repeated herein. Those of ordinary skill in the art will appreciate that the various modules and steps described in connection with the embodiments disclosed herein may be implemented as hardware, software, or a combination of both. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The 3D digital method exhibition hall interaction system provided by the embodiment of the invention establishes a target scene index data file through a data preprocessing module; scene updating is carried out on the target scene index data file through a scene updating module, and an up-to-date scene index data file is generated; and loading, rendering and drawing scene data of the latest scene index data file are realized through a scene drawing module. Compared with the prior art, the 3D digital method exhibition hall interaction system provided by the embodiment can realize browsing and operation of the digital method exhibition hall three-dimensional model without installing complex 3D software, improves interaction experience, reduces development cost, and realizes layering sense and detail display of the model.
FIG. 9 is a diagram of a computer device including a memory, a processor, and a transceiver connected by a bus, according to an embodiment of the present invention; the memory is used to store a set of computer program instructions and data and the stored data may be transferred to the processor, which may execute the program instructions stored by the memory to perform the steps of the above-described method.
Wherein the memory may comprise volatile memory or nonvolatile memory, or may comprise both volatile and nonvolatile memory; the processor may be a central processing unit, a microprocessor, an application specific integrated circuit, a programmable logic device, or a combination thereof. By way of example and not limitation, the programmable logic device described above may be a complex programmable logic device, a field programmable gate array, general purpose array logic, or any combination thereof.
In addition, the memory may be a physically separate unit or may be integrated with the processor.
It will be appreciated by those of ordinary skill in the art that the structure shown in fig. 9 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have the same arrangement of components.
In one embodiment, an embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described method.
According to the 3D digital method exhibition hall interaction method, system, equipment and medium, the rendering performance of the 3D digital method exhibition hall is improved through the processing procedures of data preprocessing, multithreading processing, scene updating and the like, and the technical scheme of browsing and operating the three-dimensional model of the digital method exhibition hall can be realized without installing complicated 3D software, so that the 3D model manufacturing process is greatly simplified, and the manufacturing cost is reduced.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.
Those skilled in the art will appreciate that implementing all or part of the above described embodiment methods may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed, may comprise the steps of embodiments of the methods described above.
The foregoing examples represent only a few preferred embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the invention. It should be noted that modifications and substitutions can be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and substitutions should also be considered to be within the scope of the present application. Therefore, the protection scope of the patent application is subject to the protection scope of the claims.

Claims (10)

1. The 3D digital method exhibition hall interaction method is characterized by comprising the following steps of:
determining a target exhibition hall data path, performing multi-level-of-detail preprocessing on digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file;
performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file;
and loading, rendering and drawing scene data according to the latest scene index data file.
2. The 3D digital therapeutic exhibition hall interaction method of claim 1, wherein the steps of determining a target exhibition hall data path and performing multi-level of detail preprocessing on the digital therapeutic exhibition hall three-dimensional model data under the target exhibition hall data path, and creating a target scene index data file comprise:
responding to target exhibition hall data path selection operation performed by a user according to three-dimensional model data of each digital method exhibition hall, and identifying and recording all the block tiles under the selected target exhibition hall data path;
acquiring the number of CPU cores, and determining the number of sub-threads for calculation according to the number of CPU cores and the number of tiles;
dynamically distributing the computing task of each sub-thread in the computing process according to the number of the sub-threads and the current computing process;
after the sub-thread acquires the calculation task, analyzing the calculation task to obtain task information, wherein the task information at least comprises detail level information; the level of detail level information at least comprises minimum level of detail level information and maximum level of detail level information;
constructing an index tree by utilizing a depth-first algorithm according to the level information of the detail level, and cutting the index tree by utilizing a breadth-first search algorithm according to the node attribute of the index tree to obtain an optimal index tree of each block tile;
and merging the optimal index tree of each block tile into a scene tree array, and converting the scene tree array into a target scene index data file with a preset data format.
3. The method of 3D digital exhibition hall interaction of claim 2, wherein the step of determining the number of sub-threads for calculation based on the number of CPU cores and the number of tiles comprises:
comparing the number of CPU cores with the number of tiles in blocks, and if the number of CPU cores is larger than the number of tiles in blocks, taking the number of tiles in blocks as the number of sub-threads for calculation; and if the number of the CPU cores is smaller than the number of the partitioned tiles, taking the number of the CPU cores as the number of the sub-threads for calculation.
4. The method of 3D digital exhibition interaction according to claim 2, wherein the step of constructing an index tree using a depth-first algorithm according to the level of detail information comprises:
restoring the minimum detail level information and the maximum detail level information to obtain a complete detail level hierarchical structure;
obtaining the number of nodes of the complete quadtree according to the level information of the detail level and a node model constructed in advance;
and taking the node level of the node in the complete detail level hierarchical structure as the node depth, and constructing an index tree layer by adopting a depth priority algorithm until the node number of the index tree reaches the node number of the complete quadtree.
5. The 3D digital method of claim 2, wherein the step of performing scene update on the target scene index data file according to the current viewpoint or scene change parameter, and generating the latest scene index data file comprises:
detecting the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed according to the current viewpoint or scene change parameters; the position relation between the segmented tiles and the view cone comprises that the segmented tiles are in the view cone, the segmented tiles intersect with the view cone and the segmented tiles are outside the view cone;
screening out the to-be-displayed block tiles according to the position relation between each block tile and the view cone before and after the current viewpoint or scene is changed;
calculating the optimal model resolution of the to-be-displayed segmented tiles, and mapping optimal detail level information according to the optimal model resolution and a detail level list;
and selecting optimal nodes to be displayed from all the to-be-displayed blocked tiles according to the optimal level of detail information, comparing the optimal nodes to be displayed with nodes being displayed in a current scene to obtain scene node comparison results, and updating all nodes in the target scene index data file according to the scene node comparison results to generate the latest scene index data file.
6. The 3D digital exhibition hall interaction method of claim 5, wherein the calculation formula of the optimal model resolution is:
where lodRes represents the optimal model resolution; n represents the number of tiles in a block; tileSize represents the tile size of the tile; d represents the distance between the viewpoint and the center of the projection area; alpha represents the angle of view; pixel represents the number of screen pixels.
7. The method of 3D digital exhibition hall interaction of claim 5, wherein the step of selecting the optimal node to be displayed from all of the tiles to be displayed according to the optimal level of detail information comprises:
judging whether the level of the current node is a target level from the root node according to the optimal detail level information, if so, adding the current node and the brother nodes thereof into an optimal node queue to be displayed; otherwise, judging whether the current node contains the child node, if so, judging whether the level of the child node is a target level; if the current node does not contain the child nodes, judging whether the child nodes of the brother nodes of the current node are target levels in sequence until all the brother nodes are judged to be finished.
8. A 3D digital treatment exhibition hall interaction system, the system comprising:
the data preprocessing module is used for determining a target exhibition hall data path, performing multi-detail level preprocessing on the digital method exhibition hall three-dimensional model data under the target exhibition hall data path, and establishing a target scene index data file;
the scene updating module is used for performing scene updating on the target scene index data file according to the current viewpoint or scene change parameters to generate an up-to-date scene index data file;
and the scene drawing module is used for loading and rendering and drawing scene data according to the latest scene index data file.
9. A computer device, characterized by: comprising a processor and a memory, the processor being connected to the memory, the memory being for storing a computer program, the processor being for executing the computer program stored in the memory to cause the computer device to perform the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized by: the computer readable storage medium having stored therein a computer program which, when executed, implements the method of any of claims 1 to 7.
CN202311478355.7A 2023-11-07 2023-11-07 Interaction method, system, equipment and medium for 3D digital method exhibition hall Pending CN117392300A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311478355.7A CN117392300A (en) 2023-11-07 2023-11-07 Interaction method, system, equipment and medium for 3D digital method exhibition hall

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311478355.7A CN117392300A (en) 2023-11-07 2023-11-07 Interaction method, system, equipment and medium for 3D digital method exhibition hall

Publications (1)

Publication Number Publication Date
CN117392300A true CN117392300A (en) 2024-01-12

Family

ID=89464769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311478355.7A Pending CN117392300A (en) 2023-11-07 2023-11-07 Interaction method, system, equipment and medium for 3D digital method exhibition hall

Country Status (1)

Country Link
CN (1) CN117392300A (en)

Similar Documents

Publication Publication Date Title
JP7125512B2 (en) Object loading method and device, storage medium, electronic device, and computer program
CN110070613B (en) Large three-dimensional scene webpage display method based on model compression and asynchronous loading
US6268862B1 (en) Three dimensional virtual space generation by fusing images
US9024947B2 (en) Rendering and navigating photographic panoramas with depth information in a geographic information system
US7535473B2 (en) Collaborative environments in a graphical information system
US8570322B2 (en) Method, system, and computer program product for efficient ray tracing of micropolygon geometry
US9754405B1 (en) System, method and computer-readable medium for organizing and rendering 3D voxel models in a tree structure
EP1764744A2 (en) Streaming geometry data using a quasi-pyramidal structure
CN101414383B (en) Image processing apparatus and image processing method
JP2022024065A (en) Multi-resolution image system
CN110390708A (en) Render the System and method for and non-volatile memory medium of optical distortion effect
CN113628331B (en) Data organization and scheduling method for photogrammetry model in illusion engine
CN112070909B (en) Engineering three-dimensional model LOD output method based on 3D Tiles
CN109035423B (en) Floor segmentation method and device of virtual three-dimensional model of house
EP1866870B1 (en) Rendering 3d computer graphics using 2d computer graphics capabilities
CN112734900A (en) Baking method, baking device, baking equipment and computer-readable storage medium of shadow map
KR20120042467A (en) Method for reusing physics simulation results and game service apparatus using the same
CN117392300A (en) Interaction method, system, equipment and medium for 3D digital method exhibition hall
Argudo et al. Interactive inspection of complex multi-object industrial assemblies
CN116824082B (en) Virtual terrain rendering method, device, equipment, storage medium and program product
CN117994412A (en) Three-dimensional scene construction method and related device
Ortega et al. Rendering large datasets of georeferenced markers in mobile devices
CN115859411A (en) Volume rendering collision detection method, device, equipment and storage medium
CN117591099A (en) System for zero code release map interface based on reach
KR20240086390A (en) Method for operating 3 dimentional space

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