Terrain generation method, device and equipment and storage medium

By converting a two-dimensional bird's-eye view into a three-dimensional terrain, the problem of low efficiency in generating and adjusting three-dimensional scene models is solved, and global planning and efficient three-dimensional scene model construction are achieved.

CN120689496APending Publication Date: 2025-09-23NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410340352.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the prior art, when users create a three-dimensional scene model, the model covers a large area, resulting in a large amount of fine-tuning operations, low generation and adjustment efficiency, and inability to perform global planning and adjustment.

Method used

By converting the two-dimensional top view drawn by the user into a matching three-dimensional terrain, a graphical user interface is used to achieve global planning and generate a three-dimensional terrain that matches the color information.

Benefits of technology

It improves the efficiency of generating and building 3D scene models, realizes global planning, and reduces the amount of fine-tuning operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689496A_ABST
    Figure CN120689496A_ABST
Patent Text Reader

Abstract

The invention provides a terrain generation method and device, equipment and a storage medium, and the terrain generation method comprises the steps: responding to a triggering operation for a target switching control in a graphical user interface, and obtaining a two-dimensional top view drawn by a user from a first window; according to the obtained color information of the two-dimensional top view, generating a target three-dimensional terrain corresponding to the two-dimensional top view; and responding to the completion of the generation of all the target three-dimensional terrains, switching the first window displayed in the graphical user interface to a second window, and displaying each target three-dimensional terrain in the second window. Therefore, through a mode of converting the two-dimensional top view drawn by the user into the three-dimensional terrain matched with the two-dimensional top view, the user can conveniently realize global planning among different three-dimensional terrains generated in the future in the process of drawing the two-dimensional top view, and the generation and building efficiency of the three-dimensional scene model is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional modeling technology, and more specifically, to a terrain generation method, apparatus, device, and storage medium. Background Art

[0002] In the prior art, when creating a three-dimensional scene model, the user can first generate an initial three-dimensional scene model by setting some basic terrain parameters (e.g., generating an initial basic terrain by setting parameters such as the generation area, terrain size, and terrain material). Then, the user can use some shaping tools (e.g., push / pull, smooth, sharp, flat, slope, etc.) in three-dimensional space to fine-tune the initial three-dimensional scene model to obtain a three-dimensional scene model that meets their own modeling needs. However, since the model coverage area of ​​the three-dimensional scene model is relatively large, when the user fine-tunes each local model area, on the one hand, the generation and adjustment efficiency of the three-dimensional scene model will be reduced due to the large amount of fine-tuning operations, and on the other hand, due to the lack of a global perspective on the three-dimensional scene model (i.e., only the local model area involved in the current fine-tuning can be focused on at each fine-tuning), the three-dimensional scene model cannot be globally planned and adjusted. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a terrain generation method, device, equipment and storage medium, which converts the two-dimensional top-view drawn by the user into a three-dimensional terrain that matches it, so that the user can achieve global planning between different three-dimensional terrains generated in the future during the process of drawing the two-dimensional top-view, thereby effectively improving the generation and construction efficiency of the three-dimensional scene model.

[0004] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings.

[0005] In a first aspect, an embodiment of the present application provides a terrain generation method, wherein a scene editor provides a graphical user interface, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic, and the terrain generation method includes:

[0006] In response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by the user from the first window;

[0007] generating a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping;

[0008] In response to the completion of generation of all the target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain is displayed in the second window; wherein the second window is used to display each generated target three-dimensional terrain in three-dimensional space, and the display position of each target three-dimensional terrain in the second window is determined according to the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

[0009] In a second aspect, an embodiment of the present application provides a terrain generation device, which provides a graphical user interface through a scene editor, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic, and the model generation device includes:

[0010] A first response module is configured to respond to a triggering operation on a target switching control in the graphical user interface, and obtain a two-dimensional top view drawn by the user from the first window;

[0011] a generating module, configured to generate a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping;

[0012] A second response module is configured to, in response to the completion of generation of all the target three-dimensional terrains, switch the first window displayed in the graphical user interface to a second window, and display each target three-dimensional terrain in the second window; wherein the second window is configured to display each generated target three-dimensional terrain in three-dimensional space, and the display position of each target three-dimensional terrain in the second window is determined based on the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

[0013] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned terrain generation method when executing the computer program.

[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned terrain generation method are executed.

[0015] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0016] The embodiments of the present application provide a terrain generation method, apparatus, device, and storage medium. In response to a trigger operation on a target switching control in a graphical user interface, the method obtains a two-dimensional top view drawn by the user from a first window; generates a target three-dimensional terrain corresponding to the two-dimensional top view based on the color information of the obtained two-dimensional top view; and in response to the completion of the generation of all target three-dimensional terrains, the method switches the first window displayed in the graphical user interface to a second window, and displays each target three-dimensional terrain in the second window. In this way, the present application converts the two-dimensional top view drawn by the user into a matching three-dimensional terrain, making it easier for the user to achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, effectively improving the efficiency of generating and building three-dimensional scene models. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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.

[0018] Figure 1 A schematic diagram showing a flow chart of a terrain generation method provided in an embodiment of the present application is shown;

[0019] Figure 2a A schematic diagram of the first interface for drawing a two-dimensional top view provided by an embodiment of the present application is shown;

[0020] Figure 2b A schematic diagram of a partial interface for drawing a two-dimensional top view according to a second embodiment of the present application is shown;

[0021] Figure 2c A schematic diagram of an interface for coloring a two-dimensional top view provided in an embodiment of the present application is shown;

[0022] Figure 3a A schematic flow chart of a first method for generating a target three-dimensional terrain corresponding to the two-dimensional top view is shown;

[0023] Figure 3b A schematic diagram of an interface for displaying all generated target three-dimensional terrains in a second window provided by an embodiment of the present application is shown;

[0024] Figure 4 A schematic flow chart of a second method for generating a target three-dimensional terrain corresponding to the two-dimensional top view is shown;

[0025] Figure 5 A schematic flow chart of another method for generating a target three-dimensional terrain provided by an embodiment of the present application is shown;

[0026] Figure 6 A schematic flow chart of a first method for adjusting a generated target three-dimensional terrain provided in an embodiment of the present application is shown;

[0027] Figure 7 A schematic flow chart of a second method for adjusting a generated target three-dimensional terrain provided in an embodiment of the present application is shown;

[0028] Figure 8 A schematic structural diagram of a terrain generating device provided in an embodiment of the present application is shown;

[0029] Figure 9 This is a structural diagram of an electronic device 900 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] 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. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.

[0031] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of 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 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 claimed application, but merely represents 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 the present application.

[0032] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0033] In the existing technology, when creating a 3D scene model, users can first generate an initial 3D scene model by setting some basic parameters. Then, users can use some shaping tools in 3D space to fine-tune the initial 3D scene model to obtain a 3D scene model that meets their own modeling needs. However, since the model coverage area of ​​a 3D scene model is large, when users fine-tune each local model area, on the one hand, the generation and adjustment efficiency of the 3D scene model will be reduced due to the large amount of fine-tuning operations. On the other hand, due to the lack of a global perspective on the 3D scene model, the 3D scene model cannot be globally planned and adjusted.

[0034] Based on this, the embodiments of the present application provide a terrain generation method, device, equipment and storage medium. By converting the two-dimensional top-view drawn by the user into a three-dimensional terrain that matches it, the user can achieve global planning between different three-dimensional terrains generated in the future during the process of drawing the two-dimensional top-view, thereby effectively improving the efficiency of generating and building three-dimensional scene models.

[0035] In one embodiment of the present application, a terrain generation method can be applied to a scene editor that can produce a three-dimensional virtual scene (i.e., a three-dimensional scene model), and the scene editor can run on a terminal device or a server; wherein the terminal device can be a local terminal device, and when the scene editor runs on the server, the terrain generation method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device (i.e., a terminal device).

[0036] To facilitate understanding of the embodiments of the present application, a terrain generation method, apparatus, device, and storage medium provided in the embodiments of the present application are described in detail below.

[0037] Reference Figure 1 As shown, Figure 1 A flowchart of a terrain generation method provided in an embodiment of the present application is shown, wherein a graphical user interface is provided through a scene editor, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic. The terrain generation method includes steps S101-S103; specifically:

