CN114155329A - Plane fusion method and system of three-dimensional model multi-grid and electronic equipment - Google Patents
Plane fusion method and system of three-dimensional model multi-grid and electronic equipment Download PDFInfo
- Publication number
- CN114155329A CN114155329A CN202111330955.XA CN202111330955A CN114155329A CN 114155329 A CN114155329 A CN 114155329A CN 202111330955 A CN202111330955 A CN 202111330955A CN 114155329 A CN114155329 A CN 114155329A
- Authority
- CN
- China
- Prior art keywords
- grid
- plane
- mesh
- grids
- planar
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/04—Texture mapping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Graphics (AREA)
- Data Mining & Analysis (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Architecture (AREA)
- Computer Hardware Design (AREA)
- Life Sciences & Earth Sciences (AREA)
- Geometry (AREA)
- Image Generation (AREA)
Abstract
The invention discloses a plane fusion method, a system and electronic equipment for a three-dimensional model multi-grid, wherein the method comprises the following steps: obtaining a grid corresponding to each texture in a first texture mapping of the three-dimensional model; fusing a plurality of grids in the same plane into a polygonal fused plane; saving the texture whole block of the fused plane in a second texture map. According to the invention, a plurality of grids on the same plane form a polygonal fusion plane, and a whole block of texture mapping is generated aiming at the fusion plane instead of a stack of texture mapping aiming at the grids, so that the utilization rate of the whole texture mapping is effectively improved, the purpose of reducing the size of the model is further achieved, and the problems of wasting texture mapping space and increasing the size of the model in the related technology are solved.
Description
Technical Field
The invention relates to the technical field of three-dimensional reconstruction, in particular to a plane fusion method and system of a three-dimensional model multi-grid network and electronic equipment.
Background
The three-dimensional model includes a structure diagram and a texture diagram, as shown in fig. 1 to 3, wherein fig. 1 shows the three-dimensional model, fig. 2 shows the structure diagram of the three-dimensional model, and fig. 3 shows the texture diagram of the three-dimensional model; in fig. 4, a part of the three-dimensional model structure diagram shown in fig. 2 is selected and enlarged, and it can be seen that it is composed of a plurality of meshes (triangular patches), each of which has a texture corresponding to it in a texture map; in the three-dimensional reconstruction, in the texture calculation link, the texture corresponding to each grid mesh is calculated, a texture map is finally formed, the size of the texture map is determined by the spatial position relation of the texture corresponding to each triangular patch, and the size of the three-dimensional model is further influenced.
In the related art, the texture corresponding to each triangular patch is often independently placed in a rectangular manner, which wastes the space of a texture map and increases the size of the model.
Aiming at the problems of wasting texture mapping space and increasing the size of a model in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The invention mainly aims to provide a plane fusion method and a plane fusion system for a three-dimensional model multi-grid, which are used for solving the problems of wasting texture mapping space and increasing the size of the model in the related technology.
In order to achieve the above object, a first aspect of the present invention provides a planar fusion method for a multi-mesh of a three-dimensional model, including:
obtaining a grid corresponding to each texture in a first texture mapping of the three-dimensional model;
fusing a plurality of grids in the same plane into a polygonal fused plane;
saving the texture whole block of the fused plane in a second texture map.
Optionally, the fusing a plurality of meshes in the same plane into a polygonal fused plane includes:
adding a plurality of grids in the same plane to a planar grid set;
and merging all grids in the plane grid set to fuse into a polygonal fusion plane.
Further, the adding a plurality of meshes in the same plane to the set of planar meshes comprises:
on the basis of a specified first grid, expanding outwards and traversing a second grid which is on the same side with the first grid;
and adding a third grid which is positioned on the same plane with the first grid in the second grid into a plane grid set, wherein the plane grid set comprises the first grid in advance.
Further, the method further comprises:
and (3) expanding and traversing: on the basis of the newly added third grid, expanding outwards and traversing a fourth grid which is on the same side with the third grid;
adding a planar grid: adding a fifth mesh of the fourth mesh, which is in the same plane as the first mesh and the third mesh, to a planar mesh set;
repeating the expanding and traversing step and the planar grid adding step until no new grids corresponding to all the textures in the first texture mapping are added into the planar grid set.
Optionally, adding a third mesh, which is in the same plane as the first mesh, of the second mesh to the planar mesh set includes:
determining a first normal corresponding to the first grid and a second normal corresponding to a grid in the second grid;
respectively calculating included angles between the second normal and the first normal;
and if the included angle is smaller than the root threshold value, the grids in the second grids corresponding to the second normal lines and the first grids are positioned on the same plane, and the grids in the second grids corresponding to the second normal lines are added into the plane grid set as third grids.
Optionally, adding a fifth mesh, which is in the same plane as the first mesh and the third mesh, of the fourth mesh to the planar mesh set includes:
determining a third normal corresponding to the third grid and a fourth normal corresponding to a grid in the fourth grid;
respectively calculating a first included angle between the fourth normal and the first normal;
respectively calculating a second included angle between the fourth normal and the third normal;
if first contained angle is less than the root threshold value just second contained angle is less than marginal threshold value, then the graticule mesh in the fourth graticule mesh that the fourth normal line corresponds with first graticule mesh, third graticule mesh are in the coplanar, will graticule mesh in the fourth graticule mesh that the fourth normal line corresponds adds to the plane graticule mesh as the fifth graticule mesh and concentrates.
Optionally, the merging all meshes in the planar mesh set into a polygonal fused plane includes:
merging all grids in the plane grid set, and traversing the edges of all grids;
if all grids corresponding to the edges are in the plane grid set, simplifying the edges;
if the grids exist in all grids corresponding to the edge and are not in the plane grid set, taking the edge as the edge of the plane boundary;
the blending plane of a polygon is fused by all sides of the plane boundary.
The second aspect of the present invention provides a planar fusion system of three-dimensional model multi-grid, comprising:
the acquiring unit is used for acquiring a grid corresponding to each texture in a first texture mapping of the three-dimensional model;
the fusion unit is used for fusing a plurality of grids in the same plane into a polygonal fusion plane;
and the storage unit is used for storing the whole texture block of the fusion plane in the second texture map.
A third aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the planar fusion method of the three-dimensional model multigrid provided in any one of the first aspects.
A fourth aspect of the present invention provides an electronic apparatus, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the method for planar fusion of a multi-mesh of a three-dimensional model provided in any one of the first aspect.
In the plane fusion method of the three-dimensional model multi-grid network provided by the embodiment of the invention, firstly, a grid network corresponding to each texture in a first texture mapping of the three-dimensional model is obtained; then fusing a plurality of grids in the same plane into a polygonal fusion plane; and finally, storing the whole texture block of the fusion plane in a second texture map. According to the invention, a plurality of grids on the same plane form a polygonal fusion plane, and a whole block of texture mapping is generated aiming at the fusion plane instead of a stack of texture mapping aiming at the grids, so that the utilization rate of the whole texture mapping is effectively improved, the purpose of reducing the size of the model is further achieved, and the problems of wasting texture mapping space and increasing the size of the model in the related technology are solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a prior art three-dimensional model;
FIG. 2 is a diagram of a prior art three-dimensional model;
FIG. 3 is a texture map of a prior art three-dimensional model;
FIG. 4 is a texture map of a portion of a three-dimensional model structure view after enlargement;
fig. 5 is a schematic flow chart of a plane fusion method according to a first embodiment of the present invention;
FIG. 6 is a schematic flow chart of a plane fusion method according to a second embodiment of the present invention;
FIG. 7 is a schematic flow chart of a plane fusion method according to a third embodiment of the present invention;
FIG. 8 is a first texture map of a three-dimensional model provided by the present invention;
fig. 9 is a schematic flow chart of a plane fusion method according to a fourth embodiment of the present invention;
FIG. 10 is a polygonal fused plane formed by fusing planar meshes according to the present invention;
FIG. 11 is a block diagram of a plane fusion system according to a first embodiment of the present invention;
fig. 12 is a block diagram of an electronic device provided by the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged under appropriate circumstances in order to facilitate the description of the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present invention, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "center", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings. These terms are used primarily to better describe the invention and its embodiments and are not intended to limit the indicated systems, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meanings of these terms in the present invention can be understood by those skilled in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in communication between two systems, components or parts. The specific meanings of the above terms in the present invention can be understood by those of ordinary skill in the art according to specific situations.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
The three-dimensional model includes a structure diagram and a texture diagram, as shown in fig. 1 to 3, wherein fig. 1 shows the three-dimensional model, fig. 2 shows the structure diagram of the three-dimensional model, and fig. 3 shows the texture diagram of the three-dimensional model; in fig. 4, a part of the three-dimensional model structure diagram shown in fig. 2 is selected and enlarged, and it can be seen that it is composed of a plurality of meshes (triangular patches), each of which has a texture corresponding to it in a texture map; in the three-dimensional reconstruction, in the texture calculation link, the texture corresponding to each grid mesh is calculated, a texture map is finally formed, the size of the texture map is determined by the spatial position relation of the texture corresponding to each triangular patch, and the size of the three-dimensional model is further influenced. In the related art, the texture corresponding to each triangular patch is often independently placed in a rectangular manner, which wastes the space of a texture map and increases the size of the model.
In order to solve the above problem, a first embodiment of the present invention provides a planar fusion method for a multi-mesh of a three-dimensional model, as shown in fig. 5, the method includes the following steps S1 to S3:
step S1: obtaining a grid corresponding to each texture in a first texture mapping of the three-dimensional model; the first texture map of the three-dimensional model is a texture map of the three-dimensional model obtained by independently placing the texture corresponding to each grid in a rectangular mode, and grids corresponding to the textures which are independently placed in the first texture map in the rectangular mode are obtained;
step S2: fusing a plurality of grids in the same plane into a polygonal fused plane; after the grids corresponding to each texture are obtained, whether all the obtained grids contain grids in the same plane or not is judged, if yes, all the grids in the same plane are fused to form a polygonal fusion plane, and the polygons can be planar graphs such as triangles, quadrangles and pentagons.
Based on the foregoing embodiment, a method according to a second embodiment of the present invention is shown in fig. 6, where step S2 includes:
step S21: adding a plurality of grids in the same plane to a planar grid set;
and establishing a plane grid set, and adding all grids in the same plane into the plane grid set, so that the grids in the same plane in the first texture mapping can be managed conveniently.
Based on the foregoing embodiments, a method according to a third embodiment of the present invention is shown in fig. 7, where step S21 includes:
step S211: on the basis of a specified first grid, expanding outwards and traversing a second grid which is on the same side with the first grid;
when obtaining grids on the same plane, each grid is a triangular patch and is triangular, so that one grid is designated as a first grid, then the first grid is used as a basis, the three edges of the first grid are expanded outwards, a second grid which is respectively shared with the three edges of the first grid is traversed, and the second grid is shared with the first grid;
the second mesh may comprise a maximum of three meshes, a minimum of one mesh; when the second graticule mesh contains three graticule mesh, every limit all corresponds the graticule mesh of a limit altogether in three limits of first graticule mesh, and when the second graticule mesh contained a graticule mesh, only one limit correspondence had the graticule mesh of limit altogether in three limits of first graticule mesh.
Step S212: and adding a third grid which is positioned on the same plane with the first grid in the second grid into a plane grid set, wherein the plane grid set comprises the first grid in advance.
After a second grid which is on the same side as the first grid is obtained, judging whether the second grid comprises grids which are on the same plane as the first grid, and if so, adding the grids which are on the same plane as the first grid into the plane grid set as a third grid; since the planar mesh sets are all meshes of the same plane and the third mesh is obtained on the basis of the first mesh, the first mesh is put into the planar mesh set in advance.
Specifically, the adding, to the planar mesh set, a third mesh in the same plane as the first mesh in the second mesh in step S212 includes:
determining a first normal corresponding to the first grid and a second normal corresponding to a grid in the second grid; when the second grid comprises a plurality of grids, the second normal line comprises the normal lines corresponding to the grids respectively;
respectively calculating included angles between the second normal and the first normal; respectively calculating included angles between all the normals contained in the second normal and the first normal;
and if the included angle is smaller than the root threshold value, the grids in the second grids corresponding to the second normal lines and the first grids are positioned on the same plane, and the grids in the second grids corresponding to the second normal lines are added into the plane grid set as third grids. Substituting different specific angle values in the experimental statistical process to carry out experiments to obtain a root threshold, and when an included angle between the second normal and the first normal is smaller than the root threshold, considering that the grid corresponding to the second normal and the first grid corresponding to the first normal are in the same plane, and adding the grid into a plane grid set as a third grid.
With a given grid G0On the basis of a normal line n0Traverse other grids G common to them1、G2、G3The corresponding normal lines are n1、n2、n3Separately calculate angle<n0,n1>(normal n)0And n1Angle), angle<n0,n2>,angle<n0,n3>When the included angle is smaller than the root threshold value, the corresponding grid is put into the plane grid set { G0、G1、G2And f, obtaining a root threshold value by substituting a specific angle value for experimental statistics.
To illustrate the technical solution of the present invention, the first texture map of the three-dimensional model provided by the present invention is shown in fig. 8, wherein the grid G3Normal to (a) is n3(ii) a With a grid G1On the basis of a normal line n1Traverse other grids G common to them11、G12、G2The corresponding normal lines are n11、n12、n2。
Based on the above embodiments, a method according to a fourth embodiment of the present invention is shown in fig. 9, and after step S212, the method further includes:
step S213: and (3) expanding and traversing: on the basis of the newly added third grid, expanding outwards and traversing a fourth grid which is on the same side with the third grid;
similar to step S211, after a third mesh is obtained by outwardly expanding the first mesh, based on a third mesh newly added in the planar mesh set, outwardly expanding three edges of the third mesh, and traversing a fourth mesh that is co-extensive with two edges of the third mesh except the edge that is co-extensive with the first mesh; because the third graticule mesh is the graticule mesh that shares the limit with first graticule mesh and outwards expands, every graticule mesh all has three limits, consequently contains 3 graticule meshes at most in the third graticule mesh, and according to every graticule mesh except that continuing outwards expanding with two limits that first graticule mesh shares the limit in the third graticule mesh, obtain every graticule mesh and two other limits share the fourth graticule mesh on limit, consequently contains 2 graticule meshes at most in the fourth graticule mesh that every graticule mesh corresponds in the third graticule mesh.
Step S214: adding a planar grid: adding a fifth mesh of the fourth mesh, which is in the same plane as the first mesh and the third mesh, to a planar mesh set;
similarly to step S212, after obtaining a fourth mesh that is co-located with two edges of the third mesh except the edge that is co-located with the first mesh, adding a mesh that is in the same plane as the first mesh and is in the same plane as the third mesh, of the fourth mesh, as a fifth mesh, to the set of planar meshes; unlike step S212, the planar mesh addition step of step S214 is performed such that the fifth mesh is not only co-planar with the first mesh, but also co-planar with the third mesh, so as to ensure that the meshes added to the planar mesh set are co-planar.
Specifically, in step S214, in the planar mesh adding step, a fifth mesh in the fourth mesh, which is located in the same plane as the first mesh and the third mesh, is added to the planar mesh set, including:
determining a third normal corresponding to the third grid and a fourth normal corresponding to a grid in the fourth grid; each grid in the third grids corresponds to a respective fourth grid, the fourth grid corresponding to each grid at most comprises two grids, and a fourth normal of each grid contained in the fourth grid corresponding to the grid in the third grids is determined;
respectively calculating a first included angle between the fourth normal and the first normal;
respectively calculating a second included angle between the fourth normal and the third normal;
if first contained angle is less than the root threshold value just second contained angle is less than marginal threshold value, then the graticule mesh in the fourth graticule mesh that the fourth normal line corresponds with first graticule mesh, third graticule mesh are in the coplanar, will graticule mesh in the fourth graticule mesh that the fourth normal line corresponds adds to the plane graticule mesh as the fifth graticule mesh and concentrates.
When first contained angle is less than the root threshold value, can regard the graticule mesh in the fourth graticule mesh to be in the coplanar with first graticule mesh, when the second contained angle is less than the root threshold value, can regard the graticule mesh in the fourth graticule mesh to be in the coplanar with the third graticule mesh, all be in the coplanar for guaranteeing to add the graticule mesh that the plane graticule mesh was concentrated two liang, be less than the root threshold value just when the second contained angle is less than marginal threshold value, graticule mesh in the fourth graticule mesh is in the coplanar with first graticule mesh, third graticule mesh, add this graticule mesh to the plane graticule mesh as fifth graticule mesh and concentrate.
Respectively based on newly added meshes of the planar mesh set, e.g. G1On the basis, traverse its new grid G of common edge11、G12The corresponding normal lines are n11、n12Separately calculate angle<n0,n11>,angle<n1,n11>,angle<n0,n12>,angle<n1,n12>When angle<n0,n11>Less than the root threshold, and angle<n1,n11>When the grid G is smaller than the edge threshold value, the corresponding grid G is arranged11Put into a planar grid set { G0、G1、G2、G11And obtaining the edge threshold value by substituting the specific angle value for experimental statistics.
Step S215: repeating the expanding and traversing step and the planar grid adding step until no new grids corresponding to all the textures in the first texture mapping are added into the planar grid set. And continuously iterating the processes until no new grids are added into the plane grid set, wherein all grids which are positioned on the same plane with the specified first grid in the first texture mapping are in the plane grid set.
Step S22: and merging all grids in the plane grid set to fuse into a polygonal fusion plane. Because the planar grids are all grids in the same plane in a centralized manner, the grids can be combined and fused into a polygonal fusion plane, and the size of the texture map is reduced.
Specifically, the step S22 includes:
merging all grids in the plane grid set, and traversing the edges of all grids;
if all grids corresponding to the edges are in the plane grid set, simplifying the edges; the number of grids corresponding to one edge is at most two;
if the grids exist in all grids corresponding to the edge and are not in the plane grid set, taking the edge as the edge of the plane boundary; when a certain grid corresponding to the edge is not in the planar grid set, the edge can be used as the edge of the planar boundary, and a polygonal fusion plane is enclosed by all the edges of the planar boundary.
The blending plane of a polygon is fused by all sides of the plane boundary.
Merging all grids in the plane grid set, traversing edges of all grids, and if at most two grids corresponding to the edges are in the plane grid set { G }0、G1、G2、G11In the 'method', if one of the edges is not concentrated in the planar mesh, the current edge is taken as the edge of the planar boundary, and finally, all the edges of the planar boundary form a polygonal fusion plane composed of a plurality of same planar meshes, as shown in fig. 10, where the lines are the planar boundaries of the polygonal fusion plane.
Step S3: saving the texture whole block of the fused plane in a second texture map. The second texture map is a whole block of texture map generated aiming at a polygonal fusion plane; and acquiring a fusion plane of the polygon obtained by fusion, and generating a whole block of texture mapping for the fusion plane to obtain a second texture mapping of the three-dimensional model.
According to the invention, a plurality of grids on the same plane form a polygonal fusion plane, and a whole block of texture mapping is generated aiming at the fusion plane instead of a stack of texture mapping aiming at a triangular patch, so that the utilization rate of the whole texture mapping is effectively improved, and the purpose of reducing the size of a model is further achieved; meanwhile, the plane fused by the method can provide basic input for model simplification, so that the model can be simplified while the clearness and the integrity of the geometric structure of the model are kept to the maximum extent.
From the above description, it can be seen that the present invention achieves the following technical effects:
according to the invention, a plurality of grids on the same plane form a polygonal fusion plane, and a whole block of texture mapping is generated aiming at the fusion plane instead of a stack of texture mapping aiming at the grids, so that the utilization rate of the whole texture mapping is effectively improved, the purpose of reducing the size of a model is further achieved, and the problems of wasting texture mapping space and increasing the size of the model in the related technology are solved;
moreover, the fusion plane in the invention can also be used for intelligently simplifying the three-dimensional model structure diagram, and the completeness of the main structure of the model is ensured to be not influenced while the model is simplified.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The first embodiment of the present invention further provides a planar fusion system of a three-dimensional model multigrid for implementing the planar fusion method of a three-dimensional model multigrid described above, as shown in fig. 11, the system includes:
an obtaining unit 111, configured to obtain a grid corresponding to each texture in a first texture map of a three-dimensional model;
a fusion unit 112, configured to fuse a plurality of grids in the same plane into a polygonal fusion plane;
a saving unit 113, configured to save the entire texture block of the fusion plane in the second texture map.
An embodiment of the present invention further provides an electronic device, as shown in fig. 12, the electronic device includes one or more processors 121 and a memory 122, where one processor 121 is taken as an example in fig. 12.
The controller may further include: an input device 123 and an output device 124.
The processor 121, the memory 122, the input device 123 and the output device 124 may be connected by a bus or other means, and the bus connection is exemplified in fig. 12.
The Processor 121 may be a Central Processing Unit (CPU), the Processor 121 may also be other general-purpose processors, Digital Signal Processors (DSP), Application Specific Integrated Circuits (ASIC), Field Programmable Gate Arrays (FPGA), other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof, and the general-purpose Processor may be a microprocessor or any conventional Processor.
The memory 122, which is a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control method in the embodiment of the present invention. The processor 121 executes various functional applications of the server and data processing by executing the non-transitory software programs, instructions and modules stored in the memory 122, namely, the plane fusion method of the three-dimensional model multi-mesh of the above-mentioned method embodiment.
The memory 122 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a processing device operated by the server, and the like. Further, the memory 122 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 122 optionally includes memory located remotely from processor 121, which may be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 123 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. The output device 124 may include a display device such as a display screen.
One or more modules are stored in the memory 122, which when executed by the one or more processors 121 perform the method shown in FIG. 5.
Those skilled in the art will appreciate that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and the processes of the embodiments of the motor control methods described above can be included when the computer program is executed. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (FM), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (10)
1. A planar fusion method of a three-dimensional model multi-grid is characterized by comprising the following steps:
obtaining a grid corresponding to each texture in a first texture mapping of the three-dimensional model;
fusing a plurality of grids in the same plane into a polygonal fused plane;
saving the texture whole block of the fused plane in a second texture map.
2. The method according to claim 1, wherein said fusing a plurality of meshes in the same plane into a polygonal fused plane comprises:
adding a plurality of grids in the same plane to a planar grid set;
and merging all grids in the plane grid set to fuse into a polygonal fusion plane.
3. The method of claim 2, wherein adding a plurality of meshes in the same plane to a set of planar meshes comprises:
on the basis of a specified first grid, expanding outwards and traversing a second grid which is on the same side with the first grid;
and adding a third grid which is positioned on the same plane with the first grid in the second grid into a plane grid set, wherein the plane grid set comprises the first grid in advance.
4. The method of claim 3, further comprising:
and (3) expanding and traversing: on the basis of the newly added third grid, expanding outwards and traversing a fourth grid which is on the same side with the third grid;
adding a planar grid: adding a fifth mesh of the fourth mesh, which is in the same plane as the first mesh and the third mesh, to a planar mesh set;
repeating the expanding and traversing step and the planar grid adding step until no new grids corresponding to all the textures in the first texture mapping are added into the planar grid set.
5. A method as claimed in claim 3, wherein said adding a third mesh of said second mesh, which is co-planar with the first mesh, to the set of planar meshes comprises:
determining a first normal corresponding to the first grid and a second normal corresponding to a grid in the second grid;
respectively calculating included angles between the second normal and the first normal;
and if the included angle is smaller than the root threshold value, the grids in the second grids corresponding to the second normal lines and the first grids are positioned on the same plane, and the grids in the second grids corresponding to the second normal lines are added into the plane grid set as third grids.
6. The method of claim 4, wherein adding a fifth mesh of the fourth mesh, which is co-planar with the first mesh and the third mesh, to the set of planar meshes comprises:
determining a third normal corresponding to the third grid and a fourth normal corresponding to a grid in the fourth grid;
respectively calculating a first included angle between the fourth normal and the first normal;
respectively calculating a second included angle between the fourth normal and the third normal;
if first contained angle is less than the root threshold value just second contained angle is less than marginal threshold value, then the graticule mesh in the fourth graticule mesh that the fourth normal line corresponds with first graticule mesh, third graticule mesh are in the coplanar, will graticule mesh in the fourth graticule mesh that the fourth normal line corresponds adds to the plane graticule mesh as the fifth graticule mesh and concentrates.
7. The method of claim 2, wherein said merging all meshes of the set of planar meshes into a polygonal fused plane comprises:
merging all grids in the plane grid set, and traversing the edges of all grids;
if all grids corresponding to the edges are in the plane grid set, simplifying the edges;
if the grids exist in all grids corresponding to the edge and are not in the plane grid set, taking the edge as the edge of the plane boundary;
the blending plane of a polygon is fused by all sides of the plane boundary.
8. A planar fusion system of a three-dimensional model multi-mesh, comprising:
the acquiring unit is used for acquiring a grid corresponding to each texture in a first texture mapping of the three-dimensional model;
the fusion unit is used for fusing a plurality of grids in the same plane into a polygonal fusion plane;
and the storage unit is used for storing the whole texture block of the fusion plane in the second texture map.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform the planar fusion method of a three-dimensional model multigrid according to any one of claims 1 to 7.
10. An electronic device, characterized in that the electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the method for planar fusion of a three-dimensional model multigrid of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111330955.XA CN114155329A (en) | 2021-11-11 | 2021-11-11 | Plane fusion method and system of three-dimensional model multi-grid and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111330955.XA CN114155329A (en) | 2021-11-11 | 2021-11-11 | Plane fusion method and system of three-dimensional model multi-grid and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114155329A true CN114155329A (en) | 2022-03-08 |
Family
ID=80459501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111330955.XA Pending CN114155329A (en) | 2021-11-11 | 2021-11-11 | Plane fusion method and system of three-dimensional model multi-grid and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114155329A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6064394A (en) * | 1997-10-31 | 2000-05-16 | Autodesk, Inc. | Texture mapping using a plane normal to a selected triangle and using a (U,V) origin thereof to preserve texture size upon surface scaling |
CN101982837A (en) * | 2010-09-19 | 2011-03-02 | 北京航空航天大学 | Fast three-dimensional visualization method based on preprocessing result of finite-element analysis |
CN105091801A (en) * | 2014-05-06 | 2015-11-25 | 上海新跃仪表厂 | Landing detecting sensor and landing area obstacle detecting method for planetoid detection |
CN106780745A (en) * | 2016-11-24 | 2017-05-31 | 南京航空航天大学 | A kind of method that the broken face of complex three-dimensional body is identified and is merged |
CN108335352A (en) * | 2018-01-22 | 2018-07-27 | 华中科技大学 | A kind of texture mapping method towards the extensive three-dimensional reconstruction scene of multiple view |
CN111986335A (en) * | 2020-09-01 | 2020-11-24 | 贝壳技术有限公司 | Texture mapping method and device, computer-readable storage medium and electronic device |
CN112561788A (en) * | 2020-12-22 | 2021-03-26 | 广联达科技股份有限公司 | Two-dimensional expansion method of BIM (building information modeling) model and texture mapping method and device |
-
2021
- 2021-11-11 CN CN202111330955.XA patent/CN114155329A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6064394A (en) * | 1997-10-31 | 2000-05-16 | Autodesk, Inc. | Texture mapping using a plane normal to a selected triangle and using a (U,V) origin thereof to preserve texture size upon surface scaling |
CN101982837A (en) * | 2010-09-19 | 2011-03-02 | 北京航空航天大学 | Fast three-dimensional visualization method based on preprocessing result of finite-element analysis |
CN105091801A (en) * | 2014-05-06 | 2015-11-25 | 上海新跃仪表厂 | Landing detecting sensor and landing area obstacle detecting method for planetoid detection |
CN106780745A (en) * | 2016-11-24 | 2017-05-31 | 南京航空航天大学 | A kind of method that the broken face of complex three-dimensional body is identified and is merged |
CN108335352A (en) * | 2018-01-22 | 2018-07-27 | 华中科技大学 | A kind of texture mapping method towards the extensive three-dimensional reconstruction scene of multiple view |
CN111986335A (en) * | 2020-09-01 | 2020-11-24 | 贝壳技术有限公司 | Texture mapping method and device, computer-readable storage medium and electronic device |
CN112561788A (en) * | 2020-12-22 | 2021-03-26 | 广联达科技股份有限公司 | Two-dimensional expansion method of BIM (building information modeling) model and texture mapping method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI590188B (en) | System and method for deleting noise points of point-cloud | |
CN110167756B (en) | Build direction based partitioning for building solid objects by additive manufacturing | |
CN114170360A (en) | Merging and rendering method and system suitable for multiple terrain data and electronic equipment | |
US9311748B2 (en) | Method and system for generating and storing data objects for multi-resolution geometry in a three dimensional model | |
CN106846487B (en) | Surface reduction method and device and display device | |
CN109308153A (en) | Picture adjusting method and device, computer readable storage medium, terminal | |
CN110264405A (en) | Image processing method, device, server and storage medium based on interpolation algorithm | |
JP3650355B2 (en) | Computer system, method and computer program for accelerating rendering of geometric models | |
CN103544727B (en) | Scenario rendering and optimizing method, system and mobile terminal based on predict braches | |
CN114494649A (en) | Finite element meshing geometric cleaning method, device and storage medium | |
US20160358344A1 (en) | Unwrapping 3D Meshes Into Low-Distortion Texture Maps | |
CN110709891A (en) | Virtual reality scene model establishing method and device, electronic equipment and storage medium | |
CN114155329A (en) | Plane fusion method and system of three-dimensional model multi-grid and electronic equipment | |
CN103679814A (en) | Processing method and device for triangle mesh model | |
CN110599597B (en) | Three-dimensional grid processing method and device based on Gaussian curvature filtering and storage medium | |
CN110796722A (en) | Three-dimensional rendering presentation method and device | |
CN108564637B (en) | Geometric model arrangement method and device | |
CN114168219A (en) | Cross-layer scheduling method and system based on OSG rendering 3DTiles model and electronic equipment | |
CN114140579A (en) | LOD model simplification method for building three-dimensional model and related device | |
CN115205411A (en) | Occlusion body generation method and device, electronic equipment and medium | |
CN112487674B (en) | Method and apparatus for generating model of lattice structure | |
CN110310353B (en) | BIM model data optimization method and system | |
CN114627225A (en) | Method and device for rendering graphics and storage medium | |
CN110704561B (en) | Map edge pasting method, terminal device and storage medium | |
CN113362436B (en) | Object rendering method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220308 |