Virtual building generation method and device, equipment and storage medium

By obtaining building shape and type parameters to generate shape blueprints and placing materials, the problem of inefficient virtual building generation in the existing technology is solved, and the effect of user independent design and efficient generation of virtual buildings is achieved.

CN120451464APending Publication Date: 2025-08-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410175664.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, the generation method of virtual buildings cannot effectively express the user's personalized architectural concepts, and the automatic generation method is inefficient, while the gradual construction method is time-consuming and labor-intensive, and the construction efficiency is inefficient.

Method used

By obtaining building shape parameters and type parameters, generating shape blueprints and placing materials, providing a building generation interface to customize the shape and type of virtual buildings, and using shape blueprints and materials to quickly build virtual buildings.

Benefits of technology

The user independently designed the shape and type of virtual buildings, improved the generation efficiency, solved the problem of inefficient efficiency in gradually building virtual buildings, and achieved the effect of efficient generation of virtual buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451464A_ABST
    Figure CN120451464A_ABST
Patent Text Reader

Abstract

The invention provides a virtual building generation method and device, equipment and a storage medium, and relates to the technical field of computers and the Internet. The method comprises the following steps: acquiring building shape parameters and building type parameters set for a to-be-generated virtual building; and generating a shape blueprint of the virtual building according to the building shape parameters. And according to the building type parameters, generating at least one material forming the virtual building. And placing at least one material forming the virtual building at a corresponding position in the shape blueprint to generate the virtual building. According to the method, on one hand, on the basis of setting of the parameters, a user can design the shape and the type of the virtual building according to autonomy; and on the other hand, by analyzing the parameters, the virtual building can be quickly generated, and the problem that the construction efficiency is low due to the fact that the virtual building is gradually constructed from zero is solved. According to the method, the technical effect of efficiently generating the virtual building on the basis of reflecting the building concept of the user is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer and Internet technology, and in particular to a method, device, equipment and storage medium for generating a virtual building. Background Art

[0002] UGC (User Generated Content) levels refer to game levels designed and created by users.

[0003] UGC levels can be composed of multiple modules and components. Components refer to the basic building objects that make up a UGC level, and modules refer to combined objects composed of multiple components. For example, the modules that make up a UGC level can include virtual buildings (such as a pavilion), and the components that make up the virtual building can include pillars, roofs, fences, etc. In related technologies, users typically use automatic generation or step-by-step construction methods to create UGC level modules. For example, with respect to the generation of virtual buildings, the automatic generation method means that users can use AI (Artificial Intelligence) technology to generate virtual buildings with one click. For example, users can provide text or images as input, and the system analyzes and understands the input text or images and generates the corresponding virtual buildings using a pre-trained model. The step-by-step construction method means that users can select appropriate components in the UGC editor to build a virtual building. By adjusting the style, position, and other attributes of multiple components separately and combining the adjusted components, a virtual building can be obtained.

[0004] Regarding the aforementioned virtual building generation methods, on the one hand, automatic generation methods, such as text-based one-click generation of virtual buildings, are generally incapable of expressing a user's personalized architectural concept. On the other hand, the aforementioned step-by-step virtual building construction methods require the user to construct the virtual building from scratch. The construction of complex virtual buildings often requires a significant amount of time and effort, resulting in low virtual building construction efficiency. Summary of the Invention

[0005] The embodiments of the present application provide a method, apparatus, device, and storage medium for generating a virtual building. The technical solutions provided by the embodiments of the present application are as follows:

[0006] According to one aspect of an embodiment of the present application, a method for generating a virtual building is provided, the method comprising:

[0007] Acquiring building shape parameters and building type parameters set for a virtual building to be generated, wherein the building shape parameters are used to determine a basic shape of the virtual building, and the building type parameters are used to determine materials constituting the virtual building;

[0008] Generate a shape blueprint of the virtual building according to the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building through at least one basic graphic element, and the basic graphic element includes at least one of the following: a line, a plane figure;

[0009] generating at least one material constituting the virtual building according to the building type parameter;

[0010] At least one material constituting the virtual building is placed at a corresponding position in the shape blueprint to generate the virtual building.

[0011] According to one aspect of an embodiment of the present application, a method for generating a virtual building is provided, the method comprising:

[0012] Displaying a building generation interface, wherein the building generation interface is a user interface for customizing and generating a virtual building, and the building generation interface includes building shape setting items and building type setting items;

[0013] In response to an operation on the building type setting item, displaying the set building type parameters in the building generation interface, the building type parameters being used to determine the materials constituting the virtual building;

[0014] In response to an operation on the building shape setting item, displaying set building shape parameters in the building generation interface, the building shape parameters being used to determine a basic shape of the virtual building;

[0015] In response to a preview operation on the virtual building, the virtual building generated based on the building shape parameters and the building type parameters is displayed.

[0016] According to one aspect of an embodiment of the present application, a device for generating a virtual building is provided, the device comprising:

[0017] an acquisition module, configured to acquire building shape parameters and building type parameters set for a virtual building to be generated, wherein the building shape parameters are used to determine a basic shape of the virtual building, and the building type parameters are used to determine materials constituting the virtual building;

[0018] A first generating module is configured to generate a shape blueprint of the virtual building according to the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building through at least one basic graphic element, and the basic graphic element includes at least one of the following: a line and a plane figure;

[0019] A second generating module is used to generate at least one material constituting the virtual building according to the building type parameter;

[0020] The placement module is used to place at least one material constituting the virtual building at a corresponding position in the shape blueprint to generate the virtual building.

[0021] According to one aspect of an embodiment of the present application, a device for generating a virtual building is provided, the device comprising:

[0022] A first display module is configured to display a building generation interface, wherein the building generation interface is a user interface for customizing and generating a virtual building, and the building generation interface includes building shape setting items and building type setting items;

[0023] a second display module, configured to display set building type parameters in the building generation interface in response to an operation on the building type setting item, wherein the building type parameters are used to determine materials constituting the virtual building;

[0024] a third display module, configured to display set building shape parameters in the building generation interface in response to an operation on the building shape setting item, wherein the building shape parameters are used to determine a basic shape of the virtual building;

[0025] A fourth display module is configured to display the virtual building generated based on the building shape parameters and the building type parameters in response to a preview operation on the virtual building.

[0026] According to one aspect of an embodiment of the present application, a computer device is provided, comprising a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned method for generating a virtual building.

[0027] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned method for generating a virtual building.

[0028] According to one aspect of an embodiment of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the aforementioned method for generating a virtual building.

[0029] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0030] In the building generation interface, users can set the virtual building's shape and type parameters. By analyzing these two parameters, a blueprint for the virtual building's shape is generated and the building's components are determined. By placing these components into the corresponding positions on the shape blueprint, the virtual building can be quickly generated. Based on these parameter settings, users can independently design the shape and type of the virtual building. Furthermore, analyzing these parameters allows for rapid virtual building generation, resolving the inefficiency associated with constructing virtual buildings from scratch. This method achieves the technical effect of efficiently generating virtual buildings while reflecting the user's architectural concept. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a schematic diagram of an implementation environment for a solution provided by an embodiment of the present application;

[0032] Figure 2 This is a flow chart of a method for generating a virtual building provided by one embodiment of the present application;

[0033] Figure 3 is a schematic diagram of a building generation interface provided by one embodiment of the present invention;

[0034] Figure 4 is a schematic diagram of a UGC level design interface provided by an embodiment of the present invention;

[0035] Figure 5 is a schematic diagram of a building generation interface provided by another embodiment of the present application;

[0036] Figure 6 is a schematic diagram of a color palette interface provided by one embodiment of the present application;

[0037] Figure 7 This is a schematic diagram of a model preview interface provided by an embodiment of the present application;

[0038] Figure 8 This is a schematic diagram of a history record interface provided by an embodiment of the present application;

[0039] Figure 9 is a schematic diagram of a history record interface provided by another embodiment of the present application;

[0040] Figure 10 This is a schematic diagram of a detailed interface of a first virtual building provided by an embodiment of the present application;

[0041] Figure 11 This is a schematic diagram of a text generation module interface provided by an embodiment of the present application;

[0042] Figure 12is a flowchart of a method for generating a virtual building provided by another embodiment of the present application;

[0043] Figure 13 This is a schematic diagram of a line blueprint and a surface blueprint provided by an embodiment of the present application;