[0038] S101 , in response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by a user from the first window.

[0039] S102: Generate a target three-dimensional terrain corresponding to the two-dimensional top view according to the acquired color information of the two-dimensional top view.

[0040] S103 , in response to completion of generation of all the target three-dimensional terrains, switching the first window displayed in the graphical user interface to a second window, and displaying each target three-dimensional terrain in the second window.

[0041] The terrain generation method provided in the embodiment of the present application responds to a trigger operation on a target switching control in a graphical user interface, obtains a two-dimensional top view drawn by the user from a first window; generates a target three-dimensional terrain corresponding to the two-dimensional top view based on the color information of the obtained two-dimensional top view; and in response to the completion of the generation of all target three-dimensional terrains, switches the first window displayed in the graphical user interface to a second window, and displays each target three-dimensional terrain in the second window. In this way, by converting the two-dimensional top view drawn by the user into a matching three-dimensional terrain, the present application facilitates the user to achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, effectively improving the efficiency of generating and building three-dimensional scene models.

[0042] The following is an exemplary description of each step in the terrain generation method provided in the embodiment of the present application:

[0043] S101 , in response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by a user from the first window.

[0044] Here, in the scene editor provided in an embodiment of the present application, a first window for drawing two-dimensional graphics is displayed in the graphical user interface, wherein an edge boundary is set in the first window (e.g., a rectangular wireframe), and the user can select any type of drawing tool to draw a two-dimensional top view of the three-dimensional terrain within the area demarcated by the edge boundary, and the area demarcated by the edge boundary corresponds to the virtual ground plane in the three-dimensional space (i.e., the three-dimensional virtual space used to display the subsequently generated three-dimensional terrain) (i.e., the edge interface set in the first window is also equivalent to the boundary of the virtual ground plane in the three-dimensional space). Therefore, after the user completes drawing the two-dimensional top view in the first window, he only needs to trigger the target switching control for indicating the switch from the two-dimensional graphics drawing window (i.e., the above-mentioned first window) to the three-dimensional space display window (e.g., the second window), and the initial three-dimensional virtual scene in the three-dimensional space can be built by converting the two-dimensional top view drawn by the user in the first window into a matching three-dimensional terrain (i.e., each converted three-dimensional terrain is displayed in the above-mentioned second window).

[0045] Specifically, before executing step S101, in the first window, the user can select any geometric drawing tool (such as a triangle drawing tool, a rectangle drawing tool, a cuboid drawing tool, etc.) to draw a corresponding geometric figure (i.e., a geometric figure that matches the selected geometric drawing tool) as the graphic boundary of the two-dimensional top view at any position within the area defined by the above edge boundary; the user can also select a brush tool to flexibly draw a custom figure as the graphic boundary of the two-dimensional top view at any position within the area defined by the above edge boundary; the embodiment of the present application does not impose any restrictions on the type of drawing tools provided in the first window and the specific graphic boundary shape of the above-mentioned two-dimensional top view.

[0046] Specifically, for each two-dimensional top view, after drawing the graphic boundary of the two-dimensional top view, the user can also select any coloring tool from the first window to fill the area within the graphic boundary of the two-dimensional top view with color, so that each color-filled two-dimensional top view can be used as the final two-dimensional top view.

[0047] It should be noted that the color filling method that can be performed in the first window is not unique; for example, you can use the brush tool to fill the area within the above-mentioned graphic boundary with color by smearing, or you can use the one-click color filling tool to perform one-click overall color filling for each closed graphic contained in the area within the above-mentioned graphic boundary, etc.; the embodiment of this application does not impose any restrictions on the specific color filling method of the above-mentioned two-dimensional top view.

[0048] Here, in step S101, the two-dimensional top view obtained from the first window is equivalent to the two-dimensional top view that needs to be converted into three-dimensional terrain this time. In combination with the above-mentioned method of drawing the two-dimensional top view, it can be seen that the user can draw one or more two-dimensional top views in the first window, and the two-dimensional top views obtained in step S101 can also be one or more. This application does not impose any restrictions on the specific number of two-dimensional top views drawn in the first window and the specific number of two-dimensional top views obtained in step S101.

[0049] In the embodiment of the present application, regardless of whether the user pre-draws one or more two-dimensional top-view images in the first window, when executing step S101, the two-dimensional top-view image to be converted into three-dimensional terrain can be obtained from the first window according to at least the following two different optional implementations:

[0050] In a first optional implementation, in response to a trigger operation on a target switching control, the scene editor can automatically obtain the two-dimensional top view drawn by the user from the first window; that is, the user only needs to draw the two-dimensional top view that needs to be converted into three-dimensional terrain in the first window in advance without performing any selection operation. After the two-dimensional top view is drawn, the user can instruct the scene editor to automatically obtain all the drawn two-dimensional top views (which can be one or more) from the first window as the two-dimensional top views that need to be converted into three-dimensional terrain later by triggering the target switching control.

[0051] It should be noted that the completed two-dimensional top view refers to the two-dimensional top view after color filling according to the aforementioned drawing method of the two-dimensional top view (equivalent to the fact that if there is only an outer boundary and the two-dimensional figure is not filled with color, it does not belong to the completed two-dimensional top view), that is, the completed two-dimensional top view represents the two-dimensional top view containing color information in the first window.

[0052] In a second optional implementation, after the two-dimensional top view is drawn in the first window, before executing step S101, the user can also use the selection tool provided in the first window to select the two-dimensional top view that needs to be converted into three-dimensional terrain this time (that is, the two-dimensional top view pre-selected by the user) from all the two-dimensional top views drawn in the first window. On this basis, when executing step S101, in response to the triggering operation of the target switching control, the scene editor can obtain the two-dimensional top view pre-selected by the user from the first window as the two-dimensional top view that needs to be converted into three-dimensional terrain later, so as to improve the flexibility of the two-dimensional top view selection.

[0053] It should be noted that when the user selects a two-dimensional top view in the first window in advance, he or she can select all the two-dimensional top views drawn in the first window, or he or she can select only some (one or more) two-dimensional top views as the two-dimensional top views that need to be subsequently converted into three-dimensional terrain (which is also equivalent to the two-dimensional top view obtained in step S101).

[0054] Specifically, before executing step S101, for the multiple two-dimensional top views drawn in the first window, the user can use the selection tool provided in the first window (such as a box selection tool for selecting according to a regular rectangle, a lasso selection tool for selecting according to a custom shape, etc.) to select the two-dimensional top view that currently needs to be converted into three-dimensional terrain (that is, the two-dimensional top view pre-selected by the user, which is also the two-dimensional top view obtained in step S101) from the above-mentioned multiple two-dimensional top views displayed in the first window; wherein the selected two-dimensional top view is in a selected state in the first window (such as being located within a selection box drawn by the box selection tool, or being in a selected shadow display state, etc.). After selecting the two-dimensional top view that currently needs to be converted into three-dimensional terrain, the user can trigger the target switching control displayed in the graphical user interface to instruct the terminal device (which is equivalent to instructing the scene editor running on the terminal device) to respond to the trigger operation and obtain each two-dimensional top view that is currently in the selected state (that is, the two-dimensional top view pre-selected by the user) as the two-dimensional top view that needs to be subsequently converted into three-dimensional terrain.

[0055] It should be noted that the above-mentioned target switching control is a virtual control used to indicate the switch from the two-dimensional graphics drawing window (i.e., the above-mentioned first window) to the three-dimensional space display window (such as the second window). The embodiment of this application does not impose any restrictions on the specific control shape of the target switching control and the specific display position of the target switching control on the graphical user interface.

[0056] S102: Generate a target three-dimensional terrain corresponding to the two-dimensional top view according to the acquired color information of the two-dimensional top view.

