A method, device, equipment, medium and program for generating a virtual building model
By obtaining the building structure parameters to generate spatial geometry and perform structural division, and adding a virtual segmentation entity model, the problems of low adaptability and low accuracy in building model generation in the existing technology are solved, and efficient and diversified building model generation is achieved.
Patent Information
- Application Number
- CN202411548970.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The building model generation methods in the existing technology have low adaptability and low precision, and most of the programmatic generation methods can only generate the building's appearance without a refined building outline.
By obtaining the building structure parameters, including space outline parameters, structural control parameters and placement parameters of the virtual connected entity model, the spatial geometry is generated, and then divided according to the structural control parameters to generate multiple spatial areas. Virtual segmented entity models are added to these areas, and finally loaded onto the basic model according to the placement parameters of the connected entity model to form a virtual building model.
It improves the efficiency and accuracy of building model generation, realizes diversified building model generation, and expands the building model generation scenarios.
Smart Images

Figure CN119538364B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a method, device, equipment, medium and program for generating a virtual building model. Background Art
[0002] In the traditional game model production process, steps such as manual implementation of game models, mapping, and importing into the game are required.
[0003] There are existing methods for procedurally generating buildings, but these methods can only generate fixed buildings and are not adaptable to other types of buildings. Moreover, most procedural generation methods only generate the building's shape, without a detailed building outline.
[0004] Therefore, a building generation method with high adaptability and high precision is urgently needed. Summary of the Invention
[0005] In view of this, embodiments of the present application provide a method, apparatus, device, medium, and program for generating a virtual building model to solve problems such as low accuracy in generating a building model.
[0006] In a first aspect, an embodiment of the present application provides a method for generating a virtual building model, the method comprising:
[0007] Acquire at least one set of building structure parameters, wherein the building structure parameters include at least: space outline parameters, structure control parameters, and placement parameters of a virtual connected entity model;
[0008] Using the spatial contour parameters, generating a spatial geometric body;
[0009] Using the structural control parameters, the spatial geometric body is structurally divided to obtain a plurality of spatial regions;
[0010] generating a virtual segmentation entity model at a target position of a first spatial region among the plurality of spatial regions to obtain a basic model of each spatial region;
[0011] According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto a basic model of a second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters.
[0012] In a second aspect, an embodiment of the present application provides a device for generating a virtual building model, the device comprising:
[0013] An acquisition module is used to acquire at least one set of building structure parameters, the building structure parameters including at least: space outline parameters, structural control parameters, and placement parameters of a virtual connected entity model;
[0014] A generating module, configured to generate a spatial geometric body using the spatial contour parameters;
[0015] A division module, configured to perform structural division on the spatial geometric body using the structural control parameters to obtain a plurality of spatial regions;
[0016] A segmentation module, configured to generate a virtual segmentation entity model at a target position of a first spatial region among the plurality of spatial regions, to obtain a basic model of each spatial region;
[0017] The loading module is used to load the virtual connected entity model onto the basic model of the second spatial area among the multiple spatial areas according to the placement parameters of the virtual connected entity model, so as to obtain a virtual building model corresponding to the building structure parameters.
[0018] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual building model generation method as described in any one of the first aspects.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the virtual building model generation method as described in any one of the first aspects are executed.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program instruction, which, when executed by a processor, implements the steps of the virtual building model generation method as described in any one of the first aspects.
[0021] Compared with the prior art, this application has the following beneficial effects:
[0022] The present application provides a method, apparatus, device, medium, and program for generating a virtual building model. The method obtains at least one set of building structure parameters, which include at least: spatial outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; generates a spatial geometry using the spatial outline parameters; structurally divides the spatial geometry using the structural control parameters to obtain multiple spatial regions; generates a virtual segmented entity model at a target position in a first spatial region of the multiple spatial regions to obtain a base model for each spatial region; and loads the virtual connected entity model onto the base model of a second spatial region of the multiple spatial regions based on the placement parameters of the virtual connected entity model to obtain a virtual building model corresponding to the building structure parameters. Thus, by randomly setting the building structure parameters, the efficiency and accuracy of building model generation are improved, and models with different parameters are generated in a diversified manner, expanding the building model generation scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a method for generating a virtual building model provided in an embodiment of the present application;
[0025] Figure 2 A schematic flow chart of a method for structural division of a spatial geometric body is also provided for the embodiment of the present application;
[0026] Figure 3 A schematic diagram of spatial geometric body segmentation provided in an embodiment of the present application;
[0027] Figure 4 A flowchart of a space merging method is also provided for the embodiment of the present application;
[0028] Figure 5 A schematic flow chart of a wall setting method is also provided for the embodiment of the present application;
[0029] Figure 6 A flow chart of a door and window setting method is also provided for the embodiment of the present application;
[0030] Figure 7 A flowchart of a virtual scene generation method is also provided for the embodiment of the present application;
[0031] Figure 8A schematic diagram of a virtual building model generating device provided in an embodiment of the present application;
[0032] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0033] Icons: 801 - acquisition module, 802 - generation module, 803 - division module, 804 - segmentation module, 805 - loading module, 901 - processor, 902 - storage medium, 903 - bus. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.
[0035] In one embodiment of the present application, a virtual building model generation method can be run on a local terminal device or a server. When a virtual building model generation method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0036] In a possible implementation, an embodiment of the present invention provides a method for generating a virtual building model, providing a user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or a client device in the cloud interaction system mentioned above.
[0037] Before explaining the virtual building model generation method provided in the embodiment of the present application, some professional terms are first introduced.
[0038] A "model" in games is a complete representation of a virtual object, be it a character, a car, or a house. These models are made up of many small three-dimensional points, called "vertices." Vertices connect to form triangles, and these triangles combine to create the object's shape. The relationship between models and vertices is like a statue composed of many small parts.
[0039] Procedural Content Generation (PCG) refers to the indirect control of generated content through logic and parameters, bypassing direct control.
[0040] Houdini: A 3D software designed entirely based on a node model. Its structure and operation methods are very different from other 3D software.
[0041] UV (texture coordinates) are used in game development to identify the position of each vertex on a model's texture map. Imagine a texture map placed on the surface of a model. UV coordinates tell the program how to map the texture map onto the model, just like applying a sticker to the surface. UV coordinates are expressed in the form of (U, V), where U represents the horizontal position and V represents the vertical position.
[0042] Figure 1 This is a flow chart of a method for generating a virtual building model provided in an embodiment of the present application. Figure 1 As shown, the method includes:
[0043] S101. Obtain at least one set of building structure parameters.
[0044] At least one set of building structure parameters includes at least: space outline parameters, structure control parameters, and placement parameters of the virtual connected entity model.
[0045] By obtaining at least one set of randomly set building structure parameters, at least one virtual building model can be generated in a subsequent step, so that the building model is more diverse.
[0046] The spatial outline parameters control the overall size of the building.
[0047] Structural control parameters control the division of the building's internal structure into several parts.
[0048] The placement parameters of the virtual connected entity model are the position and number of windows and doors.
[0049] S102. Generate a spatial geometric body using spatial contour parameters.
[0050] Using the spatial contour parameters, a spatial geometry is generated through a box to obtain a geometry with a certain size.
[0051] For example, using spatial contour parameters, a box is used to generate spatial geometry, resulting in a geometric body of defined dimensions. For PCG buildings, spatial geometry consisting of points, lines, and surfaces is used to describe the building's basic structure. In Houdini, spatial contour parameters can be used to control these points, lines, and surfaces. This can be understood as using surfaces to represent walls, and points to represent doors, windows, and so on.
[0052] S103: Using structural control parameters, structurally divide the spatial geometric body to obtain multiple spatial regions.
[0053] According to the structural control parameters, it can be determined how many parts the spatial geometry is divided into and how the spatial geometry is structurally divided.
[0054] It should be noted that in actual buildings, some spatial areas are empty areas. For example, the second floor of a building has rooms and an empty platform.
[0055] In this example, an attribute, emptyspace, is defined, representing empty space. By setting emptyspace, empty space regions can be created. For example, when emptyspaces[] = {"1_4", "2_1"} is defined, the corresponding 1-layer 4 region and 2-layer 1 region will become empty regions.
[0056] S104 : Generate a virtual segmentation entity model at a target position of a first spatial region among the multiple spatial regions to obtain a basic model of each spatial region.
[0057] The target position of the first spatial area can be a wall position, a ceiling position, or a floor position of a building. The virtual segmentation entity model is a wall, a ceiling, or a floor.
[0058] For example, the first spatial region contains the walls, ceiling, and floor. These components form the foundational framework of the entire building model. This means that the resulting foundational model for each spatial region is already sized and includes the walls, ceiling, and floor.
[0059] S105 , loading the virtual connected entity model onto a base model of a second spatial area among the multiple spatial areas according to the placement parameters of the virtual connected entity model, to obtain a virtual building model corresponding to the building structure parameters.
[0060] The second spatial area is where the virtual connected entity model can be set. By loading the virtual connected entity model onto the base model of the second spatial area among the multiple spatial areas, the resulting virtual building model includes the content of the building structure parameters, making the entire virtual building model more three-dimensional.
[0061] Thus, by randomly setting the building structure parameters, the generation efficiency of the building model is improved, the generation accuracy of the building model is improved, and models with different parameters are generated in a diversified manner, which expands the building model generation scenarios.
[0062] In summary, in this embodiment, at least one set of building structural parameters is acquired, including at least: spatial outline parameters, structural control parameters, and placement parameters of a virtual connected entity model. A spatial geometric body is generated using the spatial outline parameters. The spatial geometric body is structurally divided using the structural control parameters to obtain multiple spatial regions. A virtual segmented entity model is generated at a target location in a first spatial region among the multiple spatial regions to obtain a base model for each spatial region. Based on the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of a second spatial region among the multiple spatial regions to obtain a virtual building model corresponding to the building structural parameters. Thus, by randomly setting the building structural parameters, the efficiency and accuracy of building model generation are improved, and models with different parameters can be generated in a diversified manner, expanding the building model generation scenarios.
[0063] In the above Figure 1 On the basis of the corresponding embodiments, the embodiments of the present application also provide a method for structural division of a spatial geometric body. Figure 2 A flowchart of a method for structural division of a spatial geometric body is also provided for the embodiment of the present application.
[0064] like Figure 2 As shown, the structural control parameters are the position parameters of the preset segmentation points. In S103, the structural control parameters are used to perform structural division on the spatial geometric body to obtain multiple spatial regions, including:
[0065] S201 : Based on position parameters of preset segmentation points, generate a plurality of segmentation surfaces passing through the preset segmentation points on a spatial geometric body.
[0066] In a three-dimensional model, if a split point is located, three split planes can be determined along the horizontal, vertical, and vertical directions of the split point. If multiple split points are located, multiple split planes can be determined along the horizontal, vertical, and vertical directions of the multiple split points.
[0067] S202. Structurally divide the spatial geometric body along multiple dividing surfaces to obtain multiple spatial regions.
[0068] Based on the position of a split point, three split planes are determined. Along the three split planes, the spatial geometric body is structurally divided to obtain eight spatial regions. Based on the positions of multiple split points, multiple split planes are determined. Along the multiple split planes, the spatial geometric body is structurally divided to obtain multiple spatial regions.
[0069] A space area can be used as a room, living room, dining room, etc.
[0070] For example, taking a South American residential building as an example, if one split point is determined, the spatial geometry is usually divided into 2*2*2, that is, three split planes are determined along the split point in the horizontal, vertical, and vertical directions, and three splits are performed. If two split points are determined, the spatial geometry is usually divided into 2*2*3, that is, four split planes are determined along the split point in the horizontal, vertical, and vertical directions, and four splits are performed.
[0071] Figure 3 This is a schematic diagram of the spatial geometric body segmentation provided in the embodiment of the present application. Figure 3 As shown, three dividing surfaces can be determined by one dividing point, thereby dividing the spatial geometry into eight spatial regions.
[0072] In summary, in this embodiment, the structural control parameters are the position parameters of the preset segmentation points. Based on the position parameters of the preset segmentation points, multiple segmentation planes passing through the preset segmentation points are generated on the spatial geometric body. The spatial geometric body is structurally divided along the multiple segmentation planes to obtain multiple spatial regions. This effectively achieves structural division of the spatial geometric body.
[0073] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, the placement parameters of the virtual connected entity model include: the placement parameters of the internal connected entity model, and the placement parameters of the external connected entity model; the second spatial area includes: the internal spatial area, and the external spatial area.
[0074] In S105, based on the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of the second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters, including:
[0075] According to the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the basic models of the internal space area and the external space area to obtain the target virtual building model.
[0076] The interior space is the area of the building model that has no physical contact with the exterior, such as the space between the interior walls, ceiling, and floor. This is known as a closed area. The exterior space is the area of the building model that has physical contact with the exterior, such as the space outside the exterior walls. This is known as an open area. This makes the interior and exterior of the entire virtual building model appear more three-dimensional.
[0077] In summary, in this embodiment, the placement parameters of the virtual connected entity model include: placement parameters of the internal connected entity model and placement parameters of the external connected entity model; the second spatial region includes: the internal spatial region and the external spatial region; based on the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the base models of the internal spatial region and the external spatial region to obtain the target virtual building model. This makes the interior and exterior of the entire virtual building model more three-dimensional.
[0078] On the basis of the above embodiment, in another embodiment of the present application, the internal connection entity model includes: a first virtual door and window and / or a virtual internal connection channel.
[0079] The external connection entity model includes: second virtual doors and windows and / or virtual external connection channels.
[0080] For example, the connecting passage is a staircase. By setting doors, windows and stairs, the entire building model is made more three-dimensional.
[0081] The model for the connecting passageway is pre-prepared, and its bounding box information is obtained. First, remove any space insufficient for the staircase. Then, find the longest edge within this space to create the staircase area. Next, hollow out the upper floor to create space for the stairs. This step is accomplished using a Boolean node. Finally, use the Copy to Point method to place the staircase at this location. At this point, a fully connected passageway is created.
[0082] In the above Figure 1 Based on the corresponding embodiments, the embodiments of the present application also provide a space merging method. Figure 4 A flow chart of a space merging method is also provided for the embodiment of the present application.
[0083] like Figure 4 As shown, the second spatial area includes: the merged spatial area. Before loading the virtual connected entity model onto the base model of the second spatial area in the multiple spatial areas according to the placement parameters of the virtual connected entity model in S105 to obtain a virtual building model corresponding to the building structure parameters, the method further includes:
[0084] S301: Determine types of multiple spatial regions according to spatial marking information of multiple spatial regions.
[0085] The spatial regions created by segmenting the spatial geometry in this way cannot meet the individual needs of different buildings. For example, some buildings require large rooms, while others have living rooms that are larger than the rooms. If the spatial regions are segmented uniformly, the need for large spaces cannot be met.
[0086] The types of spatial regions are divided into two types: merged and non-merged.
[0087] S302: Determine, based on the types of the plurality of spatial regions, whether adjacent spatial regions meet a preset region merging condition of the corresponding type.
[0088] The preset region merging conditions are: the type is merge and adjacent spatial regions are merged.
[0089] S303: If the adjacent spatial regions meet the preset region merging condition, the adjacent spatial regions are merged according to their types to obtain a merged spatial region.
[0090] By merging some spatial areas, we can obtain more diverse spatial areas and realize diversified architectural models.
[0091] For example, in Houdini software, a box node can be used to generate a larger box surrounding the two empty areas as the merged area.
[0092] For example, for the merged spatial area, by determining the heights of its vertices, the lowest surface can be separated as the bottom surface, and the floor can be generated using this surface.
[0093] In summary, in this embodiment, the second spatial region includes: a merged spatial region; determining the types of the multiple spatial regions based on the placement parameters of the virtual connected entity model and the spatial tag information of the multiple spatial regions; determining, based on the types of the multiple spatial regions, whether adjacent spatial regions meet the preset region merging conditions of the corresponding types; and, if the adjacent spatial regions meet the preset region merging conditions, merging the adjacent spatial regions based on their types to obtain a merged spatial region. Thus, by merging some spatial regions, more diverse spatial regions can be obtained, enabling the realization of diverse architectural models.
[0094] Based on the above embodiment, in another embodiment of the present application, if the external connected entity model further includes: second virtual doors and windows, it indicates that a connecting passage is formed between the building model and the external space area of the building model through the second virtual doors and windows, and a virtual platform needs to be set outside the connecting passage to make the building model more three-dimensional. The method further includes:
[0095] Generate a preset virtual fence at a target position on the base model of the first external space area to form a first virtual platform corresponding to the first external space area. And / or,
[0096] A preset support entity is generated at a target position on the base model of the second external space area to form a second virtual platform corresponding to the second external space area.
[0097] The first virtual platform is a balcony, with a virtual fence set up around its edge. The second virtual platform is a courtyard, with support entities (wall columns) set up beneath the courtyard's eaves to support the eaves or the second floor of the building. This allows for more diverse architectural models.
[0098] For example, for the bottom surface of the balcony, use the bottom surface's normal direction to separate the three front-facing edges, then use the Copy to Point node in Houdini to create the fence. For the bottom surface of the courtyard, use the same operation to create the wall columns.
[0099] In summary, in this embodiment, a preset virtual fence is generated at a target location on the base model of a first external space area, forming a first virtual platform corresponding to the first external space area; and / or a preset support entity is generated at a target location on the base model of a second external space area, forming a second virtual platform corresponding to the second external space area. This allows for more diverse building models.
[0100] In the above Figure 1 On the basis of the corresponding embodiment, the embodiment of the present application also provides a wall setting method. Figure 5 A flow chart of a wall setting method is also provided for the embodiment of the present application.
[0101] like Figure 5 As shown, the virtual segmentation entity model includes: presetting a virtual wall model, generating a virtual segmentation entity model at a target position of a first spatial area in multiple spatial areas in S104, and obtaining a basic model of each spatial area, including:
[0102] S401: Generate at least one region segmentation reference line for a first spatial region.
[0103] The area division reference lines are the reference positions for placing walls.
[0104] S402: Determine at least one first reference position point on at least one region segmentation reference line.
[0105] The at least one first reference position point is used to accurately determine the placement position of the preset virtual wall model.
[0106] S403: Place the preset virtual wall model at at least one first reference position point to obtain a basic model of each spatial area.
[0107] The preset virtual wall model is determined based on width, height and orientation.
[0108] For example, in Houdini, a line with height can create a wall. Houdini has a "copyto point" node with two inputs: model A and point B. This node places model A at point B's location. Furthermore, if point B has information such as a normal and size, model A will be rotated and scaled accordingly.
[0109] For example, determine the midpoint of the region segmentation reference line and offset it slightly toward either side of the region segmentation reference line to obtain two reference points. Rays are then sent downward along each of these two reference points to determine whether they successfully intersect the entire floor surface. If both intersect successfully, the region segmentation reference line is considered an interior line. Alternatively, rays are sent upward along each of these two reference points to determine whether they successfully intersect the entire ceiling surface. If both intersect successfully, the region segmentation reference line is considered an interior line.
[0110] In summary, in this embodiment, the virtual segmentation model includes: presetting a virtual wall model; generating at least one region segmentation reference line for a first spatial region; determining at least one first reference position point on each of the at least one region segmentation reference lines; and placing the preset virtual wall model at the at least one first reference position point to obtain a base model for each spatial region. This allows for the addition of walls to a building in a variety of ways.
[0111] Based on the above embodiments, the embodiments of the present application also provide a method for setting doors and windows. Figure 6 A flow chart of a door and window setting method is also provided for the embodiment of the present application.
[0112] like Figure 6 As shown, in S403, the preset virtual wall model is placed at at least one first reference position point to obtain a basic model of each spatial area, including:
[0113] S501 : Determine a second reference position point on a regional reference line of the target wall model according to size parameters of a target wall model in each spatial region where a preset virtual wall model is placed.
[0114] The second reference position point is used to fix the preset virtual door and window model.
[0115] S502: Place the preset virtual door and window models at a second reference position point to obtain a basic model of each spatial area.
[0116] For example, a door has a set width. Based on the width of the wall, we can first lay out the possible locations for the door. In Houdini, there is a Boolean node that adds or subtracts two models. Therefore, we can use the Boolean to cut a hole in the wall the size of the door and then insert the door into it.
[0117] For example, doors in South American residential buildings are only generated at the front. Therefore, when the box space is initially generated, a 'front' feature value is added to represent the front. In this way, the front-facing edge is separated as the area with the probability of generating a door, so that these areas will generate at least one wall with a door.
[0118] Windows are placed in the same way as doors, but with slightly different placements. First, you need to set a height for the window placement. Second, windows spawn primarily on exterior walls, not interior walls.
[0119] Furthermore, for front-facing windows, window eaves are generated to make the building model more diverse.
[0120] In summary, in this embodiment, based on the dimensional parameters of the target wall model in each spatial region, where the preset virtual wall model is placed, a second reference point is determined on the regional reference line of the target wall model. Preset virtual door and window models are then placed at the second reference point to obtain a base model for each spatial region. This allows for the addition of doors and windows to buildings in a diverse manner.
[0121] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, the architectural structure parameters further include: rendering map parameters; the method further includes:
[0122] The rendering mapping parameters are used to render the target entity model corresponding to the rendering mapping parameters on the target virtual building model.
[0123] For example, the target virtual building model is generated procedurally. After generating the target virtual building model, its rendering mapping parameters (UVs, texture coordinates, used in game development to identify the position of each vertex on the model on the texture map, with U representing horizontal position and V representing vertical position) must be processed to ensure accurate mapping and display. By projecting the UVs according to the position in world space, the correct average UVs can be obtained. In game development, walls often use four-dimensional continuous mapping. This type of mapping can be connected horizontally and vertically, making it suitable for repeated tiling on a surface.
[0124] For example, a secondary wall is rendered below the wall for decorative purposes. A decorative strip similar to a dividing line is also created between houses, simulating reality.
[0125] In summary, in this embodiment, the building structure parameters also include rendering map parameters, which are used to render the target entity model corresponding to the rendering map parameters on the target virtual building model, thereby making the building model more diverse.
[0126] Based on the above embodiment, the rendering mapping parameters include at least one mapping parameter among texture mapping parameters, material mapping parameters, and light mapping parameters.
[0127] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, obtaining at least one set of building structure parameters in S101 includes:
[0128] According to the configuration parameters of the preset architectural style, an architectural structure parameter generation algorithm of the preset architectural style is adopted to generate at least one set of architectural structure parameters.
[0129] For example, the preset architectural style could be a South American residential style. The algorithm for generating architectural structural parameters uses the random function rand(s), where s is the random seed. By inputting the random seed, rand(s) returns a random value as the resulting random value, which is used as multiple sets of random architectural structural parameters. This allows for greater diversity in architectural models.
[0130] In summary, in this embodiment, based on the configuration parameters of a preset architectural style, an architectural structure parameter generation algorithm of the preset architectural style is used to generate at least one set of architectural structure parameters, thereby making the architectural model more diverse.
[0131] In the above Figure 1 On the basis of the corresponding embodiments, the embodiments of the present application also provide a method for generating a virtual scene. Figure 7 A flowchart of a virtual scene generation method is also provided for the embodiment of the present application.
[0132] like Figure 7 As shown, the method further includes:
[0133] S601: In response to a selection operation of a virtual building model inputted for at least one virtual building model corresponding to at least one set of building structure parameters, the target virtual building model selected by the selection operation is loaded into a preset virtual scene.
[0134] The generated virtual building model can be placed in a preset virtual scene to meet the design requirements in the virtual scene and improve design efficiency.
[0135] S602: Adjust the size of the target virtual building model in the preset virtual scene.
[0136] The target virtual building model can be adjusted according to design requirements to make the virtual scene more diverse.
[0137] In summary, in this embodiment, in response to a selection operation of a virtual building model inputted from a plurality of virtual building models corresponding to at least one set of building structure parameters, the target virtual building model selected by the selection operation is loaded into a preset virtual scene; and the target virtual building model is resized in the preset virtual scene.
[0138] The following describes a virtual building model generation device, equipment, storage medium, and program provided by the present application for execution. The specific implementation process and technical effects are described above and will not be repeated below.
[0139] Figure 8 A schematic diagram of a virtual building model generation device provided in an embodiment of the present application is shown in FIG. Figure 8 As shown, the device includes:
[0140] The acquisition module 801 is used to acquire at least one set of building structure parameters, which include at least: space outline parameters, structural control parameters, and placement parameters of the virtual connected entity model.
[0141] The generating module 802 is used to generate a spatial geometric body using spatial contour parameters.
[0142] The division module 803 is used to perform structural division on the spatial geometric body using structural control parameters to obtain multiple spatial regions.
[0143] The segmentation module 804 is configured to generate a virtual segmentation entity model at a target position of a first spatial region among the multiple spatial regions to obtain a basic model of each spatial region.
[0144] The loading module 805 is used to load the virtual connected entity model onto the basic model of the second spatial area among the multiple spatial areas according to the placement parameters of the virtual connected entity model, so as to obtain a virtual building model corresponding to the building structure parameters.
[0145] Furthermore, the division module 803 is specifically used to divide the spatial geometric body into multiple spatial regions using the structural control parameters as the position parameters of the preset division points, including: generating multiple division surfaces passing through the preset division points on the spatial geometric body based on the position parameters of the preset division points; and dividing the spatial geometric body into multiple spatial regions along the multiple division surfaces.
[0146] Furthermore, the loading module 805 is specifically used for the placement parameters of the virtual connected entity model, including: the placement parameters of the internal connected entity model, and the placement parameters of the external connected entity model; the second spatial area includes: the internal spatial area, and the external spatial area; according to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the basic model of the second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to each building structure parameter, including: according to the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the basic models of the internal spatial area and the external spatial area to obtain the target virtual building model.
[0147] Furthermore, the loading module 805 is specifically used for the internal connection entity model to include: first virtual doors and windows and / or virtual internal connection channels; the external connection entity model to include: second virtual doors and windows and / or virtual external connection channels.
[0148] Furthermore, the loading module 805 is specifically used for the second spatial area to include: the merged spatial area; according to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the basic model of the second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters. The method also includes: determining the types of the multiple spatial areas according to the spatial marking information of the multiple spatial areas; determining whether the adjacent spatial areas meet the preset area merging conditions of the corresponding types according to the types of the multiple spatial areas; if the adjacent spatial areas meet the preset area merging conditions, the adjacent spatial areas are merged according to the types of the adjacent spatial areas to obtain the merged spatial area.
[0149] Furthermore, the loading module 805 is specifically used to, if the external connected entity model also includes: second virtual doors and windows, the method also includes: generating a preset virtual fence at the target position on the basic model of the first external space area to form a first virtual platform corresponding to the first external space area; and / or, generating a preset support entity at the target position on the basic model of the second external space area to form a second virtual platform corresponding to the second external space area.
[0150] Furthermore, the loading module 805 is specifically used for the virtual segmentation entity model, including: presetting a virtual wall model, generating a virtual segmentation entity model at a target position of the first spatial area among multiple spatial areas, and obtaining a basic model of each spatial area, including: generating at least one area segmentation reference line for the first spatial area; determining at least one first reference position point on at least one area segmentation reference line; placing the preset virtual wall model at at least one first reference position point, and obtaining a basic model of each spatial area.
[0151] Furthermore, the loading module 805 is specifically used to place the preset virtual wall model at at least one first reference position point to obtain the basic model of each spatial area, including: determining a second reference position point on the regional reference line of the target wall model according to the size parameters of the target wall model in each spatial area where the preset virtual wall model is placed; placing the preset virtual door and window model at the second reference position point to obtain the basic model of each spatial area.
[0152] Furthermore, the loading module 805 is specifically used for the building structure parameters further including: rendering mapping parameters; the method further includes: using the rendering mapping parameters to render the target entity model corresponding to the rendering mapping parameters on the target virtual building model.
[0153] Furthermore, the loading module 805 is specifically used to render mapping parameters including at least one of texture mapping parameters, material mapping parameters, and light mapping parameters.
[0154] Furthermore, the acquisition module 801 is specifically configured to acquire at least one set of building structure parameters, including: generating the building structure parameters according to the configuration parameters of the preset building style and using the building structure parameter generation algorithm of the preset building style.
[0155] Furthermore, the loading module 805 is further configured to respond to a selection operation of a virtual building model inputted for at least one virtual building model corresponding to at least one set of building structure parameters, load the target virtual building model selected by the selection operation into a preset virtual scene, and adjust the size of the target virtual building model in the preset virtual scene.
[0156] Through the above method, at least one set of building structural parameters is obtained, the building structural parameters including at least: spatial outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; a spatial geometric body is generated using the spatial outline parameters; the spatial geometric body is structurally divided using the structural control parameters to obtain multiple spatial regions; a virtual segmented entity model is generated at a target location in a first spatial region of the multiple spatial regions to obtain a base model for each spatial region; and based on the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of a second spatial region of the multiple spatial regions to obtain a virtual building model corresponding to the building structural parameters. Thus, by randomly setting the building structural parameters, the efficiency and accuracy of building model generation are improved, and models with different parameters can be generated in a diversified manner, expanding the building model generation scenarios.
[0157] Figure 9A structural diagram of an electronic device provided in an embodiment of the present application includes: a processor 901, a storage medium 902 and a bus 903, wherein the storage medium 902 stores machine-readable instructions executable by the processor 901, and the processor 901 communicates with the storage medium 902 via the bus 903, and the processor 901 executes the machine-readable instructions to perform the above method.
[0158] At least one set of building structure parameters is obtained, where the building structure parameters include at least: space outline parameters, structure control parameters, and placement parameters of a virtual connected entity model.
[0159] Use spatial contour parameters to generate spatial geometry.
[0160] The spatial geometry is divided into multiple spatial regions by using structural control parameters.
[0161] A virtual segmentation entity model is generated at a target position of a first spatial region among the multiple spatial regions to obtain a basic model of each spatial region.
[0162] According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto a basic model of a second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters.
[0163] Optionally, the structural control parameter is a position parameter of a preset segmentation point. The structural control parameter is used to perform structural division on the spatial geometric body to obtain multiple spatial regions, including:
[0164] Based on the position parameters of the preset segmentation points, a plurality of segmentation surfaces passing through the preset segmentation points are generated on the spatial geometric body;
[0165] The spatial geometric body is structurally divided along multiple dividing surfaces to obtain multiple spatial regions.
[0166] Optionally, the placement parameters of the virtual connected entity model include: placement parameters of the internal connected entity model, and placement parameters of the external connected entity model; the second space area includes: an internal space area, and an external space area;
[0167] According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of the second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters, including:
[0168] According to the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the basic models of the internal space area and the external space area to obtain the target virtual building model.
[0169] Optionally, the internal connection entity model includes: first virtual doors and windows and / or virtual internal connection passages;
[0170] The external connection entity model includes: second virtual doors and windows and / or virtual external connection channels.
[0171] Optionally, the second spatial area includes: a merged spatial area; and before loading the virtual connected entity model onto a base model of the second spatial area in the plurality of spatial areas according to placement parameters of the virtual connected entity model to obtain a virtual building model corresponding to the building structure parameters, the method further includes:
[0172] determining types of the plurality of spatial regions according to spatial marking information of the plurality of spatial regions;
[0173] Determining, based on the types of the plurality of spatial regions, whether adjacent spatial regions meet a preset region merging condition of the corresponding type;
[0174] If the adjacent spatial regions meet the preset region merging conditions, the adjacent spatial regions are merged according to their types to obtain a merged spatial region.
[0175] Optionally, if the externally connected entity model further includes: second virtual doors and windows, the method further includes:
[0176] generating a preset virtual fence at a target position on the base model of the first external space area to form a first virtual platform corresponding to the first external space area; and / or.
[0177] A preset support entity is generated at a target position on the base model of the second external space area to form a second virtual platform corresponding to the second external space area.
[0178] Optionally, the virtual segmentation entity model includes: presetting a virtual wall model, generating a virtual segmentation entity model at a target position of a first spatial area in the plurality of spatial areas, and obtaining a basic model of each spatial area, including:
[0179] generating at least one region segmentation reference line for the first spatial region;
[0180] Determine at least one first reference position point on at least one region segmentation reference line;
[0181] The preset virtual wall model is placed at at least one first reference position point to obtain a basic model of each spatial area.
[0182] Optionally, placing a preset virtual wall model at at least one first reference position point to obtain a basic model of each spatial area includes:
[0183] Determining a second reference position point on a regional reference line of the target wall model according to size parameters of a target wall model in each spatial region where a preset virtual wall model is placed;
[0184] Place the preset virtual door and window models at the second reference position to obtain the basic model of each spatial area.
[0185] Optionally, the building structure parameters further include: rendering map parameters; and the method further includes:
[0186] The rendering mapping parameters are used to render the target entity model corresponding to the rendering mapping parameters on the target virtual building model.
[0187] Optionally, the rendering mapping parameters include at least one mapping parameter of a texture mapping parameter, a material mapping parameter, and a light mapping parameter.
[0188] Optionally, obtaining at least one set of building structure parameters includes:
[0189] According to the configuration parameters of the preset architectural style, an architectural structure parameter generation algorithm of the preset architectural style is adopted to generate at least one set of architectural structure parameters.
[0190] Optionally, the method further comprises:
[0191] In response to a selection operation of a virtual building model inputted for at least one virtual building model corresponding to at least one set of building structure parameters, the target virtual building model selected by the selection operation is loaded into a preset virtual scene;
[0192] The target virtual building model is resized in a preset virtual scene.
[0193] Through the above method, at least one set of building structural parameters is obtained, the building structural parameters including at least: spatial outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; a spatial geometric body is generated using the spatial outline parameters; the spatial geometric body is structurally divided using the structural control parameters to obtain multiple spatial regions; a virtual segmented entity model is generated at a target location in a first spatial region of the multiple spatial regions to obtain a base model for each spatial region; and based on the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of a second spatial region of the multiple spatial regions to obtain a virtual building model corresponding to the building structural parameters. Thus, by randomly setting the building structural parameters, the efficiency and accuracy of building model generation are improved, and models with different parameters can be generated in a diversified manner, expanding the building model generation scenarios.
[0194] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method embodiment is executed.
[0195] At least one set of building structure parameters is obtained, where the building structure parameters include at least: space outline parameters, structure control parameters, and placement parameters of a virtual connected entity model.
[0196] Use spatial contour parameters to generate spatial geometry.
[0197] The spatial geometry is divided into multiple spatial regions by using structural control parameters.
[0198] A virtual segmentation entity model is generated at a target position of a first spatial region among the multiple spatial regions to obtain a basic model of each spatial region.
[0199] According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto a basic model of a second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters.
[0200] Optionally, the structural control parameter is a position parameter of a preset segmentation point. The structural control parameter is used to perform structural division on the spatial geometric body to obtain multiple spatial regions, including:
[0201] Based on the position parameters of the preset segmentation points, a plurality of segmentation surfaces passing through the preset segmentation points are generated on the spatial geometric body;
[0202] The spatial geometric body is structurally divided along multiple dividing surfaces to obtain multiple spatial regions.
[0203] Optionally, the placement parameters of the virtual connected entity model include: placement parameters of the internal connected entity model, and placement parameters of the external connected entity model; the second space area includes: an internal space area, and an external space area;
[0204] According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of the second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters, including:
[0205] According to the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the basic models of the internal space area and the external space area to obtain the target virtual building model.
[0206] Optionally, the internal connection entity model includes: first virtual doors and windows and / or virtual internal connection passages;
[0207] The external connection entity model includes: second virtual doors and windows and / or virtual external connection channels.
[0208] Optionally, the second spatial area includes: a merged spatial area; and before loading the virtual connected entity model onto a base model of the second spatial area in the plurality of spatial areas according to placement parameters of the virtual connected entity model to obtain a virtual building model corresponding to the building structure parameters, the method further includes:
[0209] determining types of the plurality of spatial regions according to spatial marking information of the plurality of spatial regions;
[0210] Determining, based on the types of the plurality of spatial regions, whether adjacent spatial regions meet a preset region merging condition of the corresponding type;
[0211] If the adjacent spatial regions meet the preset region merging conditions, the adjacent spatial regions are merged according to their types to obtain a merged spatial region.
[0212] Optionally, if the externally connected entity model further includes: second virtual doors and windows, the method further includes:
[0213] generating a preset virtual fence at a target position on the base model of the first external space area to form a first virtual platform corresponding to the first external space area; and / or,
[0214] A preset support entity is generated at a target position on the base model of the second external space area to form a second virtual platform corresponding to the second external space area.
[0215] Optionally, the virtual segmentation entity model includes: presetting a virtual wall model, generating a virtual segmentation entity model at a target position of a first spatial area in the plurality of spatial areas, and obtaining a basic model of each spatial area, including:
[0216] generating at least one region segmentation reference line for the first spatial region;
[0217] Determine at least one first reference position point on at least one region segmentation reference line;
[0218] The preset virtual wall model is placed at at least one first reference position point to obtain a basic model of each spatial area.
[0219] Optionally, placing a preset virtual wall model at at least one first reference position point to obtain a basic model of each spatial area includes:
[0220] Determining a second reference position point on a regional reference line of the target wall model according to size parameters of a target wall model in each spatial region where a preset virtual wall model is placed;
[0221] Place the preset virtual door and window models at the second reference position to obtain the basic model of each spatial area.
[0222] Optionally, the building structure parameters further include: rendering map parameters; and the method further includes:
[0223] The rendering mapping parameters are used to render the target entity model corresponding to the rendering mapping parameters on the target virtual building model.
[0224] Optionally, the rendering mapping parameters include at least one mapping parameter of a texture mapping parameter, a material mapping parameter, and a light mapping parameter.
[0225] Optionally, obtaining at least one set of building structure parameters includes:
[0226] According to the configuration parameters of the preset architectural style, an architectural structure parameter generation algorithm of the preset architectural style is adopted to generate at least one set of architectural structure parameters.
[0227] Optionally, the method further comprises:
[0228] In response to a selection operation of a virtual building model inputted for at least one virtual building model corresponding to at least one set of building structure parameters, the target virtual building model selected by the selection operation is loaded into a preset virtual scene;
[0229] The target virtual building model is resized in a preset virtual scene.
[0230] Through the above method, at least one set of building structural parameters is obtained, the building structural parameters including at least: spatial outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; a spatial geometric body is generated using the spatial outline parameters; the spatial geometric body is structurally divided using the structural control parameters to obtain multiple spatial regions; a virtual segmented entity model is generated at a target location in a first spatial region of the multiple spatial regions to obtain a base model for each spatial region; and based on the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto the base model of a second spatial region of the multiple spatial regions to obtain a virtual building model corresponding to the building structural parameters. Thus, by randomly setting the building structural parameters, the efficiency and accuracy of building model generation are improved, and models with different parameters can be generated in a diversified manner, expanding the building model generation scenarios.
[0231] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment and will not be repeated here.
[0232] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0233] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0234] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0235] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0236] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0237] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or make equivalent replacements for some of the technical features thereof. However, these modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for generating a virtual building model, characterized in that: The method comprises: According to the configuration parameters of a preset architectural style, at least one set of architectural structure parameters is randomly generated using an architectural structure parameter generation algorithm of the preset architectural style, wherein the architectural structure parameters include at least: space outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; Using the spatial contour parameters, generating a spatial geometric body; Using the structural control parameters, the spatial geometric body is structurally divided to obtain a plurality of spatial regions; generating a virtual segmented entity model at a target position of a first spatial area among the plurality of spatial areas to obtain a basic model of each spatial area, wherein the first spatial area is an area where walls, ceilings, and floors are placed, and the first spatial area constitutes a basic framework of the entire virtual building model; According to the placement parameters of the virtual connected entity model, the virtual connected entity model is loaded onto a basic model of a second spatial area among the multiple spatial areas to obtain a virtual building model corresponding to the building structure parameters.
2. The method according to claim 1, characterized in that The structural control parameters are position parameters of preset segmentation points. The spatial geometric body is structurally divided using the structural control parameters to obtain multiple spatial regions, including: Based on the position parameters of the preset segmentation points, generating a plurality of segmentation planes passing through the preset segmentation points on the spatial geometric body; The spatial geometric body is structurally divided along the multiple dividing surfaces to obtain the multiple spatial regions.
3. The method according to claim 1, characterized in that The placement parameters of the virtual connected entity model include: placement parameters of the internal connected entity model, and placement parameters of the external connected entity model; the second space area includes: an internal space area, and an external space area; The step of loading the virtual connected entity model onto a base model of a second spatial area among the multiple spatial areas according to the placement parameters of the virtual connected entity model to obtain a virtual building model corresponding to the building structure parameters includes: According to the placement parameters of the internal connected entity model and the placement parameters of the external connected entity model, the internal connected entity model and the external connected entity model are loaded onto the basic models of the internal space area and the external space area to obtain the virtual building model.
4. The method according to claim 3, characterized in that The internal connection entity model includes: first virtual doors and windows and / or virtual internal connection passages; The external communication entity model includes: second virtual doors and windows and / or virtual external connection channels.
5. The method according to claim 1, wherein The second spatial area includes: a merged spatial area; before loading the virtual connected entity model onto a base model of the second spatial area in the multiple spatial areas according to the placement parameters of the virtual connected entity model to obtain a virtual building model corresponding to the building structure parameters, the method further includes: determining types of the plurality of spatial regions according to the spatial marking information of the plurality of spatial regions; determining, according to the types of the plurality of spatial regions, whether adjacent spatial regions meet a preset region merging condition of a corresponding type; If the adjacent spatial regions meet the preset region merging condition, the adjacent spatial regions are merged according to the types of the adjacent spatial regions to obtain the merged spatial region.
6. The method according to claim 4, characterized in that If the external connected entity model further includes: the second virtual door and window, the method further includes: generating a preset virtual fence at a target position on the base model of the first external space area to form a first virtual platform corresponding to the first external space area; and / or, A preset support entity is generated at a target position on the basic model of the second external space area to form a second virtual platform corresponding to the second external space area.
7. The method according to claim 1, characterized in that The virtual segmentation entity model includes: a preset virtual wall model; generating a virtual segmentation entity model at a target position of a first spatial area among the multiple spatial areas to obtain a basic model of each spatial area, including: generating at least one region segmentation reference line for the first spatial region; Determine at least one first reference position point on the at least one region segmentation reference line; The preset virtual wall model is placed at the at least one first reference position point to obtain a basic model of each spatial area.
8. The method according to claim 7, characterized in that Placing the preset virtual wall model at the at least one first reference position point to obtain a basic model of each spatial area includes: Determining a second reference position point on a regional reference line of the target wall model according to size parameters of the target wall model in each spatial region where the preset virtual wall model is placed; The preset virtual door and window model is placed at the second reference position point to obtain the basic model of each spatial area.
9. The method according to claim 1, characterized in that The building structure parameters also include: rendering map parameters; the method also includes: The rendering mapping parameters are used to render the target entity model corresponding to the rendering mapping parameters on the virtual building model.
10. The method according to claim 9, characterized in that The rendering mapping parameters include at least one mapping parameter among texture mapping parameters, material mapping parameters, and light mapping parameters.
11. The method according to claim 1, characterized in that The method further comprises: In response to a selection operation of a virtual building model inputted for at least one virtual building model corresponding to at least one set of the building structure parameters, loading the target virtual building model selected by the selection operation into a preset virtual scene; The target virtual building model is resized in the preset virtual scene.
12. A virtual building model generating device, characterized in that: The device comprises: an acquisition module, configured to randomly generate at least one set of building structure parameters based on configuration parameters of a preset building style and using a building structure parameter generation algorithm of the preset building style, wherein the building structure parameters include at least: space outline parameters, structural control parameters, and placement parameters of a virtual connected entity model; A generating module, configured to generate a spatial geometric body using the spatial contour parameters; A division module, configured to perform structural division on the spatial geometric body using the structural control parameters to obtain a plurality of spatial regions; a segmentation module, configured to generate a virtual segmented entity model at a target location of a first spatial area among the plurality of spatial areas, to obtain a basic model of each spatial area, wherein the first spatial area is an area where walls, ceilings, and floors are placed, and the first spatial area constitutes a basic framework of the entire virtual building model; The loading module is used to load the virtual connected entity model onto the basic model of the second spatial area among the multiple spatial areas according to the placement parameters of the virtual connected entity model, so as to obtain a virtual building model corresponding to the building structure parameters.
13. An electronic device, characterized in that: include: A processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the virtual building model generation method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a virtual building model according to any one of claims 1 to 11 are executed.
15. A computer program instruction, characterized in that When the program instructions are executed by a processor, the steps of the method for generating a virtual building model according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Indoor space planning system and method
CN106294903A
Method, device, storage medium and system for generating three-dimensional virtual scene
CN116503550A