[0044] Figure 14 This is a schematic diagram of dividing a linear blueprint into subgraphs provided by an embodiment of the present application;

[0045] Figure 15 This is a schematic diagram of dividing a face blueprint into subgraphs provided by an embodiment of the present application;

[0046] Figure 16 This is a flowchart of generating a virtual building provided by an embodiment of the present application;

[0047] Figure 17 This is a block diagram of a device for generating a virtual building provided by one embodiment of the present application;

[0048] Figure 18 is a block diagram of a device for generating a virtual building provided by another embodiment of the present application;

[0049] Figure 19 This is a structural block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0051] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application. The implementation environment of the solution may include: a terminal device 10 and a server 20.

[0052] The terminal device 10 includes, but is not limited to, mobile phones, tablet computers, intelligent voice interaction devices, game consoles, wearable devices, multimedia playback devices, PCs (Personal Computers), vehicle-mounted terminals, smart home appliances, AR (Augmented Reality) devices, VR (Virtual Reality) devices, and other electronic devices. The terminal device 10 can run a client for a target application (such as a game application). Optionally, the target application can be an application that needs to be downloaded and installed, or it can be in the form of a web page or a mini-program, which is not limited in this embodiment of the present application.

[0053] In the embodiment of the present application, the target application may be, but is not limited to, a war strategy game application, a tower defense game application, a real-time strategy game (RTS) application, a turn-based strategy game application, a grand strategy game application, a city construction and management game application, a war strategy game application, a business strategy game application, a strategy game (Simulation Game, SLG) application, a social application, an interactive entertainment application, a simulation program, a virtual reality (VR) application, an augmented reality (AR) application, a three-dimensional map application, a virtual reality game application, an augmented reality game application, a party game application, etc.

[0054] In some embodiments, the target application provides a user-generated content (UGC) level design feature. UGC levels are game levels created and designed by users (players) within the game. Players can use the game's provided UGC editor to independently create game levels, including map design, item settings, and mission settings. These UGC levels can then be uploaded to the game platform to share and experience with other players.

[0055] Virtual buildings can be used in user-generated content (UGC) level design. Players can create unique game levels by constructing virtual buildings, thereby creating the atmosphere and background of the game world and showcasing their design talent. Players can also utilize the design and layout of virtual buildings to incorporate game mechanisms within them, increasing the diversity, complexity, and difficulty of game levels.

[0056] In some embodiments, the application of this virtual building generation method is not limited to user-generated content (UGC) level design. For example, it can also be applied to the construction of a player base, which is the primary stronghold of a faction or player in the game. Players can create virtual buildings within their base to create a base environment that suits their preferences and style.

[0057] The aforementioned virtual buildings refer to structures within a virtual scene that users independently construct within a target application. These buildings can be accurately modeled and presented within the virtual scene, allowing users to interact and explore them in a manner similar to the real world. Virtual buildings can include a variety of different types of buildings and can generally be customized and designed according to user needs. During the creation of a virtual building, users can shape the building's shape, structure, and functionality according to their imagination and creativity. This provides users with a platform to express their own design concepts and artistic style. In the embodiments of this application, the display format of the virtual buildings is not limited. Virtual buildings can be displayed in either three-dimensional or two-dimensional form, which is not limited in this embodiment of the application. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual buildings are three-dimensional models. Each virtual building has its own shape and volume within the three-dimensional virtual environment and occupies a portion of the space within the three-dimensional environment. In some embodiments, virtual buildings can also be implemented as 2.5-dimensional or 2-dimensional models, which is not limited in this application.

[0058] The server 20 is used to provide background services for the client of the target application in the terminal device 10. For example, the server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, but is not limited thereto.

[0059] The terminal device 10 and the server 20 can communicate with each other via a network, which can be a wired network or a wireless network.

[0060] Please refer to Figure 2 , which shows a flow chart of a method for generating a virtual building provided by an embodiment of the present application. The execution subject of each step of the method can be Figure 1 In the embodiment of the embodiment shown, the terminal device 10, for example, the execution subject of each step can be the client of the target application. In the following method embodiment, for ease of description, only the execution subject of each step is described as the "client". The method can include at least one of the following steps (210-240):

[0061] Step 210: Displaying a building generation interface. The building generation interface is a user interface for customizing and generating a virtual building. The building generation interface includes building shape setting items and building type setting items.

[0062] Please refer to Figure 3, which shows a schematic diagram of a building generation interface 30 provided by an embodiment of the present application. The building shape setting item is used to adjust the shape attributes of the virtual building. Through this setting item, the user can customize the basic shape of the virtual building. For example, Figure 3 As shown, for the operation of the building shape setting item, the user can determine the foundation shape of the virtual building through the foundation shape option 31 in the interface 30. The building type setting item is used to adjust the type and specific attributes of the virtual building, and the specific attributes may include color attributes. For example, Figure 3 As shown, regarding the building type setting item, the user can determine the building type of the virtual building through the building type selection item 32 in the interface 30, where the building type refers to the classification of the virtual building. For example, the user can set the color attributes of the materials that make up the virtual building through the color attribute setting item 33 in the interface 30.

[0063] Please refer to Figure 4 , which shows a schematic diagram of a UGC level design interface 40 provided by an embodiment of the present application. Figure 4 As shown, in this interface 40, users are allowed to use the provided tools and components to create complete game levels. The solution provided in the embodiment of the present application involves generating virtual buildings in UGC levels. For other components in the UGC level, such as game mechanisms, users can design and produce them in the UGC level design interface 40. In one possible implementation method, the virtual building generation function provided by this application can be integrated into the UGC level design interface 40. Exemplarily, the user can enter the building generation interface 30 by triggering the module generation icon 41 in the UGC level design interface 40. By integrating the virtual building generation function into the UGC level design interface 40, users can operate more conveniently when making UGC levels, and can create their own game levels more flexibly and efficiently.

[0064] Step 220: In response to the operation on the building type setting item, the set building type parameters are displayed in the building generation interface. The building type parameters are used to determine the materials that constitute the virtual building.

[0065] The materials that make up a virtual building, also known as components or modules, refer to the building materials that comprise the virtual building. The building type parameter can be used to determine the building type of the virtual building, and the building type can be used to determine the materials that comprise the virtual building of that building type. For example, if the building type of the virtual building is a pavilion, the materials that make up the pavilion may include pillars, fences, roofs, etc. By combining these materials, the pavilion's specific structure and appearance can be formed.

[0066] In some embodiments, the building type setting item includes a building type selection item, which is used to select the type of virtual building; in the building generation interface, the steps for setting the building type are as follows: in response to an operation on the building type selection item, at least one candidate building type option is displayed, each building type option corresponds to a type of virtual building, and different types of virtual buildings are composed of different materials; in response to an operation on a first building type option among the at least one candidate building type option, the set type parameters are displayed in the building generation interface, and the building type parameters include type parameters, which are used to indicate the type of virtual building corresponding to the first building type option.

[0067] Building types may include corridors, pavilions, courtyard walls, towers, etc., which are not limited in this application. The first building type option refers to any candidate building type option. For example, Figure 3 As shown, the building type can be set to a Chinese-style corridor through the building type selection item 31.

[0068] When the user selects one of the building type options, the building generation interface will display the shape type parameters and building type parameters corresponding to the building type option. These parameters can be used to further specify the specific properties and details of the building type. For example, Figure 3 As shown in FIG, when the user sets the building type to a Chinese-style corridor, the foundation shape option 31 shows a variety of foundation shapes corresponding to the Chinese-style corridor. Figure 3 As shown, when the user sets the building type to a Chinese-style corridor, the color attribute setting item 33 shows the color scheme of the materials that constitute the Chinese-style corridor.

[0069] By displaying the set building type parameters in the building generation interface, this method can quickly determine the materials that make up the virtual building, thereby efficiently creating a virtual building model that meets the desired requirements. This method does not require users to select materials step by step, providing users with a more convenient and rapid way to create virtual buildings.

[0070] In some embodiments, the building type setting item further includes a color attribute setting item, which is used to set the color attributes of the materials that make up the virtual building. In the building generation interface, the steps for setting the color attributes are as follows: in response to an operation on the color attribute setting item, at least one candidate color scheme option is displayed, each color scheme option corresponding to a color scheme, and the color scheme is used to set the color attributes of the materials that make up the virtual building; in response to an operation on a first color scheme option among the at least one candidate color scheme option, the set color parameters are displayed in the building generation interface, where the building type parameters include color parameters, and the color parameters are used to indicate the color scheme corresponding to the first color scheme option.

[0071] The color scheme is used to set the color attributes corresponding to the various materials that make up the virtual building. For example, taking a pavilion as an example, the color scheme can be used to set the colors corresponding to the pillars, fences, and roof of the pavilion. The first color scheme option refers to any candidate color scheme option. For example, Figure 3 As shown, the color scheme of the materials constituting the Chinese-style corridor can be set to a standard color scheme through the color attribute setting item 33.

[0072] The above method determines the color attributes of the virtual building materials by adding color attribute settings. This method allows users to independently select color schemes, thereby quickly setting the colors of the materials that make up the virtual building.

[0073] In some embodiments, users can customize color schemes to achieve more personalized virtual building designs. Figure 5 Shown and Figure 6 As shown, users can click the Customize Color option 51 to enter the Color Palette interface 61, where they can customize their color scheme. The Color Palette interface 61 allows users to define color schemes using color palettes. A color palette is a set of predefined color blocks from which users can select predefined colors. These colors are carefully selected, commonly used in design, and possess a certain aesthetic value. Users can click a color block in the palette to apply the selected color to the components of the virtual building. Users can also define color schemes using the Color Palette, an interactive tool that allows users to select custom colors directly in the color space. Users can select the desired color by clicking, dragging, or sliding on the palette. This method allows users to precisely select the desired color and achieve a higher level of customization. The Color Palette interface 61 also provides a history function to record the user's color selections and adjustment schemes. The history log displays the user's most recent color selections, allowing users to easily review previous selections and quickly switch between them when needed. This facilitates comparing different color options and returning to specific color combinations. Through this custom color scheme method, users can create unique color combinations to design the color properties of virtual building components according to their personal preferences and design needs.

[0074] In some embodiments, the building type setting item also includes a collision attribute setting item, which is used to set the collision attributes of the materials that constitute the virtual building; in the building generation interface, the steps for setting the collision attributes are: in response to the operation on the collision attribute setting item, the set collision parameters are displayed in the building generation interface, and the building type parameters include collision parameters, which are used to indicate the collision attributes of the materials that constitute the virtual building.

[0075] The collision property is used to indicate whether each material will collide with other materials. For example, Figure 3 As shown, the collision properties of a material (such as a roof, a pillar, or a fence) can be indicated by a collision property setting item 34. The user can choose to turn collision on or off, thereby setting the collision properties of the material.

[0076] The above method determines the collision properties of virtual building assets by introducing collision property settings. Through this setting, users can select and set collision parameters within the building generation interface, which dictate the collision characteristics of the virtual building assets. This design helps enhance the interactivity and realism of virtual buildings, providing users with a richer experience. This method facilitates the creation of buildings with realistic physical interactive properties within virtual environments, enhancing the interactive experience and realism of virtual buildings.

[0077] Step 230 : In response to the operation on the building shape setting item, the set building shape parameters are displayed in the building generation interface. The building shape parameters are used to determine the basic shape of the virtual building.

[0078] The basic shape of a virtual building is used to describe the basic outline of the virtual building. The basic shape can be a geometric shape, such as a point, line, circle, polygon or other geometric elements.

[0079] In the building generation interface, at least one foundation shape option corresponding to the set type of virtual building is displayed, and each foundation shape option corresponds to a foundation shape; in response to an operation on a first foundation shape option among the at least one foundation shape option, a first foundation shape is displayed in the building generation interface, and the first foundation shape is the foundation shape corresponding to the first foundation shape option; in response to an adjustment operation on the first foundation shape, the adjusted first foundation shape is displayed in the building generation interface, and the adjustment operation is used to adjust the size of the first foundation shape; wherein the building shape parameters include at least one of the following: basic shape setting parameters, side length setting parameters and number of floors setting parameters; the basic shape setting parameters are used to determine the basic shape of the virtual building determined by the first foundation shape, the side length setting parameters are used to determine the size of the basic shape determined by the size of the first foundation shape, and the number of floors setting parameters are used to determine the number of floors of the virtual building.

[0080] Different building types correspond to different foundation shapes, and each building type corresponds to at least one candidate foundation shape. The first foundation shape refers to any candidate foundation shape. Figure 3 As shown, the foundation shape option 31 shows 7 different foundation shapes of the Chinese-style corridor. By selecting the first foundation shape, the user can intuitively observe the appearance and shape of the first foundation shape in the building generation interface and adjust its size.

[0081] This method displays foundation shape options and a first foundation shape that match the virtual building type in the building generation interface, and provides sizing controls, allowing users to flexibly adjust the building's appearance and shape as needed. This method more intuitively helps users obtain the desired foundation shape, improving building generation efficiency and user experience.

[0082] Step 240 : In response to the preview operation on the virtual building, the virtual building generated based on the building shape parameters and the building type parameters is displayed.

[0083] Please refer to Figure 7 , which shows a schematic diagram of a model preview interface 70 provided by an embodiment of the present application. Figure 3 As shown, the user can enter the model preview interface 70 by clicking the model preview button 35, and the interface 70 is used to display the generated virtual building. Through the preview operation of the virtual building, the user can view and evaluate the design of the virtual building at different stages.

[0084] In some embodiments, based on the building shape parameters and the building type parameters, a first batch of virtual buildings is generated, and the first batch of virtual buildings includes virtual buildings of various styles; Figure 7 As shown, the first batch includes three virtual buildings of different styles, namely Preview 1, Preview 2 and Preview 3, wherein the interface 70 displays the virtual building corresponding to the Preview 2 style.

[0085] In some embodiments, in response to a style switching operation for a virtual building, a virtual building of another style included in the first batch of virtual buildings is displayed. For example, if the preview 1 button 71 can be clicked, the interface 70 can display the virtual building corresponding to the preview 1 style.

[0086] In some embodiments, to provide more style options, in response to a batch switching operation for virtual buildings, a second batch of virtual buildings containing at least one style is displayed. The second batch of virtual buildings is a batch of virtual buildings regenerated based on building shape parameters and building type parameters. The style of the second batch of virtual buildings can be different from that of the first batch of virtual buildings. For example, by clicking button 72, interface 70 can display the second batch of virtual buildings.

[0087] In some embodiments, in response to the confirmation generation operation for the virtual building, the generated virtual building is displayed in the virtual scene. For example, by clicking button 73, the virtual building displayed on the interface 70 can be generated into the virtual scene.

[0088] The above method, through style switching operations and batch switching operations, helps users obtain virtual buildings with more style options and presents the generated buildings in the virtual scene when finally confirmed.

[0089] In some embodiments, please refer to Figure 8 , which shows a schematic diagram of a historical record interface 80 provided by an embodiment of the present application. The historical record interface includes model information of at least one historically generated virtual building, and the model information includes at least one of the following: model name, generation time, and last use time; in response to a viewing operation on a first virtual building in the at least one historically generated virtual building, the building detail parameters of the first virtual building are displayed, and the building detail parameters include building shape parameters and building type parameters; or, in response to a preview operation on the first virtual building in the at least one historically generated virtual building, the first virtual building is displayed; or, in response to an edit operation on the first virtual building in the at least one historically generated virtual building, the building generation interface corresponding to the first virtual building is displayed; or, in response to a delete operation on the first virtual building in the at least one historically generated virtual building, the model information of the first virtual building is deleted from the historical record interface; or, in response to a confirm generation operation on the first virtual building in the at least one historically generated virtual building, the generated first virtual building is displayed in the virtual scene.

[0090] The first virtual building refers to any historically generated virtual building. The model name refers to the name of the virtual building. The user can customize the model name or the system can automatically generate the model name. The generation time refers to the generation time of the virtual building, that is, the specific time when the virtual building was created or generated. It can be used to trace the history of building generation and arrange it in chronological order. The last used time refers to the last time the virtual building was used, that is, the date and time when the building was last called, viewed, or modified by the user or system. This can help users understand the activity level and usage of the virtual building. Building detail parameters refer to detailed parameter information related to the virtual building, including building shape parameters and building type parameters.

[0091] For example, if you click Figure 9 By clicking the button 91 in the figure, you can enter the details interface 100 of the first virtual building, which displays the building details parameters of the first virtual building. Figure 9 The first virtual building can be previewed in the display interface by clicking button 92. Figure 9 The button 93 in the figure can be used to re-edit the model information of the first virtual building. Figure 9 The button 94 in the history record interface can delete the model information of the first virtual building. Figure 8The button 81 in the figure can display the generated first virtual building in the virtual scene.

[0092] The above method is conducive to users reusing historically generated virtual buildings, improving the design efficiency of virtual buildings and optimizing user experience.

[0093] In some embodiments, please refer to Figure 11 , which shows a schematic diagram of a text generation module interface 110 provided by an embodiment of the present application. The interface 110 allows users to generate corresponding modules by inputting text. This function is intended to help users quickly and conveniently generate specific modules to meet their needs and creativity. The interface 110 usually includes a text input box, in which the user can enter the text content of the module they want to generate. This text can be descriptive, prescriptive or any other form of text. Users can enter appropriate text content based on specific application scenarios and needs. The system will understand the meaning and requirements of the text content based on natural language processing technology and algorithm analysis, and display the generated module on the interface 110. The generated module can also be generated into a virtual scene, such as as a component of a UGC level.

[0094] The technical solution provided by the embodiment of the present application enables users to set the architectural shape parameters and architectural type parameters of a virtual building in the building generation interface. By parsing the above two parameters, a shape blueprint of the virtual building can be obtained and the materials that make up the virtual building can be determined. By placing the materials at the corresponding positions of the shape blueprint, a virtual building can be quickly generated. On the one hand, based on the setting of the above parameters, users can independently design the shape and type of the virtual building. On the other hand, by parsing the above parameters, virtual buildings can be quickly generated, solving the problem of low construction efficiency caused by gradually building virtual buildings from scratch. The above method achieves the technical effect of efficiently generating virtual buildings on the basis of reflecting the user's architectural conception.

[0095] Please refer to Figure 12 , which shows a flow chart of a method for generating a virtual building provided by another embodiment of the present application. The execution subject of each step of the method may be a computer device, for example, the computer device may be Figure 1 The terminal device 10 in the implementation environment of the solution shown can also be Figure 1 The server 20 in the implementation environment of the solution shown. The method may include at least one of the following steps (1210-1240):

[0096] Step 1210: Obtain building shape parameters and building type parameters set for the virtual building to be generated. The building shape parameters are used to determine the basic shape of the virtual building, and the building type parameters are used to determine the materials that compose the virtual building.

[0097] The virtual building to be generated refers to the virtual building that the user desires to generate. Building shape parameters may include basic shape parameters, side length parameters, and number of floors parameters. Basic shape parameters determine the basic shape of the virtual building, side length parameters determine the dimensions of the basic shape, and number of floors determine the number of floors of the virtual building. Building type parameters may include type parameters, color parameters, and collision parameters. The type parameter determines the building type of the virtual building, the color parameter determines the color of the materials that make up the virtual building, and the collision parameter determines the collision properties of the materials that make up the virtual building.

[0098] Step 1220: Generate a shape blueprint of the virtual building based on the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building through at least one basic graphic element, and the basic graphic element includes at least one of the following: a line and a plane figure.

[0099] Plane shapes refer to shapes in two-dimensional space, such as rectangles and circles. In a shape blueprint, lines and plane shapes can be used to describe the basic shape of a virtual building. For example, lines can be used to describe the curved outline of a virtual building. Plane shapes can also be used to describe the building's facade and floor plan, such as the roof, door and window locations, and so on.

[0100] In some embodiments, the shape blueprint of the virtual building can be determined based on the foundation shape of the virtual building. For example, since the foundation shape of a pavilion is block-shaped, the shape blueprint of the pavilion can be determined to be a planar figure, such as a polygon. For example, since the foundation shape of a corridor is generally strip-shaped, the shape blueprint of the corridor can be determined to include at least one line.

[0101] In some embodiments, the step of generating a shape blueprint of a virtual building according to the building shape parameters includes:

[0102] According to the basic shape of the virtual building indicated by the building shape parameters, the type of the shape blueprint of the virtual building is determined, and the type of the shape blueprint is a line blueprint or a surface blueprint; according to the type of the shape blueprint and the size and structure indicated by the building shape parameters, the shape blueprint of the virtual building is generated.

[0103] The size and structure indicated by the building shape parameters refer to the size and structural characteristics of the basic shape of the virtual building.

[0104] In some embodiments, a shape blueprint of a virtual building can be generated based on the size of the virtual building foundation and the structure of the virtual building. The size of the virtual building foundation refers to specific size parameters such as the length and width of the foundation shape. The structure of the virtual building may include the number of floors of the virtual building. By determining the size of the virtual building foundation and the number of floors of the virtual building, the shape blueprint of the virtual building can be determined. For example, please refer to Figure 13 Subgraph (b) of may be a shape blueprint of a two-story tower. The number of polygons in the figure is 2, which represents that the tower has two floors. The polygons at the bottom represent the basic shape of the foundation of the first floor of the tower, and the polygons at the top represent the basic shape of the foundation of the second floor of the tower.

[0105] Line blueprints are shape blueprints that use line elements as basic graphic elements. Figure 13 , where sub-graph (a) is a schematic diagram of a line blueprint. A line blueprint includes at least one line. A surface blueprint refers to a shape blueprint that uses a plane graphic element as a basic graphic element. Figure 13 As shown in the sub-graph (b) of FIG. The face blueprint includes at least one polygon.

[0106] Step 1230: Generate at least one material constituting the virtual building according to the building type parameters.

[0107] In some embodiments, based on the type of the virtual building indicated by the building type parameter, at least one material matching the type of the virtual building is obtained from the material library; based on the building type parameter, the attributes of the at least one material matching the type of the virtual building are set to generate at least one material constituting the virtual building.

[0108] A resource library is a collection of resources that includes various types of architectural resources. The resource library may be created and maintained by designers, architects, or other professionals. Setting the properties of at least one resource may be for the resource's style, color, texture, or other adjustable properties.

[0109] The above method retrieves at least one asset that matches the virtual building type from the asset library based on the building type parameters. Then, based on the specific requirements of the selected building type, the specific attributes (such as color) of these assets are precisely set. This facilitates the customization and personalization of virtual buildings.

[0110] In some embodiments, the color attribute of at least one material matching the type of the virtual building is set according to the color parameter indicated by the building type parameter to generate at least one material constituting the virtual building.

[0111] Setting color parameters can include adjusting the primary hue, color saturation, brightness, and other aspects of the material. Depending on your needs, you can modify the material's color properties to match the style and atmosphere of the virtual building. By precisely setting the material's color properties, you can achieve a unique design for your virtual building.

[0112] In some embodiments, based on the collision parameters indicated by the building type parameter, collision properties are set for at least one asset that matches the type of the virtual building, generating at least one asset that constitutes the virtual building. By setting the collision properties of the assets, this method can enhance the physical realism of the virtual building, thereby improving the user experience and satisfaction.

[0113] Step 1240: Place at least one material constituting the virtual building into a corresponding position in the shape blueprint to generate the virtual building.

[0114] In some embodiments, based on the structure of the shape blueprint, the shape blueprint is divided into N sub-graphs, each sub-graph is a part of the shape blueprint, and N is a positive integer; from at least one material constituting the virtual building, the materials corresponding to the N sub-graphs are determined to obtain N material groups, each material group including one or more materials; the N material groups are respectively placed at corresponding positions of the N sub-graphs to generate a virtual building.

[0115] A shape blueprint can be composed of different geometric shapes. The combination of these geometric shape elements establishes the structure of the shape blueprint. Based on the structure of the shape blueprint, it can be divided into multiple subgraphs, so that each subgraph represents a specific part of the shape blueprint. For example, please refer to Figure 14 , which shows a schematic diagram of dividing a line blueprint into subgraphs provided by an embodiment of the present application. Subgraph (a) is a schematic diagram of dividing subgraphs, subgraph (b) is a schematic diagram of a virtual building, and subgraph (c) is a schematic diagram of grouping materials. Figure 13 The subgraph (a) shown in the figure is used to divide the line blueprint into subgraphs. Figure 14 As shown in subgraph (a), the line blueprint can be divided into seven subgraphs, namely subgraph 1401, subgraph 1402, subgraph 1403, subgraph 1404, subgraph 1405, subgraph 1406, and subgraph 1407. Seven material groups corresponding to the seven subgraphs are determined, and then the seven material groups are placed in the corresponding positions of the seven subgraphs. The above method divides the shape blueprint into N subgraphs according to its structure, determines the corresponding material group for each subgraph, and finally places the material group in the corresponding subgraph position. This method can quickly generate virtual buildings and improves the efficiency of virtual building generation.