[0057] Specifically, in the scene editor, the terrain attributes of each color system mapping are pre-configured; for example, the terrain attributes of the green system mapping may be vegetation mountains, the terrain attributes of the brown system mapping may be gravel mountains, the terrain attributes of the ice blue system mapping may be snow mountains, and the terrain attributes of the water blue system mapping may be oceans, etc.; at this time, for each two-dimensional top view obtained in step S101, the color system to which the two-dimensional top view belongs can be determined based on the color information of the two-dimensional top view, so that the terrain attributes mapped by the color system are used as the terrain attributes of the target three-dimensional terrain corresponding to the two-dimensional top view (that is, the terrain attributes of the target three-dimensional terrain match the terrain attributes mapped by the color information).

[0058] Specifically, in the scene editor, each color system can be further subdivided into a variety of different specific colors according to the depth of the color (for example, the green system can be subdivided into dark green, light green, etc. with different depths). The scene editor is pre-configured with the terrain height mapped to each color. Therefore, for each two-dimensional top view obtained in step S101, the specific distribution of different colors under the same color system in the two-dimensional top view can be determined based on the color information of the two-dimensional top view, and the partitioning of different terrain heights in the target three-dimensional terrain corresponding to the two-dimensional top view can be determined accordingly (that is, the terrain height of the target three-dimensional terrain matches the terrain height mapped by the color information).

[0059] Specifically, in the scene editor, you can configure the specific terrain height for each color map in advance as follows:

[0060] 1. For each color system, based on the terrain attribute mapped by the color system, the height value range of the terrain attribute in real space can be used as the terrain height distribution range corresponding to all colors in the color system. For example, if the terrain attribute mapped by the brown system is gravel mountain, and the height value range of the gravel mountain in real space is 0-1500 meters, then the terrain height distribution range corresponding to all colors in the brown system can be pre-configured in the scene editor to be 0-1500 meters.

[0061] 2. For all colors within the same color system, you can first divide the terrain height distribution range corresponding to all colors within the color system based on the total number of colors within the color system, thereby obtaining multiple specific configurable terrain heights within the color system. For example, if the brown system contains 10 different shades of brown, and the terrain height distribution range corresponding to all colors within the brown system is 0-1500 meters, then through the above division method, at intervals of 150 meters, the 10 configurable terrain heights within the brown system can be obtained as follows: 150 meters, 300 meters, 450 meters, 600 meters, 750 meters, 900 meters, 1050 meters, 1200 meters, 1350 meters, and 1500 meters.

[0062] 3. After obtaining multiple specific terrain heights that can be configured under the same color system, the specific terrain height mapped for each color in the same color system can be determined according to the depth value of each color in the same color system, in a configuration manner in which darker colors are mapped to higher terrain heights. For example, still taking the 10 configurable terrain heights in the above brown system as an example, the lightest brown in the brown system can be mapped to a terrain height of 150 meters, while the darkest brown in the brown system can be mapped to a terrain height of 1500 meters.

[0063] S103 , in response to completion of generation of all the target three-dimensional terrains, switching the first window displayed in the graphical user interface to a second window, and displaying each target three-dimensional terrain in the second window.

[0064] Here, the second window is used to display each generated target three-dimensional terrain in the three-dimensional space, that is, the second window is equivalent to the three-dimensional space display window switched by the target switching control instruction in step S101.

[0065] Specifically, in conjunction with the contents of step S101 above, it can be seen that since the area defined by the edge boundary in the first window corresponds to the virtual ground plane in the three-dimensional space, the display position of each target three-dimensional terrain in the second window (i.e., the position of the target three-dimensional terrain on the virtual ground plane) can be determined based on the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window (i.e., in the three-dimensional space, the position coordinates of a target three-dimensional terrain on the virtual ground plane are the same as the plane coordinates of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window).

[0066] The following describes in detail the specific implementation process of each of the above steps in the embodiment of this application:

[0067] Regarding the two-dimensional top view displayed in the first window, in the embodiment of the present application, as an optional embodiment, before the user triggers the target switching control, the user can draw the two-dimensional top view in the first window by following the methods described in steps a1-a2 below. Specifically:

[0068] Step a1: In response to the movement of the target drawing tool in the first window, an outer boundary corresponding to the two-dimensional top view is generated according to the movement route of the target drawing tool.

[0069] Here, the target drawing tool refers to a drawing tool used to draw two-dimensional graphics; for example, the target drawing tool can be a geometric drawing tool (such as a triangle drawing tool, a rectangle drawing tool, a cuboid drawing tool, etc.). At this time, the user can adjust the size of the geometric figure generated at the selected position in the first window by dragging the target drawing tool, thereby using the geometric figure generated at the selected position as the outer boundary corresponding to the two-dimensional top view.

[0070] In addition, the target drawing tool can also be a brush tool. In this case, the user can draw a two-dimensional graphic of a custom shape in the first window as the outer boundary corresponding to the two-dimensional top view by dragging the brush tool in the first window.

[0071] Exemplary description, Figure 2aFIG. 1 shows a schematic diagram of an interface for drawing a two-dimensional top view provided by an embodiment of the present application. Figure 2a As shown, a graphical user interface 200 is provided through a scene editor, and a first window 201 for drawing two-dimensional graphics is displayed in the graphical user interface 200. The user can control the movement of a target drawing tool 220 to generate outer boundaries corresponding to multiple two-dimensional top views 210 in the first window 201 according to the movement route of the target drawing tool 201.

[0072] Specifically, as an optional embodiment, in the first window, a grid-like division method can also be used to divide the display interface in the first window into multiple unit area grids. Taking the left-hand coordinate system as an example, the spatial coordinates of each grid point in the first window can be recorded as (X, 0, Z), that is, the height coordinate Y of each grid point is 0, and each grid point corresponds to a point on the virtual ground plane in the three-dimensional space, thereby realizing the mapping between the display position of the two-dimensional top view in the first window and the display position of the target three-dimensional terrain in the second window.

[0073] For example, when the display interface in the first window is composed of the above-mentioned multiple unit area grids, Figure 2b A schematic diagram of a partial interface for drawing a two-dimensional top view provided in the second embodiment of the present application is shown. Figure 2b As shown, in the first window 201, the grid-based boundary has a restrictive effect on line drawing and color filling. When the user uses a target drawing tool (such as a brush tool) to draw the outer boundary of a two-dimensional top view, the movement path of the target drawing tool will not be cut from the middle of a grid. That is, the movement path of the target drawing tool is also composed of multiple complete grids.

[0074] Step a2: In response to the coloring operation on the target area delineated by the outer boundary, the target area is colored in the first window to obtain the colored target area as a two-dimensional top view.

[0075] Here, when filling each two-dimensional top view with color, the user can use the brush tool configured with the selected color to smear color in the target area circled by the above outer boundary; wherein, the user can use the brush tool to fill the target area with a selected color, or use multiple selected colors to fill different areas in the target area.

[0076] In addition, users can also use a one-click coloring tool (such as a paint bucket tool) configured with a selected color to fill the above-mentioned target area with the entire color with one click; or first continue to draw multiple closed figures to be filled in the target area based on the target drawing tool, and then use the above-mentioned one-click coloring tool to fill each closed figure in the target area separately, so that the target area contains multiple closed figures of different colors.

[0077] Exemplary description, Figure 2c A schematic diagram of an interface for filling a two-dimensional top view provided by an embodiment of the present application is shown. Figure 2c As shown, in Figure 2a Based on the outer boundaries of the multiple two-dimensional top views 210 shown, the scene editor fills each target area in the first window 201 in response to the user's filling operation on the target area circled by each outer boundary, and the filled target area can be obtained as the final two-dimensional top view 210.

[0078] Regarding the specific implementation of the above step S102, for each acquired two-dimensional top view, as an optional embodiment, Figure 3a A flow chart of a first method for generating a target three-dimensional terrain corresponding to the two-dimensional top view is shown, as shown in FIG. Figure 3a As shown, when executing step S102, the method includes steps S301-S302, specifically:

[0079] S301 : When the two-dimensional top view includes a plurality of image units filled with different colors, determine a target color system to which the entire two-dimensional top view belongs according to the filling color in each of the image units.

[0080] Here, for each two-dimensional top view obtained, the two-dimensional top view can be filled with one color or multiple colors. In the case of being filled with multiple colors, when the multiple colors filled in the two-dimensional top view all belong to the same color system, one terrain attribute is mapped based on one color system. At this time, even if the two-dimensional top view is filled with multiple different colors, the target color system to which the entire two-dimensional top view belongs can still be determined according to the method in the above-mentioned step S301, thereby generating a target three-dimensional terrain with only one terrain attribute (i.e., matching the terrain attribute mapped by the target color system) based on the terrain attribute mapped by the target color system.

