CN115687552A - Scene map generation method and device, computer equipment and storage medium - Google Patents

Scene map generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115687552A
CN115687552A CN202211405749.5A CN202211405749A CN115687552A CN 115687552 A CN115687552 A CN 115687552A CN 202211405749 A CN202211405749 A CN 202211405749A CN 115687552 A CN115687552 A CN 115687552A
Authority
CN
China
Prior art keywords
target
terrain
map
editing
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211405749.5A
Other languages
Chinese (zh)
Inventor
王子一
陈俊宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202211405749.5A priority Critical patent/CN115687552A/en
Publication of CN115687552A publication Critical patent/CN115687552A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides a scene map generation method, a scene map generation device, a computer device and a storage medium, wherein the method comprises the following steps: generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units; determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile; and in response to the editing operation executed in the editing mode corresponding to the target editing element, adjusting the element information of at least one target map unit in the plurality of map units in the terrain tile to generate the target map. After the initial terrain tile is automatically generated, the embodiment of the disclosure can also support a user to edit the initial terrain tile, so that a terrain meeting the requirements of the user can be generated, and compared with a mode that the user manually makes a scene map, the method and the device can improve the scene map making efficiency.

Description

Scene map generation method and device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of map drawing technologies, and in particular, to a scene map generation method, an apparatus, a computer device, and a storage medium.
Background
Scene maps containing various terrains are often required in many simulation scenes or gaming applications.
In the process of generating the scene map, the scene map is usually directly generated according to various types of terrains, the terrain form in the generated scene map is fixed, and the generated terrains cannot be locally modified, so that the terrains meeting the requirements of users are difficult to generate.
Disclosure of Invention
The embodiment of the disclosure at least provides a scene map generation method, a scene map generation device, computer equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a scene map generation method, including:
generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
and adjusting element information of at least one target map unit in a plurality of map units in the terrain tile to generate a target map in response to editing operation performed in an editing mode corresponding to the target editing element.
In an alternative embodiment, the target editing element comprises a terrain element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a selection operation of a relief adjustment range, determining at least one target map unit located within the relief adjustment range from among a plurality of map units in the terrain tile;
and in response to the triggering operation of the terrain adjusting direction, adjusting the terrain information of the at least one target map unit after rising or falling according to the operation direction of the triggering operation.
In an alternative embodiment, the target editing element comprises a geological element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a geo-adjustment range selection operation, determining at least one target map cell of the plurality of map cells in the terrain tile that is within the geo-adjustment range;
and responding to the trigger operation of geological material adjustment, and adjusting the material information of the at least one target map unit according to the selected geological material.
In an alternative embodiment, the target editing element comprises a river element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
determining river path information in response to selection operations of a starting point, an end point and a turning point;
determining at least one target map unit to be replaced by a liquid unit in a plurality of map units in the terrain tile based on the river path information and preset river width information;
and responding to the liquid unit replacement operation, replacing the landscape information corresponding to the at least one target map unit with the landscape information corresponding to the liquid unit.
In an alternative embodiment, the target editing element comprises a lake sea element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
determining spatial area information of a liquid cell to be filled in response to a selection operation of a water bottom surface and a water surface in the terrain tile;
determining position information of a liquid unit to be filled in the space area indicated by the space area information based on the space area information, and taking the liquid unit to be filled as a target map unit;
and responding to the filling operation of the liquid unit, and modifying the landscape information of the target map unit into the landscape information corresponding to the liquid unit to be filled based on the position information of the liquid unit to be filled.
In an alternative embodiment, the target editing element includes a water-based element; the water system elements comprise river elements and/or lake sea elements;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a selection operation of a liquid unit deletion range, determining at least one target liquid unit in the liquid units, which is located within the liquid unit deletion range;
and responding to the liquid unit deleting operation, and modifying the landscape information corresponding to the target liquid unit into the original landscape information.
In an alternative embodiment, the target editing element comprises a map unit element of the target material;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to the selection operation of the map unit addition range, determining the position information of the map unit to be added in the map unit addition range, and taking the map unit to be added as a target map unit;
and in response to the map unit adding operation, modifying the material information of the target map unit into the material information of the target material corresponding to the map unit to be added based on the position information of the map unit to be added.
In an alternative embodiment, the target editing element comprises a map unit element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a map unit deletion range selection operation, determining at least one target map unit of a plurality of map units in the terrain tile that is within the map unit deletion range;
and in response to the map unit deleting operation, deleting the target map unit and the material information corresponding to the target map unit.
In an alternative embodiment, the generating a terrain tile of a target terrain type in response to the target terrain type being selected from a plurality of terrain types, comprises:
in response to a target terrain type selected from a plurality of terrain types, a terrain tile of the target terrain type is generated at a location indicated by a target terrain tile preview area around the generated target terrain tile.
In a second aspect, an embodiment of the present disclosure further provides a scene map generating apparatus, including:
a generation module for generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
the determining module is used for determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
and the adjusting module is used for responding to the editing operation executed by adopting the editing mode corresponding to the target editing element, and adjusting the element information of at least one target map unit in a plurality of map units in the terrain tile so as to generate the target map.
In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
In a fourth aspect, the disclosed embodiments further provide a computer-readable storage medium, where a computer program is stored, and the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
The scene map generation method provided by the embodiment of the disclosure can generate an initial terrain tile under a target terrain type based on the selected target terrain type, and can adjust element information of at least one target map unit in a plurality of map units in the terrain tile aiming at a target editing element. In the process, after the initial terrain tile is automatically generated, a user can be supported to edit and adjust the initial terrain tile in form details through a plurality of set editing elements, so that the terrain meeting the requirements of the user can be generated; compared with the mode that a user manually makes the scene map, the scene map making efficiency can be improved, and meanwhile compared with the mode that the scene map is directly generated based on the selected terrain type through one key, the terrain form in the scene map can be individually adjusted, so that the map making requirement is fully met.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is to be understood that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art to which the disclosure pertains without the benefit of the inventive faculty, and that additional related drawings may be derived therefrom.
Fig. 1 shows a flowchart of a scene map generation method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a schematic view of a terrain tile provided by embodiments of the present disclosure;
FIG. 3 illustrates a schematic view of another terrain tile provided by embodiments of the present disclosure;
FIG. 4 illustrates a schematic diagram of determining coverage of a landscape brush provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram illustrating the effect of the bump on the target map unit provided by the embodiment of the disclosure;
FIG. 6 is a schematic diagram illustrating an effect of a target map unit after changing a material according to an embodiment of the present disclosure;
FIG. 7 shows a schematic diagram of a river path generation provided by an embodiment of the present disclosure;
FIG. 8 is a terrain elevation map of a terrain tile in a horizontal plane provided by an embodiment of the present disclosure;
FIG. 9 illustrates a terrain elevation map of another terrain tile provided by embodiments of the present disclosure in a horizontal plane;
FIG. 10 illustrates a terrain elevation map of yet another terrain tile provided by an embodiment of the present disclosure in a horizontal plane;
fig. 11 illustrates a schematic diagram of filling liquid cells in a terrain tile provided by an embodiment of the present disclosure;
fig. 12 is a schematic diagram illustrating a scene map generation apparatus provided in an embodiment of the present disclosure;
fig. 13 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
In the process of generating a scene map, the scene map is usually directly generated according to various types of terrains, the terrain form in the generated scene map is fixed, and the generated terrains cannot be locally modified, so that the terrains meeting the requirements of users are difficult to generate.
Based on this, the scene map generation method provided by the embodiment of the present disclosure may generate an initial terrain tile in the target terrain type based on the selected target terrain type, and may adjust element information of at least one target map unit of a plurality of map units in the terrain tile for the target editing element. In the process, after the initial terrain tile is automatically generated, a user can be supported to edit and adjust the initial terrain tile in form details through a plurality of set editing elements, so that the terrain meeting the requirements of the user can be generated; compared with the mode that a user manually makes the scene map, the scene map making efficiency can be improved, and meanwhile compared with the mode that the scene map is directly generated based on the selected terrain type through one key, the terrain form in the scene map can be individually adjusted, so that the map making requirement is fully met.
The defects existing in the above solutions and the proposed solutions are the results obtained after the inventor has made practice and careful study, therefore, the discovery process of the above problems and the solutions proposed by the present disclosure in the following problems should be the contribution of the inventor to the present disclosure in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In order to facilitate understanding of the present embodiment, a scene map generation method disclosed in the embodiments of the present disclosure is first described in detail, and an execution subject of the scene map generation method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability.
The scene map generation method provided by the embodiment of the disclosure can be applied to a target operation interface for generating the scene map. The target operation interface may be an operation interface of an application, software, or the like for generating a scene map. The target operation interface can automatically generate an initial terrain tile, and can provide terrain editing tools and functions, and a user can manually edit the initial terrain tile on the target operation interface to finally obtain a target map.
Referring to fig. 1, a flowchart of a scene map generation method provided in the embodiment of the present disclosure is shown, where the method includes S101 to S103, where:
s101: generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile includes a plurality of map cells therein.
In the disclosed embodiment, the plurality of terrain types may include any terrain type that may constitute a landform ecology, such as plains, hills, mountains, canyons, waters, and the like. After the target terrain type is selected, a terrain tile of the target terrain type can be automatically generated. Attribute information of the terrain tiles of the target terrain type, such as size, height, slope, depth, width, etc., may be preset. For example, upon selection of a flat terrain, a flat terrain tile having a preset height may be automatically generated. The top layer of the plain terrain tiles may be a grass layer and the bottom layer may be a dirt layer.
Each terrain tile may include a plurality of map cells. In one embodiment, each map cell may be a cube of the same size and shape in the three-dimensional scene map. The map units form terrain tiles of different terrain types in a stacking, tiling and other modes. Based on the coordinate information of the respective map unit in the terrain tile, attribute information of the terrain tile may be determined.
In one embodiment, prior to generating a terrain tile of a target terrain type, if no other terrain tiles have been generated, a terrain tile of the target terrain type may be automatically generated at a default location in response to a target terrain type selected from a plurality of terrain types. In one embodiment, prior to generating a terrain tile of a target terrain type, if other terrain tiles have already been generated, a terrain tile of the target terrain type may be generated at a location indicated by a target terrain tile preview area surrounding the generated target terrain tile in response to a target terrain type selected from a plurality of terrain types.
In a schematic diagram of a terrain tile as shown in fig. 2, a plain terrain tile may be automatically generated at a default position in response to a plain terrain type selected among terrain type options of a target operation interface, the plain terrain tile being unconnected to other terrain tiles, and a terrain tile preview area may be presented at front, back, left, and right positions of the plain terrain tile, respectively. Wherein the shaded terrain tile preview area in figure 2 may represent a selected target terrain tile preview area.
In another exemplary illustration of terrain tiles as shown in FIG. 3, in response to a hilly terrain type selected from a plurality of terrain types, a hilly terrain tile may be generated at the location indicated by the target terrain tile preview area shown in FIG. 2, the hilly terrain tile being connected to the plains terrain tile. A terrain tile preview area may be displayed in the surroundings of the hilly terrain tiles and the plain terrain tiles at a location other than the location where the hilly terrain tiles are connected to the plain terrain tiles. The shaded terrain tile preview area in fig. 3 may represent a selected target terrain tile preview area. In response to a target terrain type selected from the plurality of terrain types, the terrain tile for the target terrain type may then continue to be generated at the location indicated by the target terrain tile preview area shown in FIG. 3.
In order to make the generated target map more realistic, the connection between the currently generated terrain tile and the generated target terrain tile may be subjected to a smooth transition process. In a specific implementation, the berlin noise algorithm may be used to perform the smooth transition processing, which may not be described in detail here.
By generating a terrain tile for the target terrain type, an initial terrain tile may be obtained. The initial terrain tiles may be edited in a subsequent process.
S102: determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the shape of the terrain tile.
The editing element may include an element for editing the initial terrain tile to adjust the form of the terrain tile. Specifically, the preset editing elements may include a relief element, a geological element, a water system element, a map unit element, and the like. The water system elements may specifically include river elements and lake sea elements.
In one embodiment, multiple preset editing elements may be displayed on the target operation interface, and the selected target editing element may be determined through a selection operation of a user on the target operation interface.
S103: and in response to the editing operation executed in the editing mode corresponding to the target editing element, adjusting the element information of at least one target map unit in the plurality of map units in the terrain tile to generate the target map.
The editing modes adopted can be different for different editing elements. For example, for a terrain element, different operating directions may be used to control the elevation and descent of the terrain; for geological elements, geology and the like can be changed by selecting different materials.
The editing modes adopted for the same editing elements can also be different. For example, the water system element may be selected from the water bottom surface and the water surface to form a lake or sea, from the starting point, the end point, and the turning point to form a river, or from the liquid unit corresponding to the water system element.
In one embodiment, the target editing element may comprise a terrain element. After the user selects the terrain brush on the target operation interface, the terrain elements can be edited. The editing mode corresponding to the terrain elements may include using different operation directions to control the rise and fall of the terrain.
In response to a selection operation of the terrain adjustment range, at least one target map unit of the plurality of map units in the terrain tile that is within the terrain adjustment range may be determined.
Here, the terrain adjustment range may be selected by a terrain brush. And determining a circular area, namely the coverage range of the terrain pen brush by taking the center of the terrain pen brush as a circle center and taking the first preset distance as a radius. In practice, as shown in fig. 4, the coverage of the brush may be displayed in a preset highlighting manner in the terrain tile, and the coverage of the brush may move as the brush moves.
The coverage range of the terrain pen brush is used as a reference circular plane, and a cylindrical range formed by circular planes which are parallel to the reference circular plane and have the same size is used as a terrain adjusting range. And then determining at least one target map unit in the plurality of map units in the terrain tile, wherein the target map unit is located in the terrain adjustment range according to the terrain adjustment range. At least one target map unit is the map unit of the terrain information to be adjusted.
In response to a triggering operation of the relief adjustment direction, relief information of the at least one target map unit after rising or falling may be adjusted according to the operation direction of the triggering operation.
The operation direction of the triggering operation of the terrain adjustment direction may be a direction perpendicular to the above-mentioned reference circular plane, and each time the triggering operation of the terrain adjustment direction is performed, the at least one target map unit may be changed by one terrain unit (the terrain unit includes, for example, a numerical value corresponding to a side length of one map unit) in the operation direction of the triggering operation. For example, after two successive terrain raising operations triggered by the target map unit are performed, the target map unit is raised by two terrain units.
In one embodiment, the at least one target map unit can be controlled to be raised by one unit within the terrain adjustment range by clicking a left mouse button, and the copied bottom map unit is used as a new bottom map unit to adjust the terrain information of the at least one target map unit after being raised. Fig. 5 shows a schematic diagram of the effect of the raised object map unit. In one embodiment, the at least one target map unit can be controlled to descend by one unit within the terrain adjustment range by clicking a right mouse button, and the map unit on the bottom layer is deleted, so as to adjust the terrain information of the at least one target map unit after descending. When the mouse is dragged, a new terrain adjusting range can be determined in real time, and after the mouse is clicked, the terrain information of at least one target map unit in the terrain adjusting range after being raised or lowered is adjusted according to the corresponding operation direction.
When the terrain elevation operation is performed, if there is a solid object within the terrain adjustment range, the solid object may rise along with the terrain. When the terrain descending operation is executed, if an entity or a house exists in the terrain adjusting range, the entity object descends along with the terrain.
In one embodiment, the target editing element may comprise a geological element, and the geological element may be edited after the user selects a geological brush on the target operation interface. The editing mode corresponding to the geological elements comprises changing geology by selecting different materials.
In response to a selection operation of the geo-adjustment range, at least one target map cell of the plurality of map cells in the terrain tile that is within the geo-adjustment range may be determined.
Here, the geological adjustment range may be selected by a geological brush. The geology adjustment range is determined in a similar manner to the terrain adjustment range. Specifically, a circular area determined by taking the center of the geological brush as a circle center and taking the second preset distance as a radius is the coverage area of the geological brush. The coverage range of the geological brush is the geological adjustment range. In practice, the geological adjustment range may be displayed in a preset prominent manner in the terrain tile, and the geological adjustment range may move with the movement of the geological brush.
Based on the selected geo-adjustment range, at least one target map cell of the plurality of map cells in the terrain tile that is within the geo-adjustment range may be located. At least one target map unit is the map unit of geological information to be adjusted.
In response to a trigger operation of geological material adjustment, material information of at least one target map unit may be adjusted based on the selected geological material.
In order to improve the reality of the target map, in an embodiment, the distribution of target map units of different materials may be adjusted through a target algorithm, and fig. 6 shows an effect schematic diagram of the target map units after the material is changed, and the distribution of the target map units of different materials is more uniform, so that the target map units and other map units are more visually smooth.
In one embodiment, the target editing element may include a river element, and the user may edit the river element after selecting the river brush on the target operation interface. The editing mode corresponding to the river element includes generating a river by the selected starting point, end point, and turning point.
In response to the selection operation of the start point, the end point, and the turning point, river course information may be determined.
Here, the location information of the start point, the end point, and the turning point may be location information of a map unit selected by the user on the terrain tile. The selected starting point, the selected end point and the turning point are in accordance with the flowing trend of the river from high to low. When a physical object (e.g., a house building) exists at the start point, the end point, and the turning point, a river is not generated.
As shown in fig. 7, after selecting the starting point in the terrain tile a, a first turning point may be selected within a preset range of the starting point, as shown by the terrain tile b. There may be at least one river path information between the starting point and the first turning point, where a river path that is the shortest distance from the starting point to the first turning point and that conforms to the flow trend, i.e. a river path shown by the terrain tile c, may be determined based on the target algorithm.
In the case where there are a plurality of map units around the starting point, the map unit closest to the high-low tendency of the starting point, which conforms to the tendency of flow, may be selected. Fig. 8 shows a terrain height map of a terrain tile in a horizontal plane, the numbers in the table represent height information of the map unit, and after selecting a starting point (height information is 9) and a first turning point (height information is 7), a first map unit closest to the height trend of the starting point can be determined from the starting point, then a second map unit closest to the height trend of the first map unit can be determined, and so on until all map units from the starting point to the first turning point are determined. And, the river course formed by all map cells from the starting point to the first turning point follows the flow trend and is the shortest of all river courses formed from the starting point to the first turning point.
Based on the same logic, each map cell from the starting point to the first transition point may be determined. After the first turning point is selected, a second turning point, here the end point of the river, as shown by the terrain tile d, may be selected, and river path information between the first turning point and the end point, i.e. the river path shown by the terrain tile e, is generated according to the above rules. When the mouse is moved to any turning point or end point, the river course preview information from the starting point to the turning point or end point can be generated.
When the river course is generated, if a situation as shown in fig. 9 occurs in which the map units having the height information of 5 and 6 between the start point and the end point are blocked by the obstacle having the higher height information, the river course may be generated by bypassing the obstacle; if the situation as shown in fig. 10 occurs, that is, when the map cell whose terminal height information is 7 is surrounded by an obstacle whose height information is high, the river course cannot be generated.
In a specific implementation, at least one target map cell to be replaced with a liquid cell among a plurality of map cells in the terrain tile may be determined based on the river path information and the preset river width information.
The river width information may include a width of the route centering on the river course and a width expanding to both sides of the center route. In the process of setting river width information, if the condition that the low trend does not accord with the flowing trend, or the river bed is lost, or the river bed is blocked by an obstacle is met, \9633, the width can be reduced to avoid, and the specific process is not detailed.
After determining at least one target map unit to be replaced with a liquid unit, replacing the landscape information corresponding to the at least one target map unit with the landscape information corresponding to the liquid unit. Here, the landscape information may include color, texture, and the like. The landscape information corresponding to the target map unit may be different from the landscape information corresponding to the liquid unit.
In one embodiment, the target editing element may comprise a lake sea element. After the user selects the lake sea brush on the target operation interface, the lake sea elements can be edited. The editing mode corresponding to the lake sea element may include generating the lake sea by selecting the water bottom surface and the water surface.
In the terrain tile, a first plane having first level information and a second plane having second level information may be selected. The first level information may be higher than the second level information. In this case, the first plane may be a water surface and the second plane may be a water surface.
In response to a selection operation of the water bottom surface and the water surface in the terrain tile, spatial area information of the liquid unit to be filled, i.e. between the water bottom surface and the water surface, can be determined. Based on the spatial region information, it is possible to determine position information of the liquid unit to be filled within the spatial region indicated by the spatial region information, and to take the liquid unit to be filled as a target map unit. In response to the liquid cell filling operation, the landscape information of the target map cell may be modified to the landscape information corresponding to the liquid cell to be filled based on the position information of the liquid cell to be filled.
Fig. 11 shows a schematic view of filling liquid units in a terrain tile, comprising three planes in the terrain tile a, which can be filled with liquid units in the space area between the plane 3 and the plane 2, when the plane 3 with the lowest level information is selected as the water bottom surface and the plane 2 is selected as the water surface, i.e. the landscape shown by the terrain tile b; when the plane 2 is continuously selected as the water bottom surface and the plane 1 is selected as the water surface, liquid units, namely landscapes shown by the terrain tiles c, can be continuously filled in the space area between the plane 2 and the plane 1; when continuing to select the level 1 as the water bottom surface and the land level as the water surface, the space area between the level 1 and the land level can be filled with liquid units, i.e. the landscape shown by the terrain tiles d.
In one embodiment, the target editing element may include a water-based element. In the case where the target editing element includes a river element and/or a lake sea element, the editing manner corresponding to the water system element may include deleting a liquid unit corresponding to the water system element. After the user selects the water system eraser on the target operation interface, the water system elements can be deleted and edited.
At least one target liquid unit located within the liquid unit deletion range among the liquid units is determined in response to a selection operation of the liquid unit deletion range. And modifying the landscape information corresponding to the target liquid unit into the original landscape information.
In specific implementation, the liquid unit deletion range can be selected by dragging the water-based eraser. The liquid unit located within the liquid unit deletion range may serve as at least one target liquid unit to be deleted. In response to a liquid unit deletion operation performed with respect to a target liquid unit, landscape information corresponding to the target liquid unit may be modified to the original landscape information.
In one embodiment, the target editing element may comprise a map cell element of the target material. After the user selects the map unit brush on the target operation interface, the map unit elements of the target material can be edited. Specifically, the editing manner corresponding to the map unit element of the target material may include adding the map unit element of the target material. A plurality of map unit materials can be displayed on the target operation interface, and after a user selects a target material, a preview image of the selected target material can be displayed.
In response to a selection operation of the map unit addition range, position information of the map unit to be added within the map unit addition range may be determined, and the map unit to be added may be taken as a target map unit.
Here, the map unit addition range may be a range selected on the map by the map unit brush. After the map unit adding range is selected, the position information of the map unit to be added in the map unit adding range can be determined, and the preview area is displayed at the position indicated by the position information of the map unit to be added.
In response to the map unit adding operation, the material information of the target map unit can be modified into the material information of the target material corresponding to the map unit to be added based on the position information of the map unit to be added.
In one embodiment, where the target editing element comprises a map unit element, the editing mode corresponding to the map unit element may comprise deleting the map unit element. The map unit elements can be deleted after the user selects the block eraser on the target operation interface.
In response to a selection operation of the map unit deletion range, at least one target map unit of the plurality of map units in the terrain tile that is within the map unit deletion range may be determined.
Here, the map unit deletion range may be a range that the map unit brush selects on the map. Upon selection of a map unit deletion range, at least one target map unit of the plurality of map units in the terrain tile that is within the map unit deletion range may be determined.
In response to the map unit deletion operation, the target map unit and the material information corresponding to the target map unit may be deleted.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a scene map generation device corresponding to the scene map generation method is also provided in the embodiments of the present disclosure, and because the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the scene map generation method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 12, there is shown an architecture schematic diagram of a scene map generation apparatus provided in an embodiment of the present disclosure, where the apparatus includes:
a generating module 1201 for generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
a determining module 1202, configured to determine a selected target editing element in multiple preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
an adjusting module 1203, configured to adjust element information of at least one target map unit in the plurality of map units in the terrain tile in response to an editing operation performed in an editing manner corresponding to the target editing element, so as to generate a target map.
In an alternative embodiment, the target editing element comprises a terrain element;
the adjusting module 1203 is specifically configured to:
in response to a selection operation of a relief adjustment range, determining at least one target map unit located within the relief adjustment range from among a plurality of map units in the terrain tile;
and in response to the triggering operation of the terrain adjusting direction, adjusting the terrain information of the at least one target map unit after rising or falling according to the operation direction of the triggering operation.
In an alternative embodiment, the target editing element comprises a geological element;
the adjusting module 1203 is specifically configured to:
in response to a geo-adjustment range selection operation, determining at least one target map cell of the plurality of map cells in the terrain tile that is within the geo-adjustment range;
and responding to the trigger operation of geological material adjustment, and adjusting the material information of the at least one target map unit according to the selected geological material.
In an alternative embodiment, the target editing element comprises a river element;
the adjusting module 1203 is specifically configured to:
determining river path information in response to the selection operation of the starting point, the end point and the turning point;
determining at least one target map unit to be replaced by a liquid unit in a plurality of map units in the terrain tile based on the river path information and preset river width information;
and responding to the liquid unit replacement operation, and replacing the landscape information corresponding to the at least one target map unit with the landscape information corresponding to the liquid unit.
In an alternative embodiment, the target editing element comprises a lake sea element;
the adjusting module 1203 is specifically configured to:
determining spatial region information of a liquid cell to be filled in response to a selection operation of a water bottom surface and a water surface in the terrain tile;
determining position information of a liquid unit to be filled in the space area indicated by the space area information based on the space area information, and taking the liquid unit to be filled as a target map unit;
and responding to the filling operation of the liquid unit, and modifying the landscape information of the target map unit into the landscape information corresponding to the liquid unit to be filled based on the position information of the liquid unit to be filled.
In an alternative embodiment, the target editing element includes a water-based element; the water system elements comprise river elements and/or lake sea elements;
the adjusting module 1203 is specifically configured to:
in response to a selection operation of a liquid unit deletion range, determining at least one target liquid unit in the liquid units, which is located within the liquid unit deletion range;
and responding to the liquid unit deleting operation, and modifying the landscape information corresponding to the target liquid unit into the original landscape information.
In an alternative embodiment, the target editing element comprises a map unit element of the target material;
the adjusting module 1203 is specifically configured to:
in response to the selection operation of the map unit addition range, determining the position information of the map unit to be added in the map unit addition range, and taking the map unit to be added as a target map unit;
and in response to the map unit adding operation, modifying the material information of the target map unit into the material information of the target material corresponding to the map unit to be added based on the position information of the map unit to be added.
In an alternative embodiment, the target editing element comprises a map unit element;
the adjusting module 1203 is specifically configured to:
in response to a map unit deletion range selection operation, determining at least one target map unit of a plurality of map units in the terrain tile that is within the map unit deletion range;
and in response to the map unit deleting operation, deleting the target map unit and the material information corresponding to the target map unit.
In an optional implementation, the generating module 1201 is specifically configured to:
in response to a target terrain type selected from a plurality of terrain types, a terrain tile of the target terrain type is generated at a location indicated by a target terrain tile preview area around the generated target terrain tile.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Based on the same technical concept, the embodiment of the disclosure also provides computer equipment. Referring to fig. 13, a schematic structural diagram of a computer device 1300 provided in the embodiment of the present disclosure includes a processor 1301, a memory 1302, and a bus 1303. The storage 1302 is used for storing execution instructions and includes a memory 13021 and an external storage 13022; the memory 13021 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 1301 and data exchanged with an external storage 13022 such as a hard disk, the processor 1301 exchanges data with the external storage 13022 through the memory 13021, and when the computer device 1300 runs, the processor 1301 and the storage 1302 communicate through the bus 1303, so that the processor 1301 executes the following instructions:
generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
and adjusting element information of at least one target map unit in a plurality of map units in the terrain tile to generate a target map in response to editing operation performed in an editing mode corresponding to the target editing element.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the scene map generation method in the foregoing method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the scene map generation method in the foregoing method embodiments, which may be specifically referred to the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the technical scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (12)

