CN119169165A - Model rendering method, device, terminal device and readable storage medium - Google Patents
Model rendering method, device, terminal device and readable storage medium Download PDFInfo
- Publication number
- CN119169165A CN119169165A CN202310730826.2A CN202310730826A CN119169165A CN 119169165 A CN119169165 A CN 119169165A CN 202310730826 A CN202310730826 A CN 202310730826A CN 119169165 A CN119169165 A CN 119169165A
- Authority
- CN
- China
- Prior art keywords
- model
- bounding box
- rendered
- dimensional mesh
- mesh model
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
Landscapes
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
The application is applicable to the technical field of model rendering and provides a method, a device, terminal equipment and a readable storage medium for model rendering, wherein the method comprises the steps of generating a bounding box of a three-dimensional grid model to be rendered; the method comprises the steps of determining collision relations among bounding boxes, determining a three-dimensional grid model to be reserved according to the collision relations, and rendering the three-dimensional grid model to be reserved to obtain a rendered image corresponding to the three-dimensional grid model to be rendered. By the method, the surface characteristic details of the three-dimensional grid model to be rendered can be reserved after the rendering.
Description
Technical Field
The application belongs to the technical field of model rendering, and particularly relates to a model rendering method, a device, terminal equipment and a readable storage medium.
Background
Model rendering is the process of converting a three-dimensional light energy transfer process into a two-dimensional image.
At present, in order to make the rendered three-dimensional model approach to an actual object as much as possible, a three-dimensional model with more nodes and faces is generally designed, and in the model rendering process, the more the nodes and faces of the three-dimensional model are, the longer the required rendering time is, so that the waiting time of a user is too long, and the experience is poor.
Disclosure of Invention
The embodiment of the application provides a model rendering method, a device, a terminal device and a readable storage medium, which can solve the problem that the rendering time of the existing rendering method is longer.
In a first aspect, an embodiment of the present application provides a model rendering method, including:
generating a bounding box of the three-dimensional grid model to be rendered;
Determining collision relations among the bounding boxes, and determining a three-dimensional grid model to be reserved according to the collision relations;
Rendering the three-dimensional grid model to be reserved to obtain a rendered image corresponding to the three-dimensional grid model to be rendered.
Since the bounding box is a regular object, it is more efficient and simple to use it instead of the model itself for collision calculation than to use the model itself directly. Meanwhile, the three-dimensional grid model to be rendered is determined according to the collision relation, and only the three-dimensional grid model to be determined to be reserved is required to be rendered during rendering, so that the structure to be rendered can be simplified, the rendering speed can be improved, the waiting time of a user is shortened, and the good experience of the user is improved.
Optionally, the determining the three-dimensional grid model to be retained according to the collision relation includes:
and removing the internal structure in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
Optionally, the removing the internal structure in the three-dimensional grid model to be rendered according to the collision relation includes:
And eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
Optionally, before the removing, according to the collision relationship, the three-dimensional mesh model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relationship in the three-dimensional mesh model to be rendered, the method further includes:
calculating a ratio value of the volume of the intersecting part to the volume of the bounding box with smaller volume under the condition that the collision relation is the intersection relation;
The removing the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation in the three-dimensional grid model to be rendered according to the collision relation comprises the following steps:
And eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the proportion value is larger than a preset proportion threshold value.
Optionally, the model rendering method further includes:
And eliminating a target area of a bounding box with smaller volume in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the ratio value is larger than a preset ratio threshold value, wherein the target area is an area which does not belong to the overlapping area in the bounding box with smaller volume.
Optionally, the determining the collision relation between the bounding boxes, determining the three-dimensional grid model to be retained according to the collision relation, includes:
Selecting one non-traversed bounding box from target bounding boxes, and determining collision relations between the selected bounding box and other bounding boxes, wherein when the non-traversed bounding box is selected for the first time, the target bounding box is generated, and when the non-traversed bounding box is not selected for the first time, the target bounding box is a bounding box corresponding to a three-dimensional grid model to be reserved currently;
And after each traversal is finished, eliminating the three-dimensional grid model corresponding to the bounding box with smaller volume in the two bounding boxes with the collision relation as the inclusion relation.
Optionally, the model rendering method further includes:
After the collision relation of each bounding box in the target bounding box is determined, determining whether a three-dimensional grid model corresponding to the bounding box with smaller volume is determined as a three-dimensional grid model to be reserved according to the proportional relation of the volume of the intersecting part and the volume of the bounding box with smaller volume for two bounding boxes with each group of collision relations as an intersecting relation.
Optionally, before selecting one non-traversed bounding box from the target bounding boxes, the method further includes:
Calculating the volume of each generated bounding box;
sequencing each bounding box from large to small according to the size of the volume, wherein when a bounding box which is not traversed is selected for the first time, each sequenced bounding box is used as the target bounding box;
The selecting a non-traversed bounding box from the target bounding boxes comprises:
And selecting an un-traversed bounding box from the target bounding boxes in a front-to-back order.
Optionally, before the generating of the bounding box of the three-dimensional grid model to be rendered, the method further includes:
Obtaining the model file content of a three-dimensional model file;
Generating a data structure in a target format according to the content of the model file;
and generating a grid structure according to the data structure to obtain the three-dimensional grid model to be rendered.
Optionally, the data structure of the target format includes vertex coordinates of vertices and vertex index fields of the vertices, wherein the vertex index fields include connection relations between the vertices stored in a tree structure and other vertices, and the generating a grid structure according to the data structure includes:
determining a vertex corresponding to a father node and a vertex index field corresponding to the father node according to the connection relation between the vertex stored in the tree structure in the vertex index field and other vertices;
And generating a grid structure according to the determined vertex coordinates corresponding to the vertices and the determined vertex index fields.
Optionally, the generating a bounding box of the three-dimensional grid model to be rendered includes:
For each vertex index field, determining a vertex with a connection relation according to the vertex index field to obtain a target vertex set;
for each target vertex set, determining a maximum value and a minimum value corresponding to the target vertex set on a three-dimensional coordinate axis according to vertex coordinates of vertexes in the target vertex set;
And generating a bounding box of the three-dimensional grid model to be rendered according to the maximum value and the minimum value which are corresponding to the target vertexes concentrated on the three-dimensional coordinate axis.
Optionally, before the generating of the bounding box of the three-dimensional grid model to be rendered, the method further includes:
judging whether the three-dimensional grid model to be rendered needs model simplification or not;
The generating the bounding box of the three-dimensional grid model to be rendered comprises the following steps:
and generating a bounding box of the three-dimensional grid model to be rendered under the condition that the three-dimensional grid model to be rendered needs to be subjected to model simplification.
Optionally, the determining whether the three-dimensional grid model to be rendered needs model simplification includes:
Acquiring current scene information or model information of the three-dimensional grid model to be rendered;
Judging whether the three-dimensional grid model to be rendered needs model simplification or not according to the current scene information or the model information.
In a second aspect, an embodiment of the present application provides a model rendering apparatus, including:
the bounding box generation module is used for generating a bounding box of the three-dimensional grid model to be rendered;
the three-dimensional grid model determining module is used for determining the collision relation between the bounding boxes and determining the three-dimensional grid model to be reserved according to the collision relation;
And the rendering module is used for rendering the three-dimensional grid model to be reserved to obtain a rendered image corresponding to the three-dimensional grid model to be rendered.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the method according to any one of the first aspects when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method according to any of the first aspects.
In a fifth aspect, an embodiment of the application provides a computer program product for, when run on a terminal device, causing the terminal device to perform the method of any of the first aspects described above.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a model rendering method according to an embodiment of the present application;
FIG. 2 is a schematic side view of a three-dimensional grid to be rendered according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a bounding box obtained by performing a bounding box operation on the three-dimensional grid to be rendered in FIG. 2 according to an embodiment of the present application;
FIG. 4 is a schematic diagram of two bounding boxes with a collision relationship being an inclusion relationship according to an embodiment of the present application;
FIG. 5 is a schematic diagram of two bounding boxes with a collision relationship of a separation relationship according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a bounding box before deletion according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a portion of the bounding box of FIG. 6 after deletion according to another embodiment of the present application;
FIG. 8 is a schematic diagram of a three-dimensional mesh model to be rendered according to another embodiment of the present application;
FIG. 9 is a schematic illustration of a retained three-dimensional mesh model provided by an embodiment of the present application;
FIG. 10 is a schematic diagram of a model rendering apparatus according to an embodiment of the present application;
Fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, 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.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Furthermore, in the description of the present specification and the appended claims, the terms "first," "second," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise.
Embodiment one:
When the three-dimensional model includes more nodes and faces, a longer rendering time is required if all the nodes and faces are rendered.
In order to shorten the rendering time, the embodiment of the application provides a model rendering method. In the method, bounding boxes of the three-dimensional grid model to be rendered are generated, the three-dimensional grid model to be reserved is determined according to collision relations among the generated bounding boxes, and finally the three-dimensional grid model to be reserved is rendered.
The model rendering method provided by the embodiment of the application is described below with reference to the accompanying drawings.
Fig. 1 shows a flow chart of a model rendering method according to an embodiment of the present application, where the method may be applied to a terminal device, and is described in detail as follows:
S11, generating a bounding box of the three-dimensional grid model to be rendered.
The shape of the three-dimensional grid model to be rendered can be a regular shape, such as a cube or a cuboid, or an irregular shape, such as an irregular shape formed by a plurality of three-dimensional bodies with different shapes.
The three-dimensional Mesh model to be rendered may be a Mesh (Mesh) structure of a graphics library (Web Graphics Library, webGL) standard of the Web terminal. The WebGL technology is a technology for drawing and rendering three-dimensional graphics on web pages and allowing users to interact with it.
Wherein a bounding box is an algorithm for solving the optimal bounding space of a discrete point set, the basic idea is to replace a complex geometric object approximately with a somewhat bulky and simple-to-property geometry (i.e., bounding box). Common bounding box algorithms are axis aligned bounding boxes (axis-aligned bounding box, AABB), bounding balls, directed bounding boxes (Oriented Bounding Box, OBB), and fixed direction convex hulls (Fixed directions hulls, FDH), among others.
Since the three-dimensional mesh model to be rendered is typically irregularly shaped, and the bounding boxes are simply characterized geometries, the number of bounding boxes generated is typically greater than 1. Assuming that the side surface of the three-dimensional mesh to be rendered (the side surface is a two-dimensional graph) is shown in fig. 2, after the operation of the bounding box is performed on the three-dimensional mesh to be rendered, 2 bounding boxes are obtained, as shown in fig. 3.
In the embodiment of the application, in the process of generating the bounding box of the three-dimensional grid model to be rendered, the mapping relation between the three-dimensional grid model to be rendered and the bounding box is recorded, and the maximum value and the minimum value of each bounding box in three dimensions are recorded. For example, assuming that 2 bounding boxes are generated, the position coordinates of the three-dimensional grid model surrounded by each bounding box are recorded, and then the mapping relation between each bounding box and the three-dimensional grid model to be rendered is obtained. After the mapping relation between each bounding box and the three-dimensional grid model is obtained, the three-dimensional grid model corresponding to different bounding boxes can be searched out according to the mapping relation.
S12, determining the collision relation between the bounding boxes, and determining the three-dimensional grid model to be reserved according to the collision relation.
Specifically, in the case where the number of generated bounding boxes is greater than 1, for each dimension, coordinates of two bounding boxes in the dimension are compared, and the collision relationship between the two bounding boxes is determined according to the comparison result of the coordinates in the respective dimensions.
In some embodiments, the collision relationships include inclusion relationships, intersection relationships, and separation relationships. Specifically, in the case where the number of generated bounding boxes is greater than 1, the collision relationship between the two bounding boxes is determined by comparing the maximum value and the minimum value of the two bounding boxes in three dimensions. For example, assuming that there are two bounding boxes, a first bounding box and a second bounding box, the maximum and minimum values of the first bounding box in three dimensions are Xmin, xmax, ymin, ymax, zmin, zmax, and the relationship between all vertices (x, y, z) of the second bounding box and Xmin, xmax, ymin, ymax, zmin, zmax is determined, if:
Xmin≤x≤Xmax
Ymin≤y≤Ymax
Zmin≤y≤Zmax
It is determined that the first bounding box contains the second bounding box, i.e., the second bounding box is inside the first bounding box, i.e., the collision relationship of the first bounding box and the second bounding box is an inclusion relationship. Wherein fig. 4 shows a schematic diagram of two bounding boxes with collision relations as containment relations.
If all vertices (x, y, z) of the second bounding box do not satisfy the above relationship, that is, x is greater than Xmax or x is less than Xmin, y is greater than Ymax or y is less than Ymin, z is greater than Zmax or z is less than Zmin, it is determined that there is no overlapping portion of the first bounding box and the second bounding box, that is, the collision relationship of the first bounding box and the second bounding box is a separation relationship. Wherein fig. 5 shows a schematic diagram of two bounding boxes with a collision relationship of a separation relationship.
If part of vertexes (x, y, z) of the second bounding box meets the relation, such as Xmin is not more than x is not more than Xmax, but y is more than Ymax or y is less than Ymin, a part where the first bounding box and the second bounding box are partially overlapped is judged, namely, the collision relation of the first bounding box and the second bounding box is an intersecting relation. Wherein fig. 3 shows a schematic diagram of two bounding boxes with collision relations in intersecting relation.
After the collision relation is obtained, the terminal equipment can select the three-dimensional grid model to be reserved according to the reservation instruction sent by the user. The reservation instruction includes a specific collision relationship, for example, when the collision relationship included in the reservation instruction is a separation relationship, the three-dimensional grid model corresponding to the separation relationship is a three-dimensional grid model to be reserved, and when the collision relationship included in the reservation instruction is a separation relationship and an intersection relationship, the three-dimensional grid models corresponding to the separation relationship and the intersection relationship are three-dimensional grid models to be reserved.
Of course, the three-dimensional grid model to be reserved can be selected according to a preset rule, besides the three-dimensional grid model to be reserved can be selected according to a reservation instruction sent by a user. For example, when the preset rule is to remove the internal structure of the three-dimensional grid model to be rendered, the determined three-dimensional grid model to be reserved is the three-dimensional grid model remaining after the internal structure is removed from the three-dimensional grid model to be rendered.
And S13, rendering the three-dimensional grid model to be reserved to obtain a rendered image corresponding to the three-dimensional grid model to be rendered.
Specifically, the three-dimensional grid model to be reserved can be added into a rendering scene for rendering, such as a WebGL rendering scene for rendering. Before rendering, webGL rendering scenes also need to be initialized so that the rendered virtual scenes are closer to the real environment. For example, the diffuse and solar light sources in the environment are simulated by creating an ambient light module and a parallel light module, respectively, and the viewing angle of the user is simulated by initializing the camera module. Because the WebGL does not need any browser plug-in support, and the interface is realized through a unified cross-platform open graphic library interface, the rendering of the three-dimensional grid model to be reserved in the WebGL rendering scene can improve the rendering convenience.
In the embodiment of the application, since the bounding box is a regular object, the collision calculation by using the bounding box instead of the model per se is more efficient and simpler than the collision calculation by directly using the model per se. Meanwhile, the three-dimensional grid model to be rendered is determined according to the collision relation, and only the three-dimensional grid model to be determined to be reserved is required to be rendered during rendering, so that the structure to be rendered can be simplified, the rendering speed can be improved, the waiting time of a user is shortened, and the good experience of the user is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Embodiment two:
In some embodiments, when determining the three-dimensional mesh model to be retained according to the preset rule, determining the three-dimensional mesh model to be retained according to the collision relationship in S12 includes:
and removing the internal structure in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
The internal structure refers to a structure that does not belong to the surface of the three-dimensional mesh model to be rendered.
In the embodiment of the application, after the internal structure is removed, the internal structure does not need to be rendered later. The internal structure in the three-dimensional grid model to be rendered is eliminated, namely, the external structure of the three-dimensional grid model to be rendered is reserved, so that grid characteristic details of the surface of the three-dimensional model to be rendered can be reserved after the three-dimensional model to be rendered is rendered. And because the user usually does not pay attention to the internal structure of the model, if the internal structure is removed and then the three-dimensional grid model to be rendered is rendered, the three-dimensional grid model to be rendered can be reduced, the rendering efficiency is improved, grid characteristic details of the surface of the three-dimensional grid model to be rendered can be reserved as far as possible, and the user can obtain enough grid characteristic details of the surface of the model.
In some embodiments, the removing the internal structure in the three-dimensional mesh model to be rendered according to the collision relation includes:
And eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
Specifically, after determining collision relations between every two bounding boxes in the three-dimensional grid model to be rendered, analyzing whether two bounding boxes corresponding to each collision relation have overlapping areas, and if so, eliminating the three-dimensional grid model corresponding to the overlapping areas. For example, assuming that the collision relationship between two bounding boxes is an inclusion relationship, since the region where the included bounding box is located is the overlapping region of the two bounding boxes, the elimination of the overlapping region is to eliminate the three-dimensional mesh model corresponding to the included bounding box. For example, assuming that the collision relationship between two bounding boxes is an intersection relationship, since the intersection region in the two bounding boxes is an overlapping region, the elimination of the overlapping region is a three-dimensional mesh pattern corresponding to the elimination of the intersection region.
Of course, if the collision relationship between the two bounding boxes is a separation relationship, since there is no overlapping portion between the two bounding boxes in the separation relationship, the three-dimensional mesh model corresponding to the two bounding boxes is not removed, i.e., the three-dimensional mesh model corresponding to the two bounding boxes is retained.
In the embodiment of the application, when the overlapping area exists in the two bounding boxes, the structure corresponding to the overlapping area necessarily belongs to the internal structure of the two bounding boxes, so that the three-dimensional grid model to be reserved can be accurately determined by searching the overlapping area and removing the overlapping area.
In some embodiments, when considering that the collision relationship of the two bounding boxes is an intersection relationship, the two bounding boxes have regions that do not belong to the opposite bounding box, and because the intersection portions of the two bounding boxes are the extensions of the regions that do not belong to the opposite bounding box in the corresponding bounding boxes, before the three-dimensional mesh model corresponding to the overlapping regions in the two bounding boxes corresponding to the collision relationship in the three-dimensional mesh model to be rendered is removed according to the collision relationship, in order to balance the rendered image and the rendering speed that can be viewed by the user, the method further includes:
when the collision relationship is an intersection relationship, a ratio value of the volume of the intersection portion to the volume of the bounding box having a smaller volume is calculated.
Correspondingly, the removing the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation from the three-dimensional grid model to be rendered according to the collision relation comprises the following steps:
and eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the proportion value is larger than a preset proportion threshold value.
Wherein the preset ratio threshold is typically greater than or equal to 50%.
In the embodiment of the application, the collision relation between the bounding box A and the bounding box B is judged to be an intersecting relation, the volume of the bounding box A is smaller than that of the bounding box B, and the ratio value is calculated firstly, namely the volume/S of the bounding box A, assuming that the volume of the intersecting part of the bounding box A and the bounding box B is S. And after judging that the ratio value is larger than the preset ratio threshold value, eliminating the intersecting part between the bounding box A and the bounding box B, otherwise, eliminating the intersecting part between the bounding box A and the bounding box B. Because the three-dimensional grid model corresponding to the intersection part between the two bounding boxes is removed only after the proportion value is larger than the preset proportion threshold value, when the conditions are met, the grid feature details of the surface included by the bounding box with smaller volume are indicated to be less, and therefore, even if the intersection part of the two bounding boxes is removed, the user can not be greatly influenced by viewing the rendered three-dimensional grid model.
It should be noted that, when the collision relationship is the inclusion relationship, the three-dimensional mesh model lost by the included bounding box may be directly removed without calculating the scale value. Of course, when the collision relationship is a separation relationship, the three-dimensional grid models corresponding to the two bounding boxes of the separation relationship are reserved. Referring to fig. 6, fig. 6 is a schematic diagram before the bounding box is rejected according to the collision relation of the bounding box, and fig. 7 is a schematic diagram after a part of the bounding box of fig. 6 is rejected according to the collision relation of the bounding box. Referring to fig. 8, fig. 8 shows a schematic view of a three-dimensional mesh model to be rendered, and fig. 9 shows a schematic view of a reserved three-dimensional mesh model.
In some embodiments, to further shorten the rendering time, the model rendering method further includes:
And eliminating a target area of a bounding box with smaller volume in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the proportion value is larger than a preset proportion threshold value, wherein the target area is an area which does not belong to the overlapping area in the bounding box with smaller volume.
In the embodiment of the application, under the condition that the collision relation is the intersection relation, calculating the ratio value of the volume of the intersection part and the volume of the bounding box with smaller volume, and removing the area which does not belong to the overlapping area of the bounding box with smaller volume and the bounding box with larger volume from the bounding box with smaller volume after judging that the ratio value is larger than the preset ratio threshold (the ratio threshold can be set to be a value larger than 50%). That is, in the embodiment of the present application, if the ratio value is greater than the preset ratio threshold value when the collision relationship is the intersection relationship, the three-dimensional grid model corresponding to the bounding box with smaller volume is removed. Under the condition that the proportion value is larger than the preset proportion threshold value, the surface mesh feature details included by the bounding box with smaller volume are indicated to be less, so that even if the three-dimensional mesh model corresponding to the bounding box with smaller volume is removed, the user can not be influenced greatly by viewing the rendered three-dimensional mesh model.
Embodiment III:
in some embodiments, the step S12 includes:
A1, selecting an un-traversed bounding box from target bounding boxes, and determining collision relations between the selected bounding boxes and other bounding boxes, wherein when the un-traversed bounding box is selected for the first time, the target bounding box is each bounding box generated, and when the un-traversed bounding box is not selected for the first time, the target bounding box is the bounding box corresponding to the three-dimensional grid model to be reserved currently.
And A2, after each traversal is finished, eliminating the three-dimensional grid model corresponding to the bounding box with smaller volume in the two bounding boxes with the collision relationship as the inclusion relationship.
Specifically, assuming that the number of generated bounding boxes is greater than 1, traversing the bounding boxes according to a certain sequence (such as a sequence from front to back), determining collision relations between the selected bounding boxes and other bounding boxes, if the collision relations are containing relations, eliminating three-dimensional grid models corresponding to the smaller bounding boxes in the two bounding boxes corresponding to the containing relations, and continuing to select new bounding boxes for traversing until all the remaining bounding boxes are traversed. Since the bounding boxes to be subjected to the collision relation calculation are selected by the traversal method, the repeated calculation of the collision relation on the same bounding box can be avoided. Meanwhile, after each traversal is finished, the three-dimensional grid model corresponding to the bounding box with smaller volume in the two bounding boxes containing the relation is removed, so that the internal structure in the three-dimensional grid model to be rendered can be removed in time.
In some embodiments, the model rendering method further includes:
After the collision relation of each bounding box in the target bounding box is determined, determining whether a three-dimensional grid model corresponding to the bounding box with smaller volume is determined as a three-dimensional grid model to be reserved according to the proportional relation of the volume of the intersecting part and the volume of the bounding box with smaller volume for two bounding boxes with each group of collision relations as an intersecting relation.
Specifically, after each traversal is finished, two bounding boxes corresponding to each intersection relation are reserved, only after the collision relation of each bounding box in the target bounding box is determined, the proportion relation between the volume of the intersection part and the bounding box with smaller volume in the two bounding boxes of the intersection relation is calculated, and whether the three-dimensional grid model corresponding to the bounding box with smaller volume is removed is selected according to the calculated proportion relation.
To more clearly describe how to determine the three-dimensional mesh model to be retained by traversing the bounding box, a specific application example is described below.
Assume that the number of bounding boxes of the generated three-dimensional grid model to be rendered is 4 and A, B, C, D respectively.
Select a for a first pass, determine collision relationships of a and B, A and C, A and D, respectively. If the collision relation between A and B is the inclusion relation, A comprises B, the collision relation between A and C is the intersection relation, and the collision relation between A and D is the separation relation, eliminating the three-dimensional grid model corresponding to B after the traversal is finished.
After the first traversal is completed, the remaining bounding boxes are A, C, D.
C is selected for the second traversal, and the collision relation between A and C is determined, so that only the collision relation between C and D is determined in the traversal process. Assuming that the collision relationship between C and D is an inclusion relationship, and the volume of D is larger than that of C, namely D contains C, deleting the three-dimensional grid model corresponding to C.
After the second traversal is completed, the collision relationships of the remaining bounding boxes (i.e., A, D) are determined. Although the collision relationship between a and C is an intersecting relationship (the volume of a is assumed to be greater than the volume of C) in the first traversal process, since the three-dimensional mesh model corresponding to C is removed after the second traversal is completed, that is, the collision relationship between a and C will not exist, it is not necessary to determine the proportional relationship between the volume of the intersecting portion (that is, the overlapping portion of a and C) and the volume of C, so that it is not necessary to perform a determination step of whether to retain the three-dimensional mesh model corresponding to C, and further, the rendering efficiency of the model is improved.
In the embodiment of the application, after the collision relation of two bounding boxes is obtained each time, the three-dimensional grid model corresponding to the bounding box with smaller volume in the containing relation is removed first, but the three-dimensional grid model corresponding to the bounding box with the intersecting relation is not processed temporarily, and only after the collision relation of the rest bounding boxes is obtained, whether the three-dimensional grid model corresponding to the bounding box with smaller volume in the intersecting relation needs to be reserved or not is judged, and the two bounding boxes with the intersecting relation determined in advance are possibly removed when the collision relation is determined later (if a certain bounding box with the intersecting relation is contained by other bounding boxes, the certain bounding box is removed), so that when the three-dimensional grid model needing to be reserved is determined by adopting the method, the calculated amount can be reduced, and the efficiency of obtaining the three-dimensional grid model needing to be reserved is improved.
In some embodiments, before A1 above, further comprising:
b1, calculating the volume of each generated bounding box.
Specifically, before calculating the volume of a bounding box, determining the center point of the bounding box according to the maximum value and the minimum value of the bounding box in three dimensions, and determining the length, the width and the depth of the bounding box according to the center point and each vertex of the bounding box. The volume of the bounding box is calculated from the length, width and depth of the bounding box.
And B2, sorting the bounding boxes according to the size of the volume from large to small, wherein when the bounding box which is not traversed is selected for the first time, the sorted bounding boxes are used as the target bounding boxes.
Correspondingly, the A1 includes:
And selecting an unremoved bounding box from the target bounding boxes in a front-to-back order.
In order to more clearly describe how bounding boxes are ordered according to their volumes, and how the ordered bounding boxes are traversed, a specific application example is described below.
Assuming that the number of bounding boxes of the generated three-dimensional grid model to be rendered is 4 and A, B, C, D respectively, and the volumes of the bounding boxes meet the following relation that A > B > D > C, the ordered result is ABDC.
One non-traversed bounding box is selected from the target bounding boxes "ABDC" from front to back, and since a is not traversed, a first traversal selects a by determining the collision relationship of a with B, A and D, A with C, respectively. If the collision relation between A and B is the inclusion relation, A contains B, the collision relation between A and D is the intersection relation, and the collision relation between A and C is the separation relation, eliminating the three-dimensional grid model corresponding to B after the traversal is finished.
After the first traversal is finished, selecting an un-traversed bounding box from front to back in the target bounding box ADC, wherein the selected bounding box is D, and the collision relation between D and C determined in the traversal process is a separation relation.
Since the remaining bounding boxes (i.e., target bounding boxes) are "ADC" after the second traversal is completed and the collision relations between the bounding boxes are determined, bounding boxes corresponding to the intersection relations, namely A and D, can be screened from the collision relations, and whether a three-dimensional grid model corresponding to D is reserved or not is determined according to the proportion of the volume of the intersection part to the volume of D. Since the collision relation between A and C is a separation relation, and the collision relation between D and C is also a separation relation, the three-dimensional grid model corresponding to C is a three-dimensional grid model to be reserved, and since the volume of A is the largest, the three-dimensional grid model corresponding to A is also a three-dimensional grid model to be reserved.
In the embodiment of the application, since the bounding boxes are firstly ordered according to the volumes of the bounding boxes from large to small, and then the non-traversed bounding boxes are selected according to the sequence from front to back to calculate the collision relation between the bounding boxes, the collision relation between bounding boxes with large volumes is calculated first when the collision relation is calculated. And because the probability that the bounding box with larger volume contains other bounding boxes is larger, the collision relation between the bounding box with larger volume and other bounding boxes is calculated first, the three-dimensional grid model corresponding to the contained bounding box can be removed earlier, the number of the bounding boxes required to be calculated subsequently can be reduced, and the efficiency of obtaining the three-dimensional grid model required to be reserved can be improved.
Embodiment four:
In some embodiments, before the step S11, the method further includes:
and C1, obtaining the model file content of the three-dimensional model file.
The above model file content is the content to be rendered, wherein the format of the three-dimensional model file includes, but is not limited to, ".obj", ". Gltf", ".glb", ".fbx", ".stl".
Specifically, the three-dimensional model file stored in the local or cloud server can be read in an Ajax or fetch mode, and the model file content of the read three-dimensional model file can be obtained.
And C2, generating a data structure in a target format according to the content of the model file.
The data structure of the target format may be a json data structure or a character string data structure.
And C3, generating a grid structure according to the data structure to obtain the three-dimensional grid model to be rendered.
The grid data in the grid structure is internal data stored in the grid structure by the computer, and is suitable for screen display.
In the embodiment of the application, the content of the model file is considered to comprise the content to be rendered, so that the data structure in the target format can be quickly generated according to the content of the model file, and the grid structure is a special data structure, so that after the data structure in the target format is generated, the grid structure corresponding to the data structure can be accurately generated by combining the characteristics of the grid structure, and further, the corresponding rendering according to the grid structure is facilitated.
In some embodiments, the data structure of the target format includes vertex coordinates of vertices and vertex index fields of the vertices, the vertex index fields include connection relations between the vertices stored in a tree structure and other vertices, and the C3 includes:
and C31, determining the vertex corresponding to the father node and the vertex index field corresponding to the father node according to the connection relation between the vertex stored in the tree structure in the vertex index field and other vertices.
Wherein the vertex index field includes the connection relationship of the vertex to other vertices in the model file content. For example, assuming that the vertex index field corresponding to the vertex A is the vertex index field A, and the vertex A is connected with the vertex B, the vertex index field includes the connection relationship between the vertex A and the vertex B, and it can be seen from the connection relationship between two vertices which are parent nodes and which are child nodes. In addition, the vertex index field may also include a mesh rendering order for the vertices.
Specifically, the connection relation of each vertex index field is analyzed to analyze the vertices belonging to the parent node among the respective vertices.
And C32, generating a grid structure according to the determined vertex coordinates corresponding to the vertexes and the determined vertex index fields.
After determining which vertex belongs to the parent node, converting the obtained vertex coordinates of the vertices and vertex index fields corresponding to the vertices into a three-dimensional grid model, such as a grid structure of WebGL standard. Of course, if the vertex index field further includes a mesh drawing order of the vertices, each vertex is converted into a three-dimensional mesh model according to the mesh drawing order of the vertices.
For example, assume that the three-dimensional model corresponding to the model file content is a bottle and a fruit, and the fruit is in the bottle, and because the fruit is in the bottle, each vertex corresponding to the fruit is a child node of the vertex corresponding to the bottle, at this time, the three-dimensional grid model to be rendered can be directly obtained according to each vertex corresponding to the bottle.
In the embodiment of the application, the vertexes belonging to the father node are firstly screened out from the vertexes, and then the screened vertexes are converted into the three-dimensional grid model, so that the quantity of the vertexes needing to be converted into the three-dimensional grid model is reduced, and the conversion efficiency is improved.
In some embodiments, the step S11 includes:
d1, determining the vertexes with connection relation according to the vertex index fields for each vertex index field to obtain a target vertex set.
Specifically, a target vertex set is determined according to the connection relationship of vertices recorded in each vertex index field in the data structure of the target format.
And D2, for each target vertex set, determining the maximum value and the minimum value corresponding to the target vertex set on the three-dimensional coordinate axis according to the vertex coordinates of the vertices in the target vertex set.
And D3, generating a bounding box of the three-dimensional grid model to be rendered according to the maximum value and the minimum value which are corresponding to the target vertexes concentrated on the three-dimensional coordinate axis.
Since the mesh model to be rendered is a three-dimensional model, the bounding box generated is also a three-dimensional bounding box, the maximum value of the coordinates of the bounding box in any dimension is at least greater than the minimum value of the coordinates of the three-dimensional mesh model in that dimension, and the minimum value of the coordinates of the bounding box in that dimension is at least less than the minimum value of the coordinates of the three-dimensional mesh model in that dimension. Namely, according to the mode, the bounding box of the three-dimensional grid model to be rendered can be accurately generated.
Fifth embodiment:
In some embodiments, the user does not need to pay attention to the internal structure of the model in view of some scenes, but some scenes do not need to pay attention to the internal structure of the model, so before S11, the method further includes:
and judging whether the three-dimensional grid model to be rendered needs model simplification or not.
The step S11 includes:
And generating a bounding box of the three-dimensional grid model to be rendered under the condition that the three-dimensional grid model to be rendered needs to be subjected to model simplification.
The model simplification refers to removing part of the structure of the three-dimensional grid model to be rendered, such as removing the internal structure of the three-dimensional grid model to be rendered.
In the embodiment of the application, the bounding box of the model is generated after the three-dimensional grid model to be rendered is judged to need to be subjected to model simplification, so that the situation that the bounding box is generated without model simplification by a user, and then some grid models are deleted according to the collision relation among the bounding boxes can be avoided.
In some embodiments, the determining whether the three-dimensional mesh model to be rendered needs model simplification includes:
and E1, acquiring current scene information or model information of the three-dimensional grid model to be rendered.
The current scene information may include at least one of a current time, a user who issues a rendering request, a determination result of whether a rejection instruction is received, and a occupation of a user who views the rendering result.
The model information includes information for indicating whether the three-dimensional mesh model to be rendered belongs to an internally and externally nested model, for example, if the three-dimensional mesh model to be rendered belongs to the internally and externally nested model, it is determined that the three-dimensional mesh model to be rendered needs to be subjected to model simplification.
And E2, judging whether the three-dimensional grid model to be rendered needs model simplification or not according to the current scene information or the model information.
Specifically, if the current scene information includes the current time, judging whether the current time is within a preset time range (that is, a preset condition includes a preset time range), if so, judging that the three-dimensional grid model to be rendered needs to be subjected to model simplification, otherwise, judging that the three-dimensional grid model to be rendered does not need to be subjected to model simplification. If the current scene information comprises a user sending a rendering request, judging whether the user sending the rendering request is a preset user (namely, a preset condition comprises the preset user), if so, judging that the three-dimensional grid model to be rendered needs to be subjected to model simplification, otherwise, judging that the three-dimensional grid model to be rendered does not need to be subjected to model simplification. If the current scene information includes a judgment result of whether a model simplification instruction is received or not, and the judgment result indicates that the model simplification instruction is received (namely, the preset condition includes that the model simplification instruction is received), the three-dimensional grid model to be rendered is judged to need model simplification, otherwise, the three-dimensional grid model to be rendered is judged not to need model simplification. If the current scene information includes the occupation of the user viewing the rendering result, judging whether the occupation of the user viewing the rendering result belongs to the preset occupation (namely, the preset condition includes the preset occupation), if so, judging that the three-dimensional grid model to be rendered needs to be subjected to model simplification (for example, if the three-dimensional grid model to be rendered is a plurality of building models of a park, a model structure such as a hydropower pipeline is arranged in a wall body of each building model or a model structure of equipment is arranged in a room, if the rendering result is a constructor of the design of the park, because the constructor does not pay attention to the internal details of each building model, only the surface details of each building model in the park are paid attention to, the interior of the plurality of building models of the park can be removed, namely, model simplification is performed, if the rendering result is a constructor of the indoor design of the building models is viewed, the interior of the plurality of the building models of the park cannot be removed, namely, model simplification is not performed, otherwise, judging that the three-dimensional grid model to be rendered does not need model simplification.
It should be noted that, when the current scene information includes at least two kinds of information of "the current time, the user who sends the rendering request, the determination result of whether to receive the rejection instruction, and the occupation of the user who views the rendering result", any kind of information is only required to satisfy the preset condition, which is not limited herein.
In the embodiment of the application, whether the three-dimensional grid model to be rendered needs to be subjected to model simplification can be judged in various modes, so that the flexibility of the judging mode is improved.
Example six:
corresponding to the model rendering method described in the above respective method embodiments, fig. 10 shows a block diagram of a model rendering device provided in an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown.
Referring to fig. 10, the model rendering apparatus 10 includes a bounding box generation module 101, a three-dimensional mesh model determination module 102 to be retained, and a rendering module 103. Wherein:
The bounding box generating module 101 is used for generating a bounding box of the three-dimensional grid model to be rendered.
The three-dimensional grid model to be preserved determining module 102 is configured to determine a collision relationship between the bounding boxes, and determine the three-dimensional grid model to be preserved according to the collision relationship.
And the rendering module 103 is used for rendering the three-dimensional grid model to be reserved to obtain a rendered image corresponding to the three-dimensional grid model to be rendered.
In the embodiment of the application, since the bounding box is a regular object, the collision calculation by using the bounding box instead of the model per se is more efficient and simpler than the collision calculation by directly using the model per se. Meanwhile, the three-dimensional grid model to be rendered is determined according to the collision relation, and only the three-dimensional grid model to be determined to be reserved is required to be rendered during rendering, so that the structure to be rendered can be simplified, the rendering speed can be improved, the waiting time of a user is shortened, and the good experience of the user is improved.
In some embodiments, the three-dimensional mesh model determining module 102 is specifically configured to, when determining the three-dimensional mesh model to be retained according to the collision relationship:
and removing the internal structure in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
In some embodiments, the removing the internal structure in the three-dimensional mesh model to be rendered according to the collision relation includes:
And eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation in the three-dimensional grid model to be rendered according to the collision relation to obtain the three-dimensional grid model to be reserved.
In some embodiments, before the removing, according to the collision relationship, the three-dimensional mesh model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relationship in the three-dimensional mesh model to be rendered, the method further includes:
when the collision relationship is an intersection relationship, a ratio value of the volume of the intersection portion to the volume of the bounding box having a smaller volume is calculated.
Correspondingly, the removing the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the collision relation from the three-dimensional grid model to be rendered according to the collision relation comprises the following steps:
and eliminating the three-dimensional grid model corresponding to the overlapping area in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the proportion value is larger than a preset proportion threshold value.
In some embodiments, the model rendering apparatus 10 further includes:
And the external structure eliminating module of the intersection relation is used for eliminating a target area of a bounding box with smaller volume in the two bounding boxes corresponding to the intersection relation in the three-dimensional grid model to be rendered under the condition that the proportion value is larger than a preset proportion threshold value, wherein the target area is an area which does not belong to the overlapping area in the bounding box with smaller volume.
In some embodiments, the three-dimensional mesh model determining module 102 to be retained includes:
And the non-traversed bounding box selection unit is used for selecting one non-traversed bounding box from the target bounding boxes, and determining collision relations between the selected bounding boxes and the rest bounding boxes, wherein when the non-traversed bounding box is selected for the first time, the target bounding box is the generated bounding box, and when the non-traversed bounding box is not selected for the first time, the target bounding box is the bounding box corresponding to the three-dimensional grid model which is required to be reserved currently.
And the bounding box eliminating unit with smaller volume is used for eliminating the three-dimensional grid model corresponding to the bounding box with smaller volume in the two bounding boxes with the collision relation as the inclusion relation after each traversal is finished.
In some embodiments, the model rendering apparatus 10 further includes:
And the determination module is used for determining whether the three-dimensional grid model corresponding to the bounding box with smaller volume is determined as the three-dimensional grid model to be reserved according to the proportional relation between the volume of the intersecting part and the volume of the bounding box with smaller volume for each group of two bounding boxes with the collision relation being the intersection relation after the collision relation of each bounding box in the target bounding box is determined.
In some embodiments, the model rendering apparatus 10 provided in the embodiments of the present application further includes:
and the volume calculation module is used for calculating the volume of each generated bounding box before selecting one non-traversed bounding box from the target bounding boxes.
And the volume sorting module is used for sorting the bounding boxes from large to small according to the size of the volume, wherein when the bounding box which is not traversed is selected for the first time, the sorted bounding boxes are used as the target bounding boxes.
Correspondingly, the non-traversed bounding box selection unit is specifically configured to:
And selecting an unremoved bounding box from the target bounding boxes in a front-to-back order.
In some embodiments, the model rendering apparatus provided by the embodiment of the present application further includes:
The model file content acquisition module is used for acquiring the model file content of the three-dimensional model file before generating the bounding box of the three-dimensional grid model to be rendered.
And the data structure generation module is used for generating a data structure in a target format according to the content of the model file.
And the grid model generation module is used for generating a grid structure according to the data structure to obtain the three-dimensional grid model to be rendered.
In some embodiments, the data structure of the target format includes vertex coordinates of vertices and vertex index fields of the vertices, wherein the vertex index fields include connection relations between the vertices stored in a tree structure and other vertices, and the mesh model generating module is specifically configured to, when generating a mesh structure according to the data structure:
and determining the vertex corresponding to the father node and the vertex index field corresponding to the father node according to the connection relation between the vertex stored in the tree structure in the vertex index field and other vertices.
And generating a grid structure according to the determined vertex coordinates corresponding to the vertexes and the determined vertex index fields.
In some embodiments, the bounding box generating module 101 includes:
and the target vertex set determining unit is used for determining the vertexes with the connection relation according to the vertex index fields for each vertex index field to obtain the target vertex set.
And the extremum determining unit is used for determining the maximum value and the minimum value corresponding to the target vertex set on the three-dimensional coordinate axis according to the vertex coordinates of the vertices in the target vertex set for each target vertex set.
And the bounding box generating unit is used for generating a bounding box of the three-dimensional grid model to be rendered according to the maximum value and the minimum value which correspond to the target vertexes concentrated on the three-dimensional coordinate axis.
In some embodiments, the model rendering apparatus 10 provided in the embodiments of the present application further includes:
the model simplification judging module is used for judging whether the three-dimensional grid model to be rendered needs to be subjected to model simplification or not before generating the bounding box of the three-dimensional grid model to be rendered.
Correspondingly, the bounding box generating module 101 is specifically configured to:
And generating a bounding box of the three-dimensional grid model to be rendered under the condition that the three-dimensional grid model to be rendered needs to be subjected to model simplification.
In some embodiments, the model simplification judging module includes:
and the information acquisition unit is used for acquiring the current scene information or the model information of the three-dimensional grid model to be rendered.
And the information judging unit is used for judging whether the three-dimensional grid model to be rendered needs model simplification or not according to the current scene information or the model information.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Embodiment seven:
Fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 11, the terminal device 11 of this embodiment includes at least one processor 110 (only one processor is shown in fig. 11), a memory 111, and a computer program 112 stored in the memory 111 and operable on the at least one processor 110, the steps of any of the respective method embodiments described above being implemented when the processor 110 executes the computer program 112.
The terminal device 11 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device 11 may include, but is not limited to, a processor 110, a memory 111. It will be appreciated by those skilled in the art that fig. 11 is merely an example of the terminal device 11 and is not meant to be limiting as to the terminal device 11, and may include more or fewer components than shown, or may combine certain components, or may include different components, such as input-output devices, network access devices, etc.
The Processor 110 may be a central processing unit (Central Processing Unit, CPU), the Processor 110 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 111 may in some embodiments be an internal storage unit of the terminal device 11, such as a hard disk or a memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11 in other embodiments, for example, a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the terminal device 11. Further, the memory 111 may include both an internal storage unit and an external storage device of the terminal device 11. The memory 111 is used to store an operating system, an application program, a boot loader (BootLoader), data, other programs, and the like, such as program codes of the computer programs. The above-described memory 111 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises at least one processor, a memory and a computer program stored in the memory and capable of running on the at least one processor, wherein the steps in any of the method embodiments are realized when the processor executes the computer program.
The embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product enabling a terminal device to carry out the steps of the method embodiments described above when the computer program product is run on the terminal device.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. The computer program comprises computer program code, and the computer program code can be in a source code form, an object code form, an executable file or some intermediate form and the like. The computer readable medium may include at least any entity or device capable of carrying computer program code to a camera device/terminal equipment, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing embodiments are merely illustrative of the technical solutions of the present application, and not restrictive, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that modifications may still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions of some technical features thereof, and that such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (16)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310730826.2A CN119169165A (en) | 2023-06-19 | 2023-06-19 | Model rendering method, device, terminal device and readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310730826.2A CN119169165A (en) | 2023-06-19 | 2023-06-19 | Model rendering method, device, terminal device and readable storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN119169165A true CN119169165A (en) | 2024-12-20 |
Family
ID=93877299
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310730826.2A Pending CN119169165A (en) | 2023-06-19 | 2023-06-19 | Model rendering method, device, terminal device and readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119169165A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119418016A (en) * | 2025-01-06 | 2025-02-11 | 中科图新(苏州)科技有限公司 | Terrain rendering method, device, computer equipment, readable storage medium and program product |
-
2023
- 2023-06-19 CN CN202310730826.2A patent/CN119169165A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119418016A (en) * | 2025-01-06 | 2025-02-11 | 中科图新(苏州)科技有限公司 | Terrain rendering method, device, computer equipment, readable storage medium and program product |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6952204B2 (en) | 3D computer modelling apparatus | |
| CN115131482B (en) | Method, device and equipment for rendering lighting information in game scenes | |
| JP3390463B2 (en) | Shadow test method for 3D graphics | |
| WO2020098531A1 (en) | Object loading method, device, storage medium, and electronic device | |
| US8773422B1 (en) | System, method, and computer program product for grouping linearly ordered primitives | |
| US20090225080A1 (en) | Real-time Precision Ray Tracing | |
| CN113112603B (en) | Method and device for optimizing three-dimensional model | |
| US9208610B2 (en) | Alternate scene representations for optimizing rendering of computer graphics | |
| US20060066616A1 (en) | Diffuse photon map decomposition for parallelization of global illumination algorithm | |
| CN117237502A (en) | Three-dimensional rendering method, device, equipment and medium | |
| Livnat et al. | Interactive point-based isosurface extraction | |
| CN107464286B (en) | Method, device, equipment and readable medium for repairing holes in three-dimensional city model | |
| Richter et al. | Out-of-core real-time visualization of massive 3D point clouds | |
| CN111950057A (en) | A method and device for loading building information model BIM | |
| US20240203030A1 (en) | 3d model rendering method and apparatus, electronic device, and storage medium | |
| JP6864495B2 (en) | Drawing Global Illumination in 3D scenes | |
| CN113724401A (en) | Three-dimensional model cutting method and device, computer equipment and storage medium | |
| CN117876572B (en) | Illumination rendering method, device, equipment and storage medium | |
| GB2607350A (en) | Graphics processing | |
| CN119169165A (en) | Model rendering method, device, terminal device and readable storage medium | |
| Wiemann et al. | Automatic Map Creation For Environment Modelling In Robotic Simulators. | |
| JP2015022761A (en) | Video processing apparatus and method | |
| CN116127802A (en) | Method, device and system for displaying CAE simulation result on 3D (three-dimensional) view | |
| CN117152237A (en) | Distance field generation method and device, electronic equipment and storage medium | |
| CN117422848A (en) | Method and device for segmenting three-dimensional model |
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 |