[0081] Specifically, in combination with the content of the above-mentioned step a1, it can be known that the first window can be composed of multiple unit area grids, or it can be an ordinary interface without grid division; wherein, when the first window contains the above-mentioned multiple unit area grids, the image unit in step S102 can be represented as a grid filled with color in a two-dimensional top view; and when no grid division is performed in the first window, the image unit in step S102 can be represented as a pixel point filled with color in a two-dimensional top view; the embodiment of the present application does not impose any limitation on the specific representation method of the image unit in the above-mentioned step S102.

[0082] S302 : Generate a target three-dimensional terrain corresponding to the two-dimensional top view according to the target color system and the filling color in each of the image units.

[0083] Here, based on the fact that the various colors filled in the two-dimensional top view all belong to the same color system (i.e., the entire two-dimensional top view belongs to the target color system), the terrain attributes of the generated target three-dimensional terrain match the terrain attributes mapped by the above-mentioned target color system; for example, the two-dimensional top view is filled with a variety of green colors (e.g., light green, dark green, etc. of different shades). At this time, it can be determined that the target color system to which the entire two-dimensional top view belongs is the green system, and based on the fact that the terrain attribute mapped by the green system is vegetation mountain, the terrain attribute of the target three-dimensional terrain to be generated is determined to be vegetation mountain.

[0084] Here, when the two-dimensional top view is filled with only one color, the terrain height of the target three-dimensional terrain to be generated can be determined based on the terrain height mapped by the color. When the two-dimensional top view is filled with multiple colors, each image unit filled with a color in the two-dimensional top view corresponds to a voxel unit (i.e., volume element) in the target three-dimensional terrain. Therefore, when generating the target three-dimensional terrain, it is only necessary to ensure that the height of each voxel unit in the target three-dimensional terrain matches the terrain height mapped by the fill color in the image unit corresponding to the voxel unit in the two-dimensional top view.

[0085] Exemplary description, Figure 3b FIG. 1 shows a schematic diagram of an interface for displaying all generated target three-dimensional terrains in a second window provided by an embodiment of the present application, such as Figure 3b As shown, after the drawing is completed Figure 2cAfter the multiple two-dimensional top-view images 210 shown, taking the automatic acquisition of each two-dimensional top-view image 210 drawn in the first window 201 as a two-dimensional top-view image that needs to be converted into three-dimensional terrain as an example, the user can instruct the scene editor to automatically acquire each two-dimensional top-view image 210 drawn in the first window 201 by triggering the target switching control 300, and generate a target three-dimensional terrain 310 corresponding to each two-dimensional top-view image 210, and switch the first window currently used for drawing the two-dimensional top view to the second window 202 for displaying the target three-dimensional terrain 310 in three-dimensional space, and also display each generated target three-dimensional terrain 310 in the second window 202; wherein, in the second window 202, the display position of each target three-dimensional terrain 310 on the virtual ground plane 320 is determined according to the display position of the corresponding two-dimensional top view 210 in the first window 201.

[0086] As another optional embodiment, Figure 4 A schematic flow chart of a second method for generating a target three-dimensional terrain corresponding to the two-dimensional top view is shown. Figure 4 As shown, when executing step S102, the method includes steps S401-S402, specifically:

[0087] S401, when the two-dimensional overhead view includes multiple local image areas belonging to different color systems, for each of the local image areas, generate a local three-dimensional terrain corresponding to the local image area based on the first color system to which the local image area belongs and the filling color within each image unit in the local image area.

[0088] Here, different from the above-mentioned step S301, when the multiple colors filled in the two-dimensional overhead view do not belong to the same color system, it can be determined based on the number of image units with the same color system as the filled colors. When the proportion of the number of image units in the same color system to the total number of image units in the two-dimensional overhead view exceeds a preset threshold, it can be determined that the multiple image units in the same color system constitute a local image area belonging to the color system. Thus, for the first color system to which each local image area belongs, based on the terrain attributes mapped by the first color system, a local three-dimensional terrain corresponding to each local image area is generated (i.e., the terrain attributes of the local three-dimensional terrain match the terrain attributes mapped by the first color system).

[0089] Specifically, in step S401, similar to the above step S302, for each local three-dimensional terrain, it is only necessary to ensure that the height of each voxel unit in the local three-dimensional terrain matches the terrain height of the fill color mapping in the image unit corresponding to the voxel unit in the local image area.

[0090] S402 , combining the local three-dimensional terrain corresponding to each local image region in the two-dimensional top view according to the relative position relationship of the different local image regions in the two-dimensional top view in three-dimensional space to obtain the target three-dimensional terrain composed of all the local three-dimensional terrains.

[0091] As an example, take a two-dimensional top view containing a green local image area a and a brown local image area b as an example, where the terrain attribute based on the green mapping is a vegetation mountain and the terrain attribute based on the brown mapping is a gravel mountain. The local three-dimensional terrain corresponding to the local image area a can be generated as vegetation mountain A (the terrain height distribution is determined according to the distribution of different colors in the local image area a), and the local three-dimensional terrain corresponding to the local image area b is gravel mountain B (the terrain height distribution is determined according to the distribution of different colors in the local image area b). If the local image area a is located to the left of the local image area b in the two-dimensional top view, then when generating the target three-dimensional terrain, the vegetation mountain A will also be embedded on the left side of the gravel mountain B.

[0092] It should be noted that the two-dimensional top view in steps S401-S402 refers to all the two-dimensional top views obtained in step S101. That is, no matter whether one or multiple two-dimensional top views are obtained in step S101, each of the obtained two-dimensional top views can be processed in the same way as steps S401-S402 to generate the target three-dimensional terrain corresponding to each two-dimensional top view.

[0093] With respect to the specific implementation of steps S101-S102 above, based on the two-dimensional top view drawn by the user in the first window from a top-down perspective, the corresponding target three-dimensional terrain can be generated in the second window. On this basis, in order to enrich the terrain details of the target three-dimensional terrain finally generated, the scene editor can also provide the user with other windows for drawing two-dimensional graphics in addition to the first window, so that the user can draw two-dimensional views from perspectives other than the top-down perspective in other windows, thereby comprehensively generating a target three-dimensional terrain with richer surface details based on the two-dimensional views from all different perspectives, including the two-dimensional top view.

[0094] Based on this, as an optional embodiment, Figure 5 FIG. 1 shows a flow chart of another method for generating a target three-dimensional terrain according to an embodiment of the present application. Figure 5 As shown, the method includes steps S501-S506, specifically:

[0095] S501 : In response to a target operation on a target two-dimensional top view drawn in the first window, a plurality of virtual controls indicating different two-dimensional views are displayed in the first window.

[0096] Here, the above-mentioned target two-dimensional top view represents any two-dimensional top view drawn in the first window. That is, before the user selects a two-dimensional top view from the first window that actually needs to be converted into three-dimensional terrain, the user can select any two-dimensional top view from the first window as the target two-dimensional top view in advance, so that before the three-dimensional terrain conversion is performed, other two-dimensional views (such as left view, cross-sectional view, etc.) of each two-dimensional top view from other perspectives can be prepared in advance.

[0097] Specifically, when the scene editor runs on different types of electronic devices, the user can trigger the above-mentioned target operations in different ways; for example, when the scene editor runs on a computer, the user can trigger the display of multiple virtual controls indicating different two-dimensional views in the first window by right-clicking the mouse at the target two-dimensional top view (that is, the above-mentioned target operation is equivalent to the right-click operation of the mouse at this time); when the scene editor runs on a mobile terminal (such as a mobile phone, tablet, etc.), the user can trigger the display of multiple virtual controls indicating different two-dimensional views in the first window by double-clicking the finger at the target two-dimensional top view (that is, the above-mentioned target operation is equivalent to the double-click operation of the finger at this time).

