Method and device for making game erosion terrain
By determining the number of erosion iterations, terrain amplification coefficient and node erosion parameters of the terrain area, and combining terrain re-set parameters for terrain baking, the problem of cumbersome and inconsistent production of terrain erosion effects in the existing technology is solved, and efficient and accurate terrain erosion effects are achieved generate.
Patent Information
- Application Number
- CN202311774747.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-01-10
AI Technical Summary
The terrain erosion effect in existing games is cumbersome and resource consumption, which leads to inconsistent rendering results and game engine display, affecting the game experience.
By determining the number of erosion iterations, terrain amplification coefficient and node erosion parameters of the terrain area, terrain baking is combined with terrain reset parameters to generate efficient and consistent game terrain erosion effects.
It reduces the time and system resource consumption of terrain erosion production, improves the accuracy and effect of terrain erosion production, and meets different terrain erosion needs.
Smart Images

Figure CN119280827A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of game development, and in particular to a method and device for making eroded terrain in a game. Background Art
[0002] During the game development process, game terrain is created according to the needs of different game scenes. For example, terrain erosion refers to the process of simulating the wear and change of terrain caused by factors such as water flow, wind, and temperature in nature, which is used to generate more realistic and natural game terrain effects.
[0003] At present, the development and production of terrain erosion effects in existing games are usually based on offline terrain erosion baking using third-party tools for terrain erosion simulation. However, offline baking requires the import and export of a large number of files, which will cause unnecessary time and system resource consumption, greatly increase the complexity of operations, and also lead to inconsistencies between the rendering results and the display ratio or effect in the game engine, thus resulting in the production effect of eroded terrain in the game. Summary of the invention
[0004] In view of this, the present invention provides a method and device for making game erosion terrain, the main purpose of which is to solve the problem of poor production effect of existing game erosion terrain.
[0005] According to one aspect of the present invention, a method for making a game erosion terrain is provided, comprising:
[0006] Determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area;
[0007] According to the selected erosion node of the terrain area, obtaining the node erosion parameter of the erosion node, wherein different erosion nodes correspond to different node erosion parameters;
[0008] Erosion baking is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters.
[0009] Furthermore, before obtaining the node erosion parameters of the erosion nodes selected in the terrain area, the method further includes:
[0010] Defining an erosion node to be subjected to terrain erosion baking based on different terrain erosion effect parameters, and configuring a data dictionary corresponding to the erosion node, wherein the data dictionary stores at least one element object for receiving a node erosion parameter of the erosion node;
[0011] The node erosion parameter is generated based on the numerical content entered in the element object, and then the node erosion parameter is retrieved from the data dictionary after the erosion node is determined.
[0012] Further, the erosion baking of the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter includes:
[0013] Amplifying the terrain region by a preset pixel multiple according to the erosion terrain amplification coefficient to obtain a first terrain region, and performing a first height processing on the amplified terrain region according to the height preprocessing parameter to obtain a second terrain region;
[0014] Performing baking based on the node erosion parameters and the terrain resetting parameters on the second terrain area according to the number of erosion iterations to obtain a first eroded terrain, wherein the terrain resetting parameters include an erosion weight of at least one erosion layer and a terrain material;
[0015] The first erosion terrain is subjected to a second height processing according to the height post-processing parameters to obtain a second erosion terrain, and the second erosion terrain is reduced by the preset pixel multiple according to the erosion terrain magnification coefficient to obtain a game erosion terrain.
[0016] Furthermore, before performing baking based on the node erosion parameters and the terrain resetting parameters on the second terrain region according to the number of erosion iterations to obtain the first eroded terrain, the method further includes:
[0017] Under the condition that no target layer is selected in the terrain resetting parameters, a default layer is generated as an erosion layer, and an erosion weight and a terrain material of the erosion layer are determined;
[0018] Under the condition that at least one target layer is selected in the terrain resetting parameters, an erosion layer corresponding to the target layer is retrieved based on a preset layer mapping relationship, and an erosion weight and a terrain material of the erosion layer are determined.
[0019] Furthermore, before obtaining the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters of the terrain area, the method further includes:
[0020] Create multiple parameter base classes in the game engine, and define parameter meanings for the parameter base classes respectively, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters obtained through parameter items;
[0021] An erosion configuration file is generated based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters, and the erosion configuration file is initialized and configured.
[0022] Furthermore, the obtaining of the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters of the terrain area includes:
[0023] Under the condition that the erosion configuration file is selected in the erosion editing interface of the game engine, the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameter in the erosion configuration file are retrieved;
[0024] Under the condition that the erosion configuration file is not selected in the erosion editing interface of the game engine, the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters are obtained based on the parameter items displayed in the erosion editing interface.
[0025] Further, the obtaining of the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameter based on the parameter items displayed in the erosion editing interface includes:
[0026] Under the condition that a height processing operation is selected in the erosion editing interface, a height processing parameter item corresponding to the height processing operation is displayed, wherein the height processing operation includes a height pre-processing operation and a height post-processing operation;
[0027] The height processing result is determined according to the parameter content entered in the height processing parameter item, and the height processing result includes height pre-processing parameters and height post-processing parameters for distorting and denoising the terrain height.
[0028] Furthermore, after erosion baking is performed on the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter, the method further includes:
[0029] Under the condition of selecting to debug the game erosion terrain, target channels of terrain height output, terrain layer output, and debugging layer output of the game erosion terrain are respectively selected through RGB channels.
[0030] Further, determining the terrain area to be subjected to terrain erosion baking includes:
[0031] Under the condition that the game terrain image is outputted through the game engine, the selected area is obtained by moving the control, and the selected area is masked and drawn to obtain the terrain area.
[0032] According to another aspect of the present invention, a device for making erosion terrain in a game is provided, comprising:
[0033] A determination module is used to determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area;
[0034] An acquisition module, used for acquiring a node erosion parameter of the erosion node according to the selected erosion node of the terrain area, wherein different erosion nodes correspond to different node erosion parameters;
[0035] A baking module is used to perform erosion baking on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters.
[0036] Furthermore, the device also includes:
[0037] A configuration module, used to define an erosion node to be subjected to terrain erosion baking based on different terrain erosion effect parameters, and to configure a data dictionary corresponding to the erosion node, wherein the data dictionary stores at least one element object for receiving a node erosion parameter of the erosion node;
[0038] A generation module is used to generate the node erosion parameter based on the numerical content entered by the element object, so as to determine the erosion node and then retrieve the node erosion parameter from the data dictionary.
[0039] Furthermore, the baking module comprises:
[0040] an amplification unit, configured to amplify the terrain region by a preset pixel multiple according to the erosion terrain amplification coefficient to obtain a first terrain region, and perform a first height processing on the amplified terrain region according to the height preprocessing parameter to obtain a second terrain region;
[0041] a baking unit, configured to perform baking based on the node erosion parameters and the terrain resetting parameters on the second terrain area according to the number of erosion iterations to obtain a first eroded terrain, wherein the terrain resetting parameters include an erosion weight of at least one erosion layer and a terrain material;
[0042] The processing unit is used to perform a second height processing on the first erosion terrain according to the height post-processing parameters to obtain a second erosion terrain, and to reduce the second erosion terrain by the preset pixel multiple according to the erosion terrain magnification coefficient to obtain a game erosion terrain.
[0043] Furthermore, the baking module also includes:
[0044] A determination unit, used for generating a default layer as an erosion layer under the condition that no target layer is selected in the terrain resetting parameters, and determining an erosion weight and a terrain material of the erosion layer;
[0045] The calling module is used to call the erosion layer corresponding to the target layer based on the preset layer mapping relationship under the condition that at least one target layer is selected in the terrain resetting parameters, and determine the erosion weight and terrain material of the erosion layer.
[0046] Furthermore, the device further comprises: a creation module,
[0047] The creation module is used to create multiple parameter base classes in the game engine, and define parameter meanings for the parameter base classes respectively, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters obtained through parameter items;
[0048] The generation module is further used to generate an erosion configuration file based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters, and initialize the erosion configuration file.
[0049] Furthermore, the acquisition module is specifically used to retrieve the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters in the erosion configuration file under the condition that the erosion configuration file is selected in the erosion editing interface of the game engine; and to acquire the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters based on the parameter items displayed in the erosion editing interface under the condition that the erosion configuration file is not selected in the erosion editing interface of the game engine.
[0050] Furthermore, the acquisition module is specifically used to display the height processing parameter items corresponding to the height processing operation under the condition that the height processing operation is selected in the erosion editing interface, and the height processing operation includes a height preprocessing operation and a height post-processing operation; determine the height processing result according to the parameter content entered in the height processing parameter item, and the height processing result includes height preprocessing parameters and height post-processing parameters for distorting and denoising the terrain height.
[0051] Furthermore, the device also includes:
[0052] The selection module is used to select the target channels of terrain height output, terrain layer output and debugging layer output of the game erosion terrain through RGB channels respectively under the condition of selecting to debug the game erosion terrain.
[0053] Furthermore, the determination module is also used to obtain a selected area by moving a control under the condition that a game terrain image is output through the game engine, and to perform mask drawing on the selected area to obtain the terrain area.
[0054] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute operations corresponding to the method for making eroded terrain in a game as described above.
[0055] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0056] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the method for making eroded terrain in the game.
[0057] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0058] The present invention provides a method and device for making game erosion terrain. Compared with the prior art, the embodiment of the present invention determines a terrain area to be subjected to terrain erosion baking, and obtains the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area; obtains the node erosion parameters of the erosion nodes according to the selected erosion nodes of the terrain area, wherein different erosion nodes correspond to different node erosion parameters; erosion baking is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters, so as to achieve the purpose of performing efficient terrain erosion in GUP, reduce the tediousness of terrain erosion production between a game engine and other erosion components, reduce the time consumption of terrain erosion and the system processing pressure, greatly improve the accuracy and effect of game terrain erosion production, and meet the production effects of different terrain erosions.
[0059] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0061] Figure 1 A flow chart of a method for making erosion terrain in a game provided by an embodiment of the present invention is shown;
[0062] Figure 2 A flow chart of another method for making erosion terrain in a game provided by an embodiment of the present invention is shown;
[0063] Figure 3 A flow chart of another method for making erosion terrain in a game provided by an embodiment of the present invention is shown;
[0064] Figure 4 A block diagram showing the composition of a device for making erosion terrain in a game provided by an embodiment of the present invention is shown;
[0065] Figure 5 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0066] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0067] The embodiment of the present invention provides a method for making a game erosion terrain, such as Figure 1 As shown, the method includes:
[0068] 101. Determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area.
[0069] In the embodiment of the present invention, the current execution end, as the production execution end for executing the game erosion terrain, can be a terminal device, or a service end such as a cloud server, so as to be based on the production of the game scene. At this time, in order to improve the system processing computing power of the current execution end, the current execution end is a hardware device specifically used to process graphics-related operations, such as a graphics processor GPU (Graphics Processing Unit), to simulate the wear and change process caused by factors such as water flow, wind, temperature, etc. in nature to the terrain, and generate a more realistic and natural terrain effect, that is, the production of terrain erosion in the game scene. Among them, the terrain area is the area where the terrain erosion is expected to be produced. The terrain in the game world can be divided and determined according to the production requirements of the developer through the editing interface of the game engine. At this time, the game engine is preferably the UE4 (UnrealEngine 4) engine, and the embodiment of the present invention does not make specific limitations.
[0070] It should be noted that the current execution end enters the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area used for terrain production through the editing interface of the game engine. Among them, the number of erosion iterations is used to characterize the overall intensity of terrain erosion. The larger the value, the higher the erosion intensity. Due to the high intensity, the greater the computing power required, the higher the impact on the system performance of the execution end. The erosion terrain magnification coefficient is used to characterize the accuracy of controlling terrain erosion. The larger the value, the higher the accuracy, but the higher the impact on the system performance of the execution end. Similarly, due to the high intensity, the greater the computing power required, the higher the impact on the system performance of the execution end. The height processing result is used to characterize the result of height processing of the terrain layer. At this time, the height processing result can be reflected in the blur degree of the image. The terrain resetting parameter is used to characterize the value of controlling the color of the terrain surface. Each terrain height layer can be configured with a corresponding terrain resetting parameter to make the terrain erosion more realistic during baking. At this time, the above-mentioned number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameter can all be entered and configured based on the terrain erosion requirements of different game scenes for developers, and the embodiment of the present invention is not specifically limited.
[0071] 102. According to the selected erosion node of the terrain area, obtain a node erosion parameter of the erosion node.
[0072] In the embodiment of the present invention, after the current execution end determines the terrain area based on the game engine, it needs to select an erosion node that matches the terrain area. Different erosion nodes correspond to different node erosion parameters. Therefore, after selecting the erosion node, the corresponding node erosion parameter can be directly obtained. Among them, the erosion node is used to characterize the effect type of the terrain during erosion baking, for example, a water erosion node, a thermal erosion node, etc., which is not specifically limited in the embodiment of the present invention.
[0073] It should be noted that in order to improve the production efficiency of system terrain erosion, the current execution end pre-configures node erosion parameters corresponding to the erosion effects for different erosion nodes. For example, for water erosion nodes, the corresponding node erosion parameters include parameters such as water intensity, precipitation density, and the degree of influence of terrain slope. The node erosion parameters corresponding to thermal erosion nodes include parameters such as the starting angle of thermal erosion, thermal erosion speed, and the degree of gravel sliding. The embodiments of the present invention do not make specific limitations.
[0074] 103. Perform erosion baking on the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter.
[0075] In an embodiment of the present invention, after obtaining all the erosion iterations, erosion terrain magnification coefficients, height processing results, terrain resetting parameters, and node erosion parameters, the current execution end mobilizes the graphics processor GPU through the game engine to perform terrain baking. For example, after the developer clicks to execute erosion production through the game engine, erosion is performed according to all parameters such as the erosion iterations, erosion terrain magnification coefficients, height processing results, terrain resetting parameters, and node erosion parameters, that is, the erosion effect map is automatically applied to the terrain to obtain the terrain effect of erosion baking.
[0076] An embodiment of the present invention provides a method for producing game erosion terrain, which achieves the purpose of performing efficient terrain erosion in GUP, reduces the complexity of terrain erosion production between the game engine and other erosion components, reduces the time consumption of terrain erosion and the system processing pressure, greatly improves the accuracy and effect of game terrain erosion production, and meets the production effects of different terrain erosion.
[0077] The embodiment of the present invention provides another method for making erosion terrain in a game, such as Figure 2 As shown, the method includes:
[0078] 201. Create multiple parameter base classes in the game engine, and define parameter meanings for the parameter base classes respectively, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters obtained through parameter items.
[0079] In order to achieve the terrain erosion production effect based on GPU, thereby improving the efficiency of system processing, the current execution end creates multiple parameter base classes in the game engine. Among them, the parameter base class can be created based on the ErosionActor component created in the game engine to implement the erosion function, and define the parameter meanings of the multiple parameter base types created. For example, the parameter base class is the Actor class, and MaskComponent is defined as an object for storing masks, that is, it can be used to store terrain area data obtained by storing masks. Furthermore, the current execution end obtains the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters obtained through parameter items through the game engine, which are not specifically limited in the embodiments of the present invention.
[0080] It should be noted that, since the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters are required as the basis for erosion when making terrain erosion, the current execution end defines the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters based on the parameter base class. Specifically, the parameter base class can be defined as the number of erosion iterations IterationCount, the erosion terrain magnification coefficient UpSampling, the height processing result HeightPreProcess-HeightPostProcess, the terrain resetting parameter RemapCommandStack, etc. for the Actor class, and the embodiment of the present invention does not make specific limitations. Among them, the height processing results HeightPreProcess-HeightPostProcess can respectively include the height preprocessing result HeightPreProcess and the height postprocessing result HeightPostProcess. At this time, the defined height preprocessing result HeightPreProcess is an array for storing height preprocessing commands. Each element in the array is an FMaskCommandParams object, which includes the following fields: an enumeration value MaskType used to specify the current command type, for example, overlay or post-processing; an enumeration value MaskOperationType used to specify the current command calculation method, such as maximum value, minimum value, addition, etc., which is only valid when MaskType is an overlay; a string MaskDetailType used to specify the command type, which can be used to specify distortion, noise blur, etc.; in addition, erosion data input by DCC erosion or GPU erosion can also be flexibly added, which is not specifically limited in the embodiment of the present invention. The defined height post-processing result HeightPostProcess is used to store an array of height post-processing commands, which is similar to the height preprocessing and will not be repeated here. The defined terrain resetting parameter RemapCommandStack is used to store the URemapCommand array of terrain resetting parameters. Each element in the array contains the following main fields: a Boolean value Enabled for setting whether to enable the resetting operation for this layer of terrain weight. The function can be turned on or off by checking or unchecking; a LayerName for specifying a layer of the redirected terrain; a UMaskCommand array MaskCommandStack for storing the Layer data operations for this terrain layer. FMaskCommandParams is used in each UMaskCommand to store the parameters of the operation node, which is similar to the description of FMaskCommandParams in HeightPreProcess and will not be repeated in the embodiments of the present invention.
[0081] 202. Generate an erosion configuration file based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters, and initialize the erosion configuration file.
[0082] In order to reduce the complexity of terrain erosion production and thus improve the efficiency of terrain erosion production, the current execution end generates an erosion configuration file based on the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters, that is, the parameter links of each parameter are stored in an erosion configuration file, so as to directly call the erosion configuration file for terrain erosion production. At this time, after the erosion configuration file is generated, all parameters in the configuration file can be initialized and configured, so that the parameters in the initialized erosion configuration file are used as default values and directly called, thereby improving the efficiency of terrain erosion production and reducing the calculation pressure of the system for producing erosion terrain. In addition, the initialization configuration can be based on parameter assignment to the various parameter links in the erosion configuration file, or it can be based on the written parameter generation script for assignment, which is not specifically limited in the embodiment of the present invention.
[0083] In the embodiment of the present invention, an ErosionConfig class may also be defined to store all UDataAsset objects of terrain erosion configuration, that is, to store erosion configuration files, so as to reduce system data processing pressure.
[0084] 203. Under the condition that the game terrain image is outputted in the game engine, a selected area is acquired by moving a control, and mask drawing is performed on the selected area to obtain the terrain area.
[0085] In order to achieve diversity in terrain erosion production, the current execution end outputs the game terrain image for the expected terrain erosion production through the game engine. At this time, the game terrain image is the terrain image data of the three-dimensional game space used for 3D game production. When the game engine outputs the game terrain image, different game scenes match different game terrain images. The embodiment of the present invention does not make specific limitations. After outputting the game terrain image, the developer can select an area in the game terrain image based on the mobile space as the selected area for mask drawing and determine it as the terrain area to be produced for terrain erosion. At this time, the mobile control can be a mouse or a touch control. When selecting an area, it can be divided into multiple selected areas, or one selected area can be divided to perform mask drawing.
[0086] It should be noted that when performing mask drawing, a component ErosionActor that implements the erosion function can be created in the game engine, and mask drawing is performed on the selected area through ErosionActor to obtain a terrain area, which is not specifically limited in the embodiment of the present invention.
[0087] 204a. Under the condition that the erosion configuration file is selected in the erosion editing interface of the game engine, the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters in the erosion configuration file are retrieved.
[0088] In order to reduce the requirements of the terrain erosion production process on the system computing power, the current execution end can pre-configure a configuration file to store the default number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters, so that terrain erosion production can be performed directly based on the parameters in the configuration file. Specifically, the current execution end first outputs the initialized erosion configuration file based on the erosion editing interface of the game engine. When the developer selects the erosion configuration file, it means that the developer expects to perform erosion terrain production based on the various parameters in the erosion configuration file, and can directly call the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters in the erosion configuration file.
[0089] Step 204b, which is parallel to step 204a, obtains the number of erosion iterations, the erosion terrain magnification factor, the height processing result, and the terrain resetting parameters based on the parameter items displayed in the erosion editing interface, under the condition that the erosion configuration file is not selected in the erosion editing interface of the game engine.
[0090] In order to reduce the complexity of terrain erosion operations in the system, when the developer does not select the erosion configuration file, it means that the developer will not use the parameters in the erosion configuration file to make terrain erosion. At this time, the erosion editing interface can be output based on the game engine to display the parameter items corresponding to the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters. The developer inputs the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters into the current execution end by entering and filling in the parameter items.
[0091] In another embodiment of the present invention, for further definition and explanation, the step of obtaining the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameter based on the parameter item displayed in the erosion editing interface includes:
[0092] Under the condition that a height processing operation is selected in the erosion editing interface, a height processing parameter item corresponding to the height processing operation is displayed;
[0093] The height processing result is determined according to the parameter content entered in the height processing parameter item.
[0094] In order to improve the convenience of terrain erosion operations, the current execution end includes height preprocessing operations and height post-processing operations for height processing operations when obtaining the number of erosion iterations, erosion terrain amplification coefficient, height processing results, and terrain resetting parameters. That is, when the developer selects the height processing operation through the erosion editing interface, the height preprocessing parameter items and height post-processing parameter items corresponding to the height preprocessing operation and the height post-processing operation are displayed respectively, so that the developer can enter the parameters for the height preprocessing and height post-processing, and then determine the height preprocessing parameters and height post-processing parameters according to the parameter content entered in the height processing parameter item.
[0095] It should be noted that the height processing in the current execution end is used to distort and blur the height map of the terrain. Therefore, the height preprocessing is the operation before the terrain erosion is made, and the height postprocessing is the operation after the terrain erosion is made, so as to add more erosion details to the height map of the terrain at different production times. For example, when entering the height preprocessing parameters, that is, before the erosion is performed, the height effect of distortion or noise blur is increased according to the parameter value. For another example, when entering the height postprocessing parameters, that is, after the erosion is performed, the height effect of distortion or noise blur is increased according to the parameter value.
[0096] In the embodiment of the present invention, in step 205 after step 204b, erosion nodes to be subjected to terrain erosion baking are defined based on different terrain erosion effect parameters, and a data dictionary corresponding to the erosion nodes is configured.
[0097] In order to speed up the efficiency of terrain erosion production and reduce the cumbersomeness of terrain erosion operation steps, the current execution end pre-creates terrain erosion effect parameters. At this time, the terrain erosion effect parameters are numerical representations of the effects produced by a type of erosion. A parameter class can be created based on ErosionActor, and a corresponding erosion node can be defined. Among them, terrain erosion effect parameters include but are not limited to erosion speed, erosion angle, erosion density, erosion intensity, etc., so that different erosion nodes are defined based on different terrain erosion effect parameters. At this time, the erosion node is used to characterize a type of diversified erosion effect produced by different erosion type combinations when the terrain is eroded and baked. Specifically, when defining an erosion node, multiple different terrain erosion effect parameters can be combined to obtain an erosion node. For example, precipitation erosion intensity, precipitation erosion speed, and terrain slope are combined and defined as an erosion node, so that after selecting this erosion node, precipitation erosion intensity, precipitation erosion speed, and terrain slope are retrieved as erosion parameters. The embodiment of the present invention does not make specific limitations.
[0098] It should be noted that in the current execution end, after the erosion node is defined, the data dictionary corresponding to the erosion node is configured so that it can be directly called when the system performs terrain erosion, speeding up the system processing speed and reducing the computing power requirements. Among them, the data dictionary stores at least one element object for receiving the node erosion parameters of the erosion node, such as the TMap word for storing terrain erosion nodes. The dictionary TMap consists of N elements (TPair), each of which is a key-value pair, the key is UErosionNodeProfilePDA, and the value is FErosionNodeSettings. Each element in the dictionary is a TPair<UErosionNodeProfilePDA,FErosionNodeSettings> Object, each UErosionNodeProfilePDA is used to store the UDataAsset object of the terrain erosion node configuration, which inherits from the UDataAsset class and stores different erosion parameters according to different types of erosion nodes. For example, the water erosion node stores parameters including precipitation intensity, precipitation density, and the degree of influence of terrain slope, and the thermal erosion node stores parameters including the starting angle of thermal erosion, thermal erosion speed, and the degree of gravel sliding. In addition, each FErosionNodeSettings object also stores the following fields: a dictionary for storing terrain erosion node parameters; a dictionary Params for storing terrain erosion node parameters. The TMap dictionary generates corresponding key-value pairs according to the parameters in NodeConfig, and these parameters can be adjusted in the game engine UE to control the erosion effect. In addition, an enumeration value ErosionNodeType for indicating the erosion type and a Boolean value Enabled for setting whether the terrain erosion node is enabled can be defined so that developers can check or uncheck to temporarily turn on or off the node, which is not specifically limited in the embodiment of the present invention.
[0099] 206. Generate the node erosion parameter based on the numerical content entered in the element object, and then retrieve the node erosion parameter from the data dictionary after determining the eroded node.
[0100] In order to improve the convenience of the game terrain erosion operation, the current execution end outputs the numerical configuration items required in each erosion node, so that the current execution end determines the numerical content entered for the element object as the node erosion parameter. At this time, the node erosion parameter is the fixed parameter used for terrain erosion production under this erosion node. After determining the erosion node, the node erosion parameter is retrieved from the data dictionary.
[0101] 207. According to the selected erosion node of the terrain area, obtain a node erosion parameter of the erosion node.
[0102] In order to facilitate the execution of terrain erosion operations, after determining the terrain area, the current execution end can select an erosion node corresponding to the terrain area to retrieve the node erosion parameters of the erosion node. Different erosion nodes correspond to different node erosion parameters, that is, the current execution end pre-configures different erosion nodes for different terrain areas, for example, pre-configures a thermal erosion node for a water terrain area, and a terrain area can be configured with one erosion node or multiple erosion nodes, which can be retrieved at the same time, which is not specifically limited in the embodiment of the present invention.
[0103] It should be noted that in the embodiment of the present invention, when terrain erosion is produced based on node erosion parameters, the terrain layer formed by the eroded terrain may include a gravel layer, a rock wall layer, a sedimentation layer, and a waterway layer, wherein the gravel layer is used to simulate the erosion effect of the stones on the rock wall being broken and sliding to the ground due to thermal erosion or water erosion. The rock wall layer is used to simulate the erosion effect of the rock wall exposed due to erosion. The sedimentation layer is used to simulate the erosion effect of the mud and sand formed during the water erosion process, which normally appears in the erosion gully. The waterway layer is used to simulate the erosion effect of the area where water flows. Correspondingly, when terrain erosion is produced, if an erosion node is selected, different erosion nodes will form a game terrain containing erosion effects of different terrain layers. For example, a water erosion node will produce erosion effects of a gravel layer, a sedimentation layer, and a waterway layer; a thermal erosion node will produce a gravel layer and a rock wall layer. At this time, it is necessary to generate a rock wall layer to show the erosion effect of the peak; a particle water erosion node will produce an erosion effect of a waterway layer to show a winding large river channel, which is not specifically limited in the embodiment of the present invention.
[0104] An embodiment of the present invention provides a method for producing game erosion terrain, which achieves the purpose of performing efficient terrain erosion in GUP, reduces the complexity of terrain erosion production between the game engine and other erosion components, reduces the time consumption of terrain erosion and the system processing pressure, greatly improves the accuracy and effect of game terrain erosion production, and meets the production effects of different terrain erosion.
[0105] The embodiment of the present invention provides another method for making erosion terrain in a game, such as Figure 3 As shown, the step of performing erosion baking on the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter includes:
[0106] 301. Amplify the terrain region by a preset pixel multiple according to the erosion terrain amplification coefficient to obtain a first terrain region, and perform a first height processing on the amplified terrain region according to the height preprocessing parameter to obtain a second terrain region;
[0107] 302. Under the condition that no target layer is selected in the terrain resetting parameters, a default layer is generated as an erosion layer, and an erosion weight and terrain material of the erosion layer are determined;
[0108] 303. Under the condition that at least one target layer is selected in the terrain resetting parameters, an erosion layer corresponding to the target layer is retrieved based on a preset layer mapping relationship, and an erosion weight and terrain material of the erosion layer are determined;
[0109] 304. Perform baking based on the node erosion parameters and the terrain reset parameters on the second terrain area according to the number of erosion iterations to obtain a first eroded terrain.
[0110] 305. Perform a second height processing on the first erosion terrain according to the height post-processing parameters to obtain a second erosion terrain, and reduce the second erosion terrain by the preset pixel multiple according to the erosion terrain magnification coefficient to obtain a game erosion terrain.
[0111] When terrain erosion is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain reset parameter, and the node erosion parameter, the terrain area is first magnified by a preset pixel multiple according to the erosion terrain magnification coefficient. Among them, the preset pixel multiple can be an integer multiple such as 1, 2, 3 times, that is, the pixels of the terrain area are magnified according to an integer multiple, which is not specifically limited in the embodiment of the present invention. At this time, the enlarged terrain area is subjected to a first height processing based on the height preprocessing parameter selected by the developer, that is, the height of the enlarged terrain area after the enlargement is increased or decreased to obtain a second terrain area. At this time, if the height preprocessing parameter is an addition of height values, the first height processing is an increase processing, and if it is a subtraction of height values, the first height processing is a reduction processing, which is not specifically limited in the embodiment of the present invention. In a specific scenario, during the erosion process, if the erosion result is not fine enough, such as the gully is too wide, the erosion terrain magnification factor can be appropriately increased to obtain higher accuracy. That is, for an area of 50m*50m, the input used for erosion is generally 50*50 pixels under the condition of 1m / grid. If it is adjusted to 3, the accuracy during erosion will increase to 150*150, and it will be reduced to 50*50 after the erosion is completed.
[0112] In a specific scenario, the developer did not select a target layer in the terrain resetting parameters, indicating that it is not necessary to perform erosion combination production on the selected target layer according to the terrain resetting parameters. At this time, the current execution end generates a default layer as the erosion layer, and determines the erosion weight and terrain material of the erosion layer, that is, the terrain resetting parameters include the erosion weight and terrain material of at least one erosion layer, thereby performing combined erosion baking based on the erosion layer, erosion weight and terrain material. Among them, the erosion layer is a material layer used to erode the terrain area, which can be pre-generated based on the node erosion parameters in the erosion node, or can be configured in the current execution end based on the game scene or game terrain erosion requirements, which is not specifically limited in the embodiment of the present invention. At the same time, the erosion weight and terrain material can be configured for the erosion layer by input, which is not specifically limited in the embodiment of the present invention. When at least one target layer is selected in the terrain resetting parameters, the preset layer mapping relationship calls the erosion layer corresponding to the target layer, and determines the erosion weight and terrain material of the erosion layer. At this time, the preset layer mapping relationship records the erosion layers pre-set for different target layers. After the erosion layer is determined, the erosion weight and terrain material entered or selected through the erosion editing page of the game engine are received, and the embodiment of the present invention does not make specific limitations.
[0113] It should be noted that after determining the terrain resetting parameters, the second terrain area is baked based on the node erosion parameters and the terrain resetting parameters according to the number of erosion iterations, that is, during baking, the second terrain area is iteratively baked according to the number of erosion iterations. During each iterative baking, the second terrain area can be baked once according to the node erosion parameters and the terrain resetting parameters until all erosion iterations are baked. In addition, for the terrain resetting parameters, during baking, the erosion layers of different terrain materials and the second terrain area are baked according to the erosion weights, so as to complete one baking and obtain the first eroded terrain, which is not specifically limited in the embodiment of the present invention. After obtaining the second eroded terrain, if the developer chooses to configure the height post-processing parameters, the first eroded terrain is subjected to the second height processing. At this time, the processing methods of the first height processing and the second height processing are opposite, and the embodiment of the present invention will not be repeated here. Finally, if the configuration of the erosion terrain magnification coefficient is selected, the second eroded terrain needs to be reduced to the pixel size corresponding to the original first terrain area to obtain the game eroded terrain.
[0114] In another embodiment of the present invention, for further definition and explanation, after the step of erosion baking the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter, the method further includes:
[0115] Under the condition of selecting to debug the game erosion terrain, target channels of terrain height output, terrain layer output, and debugging layer output of the game erosion terrain are respectively selected through RGB channels.
[0116] In order to achieve the flexibility of terrain erosion production, after the current execution end makes the erosion terrain, in order to avoid the occurrence of erosion errors or baking errors, the current execution end provides a debugging function for the developer, that is, when the developer triggers the debugging instruction for the game erosion terrain, the current execution end provides debugging through the RGB channel. Specifically, after selecting debugging, the current execution end outputs the RGB channel so that the developer can select the output terrain height, terrain layer, and the target channel of the debugging layer. At this time, after selecting the corresponding target channel, the terrain height, terrain layer, and the color map of the debugging layer can be output in the corresponding target channel. Among them, the RGB channel includes not only the R channel: Erosion_Debris, the G channel: Erosion_Rock, and the B channel: Erosion_Sediment, but also the A channel: Erosion_Water, so that after selecting the target channel, three pictures can be output according to the channel color value, and the embodiment of the present invention is not specifically limited.
[0117] The embodiment of the present invention provides another method for producing game erosion terrain, which achieves the purpose of performing efficient terrain erosion in GUP, reduces the tediousness of terrain erosion production between the game engine and other erosion components, reduces the time consumption of terrain erosion and the system processing pressure, greatly improves the accuracy and effect of game terrain erosion production, and meets the production effects of different terrain erosion.
[0118] Furthermore, as a response to the above Figure 1 The implementation of the method shown in the figure, the embodiment of the present invention provides a device for making erosion terrain in a game, such as Figure 4 As shown, the device comprises:
[0119] A determination module 41 is used to determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area;
[0120] An acquisition module 42 is used to acquire a node erosion parameter of the erosion node according to the selected erosion node of the terrain area, wherein different erosion nodes correspond to different node erosion parameters;
[0121] The baking module 43 is used to perform erosion baking on the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter.
[0122] Furthermore, the device also includes:
[0123] A configuration module, used to define an erosion node to be subjected to terrain erosion baking based on different terrain erosion effect parameters, and to configure a data dictionary corresponding to the erosion node, wherein the data dictionary stores at least one element object for receiving a node erosion parameter of the erosion node;
[0124] A generation module is used to generate the node erosion parameter based on the numerical content entered by the element object, so as to determine the erosion node and then retrieve the node erosion parameter from the data dictionary.
[0125] Furthermore, the baking module comprises:
[0126] an amplification unit, configured to amplify the terrain region by a preset pixel multiple according to the erosion terrain amplification coefficient to obtain a first terrain region, and perform a first height processing on the amplified terrain region according to the height preprocessing parameter to obtain a second terrain region;
[0127] a baking unit, configured to perform baking based on the node erosion parameters and the terrain resetting parameters on the second terrain area according to the number of erosion iterations to obtain a first eroded terrain, wherein the terrain resetting parameters include an erosion weight of at least one erosion layer and a terrain material;
[0128] The processing unit is used to perform a second height processing on the first erosion terrain according to the height post-processing parameters to obtain a second erosion terrain, and to reduce the second erosion terrain by the preset pixel multiple according to the erosion terrain magnification coefficient to obtain a game erosion terrain.
[0129] Furthermore, the baking module also includes:
[0130] A determination unit, used for generating a default layer as an erosion layer under the condition that no target layer is selected in the terrain resetting parameters, and determining an erosion weight and a terrain material of the erosion layer;
[0131] The calling module is used to call the erosion layer corresponding to the target layer based on the preset layer mapping relationship under the condition that at least one target layer is selected in the terrain resetting parameters, and determine the erosion weight and terrain material of the erosion layer.
[0132] Furthermore, the device further comprises: a creation module,
[0133] The creation module is used to create multiple parameter base classes in the game engine, and define parameter meanings for the parameter base classes respectively, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing results, and terrain resetting parameters obtained through parameter items;
[0134] The generation module is further used to generate an erosion configuration file based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters, and initialize the erosion configuration file.
[0135] Furthermore, the acquisition module is specifically used to retrieve the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters in the erosion configuration file under the condition that the erosion configuration file is selected in the erosion editing interface of the game engine; and to acquire the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters based on the parameter items displayed in the erosion editing interface under the condition that the erosion configuration file is not selected in the erosion editing interface of the game engine.
[0136] Furthermore, the acquisition module is specifically used to display the height processing parameter items corresponding to the height processing operation under the condition that the height processing operation is selected in the erosion editing interface, and the height processing operation includes a height preprocessing operation and a height post-processing operation; determine the height processing result according to the parameter content entered in the height processing parameter item, and the height processing result includes height preprocessing parameters and height post-processing parameters for distorting and denoising the terrain height.
[0137] Furthermore, the device also includes:
[0138] The selection module is used to select the target channels of terrain height output, terrain layer output and debugging layer output of the game erosion terrain through RGB channels respectively under the condition of selecting to debug the game erosion terrain.
[0139] Furthermore, the determination module is also used to obtain a selected area by moving a control under the condition that a game terrain image is output through the game engine, and to perform mask drawing on the selected area to obtain the terrain area.
[0140] The embodiment of the present invention provides a device for making game erosion terrain. Compared with the prior art, the embodiment of the present invention determines a terrain area to be subjected to terrain erosion baking, and obtains the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area; obtains the node erosion parameters of the erosion nodes according to the selected erosion nodes of the terrain area, wherein different erosion nodes correspond to different node erosion parameters; erosion baking is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters, so as to achieve the purpose of performing efficient terrain erosion in GUP, reduce the tediousness of terrain erosion production between the game engine and other erosion components, reduce the time consumption of terrain erosion and the system processing pressure, greatly improve the accuracy and effect of game terrain erosion production, and meet the production effects of different terrain erosion.
[0141] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the method for making game erosion terrain in any of the above method embodiments.
[0142] Figure 5 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.
[0143] like Figure 5 As shown, the terminal may include: a processor (processor) 502 , a communication interface (Communications Interface) 504 , a memory (memory) 506 , and a communication bus 508 .
[0144] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .
[0145] The communication interface 504 is used to communicate with other devices such as clients or other servers.
[0146] The processor 502 is used to execute the program 510, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for making the game erosion terrain.
[0147] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0148] The processor 502 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0149] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0150] The program 510 may be specifically configured to enable the processor 502 to perform the following operations:
[0151] Determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area;
[0152] According to the selected erosion node of the terrain area, obtaining the node erosion parameter of the erosion node, wherein different erosion nodes correspond to different node erosion parameters;
[0153] Erosion baking is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters.
[0154] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0155] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for making erosion terrain in a game, characterized in that: include: Determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area; According to the selected erosion node of the terrain area, obtaining the node erosion parameter of the erosion node, wherein different erosion nodes correspond to different node erosion parameters; Erosion baking is performed on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters.
2. The method according to claim 1, characterized in that Before obtaining the node erosion parameters of the erosion nodes selected in the terrain area, the method further includes: Defining an erosion node to be subjected to terrain erosion baking based on different terrain erosion effect parameters, and configuring a data dictionary corresponding to the erosion node, wherein the data dictionary stores at least one element object for receiving a node erosion parameter of the erosion node; The node erosion parameter is generated based on the numerical content entered in the element object, and then the node erosion parameter is retrieved from the data dictionary after the erosion node is determined.
3. The method according to claim 1, characterized in that: The erosion baking of the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter includes: Amplifying the terrain region by a preset pixel multiple according to the erosion terrain amplification coefficient to obtain a first terrain region, and performing a first height processing on the amplified terrain region according to the height preprocessing parameter to obtain a second terrain region; Performing baking based on the node erosion parameters and the terrain resetting parameters on the second terrain area according to the number of erosion iterations to obtain a first eroded terrain, wherein the terrain resetting parameters include an erosion weight of at least one erosion layer and a terrain material; The first erosion terrain is subjected to a second height processing according to the height post-processing parameters to obtain a second erosion terrain, and the second erosion terrain is reduced by the preset pixel multiple according to the erosion terrain magnification coefficient to obtain a game erosion terrain.
4. The method according to claim 3, characterized in that Before performing baking based on the node erosion parameters and the terrain resetting parameters on the second terrain region according to the number of erosion iterations to obtain the first eroded terrain, the method further includes: Under the condition that no target layer is selected in the terrain resetting parameters, a default layer is generated as an erosion layer, and an erosion weight and a terrain material of the erosion layer are determined; Under the condition that at least one target layer is selected in the terrain resetting parameters, an erosion layer corresponding to the target layer is retrieved based on a preset layer mapping relationship, and an erosion weight and a terrain material of the erosion layer are determined.
5. The method according to claim 1, characterized in that Before obtaining the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters of the terrain area, the method further includes: Create multiple parameter base classes in the game engine, and define parameter meanings for the parameter base classes respectively, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters obtained through parameter items; An erosion configuration file is generated based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters, and the erosion configuration file is initialized and configured.
6. The method according to claim 5, characterized in that The obtaining of the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters of the terrain area includes: Under the condition that the erosion configuration file is selected in the erosion editing interface of the game engine, the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameter in the erosion configuration file are retrieved; Under the condition that the erosion configuration file is not selected in the erosion editing interface of the game engine, the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameters are obtained based on the parameter items displayed in the erosion editing interface.
7. The method according to claim 6, characterized in that The obtaining of the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, and the terrain resetting parameter based on the parameter items displayed in the erosion editing interface includes: Under the condition that a height processing operation is selected in the erosion editing interface, a height processing parameter item corresponding to the height processing operation is displayed, wherein the height processing operation includes a height pre-processing operation and a height post-processing operation; The height processing result is determined according to the parameter content entered in the height processing parameter item, and the height processing result includes height pre-processing parameters and height post-processing parameters for distorting and denoising the terrain height.
8. The method according to claim 1, characterized in that After erosion baking is performed on the terrain area based on the erosion iteration number, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameter, and the node erosion parameter, the method further includes: Under the condition of selecting to debug the game erosion terrain, target channels of terrain height output, terrain layer output, and debugging layer output of the game erosion terrain are respectively selected through RGB channels.
9. The method according to claim 1, characterized in that: Determining the terrain area to be subjected to terrain erosion baking includes: Under the condition that the game terrain image is outputted through the game engine, the selected area is obtained by moving the control, and the selected area is masked and drawn to obtain the terrain area.
10. A device for making erosion terrain in a game, characterized in that: include: A determination module is used to determine a terrain area to be subjected to terrain erosion baking, and obtain the number of erosion iterations, erosion terrain magnification coefficient, height processing result, and terrain resetting parameters of the terrain area; An acquisition module, used for acquiring a node erosion parameter of the erosion node according to the selected erosion node of the terrain area, wherein different erosion nodes correspond to different node erosion parameters; A baking module is used to perform erosion baking on the terrain area based on the number of erosion iterations, the erosion terrain magnification coefficient, the height processing result, the terrain resetting parameters, and the node erosion parameters.
11. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the method for making game erosion terrain according to any one of claims 1 to 9.
12. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the method for making game erosion terrain as described in any one of claims 1-9.