[0116] In some embodiments, the type of the shape blueprint is a linear blueprint, which includes multiple vertices and edges connected to the vertices; according to the degree of each vertex in the shape blueprint, the shape blueprint is divided into N subgraphs; wherein the type of each subgraph is any one of the following: endpoint subgraph, intersection subgraph, and line segment subgraph, the endpoint subgraph is composed of line segments containing vertices with a degree of 1, the intersection subgraph is composed of line segments containing vertices with a degree greater than or equal to 2, and the line segment subgraph refers to the line segments in the shape blueprint except for the endpoint subgraph and the intersection subgraph.

[0117] In a shape blueprint, when a vertex is connected to only one edge, that edge can be considered an endpoint subgraph. An endpoint subgraph represents the ends or edges of a building. In a shape blueprint, when a vertex is connected to two or more edges, those edges form an intersection subgraph. An intersection subgraph represents the interior or corner junctions of a building. A segment subgraph contains all line segments in a shape blueprint, excluding endpoint and intersection subgraphs.

[0118] like Figure 14 As shown, in subgraph (a), vertices with a vertex degree of 1 are established as endpoints, and a line segment connected to the endpoint is divided into an endpoint subgraph, as shown in endpoint subgraph 1401. Vertices with a vertex degree greater than or equal to 2 are established as intersections, and line segments connected to the intersections are divided into intersection subgraphs, as shown in intersection subgraph 1402. A line segment in the line blueprint that does not belong to the endpoint subgraph or the intersection subgraph is established as a line segment subgraph, as shown in line segment subgraph 1403. According to the above method, Figure 14 The subgraph (a) is divided into 7 subgraphs.

[0119] In some embodiments, the endpoint subgraph may include multiple line segments, the intersection subgraph may also include multiple line segments, and the line segment subgraph may also include multiple line segments. Figure 14 In the example, subgraph 1401 and subgraph 1407 can be re-established as an endpoint subgraph, subgraph 1403, subgraph 1406 and subgraph 1404 can be re-established as an intersection subgraph, and subgraph 1402 and subgraph 1405 can be re-established as a line segment subgraph. Figure 14 As shown in subgraph (c) in the figure, the materials can be divided into three groups (material group 1410, material group 1409, and material group 1408). The three material groups are then placed at corresponding positions of the endpoint subgraph, intersection subgraph, and line segment subgraph, respectively. For example, material group 1408 corresponds to the materials at the endpoint subgraphs (subgraph 1401 and subgraph 1407), material group 1409 corresponds to the materials at the intersection subgraphs (subgraph 1402 and subgraph 1405), and material group 1410 corresponds to the materials at the line segment subgraphs (subgraphs 1403, 1404, and 1406). The material groups are placed at corresponding positions of the subgraphs to generate the virtual building shown in subgraph (b).

[0120] The above method divides the line blueprint into endpoint subgraphs, intersection subgraphs and line segment subgraphs. Figure 3 This type of segmentation can better describe and analyze the structural characteristics of line segments. It then groups the assets based on the segmentation results and places the asset groups in corresponding sub-graph locations to generate virtual buildings. This method can quickly generate virtual buildings and improves their efficiency.

[0121] In some embodiments, the type of the shape blueprint is a face blueprint, which includes at least one polygon; for each polygon in the shape blueprint, the polygon is divided into multiple subgraphs; wherein the type of each subgraph is any one of the following: a vertex subgraph, a center point subgraph, and an edge subgraph, the vertex subgraph is composed of at least one vertex of the polygon, the center point subgraph is composed of the center point of the polygon, and the edge subgraph is composed of at least one edge of the polygon.

[0122] In a shape blueprint, each polygon has multiple vertices. One or more vertices can be considered a vertex subgraph. In a shape blueprint, each polygon has a center point. This center point can be considered a center point subgraph, which represents the center of the polygon. In a shape blueprint, each polygon has multiple edges. One or more edges can be considered an edge subgraph, which represents the boundary segments of the polygon.

[0123] Please refer to Figure 15 , which shows a schematic diagram of dividing a face blueprint into subgraphs provided by an embodiment of the present application. Among them, subgraph (a) is a schematic diagram of dividing subgraphs, subgraph (b) is a schematic diagram of a virtual building, and subgraph (c) is a schematic diagram of grouping materials. For each polygon, the vertices of the polygon in subgraph (a) are divided into vertex subgraphs, as shown in vertex subgraph 1501. The center points of the polygons are divided into center point subgraphs, as shown in center point subgraph 1502. The edges of the polygons are divided into edge subgraphs, as shown in edge subgraph 1503. According to subgraphs (a) and (c), the materials are grouped. Since subgraph (a) contains 2 polygons, the materials are divided into 2 large groups, where material group 1504 corresponds to the polygons below subgraph (a), and material group 1505 corresponds to the polygons above subgraph (a). For each material group, since each polygon is divided into three sub-graphs, material group 1504 and material group 1505 are divided into three groups respectively, and the material groups are placed at the corresponding sub-graph positions of the polygons respectively, so as to generate the virtual building shown in sub-graph (b).

[0124] The above method divides each polygon in the face blueprint into vertex subgraph, center point subgraph and edge subgraph. Figure 3This method can quickly generate virtual buildings and improve the efficiency of virtual building generation.

[0125] In some embodiments, a random seed can also be used to obtain building shape parameters and building type parameters set for the virtual building to be generated. The steps are as follows: obtain a random seed set for the virtual building to be generated, the random seed includes multiple numerical values, and the value of each numerical value affects one parameter in the building shape parameter or the building type parameter; determine the building shape parameter and the building type parameter based on the values of the multiple numerical values included in the random seed.

[0126] The steps of determining building shape parameters and building type parameters based on the values of multiple numerical values included in the random seed may include: Step 1, parsing the random seed. The obtained random seed is parsed to extract the numerical values. Step 2, numerical mapping. Each numerical value of the random seed corresponds to a parameter. Exemplarily, the numerical value of the random seed may include six numerical values, each of which corresponds to one of the aforementioned basic shape setting parameters, side length setting parameters, number of floors setting parameters, type parameters, color parameters, and collision parameters. Exemplarily, the first numerical value of the random seed may be used to indicate the basic shape setting parameters, and the second numerical value of the random seed may be used to indicate the color parameter. Step 3, determining parameter values. Based on the mapped numerical values, the specific values of the building shape parameters and building type parameters are determined. Exemplarily, the virtual building material may have 10 color schemes, represented by numerical values 0 to 9, with each numerical value corresponding to a color scheme. Assuming the random seed value is 0, the color parameters of the virtual building are determined to be the color scheme corresponding to the value 0.

[0127] The above method, by parsing the random seed and using numerical mapping rules, can determine the specific values of the building shape parameters and building type parameters. This method can generate different virtual buildings based on different random seed values, increasing the diversity and randomness of the buildings.

[0128] In some embodiments, the technical solution provided by the present application can generate virtual buildings of multiple different styles based on multiple sets of different style configuration information, wherein each set of style configuration information is used to define a style.

[0129] To generate virtual buildings in a variety of styles, multiple sets of style configuration information can be prepared. Each set of style configuration information can represent a unique style, such as modern, classical, or industrial. Each set of style configuration information contains parameter settings specific to that style, thereby establishing the stylistic characteristics of the building. During the virtual building generation process, one set of style configuration information can be used as input, and a virtual building of the corresponding style can be generated based on this set of style configuration information. By setting the parameters in the style configuration information, the building's appearance, style, and details can be adjusted. In this way, a different set of style configuration information can be selected each time a virtual building is generated, thereby generating a virtual building of a different style.

[0130] By generating virtual buildings based on multiple sets of different style configurations, this method provides greater choice and flexibility. Users can select different styles based on their needs and preferences, generating virtual buildings that meet their requirements and preferences. This method also increases the diversity of virtual buildings, allowing the generated buildings to have different stylistic characteristics to suit different scenarios and applications.

[0131] In some embodiments, in order to better manage virtual buildings, model information of the virtual buildings can be saved in historical records. The model information includes at least one of the following: model name, generation time, last use time, building detail parameters, and building detail parameters include building shape parameters and building type parameters.

[0132] The above method can facilitate users or systems to perform operations such as virtual building management, search, screening and use based on the model information of the virtual building, so as to meet the needs of users and improve the traceability and manageability of the building model.

[0133] The technical solution provided by the embodiment of the present application enables users to set the architectural shape parameters and architectural type parameters of a virtual building in the building generation interface. By parsing the above two parameters, a shape blueprint of the virtual building can be obtained and the materials that make up the virtual building can be determined. By placing the materials at the corresponding positions of the shape blueprint, a virtual building can be quickly generated. On the one hand, based on the setting of the above parameters, users can independently design the shape and type of the virtual building. On the other hand, by parsing the above parameters, virtual buildings can be quickly generated, solving the problem of low construction efficiency caused by gradually building virtual buildings from scratch. The above method achieves the technical effect of efficiently generating virtual buildings on the basis of reflecting the user's architectural conception.

[0134] Please refer to Figure 16 , which shows a flowchart of generating a virtual building provided by an embodiment of the present application.

[0135] First, players set the building shape and type parameters in the client's building generation interface, triggering the command to generate the virtual building. This method provides a user-friendly interactive method, allowing users to independently design the shape and type of the virtual building using the building shape and type parameters in the client interface. This allows users to more intuitively participate in the architectural conception and decision-making process, increasing their sense of participation and satisfaction.

[0136] The system then analyzes the set building shape parameters to generate a shape blueprint; it then analyzes the building type parameters to generate the materials that compose the virtual building. Finally, the shape blueprint is divided into subgraphs and the materials are grouped. The virtual building is generated by programmatically placing the corresponding materials along the shape blueprint. This method, leveraging AI technology, significantly saves time and reduces user workload compared to completely manual construction, making the building process more efficient.

[0137] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0138] Please refer to Figure 17 , which shows a block diagram of a virtual building generation device provided by one embodiment of the present application. This device has the functionality to implement the aforementioned virtual building generation method. This functionality can be implemented by hardware or by hardware executing corresponding software. This device can be a computer device or can be provided within a computer device. This device 1700 may include: an acquisition module 1710, a first generation module 1720, a second generation module 1730, and a placement module 1740.

[0139] The acquisition module 1710 is used to acquire building shape parameters and building type parameters set for the virtual building to be generated. The building shape parameters are used to determine the basic shape of the virtual building, and the building type parameters are used to determine the materials that constitute the virtual building.

[0140] A first generating module 1720 is configured to generate a shape blueprint of the virtual building according to the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building using at least one basic graphic element, and the basic graphic element includes at least one of the following: a line and a plane figure;

[0141] A second generating module 1730 is configured to generate at least one material constituting the virtual building according to the building type parameter;

[0142] The placement module 1740 is configured to place at least one material constituting the virtual building at a corresponding position in the shape blueprint to generate the virtual building.

[0143] In some embodiments, the first generation module 1710 is used to determine the type of the shape blueprint of the virtual building based on the basic shape of the virtual building indicated by the building shape parameters, and the type of the shape blueprint is a line blueprint or a surface blueprint; and generate the shape blueprint of the virtual building based on the type of the shape blueprint and the size and structure indicated by the building shape parameters.

[0144] In some embodiments, the second generation module 1720 includes: an acquisition unit and a setting unit ( Figure 17 not shown).

[0145] The acquiring unit is configured to acquire, according to the type of the virtual building indicated by the building type parameter, at least one material matching the type of the virtual building from a material library.

[0146] The setting unit is configured to set the attributes of at least one material matching the type of the virtual building according to the building type parameter, and generate at least one material constituting the virtual building.

[0147] In some embodiments, the setting unit is used to set the color attributes of at least one material that matches the type of the virtual building according to the color parameters indicated by the building type parameters, and generate at least one material that constitutes the virtual building; and set the collision attributes of at least one material that matches the type of the virtual building according to the collision parameters indicated by the building type parameters, and generate at least one material that constitutes the virtual building.

[0148] In some embodiments, the placement module 1740 includes: a division unit, a determination unit, and a generation unit ( Figure 17 not shown).

[0149] A division unit is used to divide the shape blueprint into N subgraphs according to the structure of the shape blueprint, each subgraph is a part of the shape blueprint, and N is a positive integer.

[0150] The determining unit is configured to determine the materials corresponding to the N sub-images from at least one material constituting the virtual building, and obtain N material groups, each material group including one or more materials.

[0151] A generating unit is configured to place the N material groups at corresponding positions of the N sub-images respectively to generate the virtual building.

[0152] In some embodiments, the shape blueprint is a linear blueprint comprising a plurality of vertices and edges connected to the vertices; the division unit is configured to divide the shape blueprint into N subgraphs according to the degrees of the vertices in the shape blueprint; wherein the type of each subgraph is any one of the following: an endpoint subgraph, an intersection subgraph, and a line segment subgraph, the endpoint subgraph being composed of line segments containing vertices with a degree of 1, the intersection subgraph being composed of line segments containing vertices with a degree greater than or equal to 2, and the line segment subgraph being composed of line segments other than the endpoint subgraph and the intersection subgraph.

[0153] In some embodiments, the shape blueprint is a face blueprint, which includes at least one polygon; the division unit is used to divide each polygon in the shape blueprint into multiple subgraphs; wherein the type of each subgraph is any one of the following: a vertex subgraph, a center point subgraph, and an edge subgraph, the vertex subgraph is composed of at least one vertex of the polygon, the center point subgraph is composed of the center point of the polygon, and the edge subgraph is composed of at least one edge of the polygon.

[0154] In some embodiments, the acquisition module 1710 is used to obtain a random seed set for the virtual building to be generated, wherein the random seed includes multiple numerical values, and the value of each numerical value affects one of the building shape parameters or the building type parameters; the building shape parameters and the building type parameters are determined based on the values of the multiple numerical values included in the random seed.

[0155] In some embodiments, the apparatus 1700 further includes: a third generating module ( Figure 17 not shown).

[0156] The third generating module is used to generate the virtual buildings in multiple different styles based on multiple groups of different style configuration information, wherein each group of the style configuration information is used to define a style.

[0157] In some embodiments, the apparatus 1700 further includes: a storage module ( Figure 17 not shown).

[0158] A saving module is used to save the model information of the virtual building in the historical record, wherein the model information includes at least one of the following: model name, generation time, last use time, and building detail parameters, wherein the building detail parameters include the building shape parameters and the building type parameters.

[0159] The technical solution provided by the embodiment of the present application enables users to set the architectural shape parameters and architectural type parameters of a virtual building in the building generation interface. By parsing the above two parameters, a shape blueprint of the virtual building can be obtained and the materials that make up the virtual building can be determined. By placing the materials at the corresponding positions of the shape blueprint, a virtual building can be quickly generated. On the one hand, based on the setting of the above parameters, users can independently design the shape and type of the virtual building. On the other hand, by parsing the above parameters, virtual buildings can be quickly generated, solving the problem of low construction efficiency caused by gradually building virtual buildings from scratch. The above method achieves the technical effect of efficiently generating virtual buildings on the basis of reflecting the user's architectural conception.

[0160] Please refer to Figure 18 , which shows a block diagram of a virtual building generation device provided by another embodiment of the present application. This device has the functionality to implement the aforementioned virtual building generation method. This functionality can be implemented by hardware or by hardware executing corresponding software. This device can be a terminal device or be incorporated into a terminal device. This device 1800 may include: a first display module 1810, a second display module 1820, a third display module 1830, and a fourth display module 1840.

[0161] A first display module 1810 is configured to display a building generation interface, which is a user interface for customizing and generating a virtual building. The building generation interface includes building shape setting items and building type setting items.

[0162] A second display module 1820 is configured to display set building type parameters in the building generation interface in response to an operation on the building type setting item, wherein the building type parameters are used to determine the materials constituting the virtual building;

[0163] A third display module 1830 is configured to display set building shape parameters in the building generation interface in response to an operation on the building shape setting item, wherein the building shape parameters are used to determine a basic shape of the virtual building;

[0164] The fourth display module 1840 is configured to display the virtual building generated based on the building shape parameters and the building type parameters in response to a preview operation on the virtual building.

[0165] In some embodiments, the building type setting item includes a building type selection item, and the building type selection item is used to select the type of the virtual building; the second display module 1820 includes: a first display unit and a second display unit ( Figure 18 not shown).

[0166] The first display unit is configured to display at least one candidate building type option in response to an operation on the building type selection item, wherein each building type option corresponds to a type of virtual building, and different types of virtual buildings are composed of different materials.

[0167] a second display unit, for displaying set type parameters in the building generation interface in response to an operation on a first building type option among the at least one candidate building type options, wherein the building type parameters include the type parameters, and the type parameters are used to indicate the type of the virtual building corresponding to the first building type option.

[0168] In some embodiments, the building type setting item also includes a color attribute setting item, and the color attribute setting item is used to set the color attributes of the materials constituting the virtual building; the second display module 1820 is also used to: in response to the operation on the color attribute setting item, display at least one candidate color scheme option, each color scheme option corresponds to a color scheme, and the color scheme is used to set the color attributes of the materials constituting the virtual building; in response to the operation on the first color scheme option among the at least one candidate color scheme option, display the set color parameters in the building generation interface, the building type parameters include the color parameters, and the color parameters are used to indicate the color scheme corresponding to the first color scheme option.

[0169] In some embodiments, the building type setting item also includes a collision attribute setting item, and the collision attribute setting item is used to set the collision attributes of the materials constituting the virtual building; the second display module 1820 is also used to: in response to the operation of the collision attribute setting item, display the set collision parameters in the building generation interface, the building type parameters include the collision parameters, and the collision parameters are used to indicate the collision attributes of the materials constituting the virtual building.

[0170] In some embodiments, the third display module 1830 is used to display at least one foundation shape option corresponding to the set type of the virtual building in the building generation interface, and each foundation shape option corresponds to a foundation shape; in response to an operation on a first foundation shape option among the at least one foundation shape option, a first foundation shape is displayed in the building generation interface, and the first foundation shape is the foundation shape corresponding to the first foundation shape option; in response to an adjustment operation on the first foundation shape, the adjusted first foundation shape is displayed in the building generation interface, and the adjustment operation is used to adjust the size of the first foundation shape; wherein the building shape parameters include at least one of the following: basic shape setting parameters, side length setting parameters and number of floors setting parameters; the basic shape setting parameters are used to determine the basic shape of the virtual building determined by the first foundation shape, the side length setting parameters are used to determine the size of the basic shape determined by the size of the first foundation shape, and the number of floors setting parameters are used to determine the number of floors of the virtual building.

[0171] In some embodiments, based on the building shape parameters and the building type parameters, a first batch of virtual buildings is generated, wherein the first batch of virtual buildings includes virtual buildings of multiple different styles; the apparatus 1800 further includes: a fifth display module ( Figure 18 not shown).

[0172] a fifth display module, configured to display, in response to a style switching operation on the virtual building, the virtual building of another style included in the first batch of virtual buildings; or, in response to a batch switching operation on the virtual building, display the virtual building of at least one style included in the second batch of virtual buildings, the second batch of virtual buildings being a batch of virtual buildings regenerated based on the building shape parameters and the building type parameters; or, in response to a confirmation generation operation on the virtual building, display the generated virtual building in a virtual scene.

[0173] In some embodiments, the device further includes: a sixth display module and a seventh display module ( Figure 18 not shown).

[0174] The sixth display module is used to display a history record interface, wherein the history record interface includes model information of at least one historically generated virtual building, and the model information includes at least one of the following: model name, generation time, and last use time.

[0175] A seventh display module is configured to, in response to a viewing operation on a first virtual building among the at least one historically generated virtual buildings, display building detail parameters of the first virtual building, the building detail parameters including the building shape parameters and the building type parameters; or, in response to a preview operation on a first virtual building among the at least one historically generated virtual buildings, display the first virtual building; or, in response to an editing operation on the first virtual building among the at least one historically generated virtual buildings, display a building generation interface corresponding to the first virtual building; or, in response to a deletion operation on the first virtual building among the at least one historically generated virtual buildings, delete the model information of the first virtual building from the historical record interface; or, in response to a confirmation generation operation on the first virtual building among the at least one historically generated virtual buildings, display the generated first virtual building in a virtual scene.

[0176] The technical solution provided by the embodiment of the present application enables users to set the architectural shape parameters and architectural type parameters of a virtual building in the building generation interface. By parsing the above two parameters, a shape blueprint of the virtual building can be obtained and the materials that make up the virtual building can be determined. By placing the materials at the corresponding positions of the shape blueprint, a virtual building can be quickly generated. On the one hand, based on the setting of the above parameters, users can independently design the shape and type of the virtual building. On the other hand, by parsing the above parameters, virtual buildings can be quickly generated, solving the problem of low construction efficiency caused by gradually building virtual buildings from scratch. The above method achieves the technical effect of efficiently generating virtual buildings on the basis of reflecting the user's architectural conception.

[0177] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0178] Please refer to Figure 19 , which shows a structural block diagram of a computer device 1900 provided in one embodiment of the present application.

[0179] Typically, the computer device 1900 includes a processor 1910 and a memory 1920 .

[0180] The processor 1910 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1910 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1910 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1910 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1910 may also include an AI processor for processing computing operations related to machine learning.

[0181] Memory 1920 may include one or more computer-readable storage media, which may be non-transitory. Memory 1920 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices or flash memory storage devices. In some embodiments, the non-transitory computer-readable storage media in memory 1920 is used to store a computer program, which is configured to be executed by one or more processors to implement the above-described method for generating a virtual building.

[0182] Those skilled in the art will understand that Figure 19 The structure shown in the figure does not constitute a limitation on the computer device 1900, and the computer device 1900 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.

[0183] In some embodiments, a computer-readable storage medium is further provided, wherein a computer program is stored in the storage medium. The computer program is loaded and executed by a processor to implement the above-mentioned method for generating a virtual building.

[0184] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or an optical disk, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0185] In some embodiments, a computer program product is also provided, which includes a computer program stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned method for generating a virtual building.

[0186] It should be noted that the collection and processing of relevant data in this application should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0187] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application do not limit this.

[0188] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for generating a virtual building, characterized in that: The method comprises: Acquiring building shape parameters and building type parameters set for a virtual building to be generated, wherein the building shape parameters are used to determine a basic shape of the virtual building, and the building type parameters are used to determine materials constituting the virtual building; Generate a shape blueprint of the virtual building according to the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building through at least one basic graphic element, and the basic graphic element includes at least one of the following: a line, a plane figure; generating at least one material constituting the virtual building according to the building type parameter; At least one material constituting the virtual building is placed at a corresponding position in the shape blueprint to generate the virtual building.

2. The method according to claim 1, characterized in that Generating a shape blueprint of the virtual building according to the building shape parameters includes: Determining a type of a shape blueprint of the virtual building according to a basic shape of the virtual building indicated by the building shape parameters, wherein the type of the shape blueprint is a line blueprint or a surface blueprint; A shape blueprint of the virtual building is generated according to the type of the shape blueprint and the size and structure indicated by the building shape parameters.

3. The method according to claim 1, characterized in that Generating at least one material constituting the virtual building according to the building type parameter includes: According to the type of the virtual building indicated by the building type parameter, acquiring at least one material matching the type of the virtual building from a material library; According to the building type parameters, the attributes of at least one material matching the type of the virtual building are set to generate at least one material constituting the virtual building.

4. The method according to claim 3, characterized in that The step of setting the attributes of at least one material matching the type of the virtual building according to the building type parameter to generate at least one material constituting the virtual building includes at least one of the following: Setting the color attribute of at least one material matching the type of the virtual building according to the color parameter indicated by the building type parameter to generate at least one material constituting the virtual building; According to the collision parameter indicated by the building type parameter, the collision attribute of at least one material matching the type of the virtual building is set to generate at least one material constituting the virtual building.

5. The method according to claim 1, wherein Placing at least one material constituting the virtual building at a corresponding position in the shape blueprint to generate the virtual building includes: According to the structure of the shape blueprint, the shape blueprint is divided into N subgraphs, each subgraph is a part of the shape blueprint, and N is a positive integer; Determining the materials corresponding to the N sub-images respectively from at least one material constituting the virtual building to obtain N material groups, each material group including one or more materials; The N material groups are placed at corresponding positions of the N sub-images respectively to generate the virtual building.

6. The method according to claim 5, characterized in that The shape blueprint is a line blueprint, which includes a plurality of vertices and edges connected to the vertices; The shape blueprint is divided into N subgraphs according to the structure of the shape blueprint, including: Divide the shape blueprint into N subgraphs according to the degree of each vertex in the shape blueprint; Among them, the type of each subgraph is any one of the following: endpoint subgraph, intersection subgraph, and line segment subgraph, the endpoint subgraph is composed of line segments containing vertices with degree 1, the intersection subgraph is composed of line segments containing vertices with degree greater than or equal to 2, and the line segment subgraph is composed of line segments other than the endpoint subgraph and the intersection subgraph.

7. The method according to claim 5, characterized in that The shape blueprint is a face blueprint, and the face blueprint includes at least one polygon; The shape blueprint is divided into N subgraphs according to the structure of the shape blueprint, including: For each polygon in the shape blueprint, dividing the polygon into a plurality of subgraphs; Among them, the type of each subgraph is any one of the following: vertex subgraph, center point subgraph, edge subgraph, the vertex subgraph is composed of at least one vertex of the polygon, the center point subgraph is composed of the center point of the polygon, and the edge subgraph is composed of at least one edge of the polygon.

8. The method according to any one of claims 1 to 7, characterized in that The step of obtaining building shape parameters and building type parameters set for the virtual building to be generated includes: Obtaining a random seed set for the virtual building to be generated, the random seed including a plurality of numerical values, each of which affects one of the building shape parameters or the building type parameters; The building shape parameter and the building type parameter are determined according to the values of the multiple numerical values included in the random seed.

9. A method for generating a virtual building, characterized in that: The method comprises: Displaying a building generation interface, wherein the building generation interface is a user interface for customizing and generating a virtual building, and the building generation interface includes building shape setting items and building type setting items; In response to an operation on the building type setting item, displaying the set building type parameters in the building generation interface, the building type parameters being used to determine the materials constituting the virtual building; In response to an operation on the building shape setting item, displaying set building shape parameters in the building generation interface, the building shape parameters being used to determine a basic shape of the virtual building; In response to a preview operation on the virtual building, the virtual building generated based on the building shape parameters and the building type parameters is displayed.

10. The method according to claim 9, characterized in that The building type setting item includes a building type selection item, and the building type selection item is used to select the type of the virtual building; In response to the operation on the building type setting item, the set building type parameters are displayed in the building generation interface, including: In response to an operation on the building type selection item, at least one candidate building type option is displayed, each building type option corresponds to a type of virtual building, and different types of virtual buildings are composed of different materials; In response to an operation on a first building type option among the at least one candidate building type option, set type parameters are displayed in the building generation interface, wherein the building type parameters include the type parameters, and the type parameters are used to indicate the type of the virtual building corresponding to the first building type option.

11. The method according to claim 10, characterized in that The building type setting item further includes a color attribute setting item, and the color attribute setting item is used to set the color attribute of the material constituting the virtual building; the method further includes: In response to an operation on the color attribute setting item, displaying at least one candidate color scheme option, each color scheme option corresponding to a color scheme, the color scheme being used to set the color attribute of the material constituting the virtual building; In response to an operation on a first color scheme option among the at least one candidate color scheme options, set color parameters are displayed in the building generation interface, the building type parameters include the color parameters, and the color parameters are used to indicate the color scheme corresponding to the first color scheme option.

12. The method according to claim 10, characterized in that The building type setting item further includes a collision attribute setting item, and the collision attribute setting item is used to set the collision attribute of the material constituting the virtual building; the method further includes: In response to the operation on the collision property setting item, the set collision parameters are displayed in the building generation interface, the building type parameters include the collision parameters, and the collision parameters are used to indicate the collision properties of the materials constituting the virtual building.

13. The method according to claim 9, characterized in that In response to the operation on the building shape setting item, displaying the set building shape parameters in the building generation interface includes: In the building generation interface, at least one foundation shape option corresponding to the set type of the virtual building is displayed, and each foundation shape option corresponds to a foundation shape; In response to an operation on a first foundation shape option among the at least one foundation shape option, displaying a first foundation shape in the building generation interface, where the first foundation shape is the foundation shape corresponding to the first foundation shape option; In response to an adjustment operation on the first foundation shape, displaying the adjusted first foundation shape in the building generation interface, wherein the adjustment operation is used to adjust the size of the first foundation shape; Among them, the building shape parameters include at least one of the following: basic shape setting parameters, side length setting parameters and number of floors setting parameters; the basic shape setting parameters are used to determine the basic shape of the virtual building determined by the first foundation shape, the side length setting parameters are used to determine the size of the basic shape determined by the size of the first foundation shape, and the number of floors setting parameters are used to determine the number of floors of the virtual building.

14. The method according to claim 9, characterized in that Generating a first batch of virtual buildings based on the building shape parameters and the building type parameters, wherein the first batch of virtual buildings includes virtual buildings of multiple different styles; the method further includes: In response to a style switching operation on the virtual building, displaying the virtual building of another style included in the first batch of virtual buildings; or, In response to a batch switching operation for the virtual buildings, displaying the virtual buildings of at least one style included in a second batch of virtual buildings, wherein the second batch of virtual buildings is a batch of virtual buildings regenerated based on the building shape parameters and the building type parameters; or, In response to the confirmation generation operation for the virtual building, the generated virtual building is displayed in a virtual scene.

15. The method according to claim 9, characterized in that The method further comprises: Displaying a history record interface, wherein the history record interface includes model information of at least one historically generated virtual building, wherein the model information includes at least one of the following: model name, generation time, and last use time; In response to a viewing operation on a first virtual building in the at least one historically generated virtual building, displaying building detail parameters of the first virtual building, the building detail parameters including the building shape parameters and the building type parameters; or In response to a preview operation on a first virtual building among the at least one historically generated virtual building, displaying the first virtual building; or, In response to an editing operation on a first virtual building in the at least one historically generated virtual building, displaying a building generation interface corresponding to the first virtual building; or, In response to a deletion operation on a first virtual building in the at least one historically generated virtual building, deleting the model information of the first virtual building in the historical record interface; or In response to a confirmation generation operation for a first virtual building among the at least one historically generated virtual building, the generated first virtual building is displayed in a virtual scene.

16. A device for generating a virtual building, characterized in that: The device comprises: an acquisition module, configured to acquire building shape parameters and building type parameters set for a virtual building to be generated, wherein the building shape parameters are used to determine a basic shape of the virtual building, and the building type parameters are used to determine materials constituting the virtual building; A first generating module is configured to generate a shape blueprint of the virtual building according to the building shape parameters, wherein the shape blueprint is used to construct a basic shape of the virtual building through at least one basic graphic element, and the basic graphic element includes at least one of the following: a line and a plane figure; A second generating module is used to generate at least one material constituting the virtual building according to the building type parameter; The placement module is used to place at least one material constituting the virtual building at a corresponding position in the shape blueprint to generate the virtual building.

17. A device for generating a virtual building, characterized in that: The device comprises: A first display module is configured to display a building generation interface, wherein the building generation interface is a user interface for customizing and generating a virtual building, and the building generation interface includes building shape setting items and building type setting items; a second display module, configured to display set building type parameters in the building generation interface in response to an operation on the building type setting item, wherein the building type parameters are used to determine materials constituting the virtual building; a third display module, configured to display set building shape parameters in the building generation interface in response to an operation on the building shape setting item, wherein the building shape parameters are used to determine a basic shape of the virtual building; A fourth display module is configured to display the virtual building generated based on the building shape parameters and the building type parameters in response to a preview operation on the virtual building.

18. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method according to any one of claims 1 to 8 or any one of claims 9 to 15.

19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 8, or the method according to any one of claims 9 to 15.

20. A computer program product, characterized in that The computer program product includes a computer program, which is stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the method according to any one of claims 1 to 8 or any one of claims 9 to 15.

Citation Information

Cited By

  • Virtual building framework generation method and system

    CN122289542A