CN111161394B - Method and device for placing three-dimensional building model - Google Patents

Method and device for placing three-dimensional building model Download PDF

Info

Publication number
CN111161394B
CN111161394B CN201811320774.7A CN201811320774A CN111161394B CN 111161394 B CN111161394 B CN 111161394B CN 201811320774 A CN201811320774 A CN 201811320774A CN 111161394 B CN111161394 B CN 111161394B
Authority
CN
China
Prior art keywords
building
dimensional
model
building model
points
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.)
Active
Application number
CN201811320774.7A
Other languages
Chinese (zh)
Other versions
CN111161394A (en
Inventor
黄馥霖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811320774.7A priority Critical patent/CN111161394B/en
Publication of CN111161394A publication Critical patent/CN111161394A/en
Application granted granted Critical
Publication of CN111161394B publication Critical patent/CN111161394B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Abstract

The embodiment of the invention provides a method and a device for placing a three-dimensional building model, wherein the method comprises the following steps: obtaining a building model layout, wherein the building model layout comprises a building area and a non-building area; mapping the building model layout diagram to a preset three-dimensional terrain mesh body model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh body model; building distribution points are determined in the building projection area; and configuring a three-dimensional building model for the building distribution points. In the embodiment of the invention, a game developer can finish the placement of a large number of building models only by creating the building model layout diagram according to the requirement and then inputting the building model layout diagram into the three-dimensional image software, thereby greatly improving the efficiency of placing the models and reducing the operation amount.

Description

Method and device for placing three-dimensional building model
Technical Field
The invention relates to the technical field of image processing, in particular to a method and a device for placing a three-dimensional building model.
Background
Many buildings are usually placed on the topography of a game scene, and as the game progresses, people have increasingly greater demands on the topography area of the game scene, so does the number of buildings placed on the topography.
At present, building models are manually placed in correct orientations on the terrain in sequence according to scene design requirements in three-dimensional computer graphic software by personnel with professional technical experience.
However, this type of building placement is inefficient and requires a lot of manpower to set up for a large number of play scenarios.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention have been made to provide a method of placing a three-dimensional building model and a corresponding apparatus for placing a three-dimensional building model that overcome or at least partially solve the foregoing problems.
In order to solve the above problems, an embodiment of the present invention discloses a method for placing a three-dimensional building model, including:
obtaining a building model layout, wherein the building model layout comprises a building area and a non-building area;
mapping the building model layout diagram to a preset three-dimensional terrain mesh body model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh body model;
building distribution points are determined in the building projection area;
and configuring a three-dimensional building model for the building distribution points.
Preferably, the method further comprises:
respectively determining target vertexes closest to each building distribution point in all vertexes of the three-dimensional terrain grid model;
and adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
Preferably, the step of determining a building distribution point in the building projection area includes:
randomly generating a point cloud in the building projection area;
calculating the point distance between each point in the point cloud;
forming a point set by the points with the point distances smaller than a preset distance threshold;
and taking the point corresponding to the average value of the coordinates of all points in the point set as a building distribution point.
Preferably, the step of configuring a three-dimensional building model for each of the building distribution points includes:
obtaining a three-dimensional building model;
the pivot points of the three-dimensional building model are moved to the building distribution points.
Preferably, the step of adjusting the direction of the preset horizontal axis of the local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex includes:
adjusting the normals of the one or more target vertices in response to an adjustment operation for the normals of the one or more target vertices;
and adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
The embodiment of the invention also discloses a device for placing the three-dimensional building model, which comprises:
the building model layout diagram acquisition module is used for acquiring a building model layout diagram, and the building model layout diagram comprises a building area and a non-building area;
the mapping module is used for mapping the building model layout diagram to a preset three-dimensional terrain grid model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain grid model;
the building distribution point determining module is used for determining building distribution points in the building projection area;
and the three-dimensional building model configuration module is used for configuring the three-dimensional building model for the building distribution points.
Preferably, the method further comprises:
the target vertex determining module is used for determining target vertices closest to each building distribution point in all vertices of the three-dimensional terrain mesh model;
and the direction adjustment module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
Preferably, the building distribution point determining module includes:
the point cloud generation sub-module is used for randomly generating point clouds in the building projection area;
a point spacing calculation sub-module for calculating the point spacing between each point in the point cloud;
the point set forming sub-module is used for forming points with the point spacing smaller than a preset spacing threshold value into a point set;
and the building distribution point determining sub-module is used for taking the point corresponding to the average value of the coordinates of all points in the point set as a building distribution point.
Preferably, the three-dimensional building model configuration module includes:
the three-dimensional building model acquisition submodule is used for acquiring a three-dimensional building model;
and the three-dimensional building model moving submodule is used for moving the pivot point of the three-dimensional building model to the building distribution point.
Preferably, the direction adjustment module includes:
a normal adjustment sub-module, configured to adjust normals of one or more target vertices in response to an adjustment operation for normals of the one or more target vertices;
and the direction adjustment sub-module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
The embodiment of the invention also discloses a device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
One or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods described above are also disclosed.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, three-dimensional image software acquires a building model layout diagram comprising a building area and a non-building area; then mapping the building model layout diagram to a preset three-dimensional terrain mesh model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh model; then determining building distribution points in a building projection area; and finally, configuring a three-dimensional building model for the building distribution points, thereby completing the placement of the building model. In the embodiment of the invention, a game developer can finish the placement of a large number of building models only by creating the building model layout diagram according to the requirement and then inputting the building model layout diagram into the three-dimensional image software, thereby greatly improving the efficiency of placing the models and reducing the operation amount.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a method for placing a three-dimensional building model according to the present invention;
FIG. 2 is a layout of a building model in an embodiment of the invention;
FIG. 3 is a schematic illustration of mapping a building model layout to a three-dimensional terrain mesh model in accordance with an embodiment of the present invention;
FIG. 4 is a flow chart of steps of a second embodiment of a method for placing a three-dimensional building model according to the present invention;
FIG. 5 is a schematic diagram of randomly generating a point cloud in a projected area of a building in an embodiment of the present invention;
FIG. 6 is a schematic diagram of merging points in a set of points into a building distribution point in an embodiment of the invention;
FIG. 7 is a schematic illustration of a three-dimensional building model configured for building distribution points in an embodiment of the present invention;
FIG. 8 is a schematic illustration of normals to all vertices of a three-dimensional terrain mesh model in an embodiment of the invention;
FIG. 9 is a schematic diagram of aligning the direction of a preset horizontal axis of a local coordinate system of a three-dimensional building model with the horizontal direction of the normal line of the corresponding target vertex in an embodiment of the present invention;
FIG. 10 is a schematic diagram of adjusting the placement direction of a three-dimensional building model in an embodiment of the invention;
fig. 11 is a block diagram of an embodiment of a placement device for a three-dimensional building model according to the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flowchart illustrating steps of a first embodiment of a method for placing a three-dimensional building model according to the present invention may specifically include the following steps:
step 101, obtaining a building model layout, wherein the building model layout comprises a building area and a non-building area;
during game development, a game developer may create a terrain model in three-dimensional image software and place a three-dimensional building model on the terrain model.
The three-dimensional building model can be pre-established, a game developer can copy the three-dimensional building model by utilizing the copy function of the three-dimensional image software, and then the three-dimensional building model generated by copying is placed at a required position, but the efficiency of manually placing the three-dimensional building model is low.
In order to improve the placement efficiency of the three-dimensional building model, in the embodiment of the invention, a game developer can firstly create a building model layout chart according to the needs.
The building model layout comprises a building area and a non-building area, wherein the building area is an area where the three-dimensional building model needs to be placed, and the non-building area is an area where the three-dimensional building model does not need to be placed.
Referring to fig. 2, a layout of a building model in accordance with an embodiment of the present invention is shown. The building model layout diagram can be a two-dimensional plan diagram, the plan diagram can be a binarization gray scale diagram with the same length and width, and the image binarization is to set the gray scale value of a pixel point on an image to be 0 or 255, namely the whole image is subjected to a process of displaying an obvious black-and-white effect, so that the outline of a building can be highlighted. The building area may be represented by white pixels and the non-building area may be represented by black pixels; alternatively, the building area may be represented by black pixels and the non-building area may be represented by white pixels.
102, mapping the building model layout diagram to a preset three-dimensional terrain mesh body model to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh body model;
the three-dimensional terrain mesh model is used for describing the landscapes of mountains, basins, plains and the like in games. The realization of different terrains in the game is realized by using an initial three-dimensional terrain mesh model and a height map,
the initial three-dimensional terrain mesh model is used for drawing ground surfaces, and is commonly provided with a tetragonal plane model, a sphere model, a cylinder model and the like. The height map stores the terrain height information for representing the terrain height, and the terrain is formed into a mountain basin or the like by different heights of the height map. The initial three-dimensional terrain mesh body model is replaced by a height map to form vertex height differences, namely various landforms.
For example, an initial three-dimensional terrain mesh body model, which constitutes an N x N rectangular mesh formed by N rows and N columns of vertices, all of which lie in the same plane. The height map comprises the height information of each vertex, and a polygonal object with a square appearance can be obtained by combining the initial three-dimensional terrain mesh body model with the height map, wherein the square polygonal object is the three-dimensional terrain mesh body model.
Mapping the building model layout to a three-dimensional terrain mesh model, a building projection area corresponding to the building area can be determined on the surface of the three-dimensional terrain mesh model.
Specifically, for a two-dimensional building model layout, a planar vertical projection (also referred to as texture mapping) may be used to map the building model layout to the surface of a three-dimensional terrain mesh model. When in projection, the colors of the building model layout are projected to the surface of the three-dimensional terrain mesh body model, and a projection image can be obtained on the surface of the three-dimensional terrain mesh body model, wherein the projection image comprises a building projection area corresponding to a building area and a non-building projection area corresponding to a non-building area.
Referring to FIG. 3, a schematic diagram of mapping a building model layout to a three-dimensional terrain mesh model is shown in an embodiment of the invention. After the building model layout is mapped to the surface of the three-dimensional terrain mesh model, a black area and a white area are generated on the surface of the three-dimensional terrain mesh model, wherein the black area is a building projection area, and the white area is a non-building projection area.
It should be noted that, in mapping, it is necessary to have the building model layout just fill the surface of the three-dimensional terrain mesh model. Specifically, the vertices of the three-dimensional terrain mesh model have UV texture coordinates, and when mapping, the UV texture coordinates can be enabled to fill the intervals of [0,1] so that the building model layout can just fill the surface of the three-dimensional terrain mesh model.
In addition, if the three-dimensional terrain mesh model is a terrain model with other shapes such as a sphere, a cylinder and the like, a proper texture projection mode is required to be adopted according to different terrain models so as to map the building model layout diagram to the surface of the terrain model. For example, a cylindrical terrain model uses cylindrical texture mapping, a spherical terrain model uses spherical texture mapping, and a building plan layout map is mapped to the terrain model surface.
Step 103, building distribution points are determined in the building projection area;
generally, when a game developer plans a game scene, the three-dimensional building models are not closely connected, and a small space is reserved between the three-dimensional building models. Thus, it may be considered that only one three-dimensional building model needs to be placed in a single building projection area, i.e. only one building distribution point is generated in a single building projection area.
And 104, configuring a three-dimensional building model for the building distribution points.
In the embodiment of the invention, three-dimensional image software acquires a building model layout diagram comprising a building area and a non-building area; then mapping the building model layout diagram to a preset three-dimensional terrain mesh model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh model; then determining building distribution points in a building projection area; and finally, configuring a three-dimensional building model for the building distribution points, thereby completing the placement of the building model. In the embodiment of the invention, a game developer can finish the placement of a large number of building models only by creating the building model layout diagram according to the requirement and then inputting the building model layout diagram into the three-dimensional image software, thereby greatly improving the efficiency of placing the models and reducing the operation amount.
Referring to fig. 4, a flowchart illustrating steps of a second embodiment of a method for placing a three-dimensional building model according to the present invention may specifically include the following steps:
step 201, obtaining a building model layout, wherein the building model layout comprises a building area and a non-building area;
step 202, mapping the building model layout diagram to a preset three-dimensional terrain mesh body model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh body model;
step 203, determining building distribution points in the building projection area;
in one example of an embodiment of the invention, the illustrated step 203 may comprise the following sub-steps:
s11, randomly generating point clouds in the building projection area;
referring to fig. 5, a schematic diagram of randomly generating a point cloud in a projected area of a building in an embodiment of the present invention is shown. When generating a point cloud, the number of points generated needs to be sufficiently large and dense to cover the architectural projection area.
Step S12, calculating the point distances among all points in the point cloud;
s13, forming a point set by the points with the point distances smaller than a preset distance threshold;
the preset interval threshold may be an average value of the point intervals between the points in the point cloud, or may be a preset value.
The points of the set of combining points should be points within the same building projection area, i.e. one set of points corresponds to one building projection area.
And a substep S14, wherein the point corresponding to the average value of the coordinates of all points in the point set is used as a building distribution point.
Referring to FIG. 6, a schematic diagram of merging points in a point set into a building distribution point is shown in an embodiment of the present invention. And combining all the points in each point set in turn to finally obtain a building distribution point, wherein the position coordinates of the building distribution point are equal to the average value of the position coordinates of all the points in the point set.
Since the building model layout is typically a bitmap, it does not carry positional information of the individual building areas. Therefore, the building projection area on the surface of the three-dimensional terrain mesh model is not provided with position information, and building distribution points cannot be directly determined in the building projection area according to the position information.
In the case that the building model layout does not have the position information of each building area, the embodiment of the invention can simply and quickly determine the building distribution points in the building projection area by adopting a mode of determining the building distribution points based on the random generation point cloud.
Instead of determining the building distribution points based on the randomly generated point cloud, it is also possible to determine one building distribution point in the building projection area in other ways, for example, by identifying the outline of the building projection area by means of machine vision identification, and then taking the center point of the identified outline as the building distribution point.
In addition, if the building model layout map carries position information of each building area, building distribution points can be determined in the building projection area according to the position information.
And 204, configuring a three-dimensional building model for the building distribution points.
Referring to fig. 7, a schematic diagram of a three-dimensional building model configured for building distribution points in an embodiment of the present invention is shown. Specifically, the three-dimensional building model may be configured for each building distribution point, or may be configured for only a part of the building distribution points.
In an embodiment of the present invention, the step 204 may include the following sub-steps:
s21, acquiring a three-dimensional building model;
the three-dimensional building model can be duplicated in three-dimensional image software.
Substep S22, moving the pivot points of the three-dimensional building model to the building distribution points.
The pivot point refers to the origin of the local coordinate system of the three-dimensional building model, and typically the centroid of the three-dimensional building model is aligned to the origin of the local coordinate system, i.e., the default pivot point of the three-dimensional building model is located at the centroid of the three-dimensional building model.
After the three-dimensional building model is configured for the building distribution points, the placement direction of the three-dimensional building model may not be the desired direction, and further adjustment of the placement direction of the three-dimensional building model is required.
Step 205, determining the nearest target vertexes to each building distribution point in all vertexes of the three-dimensional terrain grid model;
the vertex closest to the building distribution point is taken as the target vertex of the building distribution point.
Referring to fig. 8, a schematic diagram of normals to all vertices of a three-dimensional terrain mesh model in an embodiment of the invention is shown. The vertices of the three-dimensional terrain mesh volume model include position coordinates (x, y, z) and normal coordinates (nx, ny, nz). In the position coordinates (x, y, z), x may represent a left-right direction, y may represent a vertical direction, and z may represent a depth direction. The normal coordinates of a vertex may represent the steep ground around the vertex.
And step 206, adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
Each three-dimensional building model has a local coordinate system for itself. The local coordinate system may be a coordinate system of different standards, e.g. a right hand local coordinate system, a left hand local coordinate system.
For example, in the right-hand local coordinate system, the longitudinal direction of the model is parallel to the Z-axis, the height direction is parallel to the Y-axis, and the width direction is parallel to the X-axis. The preset horizontal direction axis of the local coordinates of the three-dimensional building model may be the Z-axis direction or the X-axis direction of the local coordinate system.
The above examples are directed to three-dimensional terrain mesh models of polygonal objects having square structures, and for three-dimensional terrain mesh models of other shapes, such as cylindrical shapes, spherical shapes, the definition of horizontal direction should be the vertical direction of gravity.
Referring to fig. 9, a schematic diagram of aligning the direction of a preset horizontal axis of a local coordinate system of a three-dimensional building model with the horizontal direction of the normal line of the corresponding target vertex in the embodiment of the invention is shown.
Specifically, a preset horizontal direction axis of a local coordinate system of the three-dimensional building model can be aligned with the horizontal direction of the normal line of the corresponding target vertex; when the horizontal direction of the normal line of a certain vertex is adjusted, the preset horizontal direction axis of the local coordinate system of the corresponding three-dimensional building model can be adjusted.
Alignment means that a mapping relation between a preset horizontal direction axis of a local coordinate system of the three-dimensional building model and a horizontal direction component of a normal line of a corresponding target vertex is established, so that the preset horizontal direction axis of the local coordinate system of the three-dimensional building model and the horizontal direction component of the normal line of the corresponding target vertex are kept consistent.
Besides aligning the horizontal direction component of the normal line of the target vertex with a preset horizontal direction axis of the local coordinate system of the three-dimensional building model, the secondary normal line or tangent line of the target vertex can be aligned with other direction axes of the local coordinate system of the three-dimensional building model; when the secondary normal line or tangent line of a certain vertex is adjusted, the corresponding direction axis of the local coordinate system of the corresponding three-dimensional building model can be adjusted.
In an embodiment of the present invention, the step 206 may include the following sub-steps:
a substep S31 of adjusting the normals of the one or more target vertices in response to an adjustment operation for the normals of the one or more target vertices;
in particular, in three-dimensional image software, a brush tool is provided to facilitate game developers in adjusting the normal direction of the vertices.
Referring to fig. 10, a schematic diagram of adjusting the placement direction of a three-dimensional building model according to an embodiment of the present invention is shown. The selected vertex or vertices may be adjusted simultaneously by the brush tool.
And a substep S32, adjusting the direction of the preset horizontal direction axis of the local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
After the normal line of the target vertex is adjusted, the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model is adjusted according to the component of the horizontal direction of the adjusted normal line of the target vertex, so that the directions of the two directions are kept consistent. In this way, the game developer can quickly adjust the placement direction of the plurality of three-dimensional building models.
In the embodiment of the invention, three-dimensional image software acquires a building model layout diagram comprising a building area and a non-building area; then mapping the building model layout diagram to a preset three-dimensional terrain mesh model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh model; then determining building distribution points in a building projection area; and finally, configuring a three-dimensional building model for the building distribution points, thereby completing the placement of the building model. In the embodiment of the invention, a game developer can finish the placement of a large number of building models only by creating the building model layout diagram according to the requirement and then inputting the building model layout diagram into the three-dimensional image software, thereby greatly improving the efficiency of placing the models and reducing the operation amount.
In the embodiment of the invention, besides a mode of rapidly placing the three-dimensional building model, a mode of conveniently adjusting the placing direction of the three-dimensional building model by game developers is also provided. The direction of the preset horizontal direction axis of the local coordinate system of the corresponding three-dimensional building model can be adjusted by adjusting the horizontal direction of the normal line of one or more target vertexes, so that the placement direction of the three-dimensional building model is adjusted, the adjustment time is greatly shortened, and the operation amount is reduced.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Referring to fig. 11, there is shown a block diagram of an embodiment of a placement device for a three-dimensional building model according to the present invention, which may specifically include the following modules:
a building model layout obtaining module 301, configured to obtain a building model layout, where the building model layout includes a building area and a non-building area;
the mapping module 302 is configured to map the building model layout to a preset three-dimensional terrain mesh model, so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh model;
a building distribution point determining module 303, configured to determine building distribution points in the building projection area;
a three-dimensional building model configuration module 304, configured to configure a three-dimensional building model for the building distribution points.
In an embodiment of the present invention, the apparatus may further include:
the target vertex determining module is used for determining target vertices closest to each building distribution point in all vertices of the three-dimensional terrain mesh model;
and the direction adjustment module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
In an embodiment of the present invention, the building distribution point determining module 303 may include:
the point cloud generation sub-module is used for randomly generating point clouds in the building projection area;
a point spacing calculation sub-module for calculating the point spacing between each point in the point cloud;
the point set forming sub-module is used for forming points with the point spacing smaller than a preset spacing threshold value into a point set;
and the building distribution point determining sub-module is used for taking the point corresponding to the average value of the coordinates of all points in the point set as a building distribution point.
In an embodiment of the present invention, the three-dimensional building model configuration module 304 may include:
the three-dimensional building model acquisition submodule is used for acquiring a three-dimensional building model;
and the three-dimensional building model moving submodule is used for moving the pivot point of the three-dimensional building model to the building distribution point.
In an embodiment of the present invention, the direction adjustment module may include:
a normal adjustment sub-module, configured to adjust normals of one or more target vertices in response to an adjustment operation for normals of the one or more target vertices;
and the direction adjustment sub-module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
The embodiment of the invention also provides a device, which comprises:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the method described by the embodiments of the present invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in embodiments of the invention.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The above description of the method for placing a three-dimensional building model and the device for placing a three-dimensional building model provided by the invention applies specific examples to illustrate the principles and embodiments of the invention, and the description of the examples is only used for helping to understand the method and core ideas of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. A method of placing a three-dimensional building model, comprising:
obtaining a building model layout, wherein the building model layout comprises a building area and a non-building area;
mapping the building model layout diagram to a preset three-dimensional terrain mesh body model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain mesh body model;
building distribution points are determined in the building projection area; the building distribution points are determined based on points corresponding to the average value of the coordinates of all points in a point set, wherein the point set comprises points with point cloud point distances which are randomly generated in the building projection area and smaller than a preset distance threshold;
and configuring a three-dimensional building model for the building distribution points.
2. The method as recited in claim 1, further comprising:
respectively determining target vertexes closest to each building distribution point in all vertexes of the three-dimensional terrain grid model;
and adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
3. The method of claim 1, wherein the step of configuring the three-dimensional building model for the building distribution point comprises:
obtaining a three-dimensional building model;
the pivot points of the three-dimensional building model are moved to the building distribution points.
4. The method according to claim 2, wherein the step of adjusting the direction of the preset horizontal direction axis of the local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex comprises:
adjusting the normals of the one or more target vertices in response to an adjustment operation for the normals of the one or more target vertices;
and adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
5. A placement device for a three-dimensional building model, comprising:
the building model layout diagram acquisition module is used for acquiring a building model layout diagram, and the building model layout diagram comprises a building area and a non-building area;
the mapping module is used for mapping the building model layout diagram to a preset three-dimensional terrain grid model so as to determine a building projection area corresponding to the building area on the surface of the three-dimensional terrain grid model;
the building distribution point determining module is used for determining building distribution points in the building projection area; the building distribution points are determined based on points corresponding to the average value of the coordinates of all points in a point set, wherein the point set comprises points with point cloud point distances which are randomly generated in the building projection area and smaller than a preset distance threshold;
and the three-dimensional building model configuration module is used for configuring the three-dimensional building model for the building distribution points.
6. The apparatus as recited in claim 5, further comprising:
the target vertex determining module is used for determining target vertices closest to each building distribution point in all vertices of the three-dimensional terrain mesh model;
and the direction adjustment module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the target vertex.
7. The apparatus of claim 5, wherein the three-dimensional building model configuration module comprises:
the three-dimensional building model acquisition submodule is used for acquiring a three-dimensional building model;
and the three-dimensional building model moving submodule is used for moving the pivot point of the three-dimensional building model to the building distribution point.
8. The apparatus of claim 6, wherein the direction adjustment module comprises:
a normal adjustment sub-module, configured to adjust normals of one or more target vertices in response to an adjustment operation for normals of the one or more target vertices;
and the direction adjustment sub-module is used for adjusting the direction of a preset horizontal direction axis of a local coordinate system of the corresponding three-dimensional building model according to the horizontal direction of the normal line of the one or more target vertexes after adjustment.
9. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the method of placement of a three-dimensional building model of any of claims 1-4.
10. One or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of placement of a three-dimensional building model according to any of claims 1-4.
CN201811320774.7A 2018-11-07 2018-11-07 Method and device for placing three-dimensional building model Active CN111161394B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811320774.7A CN111161394B (en) 2018-11-07 2018-11-07 Method and device for placing three-dimensional building model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811320774.7A CN111161394B (en) 2018-11-07 2018-11-07 Method and device for placing three-dimensional building model

Publications (2)

Publication Number Publication Date
CN111161394A CN111161394A (en) 2020-05-15
CN111161394B true CN111161394B (en) 2023-06-13

Family

ID=70555421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811320774.7A Active CN111161394B (en) 2018-11-07 2018-11-07 Method and device for placing three-dimensional building model

Country Status (1)

Country Link
CN (1) CN111161394B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883612A (en) * 2023-09-08 2023-10-13 东华理工大学南昌校区 Three-dimensional scene model generation method and system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767594B (en) * 2020-06-08 2024-03-12 国网新疆电力有限公司建设分公司 Temporary building model generation method, device, equipment and storage medium
CN112069566B (en) * 2020-08-04 2023-08-25 清华大学建筑设计研究院有限公司 Method for finding patterns of cultural relic building protection shed
CN112948919B (en) * 2021-02-02 2022-04-19 盈嘉互联(北京)科技有限公司 BIM model cross-floor road network extraction method based on image refinement

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3470966B2 (en) * 2001-03-28 2003-11-25 株式会社ナムコ Program, information storage medium, and game system
CN101673410B (en) * 2008-09-12 2012-08-22 中国科学院计算技术研究所 Vector building drawing based method for reconstructing three-dimensional model
CN103440682B (en) * 2013-08-13 2016-08-10 北京农业信息技术研究中心 A kind of quick three-dimensional drawing methods and system
CN107358643B (en) * 2017-07-04 2020-08-14 网易(杭州)网络有限公司 Image processing method, image processing device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116883612A (en) * 2023-09-08 2023-10-13 东华理工大学南昌校区 Three-dimensional scene model generation method and system
CN116883612B (en) * 2023-09-08 2023-11-21 东华理工大学南昌校区 Three-dimensional scene model generation method and system

Also Published As

Publication number Publication date
CN111161394A (en) 2020-05-15

Similar Documents

Publication Publication Date Title
CN111161394B (en) Method and device for placing three-dimensional building model
CN111629193B (en) Live-action three-dimensional reconstruction method and system
JP2022022434A (en) Image processing device, image processing method, and program
US20100328308A1 (en) Three Dimensional Mesh Modeling
CN102289845B (en) Three-dimensional model drawing method and device
KR101105361B1 (en) The method for geometric registration for images data and lidar data and the apparatus thereof
CN113506370A (en) Three-dimensional geographic scene model construction method and device based on three-dimensional remote sensing image
JP2018005819A (en) Three-dimensional model generation device, three-dimensional model generation method, and program
EP3501012B1 (en) System and method for procedurally generated object distribution in regions of a three-dimensional virtual environment
CN103686140A (en) Projection manufacturing method for three-dimensional object based on scheduled site
CN104157011A (en) Modeling method for three-dimensional terrain
CN106296813B (en) Three-dimensional static map producing method
JP6782108B2 (en) Visible rate calculation device
CN112102489B (en) Navigation interface display method and device, computing equipment and storage medium
KR101591427B1 (en) Method for Adaptive LOD Rendering in 3-D Terrain Visualization System
KR101854612B1 (en) Apparatus and Method for Exemplar-Based Image Inpainting for Spherical Panoramic Image
JP6146731B2 (en) Coordinate correction apparatus, coordinate correction program, and coordinate correction method
CN105184854A (en) Quick modeling method for cloud achievement data of underground space scanning point
CN109767484B (en) Uniform light and color method and system with color consistency in three-dimensional map
CN111311745B (en) Model placement method and device
CN112560126B (en) Data processing method, system and storage medium for 3D printing
CN115272379A (en) Projection-based three-dimensional grid model outline extraction method and system
CN113744403A (en) Method and system for generating three-dimensional model of building
CN117437130B (en) Tree three-dimensional model splicing gap repairing method and related equipment
CN115953522B (en) Object three-dimensional model orientation 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
GR01 Patent grant
GR01 Patent grant