CN114708385A - Virtual building assembly method and device, electronic equipment and storage medium - Google Patents

Virtual building assembly method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114708385A
CN114708385A CN202210319174.9A CN202210319174A CN114708385A CN 114708385 A CN114708385 A CN 114708385A CN 202210319174 A CN202210319174 A CN 202210319174A CN 114708385 A CN114708385 A CN 114708385A
Authority
CN
China
Prior art keywords
building
module
style
parameters
library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210319174.9A
Other languages
Chinese (zh)
Inventor
张文军
周朝邑
陈千惠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202210319174.9A priority Critical patent/CN114708385A/en
Publication of CN114708385A publication Critical patent/CN114708385A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

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

Abstract

The embodiment of the invention provides a virtual building assembling method, a virtual building assembling device, electronic equipment and a storage medium, wherein the virtual building assembling method comprises the following steps: the method comprises the steps of obtaining a building image, extracting attribute parameters of building modules of buildings in the building image, constructing three-dimensional models of the building modules based on the attribute parameters, combining the three-dimensional models with the same building style into a style module case base, and assembling virtual buildings with the building styles corresponding to the three-dimensional models according to the style module case base. By applying the embodiment of the invention, after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, and the three-dimensional model of the building module is constructed based on the attribute parameters, so that the method does not need to depend on the experience of workers, the building resource manufacturing efficiency is improved, and the manpower resource in the building manufacturing process is reduced.

Description