1. A scene map generation method is characterized by comprising the following steps:
generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
and adjusting element information of at least one target map unit in a plurality of map units in the terrain tile to generate a target map in response to editing operation performed in an editing mode corresponding to the target editing element.
2. The method of claim 1, wherein the target editing element comprises a terrain element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a selection operation of a terrain adjustment range, determining at least one target map unit of a plurality of map units in the terrain tile that is within the terrain adjustment range;
and in response to the triggering operation of the terrain adjusting direction, adjusting the terrain information of the at least one target map unit after rising or falling according to the operation direction of the triggering operation.
3. The method of claim 1, wherein the target editing element comprises a geological element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a geo-adjustment range selection operation, determining at least one target map cell of the plurality of map cells in the terrain tile that is within the geo-adjustment range;
and responding to the trigger operation of geological material adjustment, and adjusting the material information of the at least one target map unit according to the selected geological material.
4. The method of claim 1, wherein the target editing element comprises a river element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
determining river path information in response to the selection operation of the starting point, the end point and the turning point;
determining at least one target map unit to be replaced by a liquid unit in a plurality of map units in the terrain tile based on the river path information and preset river width information;
and responding to the liquid unit replacement operation, replacing the landscape information corresponding to the at least one target map unit with the landscape information corresponding to the liquid unit.
5. The method of claim 1, wherein the target editing element comprises a lake sea element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
determining spatial area information of a liquid cell to be filled in response to a selection operation of a water bottom surface and a water surface in the terrain tile;
determining position information of a liquid unit to be filled in the space area indicated by the space area information based on the space area information, and taking the liquid unit to be filled as a target map unit;
and responding to the filling operation of the liquid unit, and modifying the landscape information of the target map unit into the landscape information corresponding to the liquid unit to be filled based on the position information of the liquid unit to be filled.
6. The method of claim 1, wherein the target editing element comprises a water-based element; the water system elements comprise river elements and/or lake sea elements;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a selection operation of a liquid unit deletion range, determining at least one target liquid unit in the liquid units, which is located within the liquid unit deletion range;
and responding to the liquid unit deleting operation, and modifying the landscape information corresponding to the target liquid unit into the original landscape information.
7. The method of claim 1, wherein the target editing element comprises a map unit element of a target material;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to the selection operation of the map unit addition range, determining the position information of the map unit to be added in the map unit addition range, and taking the map unit to be added as a target map unit;
and in response to the map unit adding operation, modifying the material information of the target map unit into the material information of the target material corresponding to the map unit to be added based on the position information of the map unit to be added.
8. The method of claim 1, wherein the target editing element comprises a map cell element;
the adjusting element information of at least one target map unit in a plurality of map units in the terrain tile in response to the editing operation executed in the editing mode corresponding to the target editing element comprises:
in response to a map unit deletion range selection operation, determining at least one target map unit of a plurality of map units in the terrain tile that is within the map unit deletion range;
and in response to the map unit deleting operation, deleting the target map unit and the material information corresponding to the target map unit.
9. The method of claim 1, wherein generating a terrain tile for a target terrain type selected from a plurality of terrain types in response to the target terrain type comprises:
in response to a target terrain type selected from a plurality of terrain types, generating a terrain tile of the target terrain type at a location indicated by a target terrain tile preview area surrounding the generated target terrain tile.
10. A scene map generation apparatus, characterized by comprising:
a generation module for generating a terrain tile of a target terrain type selected from a plurality of terrain types in response to the target terrain type; the terrain tile comprises a plurality of map units;
the determining module is used for determining a selected target editing element in a plurality of preset editing elements; the preset editing elements are used for adjusting the form of the terrain tile;
and the adjusting module is used for responding to the editing operation executed by adopting the editing mode corresponding to the target editing element, and adjusting the element information of at least one target map unit in a plurality of map units in the terrain tile so as to generate the target map.
11. A computer device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the computer device is run, the machine-readable instructions when executed by the processor performing the steps of the scene map generation method of any of claims 1 to 9.
12. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the scene map generation method according to any one of claims 1 to 9.
CN202211405749.5A 2022-11-10 2022-11-10 Scene map generation method and device, computer equipment and storage medium Pending CN115687552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211405749.5A CN115687552A (en) 2022-11-10 2022-11-10 Scene map generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211405749.5A CN115687552A (en) 2022-11-10 2022-11-10 Scene map generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115687552A true CN115687552A (en) 2023-02-03