[0098] Specifically, the above-mentioned two-dimensional views include but are not limited to: two-dimensional cross-sectional views, two-dimensional left views, and two-dimensional right views; the embodiments of the present application do not impose any restrictions on the specific types and specific quantities of the above-mentioned two-dimensional views.

[0099] S502 : In response to a triggering operation on a first virtual control among a plurality of virtual controls, display a third window for drawing a first two-dimensional view in the graphical user interface.

[0100] Here, the first two-dimensional view represents the two-dimensional view indicated by the first virtual control; wherein, the first two-dimensional view can be any one of the above-mentioned two-dimensional cross-sectional view, two-dimensional left view, and two-dimensional right view. The embodiment of the present application does not impose any limitation on the specific two-dimensional view type represented by the first two-dimensional view.

[0101] Specifically, when the scene editor runs on different types of electronic devices, the user can trigger the above-mentioned first virtual control in different ways; for example, when the scene editor runs on a computer, the user can click the first virtual control with the mouse (that is, the above-mentioned triggering operation is equivalent to a mouse clicking operation at this time) to trigger the display of a third window for drawing the first two-dimensional view in the graphical user interface; when the scene editor runs on a mobile terminal (such as a mobile phone, tablet, etc.), the user can touch the first virtual control with a finger (that is, the above-mentioned triggering operation is equivalent to a finger touching operation at this time) to trigger the display of the third window for drawing the first two-dimensional view in the graphical user interface.

[0102] It should be noted that in the graphical user interface, the third window can be a pop-up window, that is, the third window can be displayed side by side with the first window in the graphical user interface, and there is no need to forcibly limit the first window to be switched to the third window.

[0103] S503 : After the first two-dimensional view is drawn in the third window, in response to a triggering operation on the target switching control, obtain the two-dimensional top view drawn by the user from the first window.

[0104] Here, the method of drawing the first two-dimensional view in the third window is similar to the method of drawing the two-dimensional top view in the first window shown in the above steps a1-a2, and the repeated parts are not repeated here.

[0105] Here, in step S503 , the method of obtaining the two-dimensional top view drawn by the user is the same as that of the above step S101 , and the repeated parts are not repeated here.

[0106] S504 : When the acquired two-dimensional top view includes the target two-dimensional top view, acquiring the first two-dimensional view from the third window.

[0107] Here, when the acquired two-dimensional top view includes the above-mentioned target two-dimensional top view, in addition to acquiring the target two-dimensional top view from the first window in the above-mentioned step S503, based on the fact that the user has previously drawn the first two-dimensional views under other perspectives (i.e., other perspectives except the top view perspective) corresponding to the target two-dimensional top view in the third window, before determining the three-dimensional terrain corresponding to the target two-dimensional top view, it is also necessary to acquire the above-mentioned first two-dimensional view from the third window.

[0108] S505 : For the target two-dimensional top view, generate a first target three-dimensional terrain that matches both the target two-dimensional top view and the first two-dimensional view according to the color information of the target two-dimensional top view and the color information of the first two-dimensional view.

[0109] Here, based on the different terrain heights of different color mappings, when generating the above-mentioned first target three-dimensional terrain, the terrain height mapped by the color information of the target two-dimensional top view and the terrain height mapped by the color information of the first two-dimensional view can be weighted summed to obtain the comprehensive height, which can be determined as the final terrain height of the first target three-dimensional terrain.

[0110] S506 : For the other acquired two-dimensional top view, generate a second target three-dimensional terrain corresponding to the other two-dimensional top view according to the color information of the other two-dimensional top view.

[0111] Here, the other two-dimensional top views represent the two-dimensional top views other than the target two-dimensional top view in the obtained two-dimensional top views; that is, in addition to the above-mentioned target top view, when other two-dimensional top views are also obtained in step S503, the method for generating the target three-dimensional terrain in the aforementioned step S102 can be referred to to generate the second target three-dimensional terrain corresponding to each of the above-mentioned other two-dimensional top views, and the repetitions are not repeated here.

[0112] It should be noted that the number of other two-dimensional top-view images in step S506 is related to the number of two-dimensional top-view images obtained in step S503, that is, the number of other two-dimensional top-view images in step S506 can be one or more. Regardless of whether the number of other two-dimensional top-view images in step S506 is one or more, each other two-dimensional top-view can be processed in the same way as the target three-dimensional terrain in the aforementioned step S102 to generate a second target three-dimensional terrain corresponding to each other two-dimensional top view.

[0113] S507 , in response to completion of generation of the first target three-dimensional terrain and all the second target three-dimensional terrains, switching the first window displayed in the graphical user interface to a second window, and displaying the first target three-dimensional terrain and each of the second target three-dimensional terrains in the second window.

[0114] Here, the specific implementation of step S507 can refer to the implementation of the aforementioned step S103, and the repeated parts are not repeated here.

[0115] Based on the method for generating the target three-dimensional terrain shown in steps S101-S103 above, the embodiment of the present application further provides the following two methods for editing and adjusting the target three-dimensional terrain, specifically:

[0116] In an optional embodiment, Figure 6 FIG. 1 shows a flow chart of a first method for adjusting a generated target three-dimensional terrain provided by an embodiment of the present application. Figure 6 As shown, after executing the above steps S101-S103, the method includes steps S601-S603, specifically:

[0117] S601 : In response to batch editing of a plurality of two-dimensional top views in the first window, displaying the plurality of two-dimensional top views after batch editing in the first window.

[0118] Here, unlike traditional three-dimensional scene models that can only adjust each three-dimensional terrain in three-dimensional space in turn, since the target three-dimensional terrain in the embodiment of the present application is generated based on the conversion of the two-dimensional top view, the user can batch edit multiple two-dimensional top views in the first window to achieve global planning between different three-dimensional terrains generated in the future.

[0119] It should be noted that when performing batch editing, the user can edit all two-dimensional top views drawn in the first window, or edit part of the two-dimensional top views drawn in the first window; the embodiment of this application does not impose any restrictions on the specific number of two-dimensional top views that the user batch edits.

[0120] It should be noted that when performing batch editing, for any two-dimensional top view to be edited, the editing operations that the user can perform on the two-dimensional top view include but are not limited to: modifying the outer boundary shape of the two-dimensional top view, moving and changing the display position of the two-dimensional top view in the first window, changing the fill color in the two-dimensional top view, etc.; the embodiments of this application do not impose any restrictions on the specific types of editing operations that the user can perform in the first window.

[0121] S602, in response to a triggering operation on a target switching control in the graphical user interface, when the multiple two-dimensional top-views belong to the acquired two-dimensional top-views, batch adjust the target three-dimensional terrain corresponding to the multiple two-dimensional top-views according to the multiple two-dimensional top-views after batch editing.

[0122] Here, the implementation of step S602 is similar to the method of generating the target three-dimensional terrain in step S102, which is equivalent to regenerating the corresponding target three-dimensional terrain based on each two-dimensional top view after batch editing when executing step S602.

[0123] S603 , in response to completion of the batch adjustment, switching the first window displayed in the graphical user interface to a second window, and displaying each target three-dimensional terrain after the batch adjustment in the second window.

[0124] Here, the specific implementation of step S603 can refer to the implementation of the aforementioned step S103, and the repeated parts are not repeated here.

[0125] In another optional embodiment, Figure 7 FIG. 1 shows a flow chart of a second method for adjusting the generated target three-dimensional terrain provided by an embodiment of the present application. Figure 7 As shown, after executing the above steps S101-S103, the method includes step S701, specifically:

[0126] S701 , in response to an adjustment operation on any target three-dimensional terrain in the second window, adjusting the model of the target three-dimensional terrain in three-dimensional space, and displaying the adjusted target three-dimensional terrain in the second window.

[0127] Here, in three-dimensional space, the user can use some shaping tools (such as push / pull, smooth, sharp, flat, slope, etc.) to adjust the model of the target three-dimensional terrain. The embodiment of this application does not impose any restrictions on the specific adjustment method of the target three-dimensional terrain.

[0128] Based on the terrain generation method provided in the embodiment of the present application, in response to a trigger operation on a target switching control in a graphical user interface, a two-dimensional top view drawn by the user is obtained from the first window; based on the color information of the obtained two-dimensional top view, a target three-dimensional terrain corresponding to the two-dimensional top view is generated; in response to the completion of the generation of all target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain is displayed in the second window. In this way, by converting the two-dimensional top view drawn by the user into a matching three-dimensional terrain, the present application facilitates the user to achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, effectively improving the efficiency of generating and building three-dimensional scene models.

[0129] Based on the same inventive concept, the present application also provides a terrain generation device corresponding to the above-mentioned terrain generation method. Since the principle of solving the problem by the terrain generation device in the embodiment of the present application is similar to that of the above-mentioned terrain generation method in the embodiment of the present application, the implementation of the terrain generation device can refer to the implementation of the above-mentioned terrain generation method, and the repeated parts will not be repeated.

[0130] Reference Figure 8 As shown, Figure 8 A schematic diagram of the structure of a terrain generation device provided in an embodiment of the present application is shown, wherein a graphical user interface is provided through a scene editor, and a first window for drawing a two-dimensional graphic is displayed in the graphical user interface. The terrain generation device includes:

[0131] A first response module 801 is configured to respond to a triggering operation on a target switching control in the graphical user interface and obtain a two-dimensional top view drawn by the user from the first window;

[0132] A generating module 802 is configured to generate a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping;

[0133] The second response module 803 is configured to, in response to the completion of generation of all the target three-dimensional terrains, switch the first window displayed in the graphical user interface to a second window, and display each target three-dimensional terrain in the second window; wherein the second window is configured to display each generated target three-dimensional terrain in three-dimensional space, and the display position of each target three-dimensional terrain in the second window is determined based on the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

[0134] In an optional embodiment, the terrain generating device further includes a drawing module, wherein the drawing module is configured to draw a two-dimensional top view in the first window by:

[0135] In response to movement of a target drawing tool in the first window, generating an outer boundary corresponding to the two-dimensional top view according to a movement path of the target drawing tool;

[0136] In response to the coloring operation on the target area delineated by the outer boundary, the target area is colored in the first window, and the colored target area is obtained as the two-dimensional top view.

[0137] In an optional implementation, when acquiring the two-dimensional top view drawn by the user from the first window, the first responding module 801 is configured to:

[0138] Obtaining the two-dimensional top view drawn by the user from the first window;

[0139] or,

[0140] From the first window, a two-dimensional top view pre-selected by the user is obtained.

[0141] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the generating module 802 is configured to:

[0142] When the two-dimensional top view includes a plurality of image units filled with different colors, determining the target color system to which the entire two-dimensional top view belongs according to the filling color in each of the image units;

[0143] A target three-dimensional terrain corresponding to the two-dimensional top view is generated based on the target color system and the fill color within each of the image units; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes mapped by the target color system, and the height of each voxel unit in the target three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the two-dimensional top view.

[0144] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the generating module 802 is configured to:

[0145] When the two-dimensional top view includes multiple local image regions belonging to different color systems, for each local image region, a local three-dimensional terrain corresponding to the local image region is generated based on the first color system to which the local image region belongs and the fill color within each image unit in the local image region; wherein the terrain attributes of the local three-dimensional terrain match the terrain attributes mapped by the first color system, and the height of each voxel unit in the local three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the local image region;

[0146] According to the relative position relationship of different local image areas in the two-dimensional top view, the local three-dimensional terrain corresponding to each local image area is combined in three-dimensional space to obtain the target three-dimensional terrain composed of all the local three-dimensional terrains.

[0147] In an optional embodiment, the terrain generating device further includes: a third response module, wherein the third response module is configured to:

[0148] In response to a target operation on a target two-dimensional top view drawn in the first window, displaying a plurality of virtual controls indicating different two-dimensional views in the first window; wherein the target two-dimensional top view represents any one of the two-dimensional top views drawn in the first window;

[0149] In response to a triggering operation on a first virtual control among a plurality of virtual controls, displaying a third window for drawing a first two-dimensional view in the graphical user interface; wherein the first two-dimensional view represents the two-dimensional view indicated by the first virtual control;

[0150] After the first two-dimensional view is drawn in the third window, in response to a triggering operation on the target switching control, obtaining at least one two-dimensional top view drawn and selected by the user from the first window;

[0151] When the acquired two-dimensional top view includes the target two-dimensional top view, acquiring the first two-dimensional view from the third window;

[0152] For the target two-dimensional top view, generating a first target three-dimensional terrain that matches the target two-dimensional top view and the first two-dimensional view according to color information of the target two-dimensional top view and color information of the first two-dimensional view;

[0153] For the other acquired two-dimensional top views, generating a second target three-dimensional terrain corresponding to the other two-dimensional top views based on color information of the other two-dimensional top views; wherein the other two-dimensional top views represent two-dimensional top views other than the target two-dimensional top view among the acquired two-dimensional top views;

[0154] In response to the completion of generation of the first target 3D terrain and all the second target 3D terrains, the first window displayed in the graphical user interface is switched to a second window, and the first target 3D terrain and each of the second target 3D terrains are displayed in the second window.

[0155] In an optional embodiment, the terrain generating device further includes: a first adjustment module, wherein the first adjustment module is configured to:

[0156] In response to batch editing of the plurality of two-dimensional top views in the first window, displaying the plurality of two-dimensional top views after batch editing in the first window;

[0157] In response to a triggering operation on a target switching control in the graphical user interface, when the plurality of two-dimensional top-view images belong to the acquired two-dimensional top-view images, batch-adjusting the target three-dimensional terrains corresponding to the plurality of two-dimensional top-view images according to the batch-edited plurality of two-dimensional top-view images;

[0158] In response to the completion of the batch adjustment, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain after the batch adjustment is displayed in the second window.

[0159] In an optional embodiment, the terrain generating device further includes: a second adjustment module, wherein the second adjustment module is configured to:

[0160] In response to an adjustment operation on any target three-dimensional terrain in the second window, a model of the target three-dimensional terrain is adjusted in three-dimensional space, and the adjusted target three-dimensional terrain is displayed in the second window.

[0161] Based on the terrain generation device provided by the embodiment of the present application, in response to the triggering operation of the target switching control in the graphical user interface, the two-dimensional top view drawn by the user is obtained from the first window; based on the color information of the obtained two-dimensional top view, the target three-dimensional terrain corresponding to the two-dimensional top view is generated; in response to the completion of the generation of all target three-dimensional terrains, the first window displayed in the graphical user interface is switched to the second window, and each target three-dimensional terrain is displayed in the second window. In this way, the present application converts the two-dimensional top view drawn by the user into a matching three-dimensional terrain, so that the user can achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, effectively improving the generation and construction efficiency of the three-dimensional scene model.

[0162] Based on the same inventive concept, the present application also provides an electronic device corresponding to the above-mentioned terrain generation method. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned terrain generation method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the above-mentioned terrain generation method, and the repeated parts will not be repeated.

[0163] Figure 9 This is a schematic diagram of the structure of an electronic device 900 provided in an embodiment of the present application, including: a processor 901, a memory 902, and a bus 903. The memory 902 stores machine-readable instructions executable by the processor 901. When the electronic device executes a terrain generation method such as in the embodiment, the processor 901 communicates with the memory 902 via the bus 903. The processor 901 executes the machine-readable instructions. A graphical user interface is provided through a scene editor, and a first window for drawing a two-dimensional graphic is displayed in the graphical user interface. When the processor 901 executes the machine-readable instructions, the following steps are implemented, specifically:

[0164] In response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by the user from the first window;

[0165] generating a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping;

[0166] In response to the completion of generation of all the target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and the target three-dimensional terrain is displayed in the second window; wherein the second window is used to display the generated target three-dimensional terrain in three-dimensional space, and the display position of the target three-dimensional terrain in the second window is determined according to the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

[0167] In an optional implementation, the processor 901 is configured to draw a two-dimensional top view in the first window by:

[0168] In response to movement of a target drawing tool in the first window, generating an outer boundary corresponding to the two-dimensional top view according to a movement path of the target drawing tool;

[0169] In response to the coloring operation on the target area delineated by the outer boundary, the target area is colored in the first window, and the colored target area is obtained as the two-dimensional top view.

[0170] In an optional implementation, when acquiring the two-dimensional top view drawn by the user from the first window, the processor 901 is configured to:

[0171] Obtaining the two-dimensional top view drawn by the user from the first window;

[0172] or,

[0173] From the first window, a two-dimensional top view pre-selected by the user is obtained.

[0174] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the processor 901 is configured to:

[0175] When the two-dimensional top view includes a plurality of image units filled with different colors, determining the target color system to which the entire two-dimensional top view belongs according to the filling color in each of the image units;

[0176] A target three-dimensional terrain corresponding to the two-dimensional top view is generated based on the target color system and the fill color within each of the image units; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes mapped by the target color system, and the height of each voxel unit in the target three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the two-dimensional top view.

[0177] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the processor 901 is configured to:

[0178] When the two-dimensional top view includes multiple local image regions belonging to different color systems, for each local image region, a local three-dimensional terrain corresponding to the local image region is generated based on the first color system to which the local image region belongs and the fill color within each image unit in the local image region; wherein the terrain attributes of the local three-dimensional terrain match the terrain attributes mapped by the first color system, and the height of each voxel unit in the local three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the local image region;

[0179] According to the relative position relationship of different local image areas in the two-dimensional top view, the local three-dimensional terrain corresponding to each local image area is combined in three-dimensional space to obtain the target three-dimensional terrain composed of all the local three-dimensional terrains.

[0180] In an optional implementation, the processor 901 is further configured to:

[0181] In response to a target operation on a target two-dimensional top view drawn in the first window, displaying a plurality of virtual controls indicating different two-dimensional views in the first window; wherein the target two-dimensional top view represents any one of the two-dimensional top views drawn in the first window;

[0182] In response to a triggering operation on a first virtual control among a plurality of virtual controls, displaying a third window for drawing a first two-dimensional view in the graphical user interface; wherein the first two-dimensional view represents the two-dimensional view indicated by the first virtual control;

[0183] After the first two-dimensional view is drawn in the third window, in response to a triggering operation on the target switching control, obtaining at least one two-dimensional top view drawn and selected by the user from the first window;

[0184] When the acquired two-dimensional top view includes the target two-dimensional top view, acquiring the first two-dimensional view from the third window;

[0185] For the target two-dimensional top view, generating a first target three-dimensional terrain that matches the target two-dimensional top view and the first two-dimensional view according to color information of the target two-dimensional top view and color information of the first two-dimensional view;

[0186] For the other acquired two-dimensional top views, generating a second target three-dimensional terrain corresponding to the other two-dimensional top views based on color information of the other two-dimensional top views; wherein the other two-dimensional top views represent two-dimensional top views other than the target two-dimensional top view among the acquired two-dimensional top views;

[0187] In response to the completion of generation of the first target 3D terrain and all the second target 3D terrains, the first window displayed in the graphical user interface is switched to a second window, and the first target 3D terrain and each of the second target 3D terrains are displayed in the second window.

[0188] In an optional implementation, the processor 901 is further configured to:

[0189] In response to batch editing of the plurality of two-dimensional top views in the first window, displaying the plurality of two-dimensional top views after batch editing in the first window;

[0190] In response to a triggering operation on a target switching control in the graphical user interface, when the plurality of two-dimensional top-view images belong to the acquired two-dimensional top-view images, batch-adjusting the target three-dimensional terrains corresponding to the plurality of two-dimensional top-view images according to the batch-edited plurality of two-dimensional top-view images;

[0191] In response to the completion of the batch adjustment, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain after the batch adjustment is displayed in the second window.

[0192] In an optional implementation, the processor 901 is further configured to:

[0193] In response to an adjustment operation on any target three-dimensional terrain in the second window, a model of the target three-dimensional terrain is adjusted in three-dimensional space, and the adjusted target three-dimensional terrain is displayed in the second window.

[0194] The electronic device provided by the embodiment of the present application responds to a trigger operation on a target switching control in a graphical user interface, obtains a two-dimensional top view drawn by the user from the first window; generates a target three-dimensional terrain corresponding to the two-dimensional top view based on the color information of the obtained two-dimensional top view; and in response to the completion of the generation of all target three-dimensional terrains, switches the first window displayed in the graphical user interface to a second window, and displays each target three-dimensional terrain in the second window. In this way, the present application converts the two-dimensional top view drawn by the user into a matching three-dimensional terrain, making it easier for the user to achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, thereby effectively improving the efficiency of generating and building three-dimensional scene models.

[0195] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which provides a graphical user interface through a scene editor, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic; the computer program is executed by a processor when running, and the processor performs the following steps:

[0196] In response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by the user from the first window;

[0197] generating a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping;

[0198] In response to the completion of generation of all the target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and the target three-dimensional terrain is displayed in the second window; wherein the second window is used to display the generated target three-dimensional terrain in three-dimensional space, and the display position of the target three-dimensional terrain in the second window is determined according to the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

[0199] In an optional implementation, the processor is configured to draw a two-dimensional top view in the first window by:

[0200] In response to movement of a target drawing tool in the first window, generating an outer boundary corresponding to the two-dimensional top view according to a movement path of the target drawing tool;

[0201] In response to the coloring operation on the target area delineated by the outer boundary, the target area is colored in the first window, and the colored target area is obtained as the two-dimensional top view.

[0202] In an optional implementation, when acquiring the two-dimensional top view drawn by the user from the first window, the processor is configured to:

[0203] Obtaining the two-dimensional top view drawn by the user from the first window;

[0204] or,

[0205] From the first window, a two-dimensional top view pre-selected by the user is obtained.

[0206] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the processor is configured to:

[0207] When the two-dimensional top view includes a plurality of image units filled with different colors, determining the target color system to which the entire two-dimensional top view belongs according to the filling color in each of the image units;

[0208] A target three-dimensional terrain corresponding to the two-dimensional top view is generated based on the target color system and the fill color within each of the image units; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes mapped by the target color system, and the height of each voxel unit in the target three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the two-dimensional top view.

[0209] In an optional implementation, when generating the target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view, the processor is configured to:

[0210] When the two-dimensional top view includes multiple local image regions belonging to different color systems, for each local image region, a local three-dimensional terrain corresponding to the local image region is generated based on the first color system to which the local image region belongs and the fill color within each image unit in the local image region; wherein the terrain attributes of the local three-dimensional terrain match the terrain attributes mapped by the first color system, and the height of each voxel unit in the local three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the local image region;

[0211] According to the relative position relationship of different local image areas in the two-dimensional top view, the local three-dimensional terrain corresponding to each local image area is combined in three-dimensional space to obtain the target three-dimensional terrain composed of all the local three-dimensional terrains.

[0212] In an optional implementation, the processor is further configured to:

[0213] In response to a target operation on a target two-dimensional top view drawn in the first window, displaying a plurality of virtual controls indicating different two-dimensional views in the first window; wherein the target two-dimensional top view represents any one of the two-dimensional top views drawn in the first window;

[0214] In response to a triggering operation on a first virtual control among a plurality of virtual controls, displaying a third window for drawing a first two-dimensional view in the graphical user interface; wherein the first two-dimensional view represents the two-dimensional view indicated by the first virtual control;

[0215] After the first two-dimensional view is drawn in the third window, in response to a triggering operation on the target switching control, obtaining at least one two-dimensional top view drawn and selected by the user from the first window;

[0216] When the acquired two-dimensional top view includes the target two-dimensional top view, acquiring the first two-dimensional view from the third window;

[0217] For the target two-dimensional top view, generating a first target three-dimensional terrain that matches the target two-dimensional top view and the first two-dimensional view according to color information of the target two-dimensional top view and color information of the first two-dimensional view;

[0218] For the other acquired two-dimensional top views, generating a second target three-dimensional terrain corresponding to the other two-dimensional top views based on color information of the other two-dimensional top views; wherein the other two-dimensional top views represent two-dimensional top views other than the target two-dimensional top view among the acquired two-dimensional top views;

[0219] In response to the completion of generation of the first target 3D terrain and all the second target 3D terrains, the first window displayed in the graphical user interface is switched to a second window, and the first target 3D terrain and each of the second target 3D terrains are displayed in the second window.

[0220] In an optional implementation, the processor is further configured to:

[0221] In response to batch editing of the plurality of two-dimensional top views in the first window, displaying the plurality of two-dimensional top views after batch editing in the first window;

[0222] In response to a triggering operation on a target switching control in the graphical user interface, when the plurality of two-dimensional top-view images belong to the acquired two-dimensional top-view images, batch-adjusting the target three-dimensional terrains corresponding to the plurality of two-dimensional top-view images according to the batch-edited plurality of two-dimensional top-view images;

[0223] In response to the completion of the batch adjustment, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain after the batch adjustment is displayed in the second window.

[0224] In an optional implementation, the processor is further configured to:

[0225] In response to an adjustment operation on any target three-dimensional terrain in the second window, a model of the target three-dimensional terrain is adjusted in three-dimensional space, and the adjusted target three-dimensional terrain is displayed in the second window.

[0226] Through the computer-readable storage medium provided in the embodiment of the present application, in response to a triggering operation on a target switching control in a graphical user interface, a two-dimensional top view drawn by the user is obtained from the first window; based on the color information of the obtained two-dimensional top view, a target three-dimensional terrain corresponding to the two-dimensional top view is generated; in response to the completion of the generation of all target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain is displayed in the second window. In this way, by converting the two-dimensional top view drawn by the user into a matching three-dimensional terrain, the present application facilitates the user to achieve global planning between different three-dimensional terrains to be generated in the future during the process of drawing the two-dimensional top view, effectively improving the efficiency of generating and building three-dimensional scene models.

[0227] In an embodiment of the present application, the computer-readable storage medium can also execute other machine-readable instructions when run by the processor to execute the terrain generation method as described in other embodiments. For the specific steps and principles of the terrain generation method, please refer to the description of the method side embodiment, which will not be repeated here.

[0228] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of the system or unit, which may be electrical, mechanical or other forms.

[0229] 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.

[0230] 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.

[0231] 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 several instructions for enabling a computer device (which can be a personal computer, a server, or a 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 various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0232] 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.

[0233] 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 terrain generation method, characterized in that: A graphical user interface is provided by a scene editor, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic. The terrain generation method includes: In response to a triggering operation on a target switching control in the graphical user interface, obtaining a two-dimensional top view drawn by the user from the first window; generating a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping; In response to the completion of generation of all the target three-dimensional terrains, the first window displayed in the graphical user interface is switched to a second window, and the target three-dimensional terrain is displayed in the second window; wherein the second window is used to display the generated target three-dimensional terrain in three-dimensional space, and the display position of the target three-dimensional terrain in the second window is determined according to the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

2. The terrain generation method according to claim 1, characterized in that: Draw a 2D top view in the first window using the following method: In response to movement of a target drawing tool in the first window, generating an outer boundary corresponding to the two-dimensional top view according to a movement path of the target drawing tool; In response to the coloring operation on the target area delineated by the outer boundary, the target area is colored in the first window, and the colored target area is obtained as the two-dimensional top view.

3. The terrain generation method according to claim 1, characterized in that: The step of obtaining the two-dimensional top view drawn by the user from the first window includes: Obtaining the two-dimensional top view drawn by the user from the first window; or, From the first window, a two-dimensional top view pre-selected by the user is obtained.

4. The terrain generation method according to claim 1, characterized in that: Generating a target three-dimensional terrain corresponding to the two-dimensional top view according to the acquired color information of the two-dimensional top view includes: When the two-dimensional top view includes a plurality of image units filled with different colors, determining the target color system to which the entire two-dimensional top view belongs according to the filling color in each of the image units; A target three-dimensional terrain corresponding to the two-dimensional top view is generated based on the target color system and the fill color within each of the image units; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes mapped by the target color system, and the height of each voxel unit in the target three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the two-dimensional top view.

5. The terrain generation method according to claim 1, characterized in that: Generating a target three-dimensional terrain corresponding to the two-dimensional top view according to the acquired color information of the two-dimensional top view includes: When the two-dimensional top view includes multiple local image regions belonging to different color systems, for each local image region, a local three-dimensional terrain corresponding to the local image region is generated based on the first color system to which the local image region belongs and the fill color within each image unit in the local image region; wherein the terrain attributes of the local three-dimensional terrain match the terrain attributes mapped by the first color system, and the height of each voxel unit in the local three-dimensional terrain matches the terrain height mapped by the fill color within the image unit corresponding to the voxel unit in the local image region; According to the relative position relationship of different local image areas in the two-dimensional top view, the local three-dimensional terrain corresponding to each local image area is combined in three-dimensional space to obtain the target three-dimensional terrain composed of all the local three-dimensional terrains.

6. The terrain generation method according to claim 1, characterized in that: The terrain generation method further includes: In response to a target operation on a target two-dimensional top view drawn in the first window, displaying a plurality of virtual controls indicating different two-dimensional views in the first window; wherein the target two-dimensional top view represents any one of the two-dimensional top views drawn in the first window; In response to a triggering operation on a first virtual control among a plurality of virtual controls, displaying a third window for drawing a first two-dimensional view in the graphical user interface; wherein the first two-dimensional view represents the two-dimensional view indicated by the first virtual control; After the first two-dimensional view is drawn in the third window, in response to a triggering operation on the target switching control, obtaining the two-dimensional top view drawn by the user from the first window; When the acquired two-dimensional top view includes the target two-dimensional top view, acquiring the first two-dimensional view from the third window; For the target two-dimensional top view, generating a first target three-dimensional terrain that matches the target two-dimensional top view and the first two-dimensional view according to color information of the target two-dimensional top view and color information of the first two-dimensional view; For the other acquired two-dimensional top views, generating a second target three-dimensional terrain corresponding to the other two-dimensional top views based on color information of the other two-dimensional top views; wherein the other two-dimensional top views represent two-dimensional top views other than the target two-dimensional top view among the acquired two-dimensional top views; In response to the completion of generation of the first target 3D terrain and all the second target 3D terrains, the first window displayed in the graphical user interface is switched to a second window, and the first target 3D terrain and each of the second target 3D terrains are displayed in the second window.

7. The terrain generation method according to claim 1, characterized in that: The terrain generation method further includes: In response to batch editing of the plurality of two-dimensional top views in the first window, displaying the plurality of two-dimensional top views after batch editing in the first window; In response to a triggering operation on a target switching control in the graphical user interface, when the plurality of two-dimensional top-view images belong to the acquired two-dimensional top-view images, batch-adjusting the target three-dimensional terrains corresponding to the plurality of two-dimensional top-view images according to the batch-edited plurality of two-dimensional top-view images; In response to the completion of the batch adjustment, the first window displayed in the graphical user interface is switched to a second window, and each target three-dimensional terrain after the batch adjustment is displayed in the second window.

8. The terrain generation method according to claim 1, characterized in that: The terrain generation method further includes: In response to an adjustment operation on any target three-dimensional terrain in the second window, a model of the target three-dimensional terrain is adjusted in three-dimensional space, and the adjusted target three-dimensional terrain is displayed in the second window.

9. A terrain generating device, characterized in that: A graphical user interface is provided by a scene editor, wherein the graphical user interface displays a first window for drawing a two-dimensional graphic, and the terrain generating device includes: A first response module is configured to respond to a triggering operation on a target switching control in the graphical user interface, and obtain a two-dimensional top view drawn by the user from the first window; a generating module, configured to generate a target three-dimensional terrain corresponding to the two-dimensional top view based on the acquired color information of the two-dimensional top view; wherein the terrain attributes of the target three-dimensional terrain match the terrain attributes of the color information mapping, and the terrain height of the target three-dimensional terrain matches the terrain height of the color information mapping; A second response module is configured to, in response to the completion of generation of all the target three-dimensional terrains, switch the first window displayed in the graphical user interface to a second window, and display each target three-dimensional terrain in the second window; wherein the second window is configured to display each generated target three-dimensional terrain in three-dimensional space, and the display position of each target three-dimensional terrain in the second window is determined based on the display position of the two-dimensional top view corresponding to the target three-dimensional terrain in the first window.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the terrain generation method as described in any one of claims 1 to 8 are performed.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the terrain generation method according to any one of claims 1 to 8.