CN114026604A - Model display method and device, electronic equipment and computer readable storage medium - Google Patents

Model display method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114026604A
CN114026604A CN202080044432.6A CN202080044432A CN114026604A CN 114026604 A CN114026604 A CN 114026604A CN 202080044432 A CN202080044432 A CN 202080044432A CN 114026604 A CN114026604 A CN 114026604A
Authority
CN
China
Prior art keywords
grid
target
display layer
scene
grid display
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
CN202080044432.6A
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.)
SZ DJI Technology Co Ltd
Original Assignee
SZ DJI Technology 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 SZ DJI Technology Co Ltd filed Critical SZ DJI Technology Co Ltd
Publication of CN114026604A publication Critical patent/CN114026604A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Databases & Information Systems (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A model display method, a model display device and a computer-readable storage medium are provided, and the method comprises the following steps: acquiring a current visual field range (101) of a display window for displaying a three-dimensional model of a scene; determining a target grid display layer (102) to be loaded in the scene three-dimensional model according to the visual field range; calculating the target resource amount (103) required by the electronic equipment for loading the target grid display layer; according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in a loading window (104); under the condition that hardware resources of the electronic equipment are insufficient, a coarser target grid block can be selected for loading and displaying, so that the scene three-dimensional model is normally loaded; under the condition that hardware resources of the electronic equipment are abundant, a finer target grid block is selected for loading and displaying, so that the advantages of the hardware resources of the electronic equipment are utilized, and the displaying effect is improved.

Description

Model display method and device, electronic equipment and computer readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying a model, an electronic device, and a computer-readable storage medium.
Background
The level of Detail (LOD) technique is to determine resource allocation when rendering an object of a three-dimensional model according to the position and importance of the three-dimensional model in a display environment, so as to reduce the number of faces and details of a distant or unimportant object, thereby reducing resource consumption.
In the present scheme, in order to display a large-scale three-dimensional model, the electronic device generally needs to construct a corresponding LOD model, the LOD model has a plurality of display layers with different fineness, and the electronic device can load and display the display layers according to the hardware condition of the electronic device. In practical application, the electronic equipment can select a certain layer of display layer in the LOD model as the layer to be displayed according to actual requirements, and the fineness of the layer to be displayed can meet the actual requirements.
However, under the condition that the hardware condition of the electronic equipment is poor, the probability that the layer to be displayed cannot be normally loaded and displayed can be improved; under the condition that the hardware condition of the electronic equipment is excellent, the layer to be displayed can only be displayed with the self fineness, and the detail degree of the display cannot be further improved. In conclusion, the display effect of the electronic equipment on the three-dimensional model is poor.
Disclosure of Invention
The application provides a model display method and device and a computer readable storage medium, which can solve the problem that in the prior art, electronic equipment has poor display effect on a three-dimensional model.
In a first aspect, an embodiment of the present application provides a method for displaying a model, including:
acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window;
wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer or a second grid display layer which is coarser than the target grid display layer;
the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer;
the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer;
the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
In a second aspect, an embodiment of the present application provides a method for displaying a model, including:
acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model, wherein the actual geometric errors are used for reflecting the actual geometric distances between the grid surfaces of the grid display layers and the surface of the scene three-dimensional model;
under the condition that the target resource quantity meets the rough display condition, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model;
and selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
In a third aspect, an embodiment of the present application provides a display apparatus for a model, including:
a memory and a processor;
the memory is used for acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor is configured to:
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window;
wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer or a second grid display layer which is coarser than the target grid display layer;
the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer;
the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer;
the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
In a fourth aspect, an embodiment of the present application provides a display apparatus for a model, including:
a memory and a processor;
the memory is used for acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor is configured to: determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model, wherein the actual geometric errors are used for reflecting the actual geometric distances between the grid surfaces of the grid display layers and the surface of the scene three-dimensional model;
under the condition that the target resource quantity meets the rough display condition, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model;
and selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
In a fifth aspect, the present application provides an electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program implementing the method of the above aspect when executed by the processor.
In a sixth aspect, the present application provides a computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of the above aspect.
In a seventh aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspect.
In the embodiment of the application, the display fineness of each grid display layer of the scene three-dimensional model is specifically quantized through geometric errors, and according to the specific hardware condition of the electronic equipment for loading the scene three-dimensional model, a target grid block coarser than a grid block of a target grid display layer can be selected from the scene three-dimensional model for loading and displaying under the condition that the hardware resource of the electronic equipment is insufficient to load the target grid display layer to be loaded, so that the scene three-dimensional model can be normally loaded under the condition that the hardware resource of the electronic equipment is poor; under the condition that hardware resources of the electronic equipment are abundant, the target grid blocks which are finer than the grid blocks of the target grid display layer can be selected from the scene three-dimensional model for loading and displaying, so that the scene three-dimensional model is displayed more finely by using the advantages of the hardware resources of the electronic equipment under the condition that the hardware resources of the electronic equipment are abundant, and the display effect is improved.
Drawings
Fig. 1 is a flowchart of a method for displaying a model according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a grid display layer provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating specific steps of a method for displaying a model according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a mesh display layer included in a three-dimensional model of a scene according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an alternative process of a grid display layer according to an embodiment of the present application;
FIG. 6 is a flow chart of another model display method provided in the embodiments of the present application;
FIG. 7 is a block diagram of a model display device provided by an embodiment of the present application;
fig. 8 is a block diagram of a display device of another model provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, exemplary embodiments according to the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the present application and not all embodiments of the present application, and that the present application is not limited by the example embodiments described herein. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the application described in the application without inventive step, shall fall within the scope of protection of the application.
In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the present application. It will be apparent, however, to one skilled in the art, that the present application may be practiced without one or more of these specific details. In other instances, well-known features of the art have not been described in order to avoid obscuring the present application.
It is to be understood that the present application is capable of implementation in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
In order to provide a thorough understanding of the present application, a detailed structure will be presented in the following description in order to explain the technical solutions presented in the present application. Alternative embodiments of the present application are described in detail below, however, the present application may have other implementations in addition to these detailed descriptions.
The following describes the model display method, apparatus, and system in detail with reference to the accompanying drawings. The features of the following examples and embodiments may be combined with each other without conflict.
Fig. 1 is a flowchart of a model displaying method provided in an embodiment of the present application, and as shown in fig. 1, the method may include:
step 101, obtaining a current view field range of a display window for displaying the scene three-dimensional model.
In the embodiment of the application, a scene three-dimensional model of a scene can be reconstructed based on images acquired by a movable platform in the scene, and after the scene three-dimensional model is established, the scene three-dimensional model can be rendered and displayed through a display window on electronic equipment so as to realize three-dimensional reconstruction and display of the scene. Wherein, the movable platform can include: unmanned aerial vehicle, unmanned car, unmanned ship, handheld shooting equipment etc..
Specifically, the goal of establishing the three-dimensional scene model is to establish multiple layers of grid display layers, the detail degree of the multiple layers of grid display layers is decreased progressively, each layer of grid display layer may include multiple grid surfaces, and the grid surfaces are used for displaying the surface of the object corresponding to the three-dimensional scene model.
For example, assuming that the three-dimensional scene model corresponds to an object that is a sphere with a smooth surface, the grid display layer may be understood as a regular polyhedron that encloses the sphere, and the number of grid faces of different grid display layers is different. The higher the number of grid faces, the higher the level of detail of the grid presentation layer. Referring to fig. 2, which shows a schematic diagram of a grid display layer provided in an embodiment of the present application, for one grid display layer 10 and one grid display layer 11, the grid display layer 10 is a regular hexahedron, and the grid display layer 11 is a regular dodecahedron. In the process of changing the grid display layer 10 into the grid display layer 11, the number of grid faces of the grid display layer is increased, and the grid display layer 11 is closer to a sphere than the grid display layer 10, which makes the degree of detail of the grid display layer 11 higher than the grid display layer 10.
Furthermore, the electronic device displays part or all of the area of the three-dimensional scene model through a display window of the display screen, the display window has an adjustable visual field range, and the detail degrees of the three-dimensional scene model which can be displayed under different visual field ranges are different.
In the embodiment of the application, a user can select the current visual field range of the display window of the electronic device through selection operation, for example, if the visual field range of the display window includes 0-10, the larger the numerical value is, the larger the visual field range is, and the coarser the detail degree of the displayed three-dimensional model of the scene is; the smaller the numerical value is, the smaller the visual field range is, and the finer the detail degree of the displayed scene three-dimensional model is; in one implementation, the selection operation of the user may be a scroll operation of the mouse wheel of the electronic device by the user, and different view ranges may be selected by different scroll directions and scroll distances, for example, if the user wishes to display the three-dimensional model of the scene with moderate fineness in a medium view range, the user may select the view range 5 by the mouse wheel. In addition, the selection of the current view range may also be implemented in other manners, for example, the user directly inputs a corresponding numerical value as the current view range.
The current visual field range may be a default value, which is not limited in the embodiments of the present application.
And step 102, determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range.
In the embodiment of the application, different view ranges correspond to different display fineness requirements of a user on a scene three-dimensional model, so that the display fineness of each grid display layer in the scene three-dimensional model can be quantized, the corresponding relation between the view ranges and the display fineness is established, the display fineness corresponding to the current view range of the display window selected by the user is determined according to the corresponding relation, and the target grid display layer with the display fineness is provided.
For example, assuming that the scene three-dimensional model includes three grid display layers with coarse, moderate and fine display fineness respectively, and the visual field range of the display window also includes three values, i.e., far, medium and near, the corresponding relationship of coarse-far, moderate-medium and fine-near can be established, and when the visual field range subsequently selected by the user is the far corresponding value, the grid display layer corresponding to the coarse display fineness can be determined as the target grid display layer.
And 103, calculating the target resource amount required by the electronic equipment for loading the target grid display layer.
In the embodiment of the application, in the process of loading the grid display layer, the electronic device needs to perform calculation of algorithms such as rendering and the like, and consumes a certain amount of resources of hardware, and the more precise the loaded grid display layer is, the larger the amount of resources consumed is. The resource amount may include hardware parameters such as a video memory capacity and a memory capacity of the electronic device.
Therefore, after the target grid display layer is determined, the target resource amount required by the electronic device for loading the target grid display layer can be calculated according to the size of the loaded target grid display layer, the required algorithm and the like. For example, the display memory capacity occupied by the electronic equipment is calculated and loaded when the target grid display layer is loaded and rendered.
And 104, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model according to the target resource amount, and displaying the selected target grid blocks in the loading window.
Wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer, or a second grid display layer which is coarser than the target grid display layer.
In the embodiment of the present application, the total resource amount of the hardware of the electronic device is limited, for example, the total capacity of the memory and the video memory used by the electronic device is fixed, for example, the total capacity of the memory is 4g, and the total capacity of the video memory is 2 g.
Under the most basic condition, the sum of the resource amount required by the display window to load the target grid display layer and the resource amount currently used by the hardware cannot exceed the total resource amount, otherwise, the resources are insufficient, and the target grid display layer cannot be loaded. In addition, in some cases, a threshold slightly smaller than the total resource amount may be set, and the sum of the resource amount required by the display window to load the target grid display layer and the resource amount currently used by the hardware may not exceed the threshold, so as to avoid the resource amount from being consumed, and to always reserve a part of the resource amount for use in an emergency.
Therefore, under the condition that hardware resources are not enough to load the target grid display layer, for example, the target grid display layer needs to consume 1.5g of video memory, and the current video memory only remains 1.2g of available capacity, the electronic device may select all grid blocks of the second grid display layer, which are coarser than the target grid display layer, from one or more grid display layers of the scene three-dimensional model as target grid blocks, and load the second grid display layer formed by all target grid blocks through the display window, because the fineness of the second grid display layer is lower than that of the target grid display layer, the amount of resources required for loading the second grid display layer is reduced, and the condition of insufficient hardware resources is relieved.
Further, if the hardware resources still cannot meet the requirement of loading the second grid display layer, a grid display layer with lower fineness than the second grid display layer can be further selected from one or more grid display layers of the scene three-dimensional model for loading until the hardware resources can meet the requirement of loading the current grid display layer.
Under the condition that the hardware resources can meet the requirement of loading the target grid display layer and the hardware resources are sufficient, for example, the target grid display layer needs to consume 0.5g of video memory, and the current video memory has 2g of available capacity. The electronic equipment can select all grid blocks of a first grid display layer which is more precise than a target grid display layer as target grid blocks from one or more grid display layers of the scene three-dimensional model under the condition that hardware resources are enough to completely load the finer grid display layer, and loads the first grid display layer formed by all the target grid blocks through the display window.
Under another condition (hardware resources are remained, but a finer grid display layer cannot be completely loaded), at this time, the electronic device may select a part of grid blocks from the finer first grid display layer, and replace the selected grid blocks with corresponding blocks in the target grid display layer until the resource amount required by the replaced target grid display layer reaches the upper limit of hardware, and load the replaced target grid display layer through the display window.
Furthermore, if the hardware resource can easily meet the requirement of loading the first grid display layer, a grid display layer with higher fineness than the first grid display layer can be further selected from one or more grid display layers of the scene three-dimensional model for loading until the upper limit of the hardware resource is reached.
Specifically, the actual geometric error of any grid block in the first grid display layer is smaller than the actual geometric error of any grid block in the target grid display layer; the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer; the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
In the embodiment of the present application, the geometric error is used to characterize a geometric distance between a mesh surface in the mesh display layer and a surface of the three-dimensional model of the scene (i.e., a surface of an object corresponding to the three-dimensional model of the scene, which may also be understood as a surface of a mesh surface of a perfect mesh display layer). Generally speaking, the smaller the actual geometric error of the grid display layer is, the larger the number of grid faces included in the grid display layer is, the smaller the geometric distance between the grid face of the grid display layer and the surface of the three-dimensional model of the scene is, and because the number of grid faces is larger and the grid face is closer to the perfect grid display layer, the more similar the grid display layer is to the perfect grid display layer, the higher the degree of detail of the grid display layer is.
For example, referring to fig. 2, in the case that the object corresponding to the scene three-dimensional model is a sphere with a smooth surface, the grid display layer 10 is a regular hexahedron, and the grid display layer 11 is a regular dodecahedron. It can be seen that the larger the number of the grid surfaces of the grid display layer is, the smaller the geometric distance between the grid surface and the surface of the sphere is, so that the actual geometric error of the grid display layer 11 is smaller than that of the grid display layer 11.
In the embodiment of the application, by introducing the concept of the geometric error, the display fineness of each grid display layer of the scene three-dimensional model can be specifically quantized, so that the display fineness of each grid display layer can be distinguished according to the difference of the actual geometric error. The fineness of the first grid display layer is greater than that of the target grid display layer and the second grid display layer, so that the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer and that of any grid block in the second grid display layer; the fineness of the second grid display layer is smaller than the fineness of the first grid display layer and the target grid display layer, so that the actual geometric error of any grid block in the second grid display layer is larger than the actual geometric error of any grid block in the target grid display layer and the first grid display layer.
To sum up, according to the method for displaying a model provided in the embodiment of the present application, the display fineness of each grid display layer of a scene three-dimensional model is specifically quantized through a geometric error, and according to a specific hardware condition of an electronic device that loads the scene three-dimensional model, a target grid block that is coarser than a grid block of a target grid display layer is selected from the scene three-dimensional model for load display under the condition that a hardware resource of the electronic device is insufficient to load the target grid display layer to be loaded, so that the scene three-dimensional model can be normally loaded under the condition that the hardware resource of the electronic device is poor; under the condition that hardware resources of the electronic equipment are abundant, the target grid blocks which are finer than the grid blocks of the target grid display layer can be selected from the scene three-dimensional model for loading and displaying, so that the scene three-dimensional model is displayed more finely by using the advantages of the hardware resources of the electronic equipment under the condition that the hardware resources of the electronic equipment are abundant, and the display effect is improved.
Fig. 3 is a specific flowchart of a model displaying method provided in an embodiment of the present application, where the method may include:
step 201, obtaining a current view field range of a display window for displaying the scene three-dimensional model.
Wherein the scene three-dimensional model comprises a plurality of grid display layers, each grid display layer comprising at least one grid block;
specifically, step 201 may specifically refer to step 101 described above, and is not described herein again.
Step 202, determining a target geometric error corresponding to the visual field range.
In the embodiment of the application, different view ranges correspond to different display fineness requirements of a user on a three-dimensional model of a scene, so that the display fineness of each grid display layer in the three-dimensional model of the scene can be quantized by introducing a geometric error, and a corresponding relation between the view range and the geometric error is established, so that a target geometric error corresponding to a current view range of a display window selected by the user is determined according to the corresponding relation, and the target grid display layer with the target geometric error is determined.
For example, assuming that the scene three-dimensional model includes three grid display layers with geometric errors respectively being a coarse value, a moderate value, and a fine value, and the visual field range of the display window also includes a far value, a medium value, and a near value, a coarse-far, moderate-medium, and fine-near correspondence may be established, and when the visual field range subsequently selected by the user is the far corresponding value, the grid display layer corresponding to the geometric error of the coarse value may be determined as the target grid display layer.
And 203, determining a target grid display layer in the scene three-dimensional model according to the target geometric error.
The target grid display layer is the grid display layer with the minimum difference value between the actual geometric error and the target geometric error.
Specifically, the geometric error is used to represent a geometric distance between a mesh surface in the mesh display layer and a surface of the three-dimensional model of the scene (i.e., a surface of an object corresponding to the three-dimensional model of the scene, which may also be understood as a surface of a mesh surface of a perfect mesh display layer). Since the target geometric error corresponding to the current view range of the display window is determined in step 202, the target grid display layer with the actual geometric error closest to the target geometric error may be the grid display layer satisfying the definition currently required by the user.
And 204, calculating the target resource amount required by the electronic equipment for loading the target grid display layer.
Specifically, step 204 may specifically refer to step 103 described above, and is not described herein again.
Optionally, step 204 may also be implemented by determining the target resource amount according to the target geometric error and a screen resolution of a display screen of the electronic device.
In the embodiment of the application, the screen resolution of the display screen of the electronic device determines the visual field range, and when the user does not perform the visual field range adjustment operation, the larger the screen resolution is, the more the effective area of the loaded scene three-dimensional model becomes, and the consumed resources become larger; the smaller the screen resolution is, the less the effective area of the loaded three-dimensional model of the scene becomes, and the less resources are consumed. Therefore, the display fineness of the target grid display layer can be quantified based on the target geometric error, and the target resource amount required by loading the target grid display layer is further determined by the target geometric error and the screen resolution of the display screen of the electronic device.
Step 205, according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window.
Specifically, step 205 may specifically refer to step 104 described above, and is not described herein again.
Optionally, step 205 includes:
and a substep 2051, selecting a part or all of the grid blocks in the first grid display layer to replace the corresponding grid blocks of the target grid display layer when the target resource amount meets the fine display condition.
And a substep 2052, displaying all the grid blocks included in the replaced target grid display layer as target grid blocks through the display window.
Optionally, the fine display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a first preset threshold value.
In the embodiment of the application, the hardware resources of the electronic device can be limited by the fine display condition to meet the condition that the target grid display layer is loaded, and under the condition that the hardware resources are sufficient, the hardware resources of the electronic device are sufficient, and it can be reflected that the sum of the target resource amount required by loading the target grid display layer and the current used resource amount of the electronic device is less than or equal to the first preset threshold.
For example, when the hardware resource amount of the electronic device is a display memory, the total display memory of the electronic device is 2g, assuming that the electronic device can further display the scene three-dimensional model in a refined manner and can normally use other functions, 0.4g of the display memory needs to be reserved, at this time, the first preset threshold value may be 1.6g, and when the sum of the target resource amount required by loading the target grid display layer and the current used resource amount of the electronic device is less than or equal to 1.6g, the electronic device may further display the scene three-dimensional model in a refined manner by using the advantage of the hardware resources on the basis of normally operating other functions.
It should be noted that the first preset threshold may be adjusted according to different actual requirements, and in addition, the fine display condition may also be that a ratio of a sum of the target resource amount and a current used resource amount of the electronic device to the total resource amount is smaller than a preset ratio value, for example, if the preset ratio value is 80%, and the sum of the target resource amount and the current used resource amount of the electronic device occupies 40% of the resource amount of the electronic device, then the hardware resources of the electronic device are sufficient at this time, and the requirement for fine display of the three-dimensional model of the scene may be met.
Furthermore, under the condition that the target resource amount meets the fine display condition, all grid blocks of a first grid display layer which are finer than the target grid display layer can be selected from one or more grid display layers of the scene three-dimensional model to serve as target grid blocks, and the first grid display layer formed by all the target grid blocks is loaded through the display window, so that the advantage of hardware resources of the electronic equipment can be utilized, the scene three-dimensional model can be displayed more finely, and the display effect is improved.
Under another condition (hardware resources are remained, but a finer grid display layer cannot be completely loaded), at this time, the electronic device may select a part of grid blocks from the finer first grid display layer, and replace the selected grid blocks with corresponding blocks in the target grid display layer until the resource amount required by the replaced target grid display layer reaches the upper limit of hardware, and load the replaced target grid display layer through the display window.
Furthermore, if the hardware resource can easily meet the requirement of loading the first grid display layer, a grid display layer with higher fineness than the first grid display layer can be further selected from one or more grid display layers of the scene three-dimensional model for loading until the upper limit of the hardware resource is reached.
Optionally, sub-step 2051 comprises:
sub-step a1, calculating an error ratio of each mesh block in the target mesh presentation layer, where the error ratio is a ratio of an actual geometric error of the mesh block to an expected error of the mesh block.
And a substep a2, sequentially replacing the grid blocks in the target grid presentation layer with the corresponding grid blocks in the first grid presentation layer according to the sequence from large to small of the error ratio of the grid blocks in the target grid presentation layer, and stopping replacement until the current remaining resource amount of the electronic device is less than or equal to a third preset threshold.
Optionally, the expected error of the grid block includes: a ratio between a width of a screen resolution of the electronic device and a distance of the grid block to a viewpoint.
In this embodiment of the present application, each grid block in the grid presentation layer may be regarded as an individual that can be independently loaded, and has an actual geometric error and a corresponding expected error, and the closer the error ratio of the grid block is to 1, the higher the priority of replacing the grid block with a finer grid block is, and then the grid blocks in the target grid presentation layer may be sequentially replaced with the corresponding grid blocks in the first grid presentation layer according to the order from the large error ratio value to the small error ratio value of the grid block in the target grid presentation layer, until the current remaining resource amount of the electronic device is less than or equal to a third preset threshold, and the replacement is stopped.
For example, referring to FIG. 4, a schematic diagram of a mesh presentation layer included in a three-dimensional model of a scene is shown. The grid display layer m0 is the finest grid display layer, the actual geometric error is 0.5, and 16 grid blocks are in total; the grid display layer m1 is a moderate grid display layer, the actual geometric error is 1, and 4 grid blocks are in total; the grid display layer m2 is the coarsest grid display layer, the actual geometric error is 2, and there are 1 grid blocks. Wherein each grid block consumes 10M of video memory.
If the target grid display layer corresponding to the current view range of the display window is the grid display layer M1, four grid blocks of the grid display layer M1 are selected to be loaded, the consumed total video memory is 40M, and if the actual geometric error of the first grid block 21 of the grid display layer M1 obtained through calculation is 1 and the expected error is 1.2, the error ratio of the first grid block 21 is 1/1.2.
The actual geometric error of the second grid block 22 is 1, the expected error is 1.1, and the error ratio of the second grid block 22 is 1/1.1.
The actual geometric error of the third grid block 23 is 1, the expected error is 1.15, and the error ratio of the third grid block 23 is 1/1.15.
The actual geometric error of the fourth grid block 24 is 1, the expected error is 1.05, and the error ratio of the fourth grid block 24 is 1/1.05.
And the fourth grid block 24, the second grid block 22, the third grid block 23, the first grid block 21 and the fourth grid block 24 are arranged in the order of the error ratio from large to small, and the replaced priority of the fourth grid block 24 is highest. If the remaining video memory of the electronic device is 100M at this time, referring to fig. 5, a schematic diagram of a replacement process of the grid display layer is shown, where the grid display layer M0 may be used as a finer first grid display layer, the fourth grid block 24 of the grid display layer M1 is replaced with four grid blocks 25 at corresponding positions in the grid display layer M0, and after replacement, the required video memory 70M and the hardware resources are still sufficient, the second grid block 22 of the grid display layer M1 may be further replaced with four grid blocks 26 at corresponding positions in the grid display layer M0, and after replacement, the required video memory 100M and the hardware resources just reach a bottleneck, at this time, the replacement may be stopped, and the replaced grid display layer M1 of the second grid block 22 is displayed.
Assuming that the remaining video memory of the electronic device is 200M, the hardware resources are still sufficient after the second grid block 22 is replaced, the third grid block 23 and the first grid block 21 may be further replaced, and the finally obtained grid display layer M0 is loaded and displayed.
Optionally, step 205 includes:
and a substep 2053, displaying all the grid blocks included in the second grid display layer as target grid blocks through the display window under the condition that the target resource amount meets the rough display condition.
Optionally, the rough display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than a second preset threshold, wherein the first preset threshold is less than or equal to the second preset threshold.
In the embodiment of the application, the condition that the hardware resources of the electronic device are insufficient to load the target grid presentation layer can be defined through the rough presentation condition, and the insufficiency of the hardware resources of the electronic device can reflect that the sum of the target resource amount required for loading the target grid presentation layer and the current used resource amount of the electronic device is greater than or equal to the second preset threshold.
For example, when the hardware resource amount of the electronic device is a display memory, the total display memory of the electronic device is 2g, assuming that the electronic device can normally use other functions, 0.4g of the display memory needs to be reserved, the target resource amount required by the electronic device to load the target grid display layer is 1g, at this time, the second preset threshold may be 1.6g, and when the sum of the target resource amount required by the electronic device to load the target grid display layer and the current used resource amount of the electronic device is greater than 1.6g, the electronic device cannot normally operate other functions.
In addition, in another case, assuming that the current used resource amount of the electronic device is 1.2g, the target grid display layer cannot be loaded on the remaining video memory of the electronic device at this time, which also belongs to the rough display condition.
It should be noted that the second preset threshold may be adjusted according to different actual requirements, and in addition, the rough display condition may also be that a ratio of a sum of the target resource amount and a current used resource amount of the electronic device to the total resource amount is greater than a preset ratio value, for example, if the preset ratio value is 80%, and the sum of the target resource amount and the current used resource amount of the electronic device occupies 90% of the resource amount of the electronic device, then the hardware resource of the electronic device is insufficient at this time, and the requirement for loading the target grid display layer cannot be met.
For example, referring to fig. 4, where the grid display layer m0 is the finest grid display layer, the actual geometric error is 0.5, and there are 16 grid blocks; the grid display layer m1 is a moderate grid display layer, the actual geometric error is 1, and 4 grid blocks are in total; the grid display layer m2 is the coarsest grid display layer, the actual geometric error is 2, and there are 1 grid blocks. Wherein each grid block consumes 10M of video memory.
If the target grid display layer corresponding to the current visual field range of the display window is the grid display layer M1, four grid blocks of the grid display layer M1 are selected to be loaded, the consumed total video memory is 40M, if the remaining idle video memory of the electronic equipment is only 20M at the moment, the coarse display condition is met, the idle hardware resources of the electronic equipment cannot display the whole grid display layer M1, the electronic equipment can select the grid display layer M2 which is coarser than the grid display layer M1 to display, the resource amount required by the grid display layer M2 is 10M video memory, and the remaining video memory of the electronic equipment can meet the requirements.
Optionally, sub-step 2053 comprises:
and a substep B1, if the sum of the resource amount required by the electronic device for loading the second grid display layer and the current used resource amount is smaller than the first preset threshold, selecting a third grid display layer from the scene three-dimensional model, where an actual geometric error of any grid block in the third grid display layer is smaller than an actual geometric error of any grid block in the second grid display layer.
Sub-step B2, selecting part or all of the grid blocks in the third grid display layer to replace the corresponding grid blocks in the second grid display layer.
And a sub-step B3 of displaying all the grid blocks included in the replaced second grid display layer as target grid blocks through the display window.
And the sum of the resource quantity required by the replaced second grid display layer loaded by the electronic equipment and the current used resource quantity is smaller than the second preset threshold.
In this embodiment of the application, the second grid display layer is a grid display layer that is coarser than the target grid display layer, if the electronic device displays the second grid display layer, and the hardware resources are released because other processes of the electronic device stop, so that the amount of resources required by the electronic device to load the second grid display layer is less than a first preset threshold, then the fine display condition is satisfied, the electronic device may select a third grid display layer with higher fineness than the second grid display layer from the scene three-dimensional model, and after selecting a part or all of grid blocks in the third grid display layer to replace corresponding grid blocks of the second grid display layer, all grid blocks included in the replaced second grid display layer are displayed as target grid blocks through the display window.
Further, the sum of the resource amount required by the replaced second grid display layer and the current used resource amount is also less than or equal to a second preset threshold. Otherwise, the resource amount required by the replaced second grid display layer can accord with the rough display condition. That is, when a grid block is selected from the third grid display layer to replace a corresponding grid block in the second grid display layer, it is required to ensure that the resource amount required by the replaced second grid display layer does not meet the rough display condition.
Optionally, the sum of the resource amount required by the electronic device for loading the replaced target grid display layer and the current used resource amount is less than or equal to the second preset threshold.
In the process of performing sub-step 2052, the sum of the resource amount required by the replaced target grid presentation layer and the current used resource amount also needs to be less than or equal to a second preset threshold. Otherwise, the resource amount required by the replaced target grid display layer can accord with the rough display condition. That is, when a grid block is selected from the first grid display layer to replace a corresponding grid block in the target grid display layer, it is required to ensure that the amount of resources required by the target grid display layer after replacement does not meet the rough display condition.
To sum up, according to the method for displaying a model provided in the embodiment of the present application, the display fineness of each grid display layer of a scene three-dimensional model is specifically quantized through a geometric error, and according to a specific hardware condition of an electronic device that loads the scene three-dimensional model, a target grid block that is coarser than a grid block of a target grid display layer is selected from the scene three-dimensional model for load display under the condition that a hardware resource of the electronic device is insufficient to load the target grid display layer to be loaded, so that the scene three-dimensional model can be normally loaded under the condition that the hardware resource of the electronic device is poor; under the condition that hardware resources of the electronic equipment are abundant, the target grid blocks which are finer than the grid blocks of the target grid display layer can be selected from the scene three-dimensional model for loading and displaying, so that the scene three-dimensional model is displayed more finely by using the advantages of the hardware resources of the electronic equipment under the condition that the hardware resources of the electronic equipment are abundant, and the display effect is improved.
Fig. 6 is a flowchart of a method for displaying a model according to an embodiment of the present application, and as shown in fig. 6, the method may include:
301, obtaining a current view field range of a display window for displaying the scene three-dimensional model.
Wherein the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block.
Specifically, step 301 may specifically refer to step 101 described above, and is not described herein again.
And 302, determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range.
Specifically, step 302 may specifically refer to step 102 described above, and is not described here again.
Step 303, calculating the target resource amount required by the electronic device to load the target grid display layer.
Specifically, step 303 may specifically refer to step 103 described above, and is not described herein again.
And 304, under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model.
Wherein the actual geometric error is used for reflecting the actual geometric distance between the mesh surface of the mesh display layer relative to the surface of the scene three-dimensional model.
Optionally, the fine display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a fourth preset threshold value.
In the embodiment of the application, the hardware resources of the electronic device can be limited by the fine display condition to meet the condition that the target grid display layer is loaded, and under the condition that the hardware resources are sufficient, the hardware resources of the electronic device are sufficient, and it can be reflected that the sum of the target resource amount required by loading the target grid display layer and the current used resource amount of the electronic device is less than or equal to the fourth preset threshold.
Specifically, the actual geometric error of the mesh block of the scene three-dimensional model may be stored as a parameter in the file of the mesh block, and the display method of the model provided in the embodiment of the present application, in the case where a file of mesh zones that can be applied specifically to a three-dimensional model of a scene can be authorized to be modified, the residual idle resource amount of the electronic equipment in the running period is kept in a stable range for a long time, and the residual idle resource amount is sufficient, so that the requirement of further fine loading of the scene three-dimensional model can be fully met, the actual geometric errors in the files of all mesh presentation layers of the three-dimensional model of the scene may be increased at this point, after modification, the display window of the electronic device considers that the fineness of the current target grid display layer is insufficient, and actively selects a grid display layer finer than the target grid display layer for loading and displaying.
And 305, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model under the condition that the target resource quantity meets the rough display condition.
Optionally, the rough display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than or equal to a fifth preset threshold value; wherein the fourth preset threshold is less than or equal to the fifth preset threshold.
In the embodiment of the application, the condition that the hardware resources of the electronic device are insufficient to load the target grid presentation layer can be defined through the rough presentation condition, and the insufficiency of the hardware resources of the electronic device can reflect that the sum of the target resource amount required for loading the target grid presentation layer and the current used resource amount of the electronic device is greater than or equal to a fifth preset threshold value.
Specifically, under the condition that the file of the grid block of the scene three-dimensional model can be authorized to be modified, the remaining free resource amount of the electronic device during the operation period is kept in a stable range for a long time, and the remaining free resource amount is insufficient, the scene three-dimensional model needs to be subjected to rough loading display to ensure normal loading, at this time, the actual geometric errors in the files of all grid display layers of the scene three-dimensional model can be reduced, after modification, the display window of the electronic device considers that the fineness of the current target grid display layer is too high, and a grid display layer coarser than the target grid display layer is actively selected for loading display.
And step 306, selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
In the embodiment of the application, as the actual geometric errors of the grid blocks of each grid display layer in the scene three-dimensional model are correspondingly modified under different display conditions, the grid display layer meeting the requirements of the current display conditions can be actively loaded to be displayed by the display window through a means of actively changing the actual geometric errors of the grid blocks of the grid display layer, so that the hardware resource utilization rate and the display efficiency are improved.
For example, referring to fig. 4, the grid display layer m0 is the finest grid display layer, the actual geometric error is 0.5, and there are 16 grid blocks; the grid display layer m1 is a moderate grid display layer, the actual geometric error is 1, and 4 grid blocks are in total; the grid display layer m2 is the coarsest grid display layer, the actual geometric error is 2, and there are 1 grid blocks. Wherein each grid block consumes 10M of video memory.
If the target geometric error corresponding to the current visual field range of the display window is 1, and the target grid display layer with the actual geometric error closest to the target geometric error is the grid display layer M1, four grid blocks of the grid display layer M1 are selected to be loaded, the total consumed video memory is 40M, and assuming that the remaining idle video memory of the electronic device is 20M at the moment and cannot support the loading display of the grid display layer M1, the electronic device can uniformly divide the actual geometric errors of the grid blocks of all the grid display layers by 2, so that the actual geometric error of the grid display layer M0 becomes 0.25; the actual geometric error of the grid display layer m1 becomes 0.5; the actual geometric error of the grid display layer M2 becomes 1, after the modification, the target grid display layer with the actual geometric error closest to the target geometric error is the grid display layer M2, the loading and displaying of the grid display layer M2 only needs 10M video memory, and the remaining idle video memory of the electronic device is fully used.
Optionally, step 306 may include:
substep 3061, a target geometric error corresponding to the current field of view is determined.
And a substep 3062 of determining a grid display layer corresponding to the target geometric error in the scene three-dimensional model according to the target geometric error, wherein the grid display layer corresponding to the target geometric error is the grid display layer with the minimum difference value between the corrected actual geometric error and the target geometric error.
The sub-steps 3061-3062 can be referred to above as the sub-steps 202-203, which are not described in detail here.
Optionally, the fine display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a fourth preset threshold value; the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than or equal to a fifth preset threshold value; wherein the fourth preset threshold is less than or equal to the fifth preset threshold. For the related description of the fine display condition and the rough display condition, reference may be made to the above-mentioned embodiment of fig. 3, and details are not repeated here.
To sum up, according to the method for displaying a model provided in the embodiment of the present application, the display fineness of each grid display layer of a three-dimensional model of a scene is specifically quantified through a geometric error, and according to a specific hardware condition of an electronic device loading the three-dimensional model of the scene, the method can correspondingly modify an actual geometric error of a grid block of each grid display layer in the three-dimensional model of the scene under different display conditions, so that a display window can actively load a grid display layer meeting the requirements of current display conditions for display through a means of actively changing the actual geometric error of the grid block of the grid display layer, thereby improving the hardware resource utilization rate and the display efficiency.
Fig. 7 is a block diagram of a model display apparatus according to an embodiment of the present application, and as shown in fig. 7, the model display apparatus 400 may include: a memory 401 and a processor 402;
the memory 401 is configured to obtain a current view field of a display window for displaying the three-dimensional model of the scene; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor 402 is configured to:
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window;
wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer or a second grid display layer which is coarser than the target grid display layer;
the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer;
the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer;
the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
Optionally, the processor is specifically configured to:
under the condition that the target resource amount meets the fine display condition, selecting part or all grid blocks in the first grid display layer to replace corresponding grid blocks of the target grid display layer;
and displaying all the grid blocks included in the replaced target grid display layer as target grid blocks through the display window.
Optionally, the processor is further configured to:
and under the condition that the target resource quantity meets a rough display condition, displaying all grid blocks included by the second grid display layer as target grid blocks through the display window.
Optionally, the fine display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a first preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than a second preset threshold;
wherein the first preset threshold is less than or equal to the second preset threshold.
Optionally, the sum of the resource amount required by the electronic device to load the replaced target grid display layer and the current used resource amount is less than or equal to the second preset threshold.
Optionally, the processor is further configured to: if the sum of the resource amount required by the electronic equipment for loading the second grid display layer and the current used resource amount is smaller than the first preset threshold value, selecting a third grid display layer from the scene three-dimensional model, wherein the actual geometric error of any grid block in the third grid display layer is smaller than the actual geometric error of any grid block in the second grid display layer;
selecting part or all of the grid blocks in the third grid display layer to replace the corresponding grid blocks of the second grid display layer;
displaying all the grid blocks included in the replaced second grid display layer as target grid blocks through the display window;
and the sum of the resource quantity required by the replaced second grid display layer loaded by the electronic equipment and the current used resource quantity is smaller than the second preset threshold.
Optionally, the processor is specifically configured to:
determining a target geometric error corresponding to the field of view;
and determining a target grid display layer in the scene three-dimensional model according to the target geometric error, wherein the target grid display layer is the grid display layer with the minimum difference value between the actual geometric error and the target geometric error.
Optionally, the processor is specifically configured to:
and determining the target resource amount according to the target geometric error and the screen resolution of the display screen of the electronic equipment.
Optionally, the processor is specifically configured to:
calculating an error ratio of each grid block in the target grid display layer, wherein the error ratio is a ratio of an actual geometric error of the grid block to an expected error of the grid block;
and sequentially replacing the grid blocks in the target grid display layer with the corresponding grid blocks in the first grid display layer according to the sequence of the error ratio values of the grid blocks of the target grid display layer from large to small, and stopping replacement until the current residual resource amount of the electronic equipment is less than or equal to a third preset threshold value.
Optionally, the expected error of the grid block includes: a ratio between a width of a screen resolution of the electronic device and a distance of the grid block to a viewpoint.
To sum up, the display device of the model provided in the embodiment of the present application specifically quantizes the display fineness of each grid display layer of the scene three-dimensional model through a geometric error, and according to a specific hardware condition of the electronic device loading the scene three-dimensional model, the application can select a target grid block coarser than a grid block of a target grid display layer from the scene three-dimensional model for loading and displaying under the condition that the hardware resource of the electronic device is insufficient to load the target grid display layer to be loaded, so that the scene three-dimensional model can be normally loaded under the condition that the hardware resource of the electronic device is poor; under the condition that hardware resources of the electronic equipment are abundant, the target grid blocks which are finer than the grid blocks of the target grid display layer can be selected from the scene three-dimensional model for loading and displaying, so that the scene three-dimensional model is displayed more finely by using the advantages of the hardware resources of the electronic equipment under the condition that the hardware resources of the electronic equipment are abundant, and the display effect is improved.
Fig. 8 is a block diagram of a model display device according to an embodiment of the present application, and as shown in fig. 8, the model display device 500 may include: a memory 501 and a processor 502;
the memory 501 is configured to obtain a current view range of a display window for displaying the three-dimensional model of the scene; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor 502 is configured to: determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model, wherein the actual geometric errors are used for reflecting the actual geometric distances between the grid surfaces of the grid display layers and the surface of the scene three-dimensional model;
under the condition that the target resource quantity meets the rough display condition, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model;
and selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
Optionally, the fine display condition includes: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a fourth preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than or equal to a fifth preset threshold value;
wherein the fourth preset threshold is less than or equal to the fifth preset threshold.
Optionally, the processor is specifically configured to:
determining a target geometric error corresponding to the current field of view;
and determining a grid display layer corresponding to the target geometric error in the scene three-dimensional model according to the target geometric error, wherein the grid display layer corresponding to the target geometric error is the grid display layer with the minimum difference value between the corrected actual geometric error and the target geometric error.
To sum up, the display device of the model provided by the embodiment of the application makes the display fineness of each grid display layer of the scene three-dimensional model specifically quantized through the geometric error, and according to the specific hardware condition of the electronic device loading the scene three-dimensional model, the application can correspondingly modify the actual geometric error of the grid block of each grid display layer in the scene three-dimensional model under different display conditions, and then the means of actively changing the actual geometric error of the grid block of the grid display layer can be used for actively loading the grid display layer meeting the requirement of the current display condition for display by the display window, so that the hardware resource utilization rate and the display efficiency are improved.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the embodiment of the model displaying method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
The memory may be an interface for connecting an external control terminal with the model presentation device. For example, the external control terminal may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a control terminal having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The memory may be used to receive input (e.g., data information, power, etc.) from an external control terminal and transmit the received input to one or more elements within the model's presentation device or may be used to transmit data between the model's presentation device and the external control terminal.
Such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor is a control center of the control terminal, is connected with each part of the whole control terminal by various interfaces and lines, and executes various functions and processing data of the control terminal by running or executing software programs and/or modules stored in the memory and calling data stored in the memory, thereby carrying out the overall monitoring on the control terminal. A processor may include one or more processing units; preferably, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, control terminal, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create control terminals for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction control terminals which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The present application is described in detail above, and the principles and embodiments of the present application are described herein by using specific examples, which are only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (28)

1. A method for displaying a model, the method comprising:
acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window;
wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer or a second grid display layer which is coarser than the target grid display layer;
the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer;
the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer;
the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
2. The method according to claim 1, wherein said selecting a plurality of target grid blocks from one or more grid display layers of the three-dimensional model of the scene according to the target resource amount, and displaying the selected target grid blocks in the loading window comprises:
under the condition that the target resource amount meets the fine display condition, selecting part or all grid blocks in the first grid display layer to replace corresponding grid blocks of the target grid display layer;
and displaying all the grid blocks included in the replaced target grid display layer as target grid blocks through the display window.
3. The method of claim 2, wherein after said calculating the target amount of resources required for the electronic device to load the target grid presentation layer, the method further comprises:
and under the condition that the target resource quantity meets a rough display condition, displaying all grid blocks included by the second grid display layer as target grid blocks through the display window.
4. The method of claim 3, wherein the fine presentation condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a first preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than a second preset threshold;
wherein the first preset threshold is less than or equal to the second preset threshold.
5. The method according to claim 4, wherein the sum of the resource amount required by the electronic device to load the replaced target grid presentation layer and the current used resource amount is less than or equal to the second preset threshold.
6. The method of claim 4, wherein after said displaying all grid blocks included in said second grid display layer through said display window as target grid blocks, said method further comprises:
if the sum of the resource amount required by the electronic equipment for loading the second grid display layer and the current used resource amount is smaller than the first preset threshold value, selecting a third grid display layer from the scene three-dimensional model, wherein the actual geometric error of any grid block in the third grid display layer is smaller than the actual geometric error of any grid block in the second grid display layer;
selecting part or all of the grid blocks in the third grid display layer to replace the corresponding grid blocks of the second grid display layer;
displaying all the grid blocks included in the replaced second grid display layer as target grid blocks through the display window;
and the sum of the resource quantity required by the replaced second grid display layer loaded by the electronic equipment and the current used resource quantity is smaller than the second preset threshold.
7. The method according to claim 1, wherein said determining a target mesh display layer to be loaded in the three-dimensional model of the scene according to the field of view comprises:
determining a target geometric error corresponding to the field of view;
and determining a target grid display layer in the scene three-dimensional model according to the target geometric error, wherein the target grid display layer is the grid display layer with the minimum difference value between the actual geometric error and the target geometric error.
8. The method of claim 7, wherein calculating the target amount of resources required by the electronic device to load the target grid presentation layer comprises:
and determining the target resource amount according to the target geometric error and the screen resolution of the display screen of the electronic equipment.
9. The method of claim 2, wherein said selecting some or all of the grid blocks in the first grid presentation layer to replace the corresponding grid blocks in the target grid presentation layer comprises:
calculating an error ratio of each grid block in the target grid display layer, wherein the error ratio is a ratio of an actual geometric error of the grid block to an expected error of the grid block;
and sequentially replacing the grid blocks in the target grid display layer with the corresponding grid blocks in the first grid display layer according to the sequence of the error ratio values of the grid blocks of the target grid display layer from large to small, and stopping replacement until the current residual resource amount of the electronic equipment is less than or equal to a third preset threshold value.
10. The method of claim 9, wherein the expected error of the grid block comprises: a ratio between a width of a screen resolution of the electronic device and a distance of the grid block to a viewpoint.
11. A method for displaying a model, the method comprising:
acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model, wherein the actual geometric errors are used for reflecting the actual geometric distances between the grid surfaces of the grid display layers and the surface of the scene three-dimensional model;
under the condition that the target resource quantity meets the rough display condition, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model;
and selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
12. The method of claim 11,
the fine display conditions comprise: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a fourth preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than or equal to a fifth preset threshold value;
wherein the fourth preset threshold is less than or equal to the fifth preset threshold.
13. The method according to claim 11, wherein selecting the mesh display layer corresponding to the field of view in the scene three-dimensional model for display according to the corrected actual geometric errors of all the mesh display layers comprises:
determining a target geometric error corresponding to the current field of view;
and determining a grid display layer corresponding to the target geometric error in the scene three-dimensional model according to the target geometric error, wherein the grid display layer corresponding to the target geometric error is the grid display layer with the minimum difference value between the corrected actual geometric error and the target geometric error.
14. An apparatus for displaying a model, the apparatus comprising: a memory and a processor;
the memory is used for acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor is configured to:
determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
according to the target resource amount, selecting a plurality of target grid blocks from one or more grid display layers of the scene three-dimensional model, and displaying the selected target grid blocks in the loading window;
wherein the one or more grid display layers comprise: the target grid display layer is a first grid display layer which is finer than the target grid display layer or a second grid display layer which is coarser than the target grid display layer;
the actual geometric error of any grid block in the first grid display layer is smaller than that of any grid block in the target grid display layer;
the actual geometric error of any grid block in the second grid display layer is larger than that of any grid block in the target grid display layer;
the actual geometric error is used for reflecting the actual geometric distance between the grid surface of the grid display layer relative to the surface of the scene three-dimensional model.
15. The apparatus of claim 14, wherein the processor is specifically configured to:
under the condition that the target resource amount meets the fine display condition, selecting part or all grid blocks in the first grid display layer to replace corresponding grid blocks of the target grid display layer;
and displaying all the grid blocks included in the replaced target grid display layer as target grid blocks through the display window.
16. The apparatus of claim 15, wherein the processor is further configured to:
and under the condition that the target resource quantity meets a rough display condition, displaying all grid blocks included by the second grid display layer as target grid blocks through the display window.
17. The apparatus of claim 16, wherein the fine presentation condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a first preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than a second preset threshold;
wherein the first preset threshold is less than or equal to the second preset threshold.
18. The apparatus according to claim 17, wherein the sum of the resource amount required by the electronic device to load the replaced target grid presentation layer and the current used resource amount is less than or equal to the second preset threshold.
19. The apparatus of claim 17, wherein the processor is further configured to: if the sum of the resource amount required by the electronic equipment for loading the second grid display layer and the current used resource amount is smaller than the first preset threshold value, selecting a third grid display layer from the scene three-dimensional model, wherein the actual geometric error of any grid block in the third grid display layer is smaller than the actual geometric error of any grid block in the second grid display layer;
selecting part or all of the grid blocks in the third grid display layer to replace the corresponding grid blocks of the second grid display layer;
displaying all the grid blocks included in the replaced second grid display layer as target grid blocks through the display window;
and the sum of the resource quantity required by the replaced second grid display layer loaded by the electronic equipment and the current used resource quantity is smaller than the second preset threshold.
20. The apparatus of claim 14, wherein the processor is specifically configured to:
determining a target geometric error corresponding to the field of view;
and determining a target grid display layer in the scene three-dimensional model according to the target geometric error, wherein the target grid display layer is the grid display layer with the minimum difference value between the actual geometric error and the target geometric error.
21. The apparatus of claim 20, wherein the processor is specifically configured to:
and determining the target resource amount according to the target geometric error and the screen resolution of the display screen of the electronic equipment.
22. The apparatus of claim 15, wherein the processor is specifically configured to:
calculating an error ratio of each grid block in the target grid display layer, wherein the error ratio is a ratio of an actual geometric error of the grid block to an expected error of the grid block;
and sequentially replacing the grid blocks in the target grid display layer with the corresponding grid blocks in the first grid display layer according to the sequence of the error ratio values of the grid blocks of the target grid display layer from large to small, and stopping replacement until the current residual resource amount of the electronic equipment is less than or equal to a third preset threshold value.
23. The apparatus of claim 22, wherein the expected error of the grid block comprises: a ratio between a width of a screen resolution of the electronic device and a distance of the grid block to a viewpoint.
24. An apparatus for displaying a model, the apparatus comprising: a memory and a processor;
the memory is used for acquiring the current visual field range of a display window for displaying the scene three-dimensional model; the scene three-dimensional model comprises a plurality of grid display layers, and each grid display layer comprises at least one grid block;
the processor is configured to: determining a target grid display layer to be loaded in the scene three-dimensional model according to the visual field range;
calculating the target resource amount required by the electronic equipment for loading the target grid display layer;
under the condition that the target resource quantity meets the fine display condition, increasing the actual geometric errors of all grid display layers of the scene three-dimensional model, wherein the actual geometric errors are used for reflecting the actual geometric distances between the grid surfaces of the grid display layers and the surface of the scene three-dimensional model;
under the condition that the target resource quantity meets the rough display condition, reducing the actual geometric errors of all grid display layers of the scene three-dimensional model;
and selecting the grid display layer corresponding to the visual field range in the scene three-dimensional model for display according to the corrected actual geometric errors of all the grid display layers.
25. The apparatus of claim 24, wherein the fine presentation condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is less than or equal to a fourth preset threshold value;
the rough display condition comprises: the sum of the target resource amount and the current used resource amount of the electronic equipment is greater than or equal to a fifth preset threshold value;
wherein the fourth preset threshold is less than or equal to the fifth preset threshold.
26. The apparatus of claim 24, wherein the processor is specifically configured to:
determining a target geometric error corresponding to the current field of view;
and determining a grid display layer corresponding to the target geometric error in the scene three-dimensional model according to the target geometric error, wherein the grid display layer corresponding to the target geometric error is the grid display layer with the minimum difference value between the corrected actual geometric error and the target geometric error.
27. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing a method of presenting a model according to any one of claims 1 to 13.
28. A computer-readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of presenting a model of any one of claims 1 to 13.
CN202080044432.6A 2020-09-30 2020-09-30 Model display method and device, electronic equipment and computer readable storage medium Pending CN114026604A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/119534 WO2022067722A1 (en) 2020-09-30 2020-09-30 Model display method, apparatus, electronic device and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN114026604A true CN114026604A (en) 2022-02-08

Family

ID=80054413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080044432.6A Pending CN114026604A (en) 2020-09-30 2020-09-30 Model display method and device, electronic equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN114026604A (en)
WO (1) WO2022067722A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895819A (en) * 2022-07-13 2022-08-12 麒砺创新技术(深圳)有限公司 Three-dimensional model intelligent display optimization method and system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117422808B (en) * 2023-12-19 2024-03-19 中北数科(河北)科技有限公司 Three-dimensional scene data loading method and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289839A (en) * 2011-08-04 2011-12-21 天津中科遥感信息技术有限公司 Method for efficiently rendering levels of detail for three-dimensional digital city
US10860167B2 (en) * 2014-07-29 2020-12-08 Autodesk, Inc. Reality capture graphical user interface
CN106599493B (en) * 2016-12-19 2020-06-05 重庆市勘测院 Visualization implementation method of BIM (building information modeling) model in three-dimensional large scene
CN110555085B (en) * 2018-03-29 2022-01-14 中国石油化工股份有限公司 Three-dimensional model loading method and device
CN110264575A (en) * 2019-06-10 2019-09-20 国家电网有限公司 A kind of cable three-dimensional display method
CN110276820B (en) * 2019-06-24 2022-12-23 重庆梅安森科技股份有限公司 GIS model optimization method and system based on LOD organization and scheduling method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114895819A (en) * 2022-07-13 2022-08-12 麒砺创新技术(深圳)有限公司 Three-dimensional model intelligent display optimization method and system
CN114895819B (en) * 2022-07-13 2022-09-13 麒砺创新技术(深圳)有限公司 Three-dimensional model intelligent display optimization method and system

Also Published As

Publication number Publication date
WO2022067722A1 (en) 2022-04-07

Similar Documents

Publication Publication Date Title
CN114026604A (en) Model display method and device, electronic equipment and computer readable storage medium
CN102819313B (en) Operating method of terminal equipment and terminal equipment
CN112581578B (en) Cloud rendering system based on software definition
CN111679904B (en) Task scheduling method and device based on edge computing network
CN112370783B (en) Virtual object rendering method, device, computer equipment and storage medium
CN116389831B (en) Yun Yuansheng-based offline rendering system and method
CN114978292A (en) Satellite network connection method, system, electronic equipment and storage medium
CN116414567A (en) Resource scheduling method, device and equipment of intelligent automobile operating system
CN113517702A (en) Emergency control method and system for source-storage-load adjustment-switching linkage
CN109905614B (en) Video controller, video controller on-load control method, display system, and storage medium
CN116700953A (en) Node power consumption adjusting method and device, electronic equipment and storage medium
CN111476872B (en) Image drawing method and image drawing device
CN116310038A (en) Model rendering method, device, electronic equipment and computer readable storage medium
CN112308201A (en) Neural network quantization method, device, chip, electronic equipment and board card
CN115599514A (en) Task scheduling method and device, computing equipment and computer readable storage medium
CN115861510A (en) Object rendering method, device, electronic equipment, storage medium and program product
CN115880402A (en) Flow animation generation method and device, electronic equipment and readable storage medium
CN114996005A (en) Resource scheduling method, device, equipment and medium
CN114627022A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114596012A (en) Method, system, apparatus and medium for resource scheduling
CN106020404A (en) Power managing method and power supplying system
CN117278626A (en) Request processing method, device, computer equipment and computer readable storage medium
CN111651265B (en) Map rendering method, device, equipment and storage medium
CN114884969B (en) Cluster instance quantity regulation and control method, device, terminal and storage medium
CN114123316B (en) SCUC model optimization method and equipment considering wind power uncertainty

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