Virtual building assembly method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a virtual building assembling method, a virtual building assembling apparatus, an electronic device, and a computer-readable storage medium.
Background
With the rapid development of the game industry, the demands on buildings and elements of game scenes are higher and higher, and scene building resources need to be made and laid in a larger game scene map.
At present, building resource construction needs an art manufacturer to take a building drawing, disassemble each module of a building through manual experience, extract relevant module parameters (size, relative position and the like) in a design drawing, and then manufacture a three-dimensional model resource meeting parameter specifications. In addition, due to the fact that the manufactured scene building resources are lack of management, workers are difficult to match the required building style and style in the building assembling link.
Disclosure of Invention
The embodiment of the invention provides a virtual building assembling method, a virtual building assembling device, electronic equipment and a computer readable storage medium, and aims to solve the problems of low efficiency, large consumption of human resources and lack of management of building resources in a building resource constructing process.
The embodiment of the invention discloses a virtual building assembling method, which comprises the following steps:
obtaining a building image;
extracting attribute parameters of each building module of the building in the building image;
constructing a three-dimensional model of the building module based on the attribute parameters;
combining the three-dimensional models with the same architectural style into a style module example library;
and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
Optionally, the combining the three-dimensional models with the same architectural style into a style module case base includes:
acquiring a data structure set for the architectural style of a style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library;
and defining different numerical values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module case libraries.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and carrying out image feature detection processing on the building image to obtain the building module parameters of each building module.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
in response to a contour labeling operation for the building image, labeling a building contour of a building module in the building image;
in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline;
building module parameters of the building module are extracted from the building outline.
Optionally, the building module parameters include a size parameter, and before the building the three-dimensional model of the building module based on the attribute parameters, the method further includes:
acquiring target size parameters of each building module type;
and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library includes:
acquiring modular splicing parameters of the virtual building;
responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module instance library corresponding to the target style module library;
determining a target style module instance library in response to the selection operation for the style module instance library;
splicing the target three-dimensional models in the target style module instance library into a virtual building based on the modular splicing parameters; and displaying the virtual building.
Optionally, the target style module instance library has a corresponding set of modular parameters, where the set of modular parameters is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and after the displaying of the virtual building, the method further includes:
in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set;
and updating and displaying the virtual building based on the adjusted modular parameter set.
Optionally, after the updated display of the virtual building based on the adjusted modular parameter set, the method further includes:
and storing the target style module instance library corresponding to the adjusted modular parameter set.
The embodiment of the invention discloses a virtual building assembling device, which is characterized by comprising the following components:
the design drawing acquisition module is used for acquiring a building image;
the parameter extraction module is used for extracting attribute parameters of all building modules of buildings in the building image;
the model construction module is used for constructing a three-dimensional model of the building module based on the attribute parameters;
the case base combination module is used for combining the three-dimensional models with the same building style into a style module case base;
and the virtual building assembling module is used for assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module case library.
Optionally, the example library combination module includes:
the data structure acquisition submodule is used for acquiring a data structure set aiming at the architectural style of the style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
the module library combination submodule is used for screening a target three-dimensional module from the three-dimensional model according to the data structure and combining the target three-dimensional module into a style module library;
and the case base forming submodule forms different case bases of the style modules by defining different values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module base.
Optionally, the method further comprises:
and the case library combination module is also used for combining the three-dimensional models corresponding to the same building image in the style module library into a style module case library.
Optionally, the attribute parameters include a building module type and building module parameters, and the parameter extraction module includes:
the semantic segmentation submodule is used for performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and the characteristic detection submodule is used for carrying out image characteristic detection processing on the building image to obtain the building module parameters of each building module.
Optionally, the attribute parameters include a building module type and building module parameters, and the parameter extraction module includes:
the contour labeling submodule is used for labeling the building contour of the building module in the building image in response to the contour labeling operation aiming at the building image;
a type labeling submodule, configured to label a building module type of the building module in the building outline in response to a type labeling operation for the building outline;
and the parameter extraction submodule is used for extracting the building module parameters of the building module from the building outline.
Optionally, the building module parameters include a size parameter, further comprising:
the parameter acquisition module is used for acquiring target size parameters of each building module type;
and the parameter adjusting module is used for adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the virtual building assembly module includes:
the parameter acquisition module is also used for acquiring the modular splicing parameters of the virtual building;
the module library determining module is used for responding to the selection operation aiming at the style module library and other style module libraries, determining a target style module library and displaying a style module instance library corresponding to the target style module library;
the system comprises a style module, an instance base determining module, a target style module instance base determining module and a processing module, wherein the style module instance base determining module is used for determining a target style module instance base in response to selection operation aiming at the style module instance base;
the model assembling module is used for assembling the target three-dimensional models in the target style module case base into a virtual building based on the modularized assembling parameters;
and the model display module is used for displaying the virtual building.
Optionally, the target style module instance library has a corresponding modular parameter set, where the modular parameter set is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and the method further includes:
a parameter adjustment module for determining an adjusted modular parameter set in response to an adjustment operation for the modular parameter set;
and the model display module is also used for updating and displaying the virtual building based on the adjusted modularized parameter set.
Optionally, the method further comprises:
and the example base storage module is used for storing the target style module example base corresponding to the adjusted modular parameter set.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Also disclosed is a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform a method according to an embodiment of the invention.
The embodiment of the invention has the following advantages: after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, and the three-dimensional model of the building module is constructed based on the attribute parameters, so that the experience of workers is not needed, the building resource manufacturing efficiency is improved, and the manpower resource in the building manufacturing process is reduced.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same building style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the style module instance library corresponding to the building style to match with a desired building style pattern.
Drawings
Fig. 1 is a flowchart illustrating steps of a virtual building assembling method according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating steps of another method for assembling a virtual building according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an attribute parameter extraction method provided in an embodiment of the present invention;
FIG. 4 is a flowchart illustrating steps of a virtual building puzzle according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating steps of another virtual building assembly verification method provided in an embodiment of the present invention;
fig. 6 is a structural block diagram of a virtual building assembling device provided in an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The virtual building assembling method in one embodiment of the invention can be operated on a local terminal device or a server. When the virtual building assembling method runs on the server, the virtual building assembling method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system comprises the server and the client device.
In an optional embodiment, various cloud applications may be run under the cloud interaction system, for example: and (6) cloud games. Taking a cloud game as an example, a cloud game refers to a game mode based on cloud computing. In the cloud game operation mode, the game program operation main body and the game picture presentation main body are separated, the storage and the operation of the virtual building assembly method are completed on the cloud game server, and the client device is used for receiving and sending data and presenting the game picture, for example, the client device can be a display device with a data transmission function close to a user side, such as a first terminal device, a television, a computer, a palm computer and the like; but the cloud game server of the cloud is used for carrying out the virtual building assembly method. When a game is played, a player operates the client device to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the client device through a network, and finally the data are decoded through the client device and the game pictures are output.
In an optional implementation manner, taking a game as an example, the local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.
Referring to fig. 1, a flowchart illustrating steps of a virtual building assembly method provided in an embodiment of the present invention is shown, which may specifically include the following steps:
step 101: and acquiring a building image.
Specifically, building images of the same or different building styles are acquired. The building image can be a building design drawing or a picture, a photo, a drawing and the like with clear building contour lines.
The buildings in the building images have corresponding building styles, the building styles can be the building styles corresponding to the buildings in the building images and can also be the styles of the buildings defined by workers, and the classification standards of the building styles of the buildings are different, such as: according to national ethnicity, the Chinese style, the Japanese style, the English style and the like are available; according to the region, the European style, the Mediterranean style, the North American wind and light and the like exist; according to the historical development genres, the Chinese characters have classical meanings, new classical meanings and the like; according to the construction mode, there are gothic mode, baroque, rococo, etc., and the construction style is not limited in the embodiment of the present invention.
Step 102: and extracting attribute parameters of each building module of the building in the building image.
The building in the building image is composed of a plurality of building modules, and the building module types of the building modules include but are not limited to a ground module, a step module, a wall surface module, a pillar module and a roof module;
the attribute parameters of the building module include parameters including, but not limited to, the building module type, size parameters, and relative position (relative position between the module and a reference point in the building image) of the building module, and values corresponding to the parameters.
Specifically, the attribute parameters of each building module in the building image are extracted, for example, the attribute parameters of each building module in the building image may be extracted by adopting various manners such as voxel segmentation, image semantic segmentation, image feature detection, and the like, which is not limited in the embodiment of the present invention.
Step 103: building a three-dimensional model of the building module based on the attribute parameters.
Specifically, after extracting the attribute parameters of each building module in the building image, a three-dimensional model of the building module can be constructed through a three-dimensional animation rendering and producing tool such as 3dsmax (3D Studio Max).
Step 104: and combining the three-dimensional models with the same architectural style into a style module example library.
Step 105: and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
Specifically, after the three-dimensional models of the building modules in the building images are constructed, the building models in the building images with the same building style have the same building style, so that the three-dimensional models corresponding to the building modules with the same building style can be combined into a style module case library, and a worker assembles a virtual building with the building style corresponding to the style module case library by using the three-dimensional models in the style module case library.
In the embodiment of the invention, after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, and the three-dimensional model of the building module is constructed based on the attribute parameters, so that the experience of workers is not required, the building resource manufacturing efficiency is improved, and the manpower resource in the building resource manufacturing process is reduced.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the corresponding style module instance library to match with a desired building style pattern.
Referring to fig. 2, a flowchart illustrating steps of another virtual building assembling method provided in the embodiment of the present invention is shown, which may specifically include the following steps:
step 201: and acquiring a building image.
Step 202: and extracting attribute parameters of each building module of the building in the building image.
In an embodiment of the present invention, the step 202 includes: performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image; and carrying out image feature detection processing on the building image to obtain the building module parameters of each building module.
The attribute parameters comprise building module types and building module parameters, wherein the building module types comprise a ground module, a step module, a wall surface module, a pillar module, a roof module and the like; the parameters of the building module parameters are the size parameters, the relative position parameters and the like of the building module.
The embodiment of the invention adopts different attribute parameter extraction methods for different precision application scenes, and for example, different technical processing schemes are provided for extracting the attribute parameters of the building module for a common precision application scene and a high precision application scene.
For a common precision application scene, such as a large amount of background building resources at a distance in a game scene, a building module type and building module parameters of a building module can be extracted in a programmed manner, image semantic segmentation and image feature detection are mainly taken as technical means, and a semantic segmentation algorithm can include fcn (full semantic nodes), segnet (semantic segmentation), Deeplab V1/V2/V3 and the like; the image feature detection algorithm may be harris (harris Corner detection), SIFT (Scale-innovative feature transform), or the like.
Specifically, image semantic segmentation is good at type division of module levels, building module types such as roofs, windows, pillars, foundations and steps contained in building images can be segmented, and workers can be helped to quickly and automatically classify the building modules. For example, in the embodiment of the present invention, an FCN algorithm (an FCN model obtained by training using a public general data set or an FCN model trained using a training set corresponding to a building) may be used to extract the building module type from an input building image, and extract the corresponding building module type and contour size.
In order to improve the accuracy of the modularization parameter extraction, the image feature detection mode is used alone to detect the outline size (size parameter) of the building module of the building image and the relative position of the outline, namely the relative position of the building module in the building space. Taking the lower left corner of the building as the origin of coordinates as an example, the position of each building module relative to the origin of the lower left corner can be extracted. Through image feature detection, the size parameters, the relative positions and the like of all the building modules in the building image are detected, and the processes of manual evaluation and parameter calculation are omitted.
In the embodiment of the invention, the building module type and the building module parameter in the building image can be extracted directly through image semantic segmentation and image characteristic detection, the process of extracting the relevant module parameter in the design drawing by disassembling each module of the building through manual experience is omitted, the experience of workers is not required to be relied on, the building resource manufacturing efficiency is improved, and the human resource in the building manufacturing process is reduced.
In an embodiment of the present invention, the step 202 includes: in response to a contour labeling operation for the building image, labeling a building contour of a building module in the building image; in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline; building module parameters of the building modules are extracted from the building outline.
Specifically, for a high-precision application scene, a semi-automatic processing mode is introduced, and a worker marks the outline of the building through modes (outline marking operation) such as dotting and edge tracing. And then, marking the building module type of the closed area (building outline), and extracting the building module parameters in the building outline by using an image feature extraction algorithm of a common precision scene. Thereby completing the extraction of the type and the parameters of the building module.
Referring to fig. 3, a schematic diagram of an attribute parameter extraction method provided in an embodiment of the present invention is shown. After the building image is input, aiming at a common precision application scene, extracting attribute parameters by adopting image semantic segmentation and image characteristic detection; and aiming at a high-precision application scene, extracting attribute parameters by adopting a manual region marking and manual quick edge tracing mode.
In the embodiment of the invention, different modes are respectively adopted to extract the attribute parameters of the building module aiming at the common precision application scene and the high precision application scene, so that the requirements under different application scenes can be met.
Step 203: building a three-dimensional model of the building module based on the attribute parameters.
In an embodiment of the present invention, the building module parameters include a size parameter, and before step 203, the method further includes: acquiring target size parameters of each building module type; and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
The target size parameter is a reference size parameter and can be obtained by self-definition of a worker.
Specifically, after the size parameters of the building modules in the building images are extracted, the size parameters of the building modules of the same building module type in different building images are inconsistent, so that the parameters of the linking ports during the splicing of the building modules in different building images are inconsistent, and the building modules in different building images are not spliced or have defects after the splicing.
In the embodiment of the invention, the size parameters of the building modules in different building images and of the same building module type are adjusted to the target size parameters corresponding to the building module type, so that the size parameters of the building modules in different building images and of the same building module type are the same, the assembly of virtual buildings is facilitated, and the problems that the building modules in different building images are not spliced or defects exist after the splicing due to the fact that the parameters of the connecting ports are inconsistent when the building modules in different building images are spliced are solved.
Step 204: a data structure is obtained for architectural style settings for a library of style modules.
The data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters.
The data structure is related to the architectural style, and one architectural style can define one data structure, namely one style module library corresponds to one data structure; the data structure corresponding to the architectural style can be defined for the staff; the data structure comprises building module types of the three-dimensional model, such as a ground module, a step module, a wall surface module and the like, and also comprises adjustable configuration parameters of the three-dimensional model of each building module type, for example, parameters of the adjustable configuration parameters of the ground module comprise example objects, positions and position corrections of the ground model, and values corresponding to the parameters of the adjustable configuration parameters can be arbitrarily initialized and specifically set by a worker.
Specifically, the worker may set a data structure for the architectural style of the style module library, for example, an ancient building of a residential style, and may design the data structure in the following manner, where the data structure table is as follows:
Figure BDA0003570884360000111
the data types in the data structure comprise the structure types of buildings and building module types such as a ground module, a step module, a wall module and the like; the adjustable configuration parameters in the data structure include adjustable configuration parameters corresponding to the structure type of the building, such as a conventional type, a T-shape, a cross shape, and adjustable configuration parameters corresponding to the three-dimensional model of each building module type, for example, the parameters of the adjustable configuration parameters of the ground module include example objects, positions and position corrections of the ground model, and the numerical values of the parameters of the adjustable configuration parameters are initialization values defined by a worker.
It should be noted that the parameters of the adjustable configuration parameters corresponding to the three-dimensional model of each building module type are different from or not completely the same as those of the attribute parameters, for example, the parameters of the ground module attribute parameters extracted from the building image may include the ground model instance object, the size parameters, and the relative position of the ground module, and the adjustable configuration parameters of the ground module in the data structure may include the ground model instance object, the position, and the position correction, which are not the same.
Step 205: and screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library.
The adjustable configuration parameters of the three-dimensional models belonging to different building styles and of the same building module type are different, for example, the adjustable configuration parameters of the step module of building style a include a step model instance object, a position offset and a hanging point, the adjustable configuration parameters of the step module of building style B include a step model instance object and a position offset, that is, the hanging point of the step module of building style a is adjustable, and the hanging point of the step module of building style B is not adjustable. Thus, the architectural style of the three-dimensional model may be determined from the adjustable configuration parameters of the three-dimensional model.
Specifically, a three-dimensional model with the same parameters of the building module type and the adjustable configuration parameters as the parameters of the adjustable configuration parameters corresponding to the building module type and the building module type in the data structure is determined from the built three-dimensional model as a target three-dimensional model, the target three-dimensional model is combined into a style module library, and the adjustable configuration parameters of the three-dimensional models with the same building module type are different in the style module libraries with different building styles.
Step 206: and defining different values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module example libraries.
Specifically, after the style module library is obtained by combination, the numerical value of the adjustable configuration parameter of the target three-dimensional model in the style module library is an initialization value, so that the numerical value of the adjustable configuration parameter of each target three-dimensional model in the style module library is defined, for example, taking a ground module as an example, a worker may define a model instance object, a position, and a position correction value of the ground module. The target three-dimensional model after the value definition of the adjustable configuration parameters is obtained, the target three-dimensional model after the value definition of the adjustable configuration parameters forms a style module instance library, and the values of the adjustable configuration parameters of the target three-dimensional model can be defined into different values, so that different style module instance libraries can be defined and obtained based on the target three-dimensional module in the style module library, and the values of the adjustable configuration parameters of the target three-dimensional model in different style module instance libraries corresponding to the same style module library are different.
It should be noted that the module library instance libraries corresponding to the same style module library correspond to the same data structure, but the values of the adjustable configuration parameters of the three-dimensional models of the building module types in the data structure corresponding to the module library instance library are different.
In addition, the values of the adjustable configuration parameters of each target three-dimensional model in the style module library are defined, and the set of the defined adjustable configuration parameters of each target three-dimensional model is the modularized parameter set corresponding to the style module example library.
In an example of the invention, values of adjustable configuration parameters of the target three-dimensional model can be randomized through program randomization, so that different style module example libraries can be quickly formed and are suitable for being used in some occasions with weak stylization requirements.
Step 207: and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
In an embodiment of the present invention, referring to fig. 4, the step 207 may include the following steps:
step 401: and acquiring the modular assembling parameters of the virtual building.
The embodiment of the invention is implemented based on the production environment of an Unreal Engine4 game Engine.
The modular assembling parameters are parameters input by a user, and can be approximate virtual building structures (one-storey buildings, two-storey buildings and the like), or building module types of the virtual building structures and building modules forming the virtual buildings, or the virtual building structures, the building module types of the building modules forming the virtual buildings, the relative positions of the building modules and the building module parameters of the building modules, and the embodiment of the invention is not limited to the above specific setting according to actual needs.
Specifically, after a style module instance library is constructed, modular assembly parameters input by workers are obtained, and the modular assembly parameters are mainly used for assembling three-dimensional models in the style module instance library.
Step 402: and responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module instance library corresponding to the target style module library.
Specifically, after the modular assembling parameters input by the worker, the worker may select the corresponding style module library, for example, if the worker inputs that the virtual building is a house, the building style of the house may be switched according to the selected style module library, where the style module library a is a gothic style and the style module library B is a baroque style. The target style module library comprises a plurality of style module case libraries, so that the style module case libraries corresponding to the target style module library are displayed after the target style module library is determined, and a user can conveniently select the style module case libraries.
Step 403: and determining a target style module instance library in response to the selection operation aiming at the style module instance library.
The modular parameter sets of the building modules in the different style module instance libraries corresponding to the same style module library are different, and by taking the ground module as an example, the ground model instance objects, positions and positions of the ground modules in the different style module instance libraries of the same style module library are corrected differently, so that the display effects of the virtual buildings formed in the different style module instance libraries corresponding to the same style module library are different.
Specifically, after the target style module library is determined and the style module instance library corresponding to the target style module library is displayed, the target style module instance library is determined from the plurality of style module instance libraries in response to selection operation of workers on the style module instance library.
Step 404: and splicing the target three-dimensional models in the target style module instance library into a virtual building based on the modular splicing parameters.
Step 405: and displaying the virtual building.
Specifically, after the staff determines the target style module instance library, based on the modularized assembling parameters, the three-dimensional models in the target style module instance library are assembled into the virtual building, and the virtual building is displayed to the staff for previewing, so that the staff can judge whether the virtual building generated based on the target style module instance library meets the requirements or not.
Referring to fig. 5, a flowchart illustrating steps of another virtual building assembly verification method provided in the embodiment of the present invention is shown, as can be seen, after the modular assembly parameters are input, a worker may determine a target style module library from the style module library a and the style module library B, and if the target style module library is the style module library a, determine a target style module instance library such as a target style module instance library a from the style module instance library corresponding to the style module library a, and output a virtual building based on the modular assembly parameters and a modular parameter set corresponding to the target style module instance library a.
At present, after modules are split, an assembling verification link is required, corresponding module art assets are firstly manufactured in a traditional art meeting, then different architectural style styles are assembled and matched in a manual mode, and the method is low in efficiency. In the embodiment of the invention, the performance of each building module in the virtual building in different styles can be quickly previewed by switching the style module instance libraries, so that the working personnel can quickly preview the effect of random collocation of the modular buildings.
In an embodiment of the present invention, the target style module instance library has a corresponding modular parameter set, where the modular parameter set is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and after the step 405, the method further includes: in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set; and updating and displaying the virtual building based on the adjusted modular parameter set.
The modular parameter set is a set of adjustable configuration parameters (including parameters and values corresponding to the parameters) of each target three-dimensional model of the corresponding target style module instance library. When the three-dimensional models in the style module instance library are assembled through the assembling parameters, the assembling is carried out on the basis of the predefined adjustable configuration parameters of each three-dimensional model, so that the displayed virtual building can be adjusted through adjusting the modularized parameter set.
Specifically, the worker may adjust the modular parameter set corresponding to the target style module instance library, so as to adjust the displayed virtual building, so that the worker directly adjusts the virtual building to a virtual building meeting the requirements.
After the modules are disassembled, the assembly verification link is required, corresponding module art assets are firstly manufactured in the traditional art meeting mode, then different architectural style styles are assembled and matched in a manual mode, and the method is low in efficiency. When artificial flaws occur at some places of seams and corners, the module assets need to be re-iterated back to the upstream link.
In the embodiment of the invention, when watching the virtual building, a worker can adjust the modular parameter set corresponding to the target style module instance library, so that the worker can conveniently and quickly adjust the building matching style meeting the conditions, and the worker does not need to return to the upstream link to iterate module assets again, thereby effectively improving the control force of the art production worker in the modular assembly link and reducing the cost of repeated iteration.
In an embodiment of the present invention, after the performing an updated display on the virtual building based on the adjusted modular parameter set, the method further includes: and storing the target style module instance library corresponding to the adjusted modular parameter set.
Specifically, when the modular parameter set corresponding to the target style module instance library is adjusted and the adjusted virtual building meets the requirements, the target style module instance library after the modular parameter set is adjusted may be additionally stored as a new style module instance library, or the target style module instance library after the modular parameter set is adjusted may be stored to cover the previous target style module instance library.
In the embodiment of the invention, the building module types and the building module parameters of the building modules in the building image are extracted through image semantic segmentation and image feature detection, so that the process of manually separating each building module through experience and extracting the relevant module parameters in the design drawing is omitted, the experience of workers is not required, the building resource manufacturing efficiency is improved, and the manpower resource in the building manufacturing process is reduced.
And aiming at the common precision application scene and the high precision application scene, different modes are respectively adopted to extract the attribute parameters of the building module so as to meet the requirements under different application scenes.
The method comprises the steps of adjusting the size parameters of building modules in different building images and of the same building module type to target size parameters, so that the size parameters of the building modules in different building images and of the same building module type are the same, and the problems that the building modules in different building images are not spliced or have defects after splicing due to the fact that parameters of connectors are inconsistent when the building modules in different building images are spliced are solved.
The performance of each building module in the virtual building under different styles can be quickly previewed by switching the style module instance library, and the effect that the modularized buildings are randomly collocated can be quickly previewed by a worker conveniently.
The method has the advantages that when a worker watches the virtual building, the worker can adjust the modular parameter set corresponding to the target style module instance library, what you see is what you get, the worker can conveniently and quickly adjust the building matching style meeting the conditions, the worker does not need to return to the upstream link again to iterate module assets again, the control force of art makers in the modular assembling link is effectively improved, and the cost of repeated iteration is reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those of skill in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the embodiments of the invention.
Referring to fig. 6, a structural block diagram of a virtual building assembling device provided in the embodiment of the present invention is shown, and specifically, the structural block diagram may include the following modules:
a design drawing obtaining module 601, configured to obtain a building image;
a parameter extraction module 602, configured to extract attribute parameters of building modules of a building in the building image;
a model construction module 603 for constructing a three-dimensional model of the building module based on the attribute parameters;
an instance library combination module 604, configured to combine the three-dimensional models with the same architectural style into a style module instance library;
and a virtual building assembling module 605, configured to assemble the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library.
Optionally, the example library combination module 604 includes:
the data structure acquisition submodule is used for acquiring a data structure set aiming at the architectural style of the style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
the module library combination submodule is used for screening a target three-dimensional module from the three-dimensional model according to the data structure and combining the target three-dimensional module into a style module library;
and the example base forming submodule forms different style module example bases by defining different values for parameters of adjustable configuration parameters of the target three-dimensional module in the style module base.
Optionally, the method further comprises:
and the example library combination module is also used for combining the three-dimensional models corresponding to the same building images in the style module library into the style module example library.
Optionally, the attribute parameters include a building module type and a building module parameter, and the parameter extraction module 602 includes:
the semantic segmentation submodule is used for performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and the characteristic detection submodule is used for carrying out image characteristic detection processing on the building image to obtain the building module parameters of each building module.
Optionally, the attribute parameters include a building module type and building module parameters, and the parameter extraction module 602 includes:
the contour labeling submodule is used for labeling the building contour of the building module in the building image in response to the contour labeling operation aiming at the building image;
a type labeling submodule, configured to label a building module type of the building module in the building outline in response to a type labeling operation for the building outline;
and the parameter extraction submodule is used for extracting the building module parameters of the building module from the building outline.
Optionally, the building module parameters include a size parameter, further comprising:
the parameter acquisition module is used for acquiring target size parameters of each building module type;
and the parameter adjusting module is used for adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the virtual building assembling module 605 includes:
the parameter acquisition module is also used for acquiring the modular splicing parameters of the virtual building;
the module library determining module is used for responding to the selection operation aiming at the style module library and other style module libraries, determining a target style module library and displaying a style module instance library corresponding to the target style module library;
the system comprises a style module, an instance base determining module, a target style module instance base determining module and a processing module, wherein the style module instance base determining module is used for determining a target style module instance base in response to selection operation aiming at the style module instance base;
the model assembling module is used for assembling the target three-dimensional models in the target style module case base into a virtual building based on the modularized assembling parameters;
and the model display module is used for displaying the virtual building.
Optionally, the target style module instance library has a corresponding modular parameter set, where the modular parameter set is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and the method further includes:
a parameter adjustment module for determining an adjusted modular parameter set in response to an adjustment operation for the modular parameter set;
and the model display module is also used for updating and displaying the virtual building based on the adjusted modularized parameter set.
Optionally, the method further comprises:
and the instance base storage module is used for storing the adjusted modularized parameter set corresponding to the target style module instance base.
In summary, in the embodiment of the present invention, after the building image is obtained, the attribute parameters of each building module of the building in the building image may be directly extracted, and the three-dimensional model of the building module may be constructed based on the attribute parameters, without depending on the experience of the worker, so as to improve the efficiency of building resource manufacturing and reduce the manpower resources in the building resource manufacturing process.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the corresponding style module instance library to match with a desired building style pattern.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Preferably, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and operable on the processor, wherein the computer program, when executed by the processor, implements the processes of the virtual building assembling method embodiments, for example:
obtaining a building image;
extracting attribute parameters of each building module of the building in the building image;
constructing a three-dimensional model of the building module based on the attribute parameters;
combining the three-dimensional models with the same architectural style into a style module example library;
and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
Optionally, the combining the three-dimensional models of the same architectural style into a style module instance library includes:
acquiring a data structure set for the architectural style of a style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library;
and defining different values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module example libraries.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and carrying out image feature detection processing on the building image to obtain the building module parameters of each building module.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
marking the building outline of the building module in the building image in response to the outline marking operation for the building image;
in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline;
building module parameters of the building module are extracted from the building outline.
Optionally, the building module parameters include a size parameter, and before the building the three-dimensional model of the building module based on the attribute parameters, the method further includes:
acquiring target size parameters of each building module type;
and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library includes:
acquiring modular splicing parameters of the virtual building;
responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module instance library corresponding to the target style module library;
responding to the selection operation aiming at the style module case base, and determining a target style module case base;
splicing the target three-dimensional models in the target style module case base into a virtual building based on the modular splicing parameters; and displaying the virtual building.
Optionally, the target style module instance library has a corresponding modular parameter set, where the modular parameter set is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and after the virtual building is displayed, the method further includes:
in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set;
and updating and displaying the virtual building based on the adjusted modular parameter set.
Optionally, after the updated display of the virtual building based on the adjusted modular parameter set, the method further includes:
and storing the target style module instance library corresponding to the adjusted modular parameter set.
By the aid of the method, after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, the three-dimensional model of the building module is built based on the attribute parameters, the experience of workers is not required to be relied on, building resource manufacturing efficiency is improved, and manpower resources in the building resource manufacturing process are reduced.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the corresponding style module instance library to match with a desired building style pattern.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the virtual building assembling method embodiment, for example:
obtaining a building image;
extracting attribute parameters of each building module of the building in the building image;
constructing a three-dimensional model of the building module based on the attribute parameters;
combining the three-dimensional models with the same architectural style into a style module example library;
and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
Optionally, the combining the three-dimensional models of the same architectural style into a style module instance library includes:
acquiring a data structure set for the architectural style of a style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library;
and defining different values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module example libraries.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
performing semantic segmentation processing on the building image to obtain building module types of all building modules in the building image;
and carrying out image feature detection processing on the building image to obtain the building module parameters of each building module.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
marking the building outline of the building module in the building image in response to the outline marking operation for the building image;
in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline;
building module parameters of the building module are extracted from the building outline.
Optionally, the building module parameters include a size parameter, and before the building the three-dimensional model of the building module based on the attribute parameters, the method further includes:
acquiring target size parameters of each building module type;
and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library includes:
acquiring modular splicing parameters of the virtual building;
responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module example library corresponding to the target style module library;
responding to the selection operation aiming at the style module case base, and determining a target style module case base;
splicing the target three-dimensional models in the target style module instance library into a virtual building based on the modular splicing parameters; and displaying the virtual building.
Optionally, the target style module instance library has a corresponding set of modular parameters, where the set of modular parameters is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and after the displaying of the virtual building, the method further includes:
in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set;
and updating and displaying the virtual building based on the adjusted modular parameter set.
Optionally, after the updated display of the virtual building based on the adjusted modular parameter set, the method further includes:
and storing the target style module instance library corresponding to the adjusted modular parameter set.
By the aid of the method, after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, the three-dimensional model of the building module is built based on the attribute parameters, the experience of workers is not required to be relied on, building resource manufacturing efficiency is improved, and manpower resources in the building resource manufacturing process are reduced.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the corresponding style module instance library to match with a desired building style pattern.
The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
Embodiments of the present invention provide a computer program product, which is stored in a storage medium and executed by at least one processor to implement processes of the above-described virtual building assembling method embodiments, such as:
obtaining a building image;
extracting attribute parameters of each building module of the building in the building image;
constructing a three-dimensional model of the building module based on the attribute parameters;
combining the three-dimensional models with the same building style into a style module case base;
and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
Optionally, the combining the three-dimensional models of the same architectural style into a style module instance library includes:
acquiring a data structure set for the architectural style of a style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not completely the same as the parameters in the attribute parameters;
screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library;
and defining different values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module example libraries.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and carrying out image feature detection processing on the building image to obtain building module parameters of each building module.
Optionally, the extracting attribute parameters of each building module of the building in the building image includes:
in response to a contour labeling operation for the building image, labeling a building contour of a building module in the building image;
in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline;
building module parameters of the building module are extracted from the building outline.
Optionally, the building module parameters include a size parameter, and before the building the three-dimensional model of the building module based on the attribute parameters, the method further includes:
acquiring target size parameters of each building module type;
and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
Optionally, the assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library includes:
acquiring modular assembly parameters of a virtual building;
responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module instance library corresponding to the target style module library;
determining a target style module instance library in response to the selection operation for the style module instance library;
splicing the target three-dimensional models in the target style module instance library into a virtual building based on the modular splicing parameters; and displaying the virtual building.
Optionally, the target style module instance library has a corresponding set of modular parameters, where the set of modular parameters is a set of adjustable configuration parameters of each target three-dimensional model in the target style module instance library, and after the displaying of the virtual building, the method further includes:
in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set;
and updating and displaying the virtual building based on the adjusted modular parameter set.
Optionally, after the updated display of the virtual building is performed based on the adjusted modular parameter set, the method further includes:
and storing the target style module instance library corresponding to the adjusted modular parameter set.
By the aid of the method, after the building image is obtained, the attribute parameters of each building module of the building in the building image can be directly extracted, the three-dimensional model of the building module is built based on the attribute parameters, the experience of workers is not required to be relied on, building resource manufacturing efficiency is improved, and manpower resources in the building resource manufacturing process are reduced.
In addition, in the embodiment of the invention, the three-dimensional model is obtained by construction, the three-dimensional models of the building modules with the same style are combined into the style module instance library, so that the building resources are convenient to manage, and in the building assembly link, a worker can select the corresponding style module instance library to match with a desired building style pattern.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. A virtual building assembly method is characterized by comprising the following steps:
obtaining a building image;
extracting attribute parameters of each building module of the building in the building image;
constructing a three-dimensional model of the building module based on the attribute parameters;
combining the three-dimensional models with the same architectural style into a style module example library;
and assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module example library.
2. The method of claim 1, wherein said combining said three-dimensional models of the same architectural style into a library of style module instances comprises:
acquiring a data structure set for the architectural style of a style module library; the data structure comprises building module types of three-dimensional models and adjustable configuration parameters of the three-dimensional models of the building module types, and the parameters of the adjustable configuration parameters are different from or not identical to the parameters in the attribute parameters;
screening target three-dimensional modules from the three-dimensional models according to the data structure, and combining the target three-dimensional modules into a style module library;
and defining different numerical values for parameters of the adjustable configuration parameters of the target three-dimensional module in the style module library to form different style module case libraries.
3. The method of claim 1, wherein the attribute parameters include a building module type and building module parameters, and wherein extracting the attribute parameters of each building module of a building in the building image comprises:
performing semantic segmentation processing on the building image to obtain the building module type of each building module in the building image;
and carrying out image feature detection processing on the building image to obtain building module parameters of each building module.
4. The method of claim 1, wherein the attribute parameters include a building module type and building module parameters, and wherein extracting the attribute parameters of each building module of a building in the building image comprises:
marking the building outline of the building module in the building image in response to the outline marking operation for the building image;
in response to a type marking operation for the building outline, marking a building module type of the building module in the building outline;
building module parameters of the building module are extracted from the building outline.
5. The method of claim 3 or 4, wherein the building module parameters include a dimensional parameter, further comprising, prior to the building a three-dimensional model of the building module based on the attribute parameters:
acquiring target size parameters of each building module type;
and adjusting the size parameter of each building module into a target size parameter corresponding to the type of the building module.
6. The method of claim 2, wherein assembling the virtual building of the building style corresponding to the three-dimensional model according to the style module instance base comprises:
acquiring modular splicing parameters of the virtual building;
responding to the selection operation aiming at the style module library, determining a target style module library, and displaying a style module example library corresponding to the target style module library;
responding to the selection operation aiming at the style module case base, and determining a target style module case base;
splicing the target three-dimensional models in the target style module instance library into a virtual building based on the modular splicing parameters; and displaying the virtual building.
7. The method of claim 6, wherein the target style module instance library has a corresponding set of modular parameters, the set of modular parameters being a set of adjustable configuration parameters for each target three-dimensional model in the target style module instance library, further comprising, after the presenting the virtual building:
in response to an adjustment operation for the modular parameter set, determining an adjusted modular parameter set;
and updating and displaying the virtual building based on the adjusted modular parameter set.
8. The method of claim 7, further comprising, after said updated presentation of the virtual building based on the adjusted set of modular parameters:
and storing the target style module instance library corresponding to the adjusted modular parameter set.
9. A device is assembled to virtual building, its characterized in that, the device includes:
the design drawing acquisition module is used for acquiring a building image;
the parameter extraction module is used for extracting attribute parameters of all building modules of buildings in the building image;
a model construction module for constructing a three-dimensional model of the building module based on the attribute parameters;
the case base combination module is used for combining the three-dimensional models with the same building style into a style module case base;
and the virtual building assembling module is used for assembling the virtual building with the building style corresponding to the three-dimensional model according to the style module instance library.
10. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, implementing the method of any of claims 1-8.
11. A computer-readable storage medium having stored thereon instructions, which when executed by one or more processors, cause the processors to perform the method of any one of claims 1-8.
CN202210319174.9A 2022-03-29 2022-03-29 Virtual building assembly method and device, electronic equipment and storage medium Pending CN114708385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210319174.9A CN114708385A (en) 2022-03-29 2022-03-29 Virtual building assembly method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210319174.9A CN114708385A (en) 2022-03-29 2022-03-29 Virtual building assembly method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114708385A true CN114708385A (en) 2022-07-05

Family

ID=82170534

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210319174.9A Pending CN114708385A (en) 2022-03-29 2022-03-29 Virtual building assembly method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114708385A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117095143A (en) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 Virtual building construction method, device, electronic equipment and storage medium
WO2024066689A1 (en) * 2022-09-29 2024-04-04 华为技术有限公司 Model processing method, and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024066689A1 (en) * 2022-09-29 2024-04-04 华为技术有限公司 Model processing method, and apparatus
CN117095143A (en) * 2023-10-19 2023-11-21 腾讯科技(深圳)有限公司 Virtual building construction method, device, electronic equipment and storage medium
CN117095143B (en) * 2023-10-19 2024-03-01 腾讯科技(深圳)有限公司 Virtual building construction method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109427088B (en) Rendering method for simulating illumination and terminal
CN114708385A (en) Virtual building assembly method and device, electronic equipment and storage medium
US20210319149A1 (en) Method, device, equipment and storage medium for generating three-dimensional space of target house
EP2889844A2 (en) Diminished reality
JP2022542573A (en) Method and computer program product for generating three-dimensional model data of clothing
CN110197534B (en) Virtual building accessory model hooking method, device, processor and terminal
CN111124119B (en) Building model presentation and interaction method based on virtual reality technology
US20220262086A1 (en) Home visualization tool
CN107590337A (en) A kind of house ornamentation displaying interactive approach and device
CN114119818A (en) Rendering method, device and equipment of scene model
US20170069142A1 (en) Genie surface matching process
CN117095300B (en) Building image processing method, device, computer equipment and storage medium
CN116310188B (en) Virtual city generation method and storage medium based on instance segmentation and building reconstruction
Jing Design and implementation of 3D virtual digital campus-based on unity3d
CN114612641A (en) Material migration method and device and data processing method
CN116681854A (en) Virtual city generation method and device based on target detection and building reconstruction
CN110853487A (en) Digital sand table system for urban design
Divya Udayan et al. Animage-based approach to the reconstruction of ancient architectures by extracting and arranging 3D spatial components
CN112843704B (en) Animation model processing method, device, equipment and storage medium
CN114820968A (en) Three-dimensional visualization method and device, robot, electronic device and storage medium
CN114820980A (en) Three-dimensional reconstruction method and device, electronic equipment and readable storage medium
CN114288664A (en) Game scene generation method and device, storage medium and electronic device
CN114638926A (en) Three-dimensional scene automatic generation system and method
CN113553633A (en) Data generation method and device, electronic equipment and computer storage medium
Wang Construction of the Three-dimensional Virtual Campus Scenes’ Problems and Solutions

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