Family

ID=85051440

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211405749.5A Pending CN115687552A (en) 2022-11-10 2022-11-10 Scene map generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115687552A (en)

Similar Documents

Publication Publication Date Title
KR101235538B1 (en) Rule-based procedural terrain generation
KR101165482B1 (en) Resource management for rule-based procedural terrain generation
JP4824019B2 (en) A terrain editing tool for rule-based procedural terrain generation
JP2022024065A (en) Multi-resolution image system
CN107126702B (en) Generation method of 3D game random map
CN111135565B (en) Terrain splicing method and device in game scene, processor and electronic device
Cristie et al. CityHeat: visualizing cellular automata-based traffic heat in Unity3D
CN112530012A (en) Virtual earth surface processing method and device and electronic device
CN104978444A (en) Picture combination method and device
CN108198194A (en) Oblique photography single object extraction method based on lateral multi-plane cutting
CN111603768A (en) Game map storage method and device and game map display method and device
CN111524231B (en) Virtual terrain processing method and device, electronic equipment and storage medium
CN109499067B (en) Terrain texture drawing method and device, electronic equipment and storage medium
CN106327566B (en) The generation method of virtual reality three-dimensional road
CN114404984A (en) Data processing method and device for game scene, computer equipment and medium
WO2024131205A1 (en) Method and apparatus for displaying precomputed cell, and method and apparatus for generating precomputed cell
US20230149812A1 (en) Methods and Systems for Developing Video Games Terrain Systems
CN115687552A (en) Scene map generation method and device, computer equipment and storage medium
CN117456076A (en) Material map generation method and related equipment
US20130187914A1 (en) Method and Apparatus for Rendering and Modifying Terrain in a Virtual World
CN110321184B (en) Scene mapping method and computer storage medium
CN115006842A (en) Scene map generation method and device, storage medium and computer equipment
CN111643897B (en) Information processing method, device, system and equipment
CN114332397B (en) Method and device for realizing same-level adjacent terrain transition effect
US20230298259A1 (en) Voxel-based approach for design models

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination