Terrain erosion method and device, storage medium and computer equipment

Through automated terrain erosion calculation and weight data mixing, the problems of low terrain erosion efficiency and inconsistent effects in the existing technology are solved, and efficient and unified terrain erosion effect generation is achieved.

CN119293128APending Publication Date: 2025-01-10BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311703705.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In existing online games, the production of terrain erosion effects requires a lot of manpower and time, resulting in low production efficiency, labor-intensive art personnel, and inconsistent terrain erosion effects drawn by different people.

Method used

By determining the target erosion area and type, using erosion calculation and mixed weight data calculation, the terrain erosion effect can be automatically achieved, reducing manual intervention, and improving efficiency and stability.

Benefits of technology

It improves the efficiency of terrain erosion, reduces the labor costs of artists, ensures the unity and coordination of terrain erosion effects, and avoids the erosion effects of different styles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293128A_ABST
    Figure CN119293128A_ABST
Patent Text Reader

Abstract

The invention discloses a terrain erosion method and device, a storage medium and computer equipment. The method comprises the steps that terrain data of a target erosion area and a target erosion type corresponding to the target erosion area are determined; performing erosion calculation on the topographic data according to the target erosion type to obtain eroded topographic data of the target erosion area and weight data of a plurality of erosion layer materials; performing hybrid calculation on the weight data of the plurality of erosion layer materials to update the weight data of each erosion layer material, so that the sum of the weight data of the plurality of corresponding erosion layer materials at the same terrain position reaches a target value; and determining erosion effect data of the target erosion area according to the topographic data after erosion and the weight data of each erosion layer material. According to the method, automatic erosion of the topographic data can be realized only by selecting the target erosion area and specifying the target erosion type, so that the topographic erosion efficiency is improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terrain erosion technology, and in particular to a terrain erosion method and device, a storage medium, and a computer device. Background Art

[0002] Existing online games, especially open world games, have an increasingly high demand for the production of large-scale terrains. Many game scenes use natural scenes, and the use of carefully designed natural scene resources can bring players a realistic gaming experience.

[0003] In order to ensure the authenticity of terrain resources in the game, it is usually necessary to create terrain erosion effects to simulate the process of erosion and change of surface rocks and soil by factors such as water flow, wind, and heat in nature, so as to generate more realistic and diverse terrain effects. Such resources usually require the design of artists, which requires high manpower and time costs in the design process of game terrain resources, resulting in low production efficiency of game resources. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a terrain erosion method and apparatus, a storage medium, and a computer device. Only by selecting the target erosion area and specifying the target erosion type can the automatic erosion of terrain data be achieved, thereby improving the efficiency of terrain erosion, reducing the labor of artists, and reducing labor costs.

[0005] According to one aspect of the present application, a terrain erosion method is provided, the method comprising:

[0006] Determine topographic data of a target erosion area and a target erosion type corresponding to the target erosion area;

[0007] Performing erosion calculation on the terrain data according to the target erosion type to obtain the post-erosion terrain data of the target erosion area and weight data of multiple erosion layer materials;

[0008] The weight data of multiple erosion layer materials are mixed and calculated to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value;

[0009] The erosion effect data of the target erosion area is determined according to the post-erosion terrain data and the weight data of each erosion layer material.

[0010] Optionally, before determining the topographic data of the target erosion area, the method further includes:

[0011] Obtain original topographic data of the target erosion area;

[0012] In the case of receiving noise addition information for a selected range in the target erosion area, performing noise calculation on the selected range based on the target noise type indicated by the noise addition information to update the original terrain data corresponding to the selected range, and using the updated original terrain data corresponding to the target erosion area as the terrain data of the target erosion area;

[0013] Otherwise, the original terrain data of the target erosion area is directly used as the terrain data of the target erosion area.

[0014] Optionally, after obtaining the original terrain data of the target erosion area, the method further includes:

[0015] Amplifying the original terrain data according to the target terrain amplification coefficient to amplify the target erosion area, and using the amplified original terrain data as the original terrain data of the target erosion area;

[0016] Correspondingly, after determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, the method further includes:

[0017] The erosion effect data is reduced and calculated according to the target terrain magnification coefficient so that the erosion effect data of the target erosion area matches the target erosion area before magnification.

[0018] Optionally, before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes:

[0019] Receiving first weight adjustment information for any first erosion layer material among a plurality of erosion layer materials, wherein the first weight adjustment information includes a terrain slope interval to be adjusted and a first weight adjustment rule, and the first weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different terrain slopes;

[0020] According to the terrain slope data in the post-erosion terrain data, a first adjustment terrain area whose terrain slope is in the terrain slope interval to be adjusted is determined, and according to the first weight adjustment rule, the weight data corresponding to the first adjustment terrain area in the first erosion layer material is adjusted.

[0021] Optionally, before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes:

[0022] Receiving second weight adjustment information for any second erosion layer material among the plurality of erosion layer materials, wherein the second weight adjustment information includes an ambient light occlusion interval to be adjusted and a second weight adjustment rule, and the second weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different ambient light occlusion values;

[0023] According to the ambient occlusion data in the post-erosion terrain data, a second adjustment terrain area in which the ambient occlusion data is in the ambient occlusion interval to be adjusted is determined, and according to the second weight adjustment rule, the weight data corresponding to the second adjustment terrain area in the second erosion layer material is adjusted.

[0024] Optionally, before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes:

[0025] Gaussian blur calculation is performed on the weight data of multiple erosion layer materials, and the weight data of each erosion layer material is updated using the Gaussian blur calculation result.

[0026] Optionally, the mixing calculation of the weight data of the multiple erosion layer materials to update the weight data of each erosion layer material includes:

[0027] For each terrain position, respectively calculate the sum of weight data of multiple erosion layer materials at the terrain position;

[0028] If the sum is greater than the target value, the weight data of each erosion layer material is updated to the ratio of the weight data of each erosion layer material to the sum, and the weight data of the default layer material corresponding to the terrain position is set to 0, wherein the default layer material is a material that matches the landform attributes of the target erosion area;

[0029] If the sum is less than the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to the difference between the target value and the sum;

[0030] If the sum is equal to the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to 0.

[0031] Optionally, before determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, the method further includes:

[0032] Performing Gaussian blur calculation on the terrain height data of the post-erosion terrain data to obtain blurred terrain height data;

[0033] Determine the height fuzzy mixing strength, and based on the height fuzzy mixing strength, perform mixing calculation on the terrain height data of the eroded terrain data and the blurred terrain height data, and use the mixed calculation result as the terrain height data of the eroded terrain data.

[0034] Optionally, determining a target erosion type corresponding to the target erosion area includes:

[0035] Receiving selection data for any one of a plurality of preset erosion types, and determining the selected target erosion type, wherein the preset erosion type includes at least one of water erosion, thermal erosion, particle water erosion, and particle wind erosion; or,

[0036] According to the geomorphic attributes of the target erosion area, a target erosion type corresponding to the geomorphic attributes is matched among a plurality of preset erosion types.

[0037] Optionally, before determining the topographic data of the target erosion area, the method further includes:

[0038] Based on the geomorphic attributes of each part of the game scene, the game scene is divided into multiple erosion areas, and each erosion area is used as the target erosion area;

[0039] Accordingly, the method further comprises:

[0040] Based on the erosion effect data of each erosion area, the erosion effect data of the game scene is determined.

[0041] According to another aspect of the present application, a terrain erosion device is provided, the device comprising:

[0042] An erosion information determination module, used to determine the terrain data of a target erosion area and a target erosion type corresponding to the target erosion area;

[0043] An erosion calculation module, used to perform erosion calculation on the terrain data according to the target erosion type, to obtain the eroded terrain data of the target erosion area and the weight data of the materials of multiple erosion layers;

[0044] A weight blending module is used to blend and calculate the weight data of multiple erosion layer materials to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value;

[0045] The erosion effect determination module is used to determine the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of the material of each erosion layer.

[0046] Optionally, the erosion information determination module is further used to:

[0047] Obtain original topographic data of the target erosion area;

[0048] In the case of receiving noise addition information for a selected range in the target erosion area, performing noise calculation on the selected range based on the target noise type indicated by the noise addition information to update the original terrain data corresponding to the selected range, and using the updated original terrain data corresponding to the target erosion area as the terrain data of the target erosion area;

[0049] Otherwise, the original terrain data of the target erosion area is directly used as the terrain data of the target erosion area.

[0050] Optionally, the erosion information determination module is further used to:

[0051] After obtaining the original terrain data of the target erosion area, amplifying the original terrain data according to the target terrain amplification coefficient to amplify the target erosion area, and using the amplified original terrain data as the original terrain data of the target erosion area;

[0052] Accordingly, the erosion effect determination module is further used for:

[0053] The erosion effect data is reduced and calculated according to the target terrain magnification coefficient so that the erosion effect data of the target erosion area matches the target erosion area before magnification.

[0054] Optionally, the weight mixing module is further used to:

[0055] Before performing mixed calculation on the weight data of the multiple erosion layer materials, receiving first weight adjustment information of any first erosion layer material among the multiple erosion layer materials, wherein the first weight adjustment information includes a terrain slope interval to be adjusted and a first weight adjustment rule, and the first weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different terrain slopes;

[0056] According to the terrain slope data in the post-erosion terrain data, a first adjustment terrain area whose terrain slope is in the terrain slope interval to be adjusted is determined, and according to the first weight adjustment rule, the weight data corresponding to the first adjustment terrain area in the first erosion layer material is adjusted.

[0057] Optionally, the weight mixing module is further used to:

[0058] Before performing mixed calculation on the weight data of the multiple erosion layer materials, receiving second weight adjustment information for any second erosion layer material among the multiple erosion layer materials, wherein the second weight adjustment information includes an ambient light occlusion interval to be adjusted and a second weight adjustment rule, and the second weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different ambient light occlusion values;

[0059] According to the ambient occlusion data in the post-erosion terrain data, a second adjustment terrain area in which the ambient occlusion data is in the ambient occlusion interval to be adjusted is determined, and according to the second weight adjustment rule, the weight data corresponding to the second adjustment terrain area in the second erosion layer material is adjusted.

[0060] Optionally, the weight mixing module is further used to:

[0061] Before the mixed calculation is performed on the weight data of the multiple erosion layer materials, Gaussian blur calculation is performed on the weight data of the multiple erosion layer materials, and the weight data of each erosion layer material is updated using the Gaussian blur calculation result.

[0062] Optionally, the weight mixing module is further used to:

[0063] For each terrain position, respectively calculate the sum of weight data of multiple erosion layer materials at the terrain position;

[0064] If the sum is greater than the target value, the weight data of each erosion layer material is updated to the ratio of the weight data of each erosion layer material to the sum, and the weight data of the default layer material corresponding to the terrain position is set to 0, wherein the default layer material is a material that matches the landform attributes of the target erosion area;

[0065] If the sum is less than the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to the difference between the target value and the sum;

[0066] If the sum is equal to the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to 0.

[0067] Optionally, the erosion effect determination module is further used to:

[0068] Before determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, performing Gaussian blur calculation on the terrain height data of the post-erosion terrain data to obtain blurred terrain height data;

[0069] Determine the height fuzzy mixing strength, and based on the height fuzzy mixing strength, perform mixing calculation on the terrain height data of the eroded terrain data and the blurred terrain height data, and use the mixed calculation result as the terrain height data of the eroded terrain data.

[0070] Optionally, the erosion information determination module is further used to:

[0071] Receiving selection data for any one of a plurality of preset erosion types, and determining the selected target erosion type, wherein the preset erosion type includes at least one of water erosion, thermal erosion, particle water erosion, and particle wind erosion; or,

[0072] According to the geomorphic attributes of the target erosion area, a target erosion type corresponding to the geomorphic attributes is matched among a plurality of preset erosion types.

[0073] Optionally, the erosion information determination module is further used to: before determining the terrain data of the target erosion area, split the game scene into multiple erosion areas based on the landform attributes of each part of the game scene, and respectively use each erosion area as the target erosion area;

[0074] Correspondingly, the erosion effect determination module is further used to determine the erosion effect data of the game scene based on the erosion effect data of each erosion area.

[0075] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned terrain erosion method is implemented.

[0076] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the above-mentioned terrain erosion method is implemented when the processor executes the program.

[0077] By means of the above technical scheme, a terrain erosion method and device, storage medium, and computer equipment provided in the embodiment of the present application perform erosion calculation on the terrain data of the target erosion area based on the target erosion type, obtain the terrain data after erosion and the weight data of each erosion layer material, and perform mixed calculation on the weight data of each erosion layer material so that the sum of the weight data of each erosion layer material corresponding to each terrain position reaches the target value, thereby determining the erosion effect data of the target erosion area according to the terrain data after erosion and the weight data of each erosion layer material. The embodiment of the present application realizes the generation of terrain erosion effect by erosion calculation and mixed calculation of the weight data of the erosion layer material. It only needs to select the target erosion area and specify the target erosion type to realize automatic erosion of terrain data, improve the efficiency of terrain erosion, reduce the labor of artists, reduce labor costs, and no longer rely on manual experience for terrain erosion drawing, improve the stability of terrain erosion effect, and for projects that require multiple people to collaborate in terrain erosion drawing, improve the unity and coordination of terrain erosion effect in the project, and avoid different styles of terrain erosion effects due to different drawing personnel in the same project.

[0078] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0080] Figure 1 A schematic diagram of a process flow of a terrain erosion method provided in an embodiment of the present application is shown;

[0081] Figure 2A A schematic diagram of a process flow of another terrain erosion method provided in an embodiment of the present application is shown;

[0082] Figure 2B A schematic diagram showing the effect of a convex hull noise provided by an embodiment of the present application is shown;

[0083] Figure 2C A schematic diagram showing the effect of a distorted noise provided by an embodiment of the present application is shown;

[0084] Figure 2D A schematic diagram showing the effect of a Perlin noise provided by an embodiment of the present application is shown;

[0085] Figure 2EA schematic diagram of the effect of terraced field noise provided by an embodiment of the present application is shown;

[0086] Figure 3 A schematic structural diagram of a terrain erosion device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0087] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0088] In this embodiment, a terrain erosion method is provided, such as Figure 1 As shown, the method includes:

[0089] Step 101: determine the terrain data of a target erosion area and the target erosion type corresponding to the target erosion area.

[0090] The terrain erosion method provided in the embodiment of the present application can be implemented based on a game engine, or it can be implemented based on an independently developed terrain erosion tool. Taking the implementation based on a game engine as an example, an erosion configuration file can be specified in the game engine so that the game engine can create multiple erosion processing nodes based on the erosion configuration file. The erosion processing node can specifically include a terrain height preprocessing node, an erosion pipeline node, a layer mixing node, and a post-processing node, wherein the terrain height preprocessing node is used to add noise to the terrain data to enrich the terrain performance, the erosion pipeline node is used to perform erosion calculation on the terrain data, the layer mixing node is used to perform mixed calculation on the weight data of each erosion layer material and perform other processing on the weight data, and the post-processing node is used to perform post-processing on the weight data of the erosion layer material and the terrain height data to make the erosion effect more realistic and reduce the abrupt performance. When used, one or more nodes can be selected as needed to change the terrain data. Different processes of terrain erosion are executed based on the selected erosion processing node, so as to realize the function of terrain erosion on the specified terrain, and the visual interface based on the game engine can conveniently configure the parameters of each erosion processing node in the game engine and preview the terrain erosion effect of each stage in real time.

[0091] In an embodiment of the present application, taking terrain erosion of a game scene as an example, the target erosion area in the game scene that needs to be eroded is first determined. For example, the target erosion area in the game scene that needs to be eroded can be marked by a brush tool whose size and shape can be adjusted in the displayed game scene. The terrain data of the target erosion area and the target erosion type of the target erosion area are obtained so that the terrain data of the target erosion area can be eroded according to the target erosion type to achieve terrain erosion of the target erosion area. Among them, the target erosion type can be one or more of a plurality of preset erosion types, and the preset erosion types can include water erosion, thermal erosion, particle water erosion, and particle wind erosion. Water erosion will produce a gravel layer, a sedimentation layer, and a waterway layer, which are suitable for forming a general erosion effect; thermal erosion will produce a gravel layer and a rock wall layer, which are suitable for generating a spike effect; particle water erosion will produce a gravel layer and a waterway layer, which are suitable for generating a large winding river channel.

[0092] Step 102, performing erosion calculation on the terrain data according to the target erosion type, to obtain the post-erosion terrain data of the target erosion area and weight data of multiple erosion layer materials.

[0093] In the embodiment of the present application, after determining the target erosion area and the target erosion type, the terrain data of the target erosion area is eroded according to the physical simulation algorithm or image processing algorithm corresponding to the target erosion type, so that the terrain data of the target erosion area changes due to erosion (here mainly the terrain height data changes), and the terrain data after erosion calculation is obtained, and the weight data of multiple erosion layer materials are obtained after erosion. The erosion layer material is the material of the material layer formed under the erosion of different erosion types, such as gravel layer, sedimentation layer, waterway layer, rock wall layer. The weight data refers to the color proportion of the erosion layer material map at each position of the terrain on the terrain. For example, the layer of the stone map is Layer01, and the layer of the grass map is Layer02. If a certain position on the terrain is stone, then the weight of Layer01 at this place is 1, and the weight of Layer02 is 0. For another position of the terrain, if it is grass, the weight of Layer01 is 0 and the weight of Layer02 is 1. If the grass and stone at a certain position each account for half, the weight of each layer corresponding to the position is 0.5.

[0094] Step 103, performing mixed calculation on the weight data of multiple erosion layer materials to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value.

[0095] In the embodiment of the present application, in order to ensure that the sum of the weight data at each position on the target terrain area is the same target value and facilitate subsequent color calculations, it is necessary to perform mixed calculations on the weight data of each erosion layer material. Specifically, the weight data of multiple erosion layer materials corresponding to each terrain position in the target terrain area can be mixed and calculated to achieve the update of the weight data of each erosion layer material corresponding to each terrain position, and ensure that the sum of the weight data of each erosion layer material corresponding to each terrain position after the update is the same target value, and the target value is generally 1.

[0096] Optionally, step 103 includes:

[0097] Step 103.1, for each terrain position, respectively calculating the sum of weight data of multiple erosion layer materials at the terrain position;

[0098] Step 103.2, if the sum is greater than the target value, updating the weight data of each erosion layer material to the ratio of the weight data of each erosion layer material to the sum, and setting the weight data of the default layer material corresponding to the terrain position to 0, wherein the default layer material is a material that matches the landform attributes of the target erosion area;

[0099] Step 103.3, if the sum value is less than the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to the difference between the target value and the sum value;

[0100] Step 103.4, if the sum value is equal to the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to 0.

[0101] In this embodiment, when performing mixed calculation of weight data for each erosion layer material, the weight data of multiple erosion layer materials corresponding to each terrain position (one pixel represents one terrain position) can be mixed and calculated one by one. Erosion generally produces a certain proportion of landform changes in a large terrain area, while another proportion of terrain may not change, or the change of landform is generally not completely different from the original landform and produces a "completely unrecognizable" change. The landform effect after erosion can be regarded as the superposition of the original landform effect of the terrain and the change of landform effect caused by erosion. Therefore, the materials involved in the mixed calculation, in addition to the erosion layer material that produces the erosion effect due to the erosion calculation, also include the default layer material of the terrain itself. For example, if the target terrain area is a desert area, the default layer material is the sand layer, and if the target terrain area is a lawn area, the default layer material is the grass layer.

[0102] Take any terrain location as an example, first calculate the sum of the weight data of multiple erosion layer materials corresponding to the terrain location. If the sum is greater than the target value, it means that the terrain location has completely lost its original landform after being eroded. Then directly normalize the weight data corresponding to each erosion layer material and reduce it proportionally to the target value. In addition, since the terrain location no longer has the original landform, set the weight data of the terrain location in the default layer material to 0, so that the original landform color will not appear in the subsequent effect display. For example, the original landform is grass, which becomes gravel after erosion. If the sum is equal to the target value, there is no need to change the weight data corresponding to each erosion layer material, and directly set the weight data of the terrain location in the default layer material to 0. If the sum is less than the target value, it means that the terrain location has not completely lost its original appearance after being eroded. In this case, the part where the sum does not reach the target value can be supplemented with the weight data of the default layer material. That is, the difference between the target value and the sum is calculated, and the weight data of each erosion layer material is kept unchanged. The weight data of the default layer material is set to this difference, so that the location can show the effect of being eroded but not completely losing its original appearance. For example, the grass color accounts for 80% and the waterway color accounts for 20%, showing the effect of a waterway on the grass.

[0103] Step 104: Determine the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material.

[0104] In an embodiment of the present application, after the weight data of each erosion layer material are mixed and calculated, the erosion effect data of the target erosion area can be determined according to the post-erosion terrain data and the weight data of each erosion layer material, so as to show the terrain and landform effects of the target erosion area after erosion based on the erosion effect data.

[0105] By applying the technical solution of this embodiment, erosion calculation is performed on the terrain data of the target erosion area based on the target erosion type, and the terrain data after erosion and the weight data of each erosion layer material are obtained, and the weight data of each erosion layer material are mixed and calculated so that the sum of the weight data of each erosion layer material corresponding to each terrain position reaches the target value, thereby determining the erosion effect data of the target erosion area according to the terrain data after erosion and the weight data of each erosion layer material. The embodiment of the present application realizes the generation of terrain erosion effect through erosion calculation and mixed calculation of the weight data of the erosion layer material. It only needs to select the target erosion area and specify the target erosion type to realize automatic erosion of terrain data, improves the efficiency of terrain erosion, reduces the labor of artists, reduces labor costs, and no longer relies on manual experience for terrain erosion drawing, improves the stability of terrain erosion effect, and for projects that require multiple people to collaborate in terrain erosion drawing, improves the unity and coordination of terrain erosion effects in the project, and avoids the appearance of different styles of terrain erosion effects due to different drawing personnel in the same project.

[0106] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another terrain erosion method is provided, such as Figure 2A As shown, the method includes:

[0107] Step 201, based on the landform attributes of each part of the game scene, the game scene is divided into multiple erosion areas, and each erosion area is used as the target erosion area; the original terrain data of the target erosion area is obtained.

[0108] In the embodiment of the present application, the game scene can be automatically split into different erosion areas, avoiding the trouble of manually specifying the erosion area. Specifically, each part of the game scene can be split into multiple erosion areas based on different landform attributes. The landform attribute of each erosion area is unique. Therefore, when performing terrain erosion, multiple erosion areas are taken as target erosion areas for terrain erosion one by one. Of course, after splitting into multiple erosion areas, one or more can be manually selected as target erosion areas for erosion. For each target erosion area, the original terrain data of the target erosion area is obtained.

[0109] Step 202, upon receiving noise addition information for a selected range in the target erosion area, noise calculation is performed on the selected range based on the target noise type indicated by the noise addition information to update the original terrain data corresponding to the selected range, and the updated original terrain data corresponding to the target erosion area is used as the terrain data of the target erosion area; otherwise, the original terrain data of the target erosion area is directly used as the terrain data of the target erosion area.

[0110] In an embodiment of the present application, before performing terrain erosion on the target erosion area, noise may be added to the terrain to enrich the terrain performance effect. Of course, erosion calculation may be performed directly without adding noise, or only noise may be added without performing erosion calculation, which is not limited here. If the user chooses to add noise before erosion calculation, then the selected range in the target erosion area where noise needs to be added and the target noise type to be added may be determined based on the received noise addition information, and noise calculation may be performed within the selected range so that the original terrain data of the selected range in the target erosion area is changed due to the addition of noise, thereby using the changed original terrain data as the terrain data of the target erosion area. Specifically, respective noises may be added to multiple ranges in the target erosion area, or multiple noises may be added to the same range. The target noise types include convex hull noise, distortion noise, Perlin noise, terrace noise, etc. Among them, convex hull noise is suitable for generating convex hulls on terrain, such as Figure 2B This is a schematic diagram of the effect of adding convex hull noise to part of the terrain; distortion noise is suitable for adding details to terrain that is too flat, otherwise the effect of eroding the flat terrain may not be ideal. Here, it is preferred to add distortion noise to all flat terrains, such as Figure 2C This is a schematic diagram of the effect of adding distortion noise to part of the terrain; Perlin Noise is Perlin Noise, which includes three modes: Type A Default, Type B Turbulence, and Type C Ridge. Figure 2D A schematic diagram of the effect of adding Perlin noise to part of the terrain; terrace noise can be used to produce terrace effects, such as Figure 2E This is a schematic diagram of the effect of adding terrace noise to part of the terrain. Of course, if the user does not add noise, the original terrain data will be directly used as the terrain data of the target erosion area for subsequent calculations.

[0111] Step 203, receiving selection data for any one of a plurality of preset erosion types, and determining the selected target erosion type, wherein the preset erosion type includes at least one of water erosion, thermal erosion, particle water erosion, and particle wind erosion; or, based on the geomorphic attributes of the target erosion area, matching the target erosion type corresponding to the geomorphic attributes among a plurality of preset erosion types.

[0112] In the embodiment of the present application, the target erosion type can be selected by the user from a plurality of preset erosion types, or can be automatically matched according to the geomorphic attributes of the target erosion area. For the automatic matching method, the preferred erosion types corresponding to different geomorphic attributes can be pre-set, so as to obtain the corresponding preferred erosion type as the target erosion type according to the geomorphic attributes of the target erosion area. The preset erosion type and the preferred erosion type both include at least one of water erosion, thermal erosion, particle water erosion and particle wind erosion.

[0113] Step 204 , performing erosion calculation on the terrain data according to the target erosion type, to obtain the post-erosion terrain data of the target erosion area and the weight data of the materials of multiple erosion layers.

[0114] In the embodiment of the present application, the terrain data of the target erosion area is eroded according to the physical simulation algorithm or image processing algorithm corresponding to the target erosion type. The specific process can be referred to the description of step 102, which will not be repeated here. In addition, after the erosion calculation, the weight data mixing calculation can be performed directly, or before the weight data mixing calculation, the weight data of the erosion layer material can be adjusted to produce an expected and natural effect, thereby improving the controllability of the terrain production. Specifically, one or more forms of adjustment can be performed, and the adjustment method is shown below.

[0115] Further, optionally, after step 204 and before step 205, the method may also include: receiving first weight adjustment information for any first erosion layer material among multiple erosion layer materials, wherein the first weight adjustment information includes a terrain slope interval to be adjusted and a first weight adjustment rule, and the first weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different terrain slopes; determining a first adjustment terrain area with a terrain slope in the terrain slope interval to be adjusted according to the terrain slope data in the post-erosion terrain data, and adjusting the weight data corresponding to the first adjustment terrain area in the first erosion layer material according to the first weight adjustment rule.

[0116] Among them, after performing erosion calculation on terrain data, the weight data of the erosion layer material can also be adjusted to a certain extent in combination with the terrain slope. For example, the weight data of a certain erosion layer material (such as a gravel layer, a sediment layer, a water channel layer) is increased at a gentle terrain, and the weight data of a certain erosion layer material (such as a rock wall layer) is increased at a steep terrain, so that the erosion effect is more in line with expectations. Specifically, the user can select the first erosion layer material to be adjusted from multiple erosion layer materials, set the terrain slope range to be adjusted, and select or set the first weight adjustment rule. The first weight adjustment rule can be the default rule or a rule set by the user, and this rule is used to indicate the weight adjustment values corresponding to different terrain slopes. For example, the user can display a terrain slope selection slider through the operation interface. The minimum value of the slider is 0, indicating completely flat, and the maximum value of the slider is 1, indicating completely steep. The terrain slope range to be adjusted is set by operating the control on the slider. The first weight adjustment rule can be the minimum weight increase value and the maximum weight increase value. The minimum weight increase value corresponds to the minimum value of the terrain slope range to be adjusted, and the maximum weight increase value corresponds to the maximum value of the terrain slope range to be adjusted. A curve is drawn with the terrain slope as the horizontal axis and the weight adjustment value as the vertical axis, so as to determine the weight adjustment values corresponding to different terrain slopes according to the curve. Of course, the first weight adjustment rule can also be set in other ways, which is not limited here. Furthermore, in the eroded terrain data, the part where the terrain slope is within the terrain slope range to be adjusted, that is, the first adjustment terrain range, is determined, and the weight data corresponding to the first adjustment terrain range in the first erosion layer material is adjusted according to the first weight adjustment rule. For example, the weights of the gravel layer, the sediment layer, and the water channel layer are increased in the area where the terrain slope is in [a, b] to fill the gravel, sediment, and water channel effects in a relatively gentle terrain, where 0 < a < b < 1; the weight of the rock wall layer is increased in the interval where the terrain slope is in [c, 1] to fill the rock wall in a relatively steep terrain. This produces a result that meets expectations and is natural, improving the controllability of terrain production.

[0117] Further, optionally, after step 204 and before step 205, it may further include: receiving second weight adjustment information for any one of the second erosion layer materials in multiple erosion layer materials. Among them, the second weight adjustment information includes the ambient occlusion range to be adjusted and the second weight adjustment rule, and the second weight adjustment rule is used to indicate the weight adjustment values corresponding to different ambient occlusion values; according to the ambient occlusion data in the eroded terrain data, the second adjustment terrain area where the ambient occlusion data is within the ambient occlusion range to be adjusted is determined, and according to the second weight adjustment rule, the weight data corresponding to the second adjustment terrain area in the second erosion layer material is adjusted.

[0118] Among them, after the terrain data is eroded, the weight data of the erosion layer material can also be adjusted in combination with the terrain's ambient occlusion data AO. AO (Ambient Occlusion) is a technology used to calculate ambient occlusion, which can be used to simulate shadows and details between objects and enhance the depth and realism of the scene. The user increases or decreases the weight of any erosion layer material at terrains with different ambient occlusion values. Specifically, the user can select the second erosion layer material to be adjusted from multiple erosion layer materials, set the ambient occlusion interval to be adjusted, and select or set the second weight adjustment rule, where the second weight adjustment rule can be a default rule or a rule set by the user, which is used to indicate the weight adjustment values ​​corresponding to different ambient occlusion values. For example, the user can display the ambient light occlusion value selection slider through the operation interface. The minimum value of the slider is 0, which means no occlusion at all, and the maximum value of the slider is 1, which means complete occlusion. The ambient light occlusion interval to be adjusted is set by operating the controls on the slider. The first weight adjustment rule can be the minimum weight increase value and the maximum weight increase value. The minimum weight increase value corresponds to the minimum value of the ambient light occlusion interval to be adjusted, and the maximum weight increase value corresponds to the maximum value of the ambient light occlusion interval to be adjusted. A curve is drawn with the ambient light occlusion value as the horizontal axis and the weight adjustment value as the vertical axis, so as to determine the weight adjustment value corresponding to different ambient light occlusion values ​​according to the curve. Of course, the second weight adjustment rule can also be set in other ways, which is not limited here. Then, in the terrain data after erosion, the part of the ambient light occlusion value in the ambient light occlusion interval to be adjusted, that is, the second adjustment terrain interval, is determined, and the weight data corresponding to the second adjustment terrain interval in the second erosion layer material is adjusted according to the second weight adjustment rule. Produce expected and natural results, and improve the controllability of terrain production.

[0119] Further, optionally, after step 204 and before step 205, the method may further include: performing Gaussian blur calculation on the weight data of multiple erosion layer materials, and updating the weight data of each erosion layer material using the Gaussian blur calculation result.

[0120] Among them, after the terrain data is eroded, the weight data of each erosion layer material output after the erosion calculation may have defects, and there may be problems such as the weight data is not consistent and uniform, resulting in an abrupt erosion effect. Therefore, the weight data of the erosion layer material can be fuzzy calculated. Specifically, the Gaussian blur calculation method can be used to update the weight data of each erosion layer material using the Gaussian blur calculation result. Among them, the number of iterations of the fuzzy calculation determines the degree of blur. The more times, the more obvious the blur intensity, which helps to repair possible defects in erosion. It enhances the details and realism of the erosion effect and improves the beauty and realism of terrain production.

[0121] Step 205, performing mixed calculation on the weight data of multiple erosion layer materials to update the weight data of each erosion layer material.

[0122] In the embodiment of the present application, the weight data of each erosion layer material is mixed and calculated to obtain the final weight data of each erosion layer material. The specific mixed calculation method can be found in the description of step 103 and will not be repeated here.

[0123] Step 206, performing Gaussian blur calculation on the terrain height data of the post-erosion terrain data to obtain the blurred terrain height data; determining the height blur mixing strength, and based on the height blur mixing strength, performing a mixing calculation on the terrain height data of the post-erosion terrain data and the blurred terrain height data, and using the mixing calculation result as the terrain height data of the post-erosion terrain data.

[0124] In the embodiment of the present application, after the terrain data is eroded, the terrain height data output after the erosion calculation may have defects, and there may be a problem that the terrain height data is not smooth enough, resulting in spurs on the terrain. Therefore, the terrain height data in the terrain data after erosion can be fuzzy calculated. Specifically, a Gaussian fuzzy calculation method can be used to obtain the blurred terrain height data, and the terrain height data before blurring and the terrain height data after blurring are mixed according to the set height fuzzy mixing strength, so that the mixed result is used as the terrain height data of the terrain data after erosion. The details and realism of the erosion effect are enhanced, and the aesthetics and realism of the terrain production are improved.

[0125] Step 207, determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material; and determining the erosion effect data of the game scene based on the erosion effect data of each erosion area.

[0126] In an embodiment of the present application, the erosion effect data of each target erosion area is determined by utilizing the post-erosion terrain data corresponding to each target erosion area and the weight data of each erosion layer material, and the erosion effect data of different erosion areas are spliced ​​to form the erosion effect data of a complete game scene, so as to complete the terrain erosion and erosion effect generation of the entire game scene.

[0127] In any embodiment of the present application, optionally, after obtaining the original terrain data of the target erosion area, the method further includes: performing amplification calculation on the original terrain data according to the target terrain magnification coefficient to magnify the target erosion area, and using the amplified original terrain data as the original terrain data of the target erosion area; accordingly, after determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of the material of each erosion layer, the method further includes: performing reduction calculation on the erosion effect data according to the target terrain magnification coefficient to make the erosion effect data of the target erosion area match the target erosion area before magnification.

[0128] In this embodiment, if you want a more precise erosion effect, you can also set the target terrain magnification factor to obtain a more precise terrain erosion effect. For example, for an area of ​​50m*50m, generally 1m 2 / grid, the input used during erosion is 50*50. If this value is adjusted to 3, the precision during erosion will increase to 150*150, and after the erosion is completed, it will be downsampled to 50*50 and written into the terrain, restoring the original size of the target eroded area.

[0129] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a terrain erosion device, such as Figure 3 As shown, the device comprises:

[0130] An erosion information determination module, used to determine the terrain data of a target erosion area and a target erosion type corresponding to the target erosion area;

[0131] An erosion calculation module, used to perform erosion calculation on the terrain data according to the target erosion type, to obtain the eroded terrain data of the target erosion area and the weight data of the materials of multiple erosion layers;

[0132] A weight blending module is used to blend and calculate the weight data of multiple erosion layer materials to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value;

[0133] The erosion effect determination module is used to determine the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of the material of each erosion layer.

[0134] Optionally, the erosion information determination module is further used to:

[0135] Obtain original topographic data of the target erosion area;

[0136] In the case of receiving noise addition information for a selected range in the target erosion area, performing noise calculation on the selected range based on the target noise type indicated by the noise addition information to update the original terrain data corresponding to the selected range, and using the updated original terrain data corresponding to the target erosion area as the terrain data of the target erosion area;

[0137] Otherwise, the original terrain data of the target erosion area is directly used as the terrain data of the target erosion area.

[0138] Optionally, the erosion information determination module is further used to:

[0139] After obtaining the original terrain data of the target erosion area, amplifying the original terrain data according to the target terrain amplification coefficient to amplify the target erosion area, and using the amplified original terrain data as the original terrain data of the target erosion area;

[0140] Accordingly, the erosion effect determination module is further used for:

[0141] The erosion effect data is reduced and calculated according to the target terrain magnification coefficient so that the erosion effect data of the target erosion area matches the target erosion area before magnification.

[0142] Optionally, the weight mixing module is further used to:

[0143] Before performing mixed calculation on the weight data of the multiple erosion layer materials, receiving first weight adjustment information of any first erosion layer material among the multiple erosion layer materials, wherein the first weight adjustment information includes a terrain slope interval to be adjusted and a first weight adjustment rule, and the first weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different terrain slopes;

[0144] According to the terrain slope data in the post-erosion terrain data, a first adjustment terrain area whose terrain slope is in the terrain slope interval to be adjusted is determined, and according to the first weight adjustment rule, the weight data corresponding to the first adjustment terrain area in the first erosion layer material is adjusted.

[0145] Optionally, the weight mixing module is further used to:

[0146] Before performing mixed calculation on the weight data of the multiple erosion layer materials, receiving second weight adjustment information for any second erosion layer material among the multiple erosion layer materials, wherein the second weight adjustment information includes an ambient light occlusion interval to be adjusted and a second weight adjustment rule, and the second weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different ambient light occlusion values;

[0147] According to the ambient occlusion data in the post-erosion terrain data, a second adjustment terrain area in which the ambient occlusion data is in the ambient occlusion interval to be adjusted is determined, and according to the second weight adjustment rule, the weight data corresponding to the second adjustment terrain area in the second erosion layer material is adjusted.

[0148] Optionally, the weight mixing module is further used to:

[0149] Before the mixed calculation is performed on the weight data of the multiple erosion layer materials, Gaussian blur calculation is performed on the weight data of the multiple erosion layer materials, and the weight data of each erosion layer material is updated using the Gaussian blur calculation result.

[0150] Optionally, the weight mixing module is further used to:

[0151] For each terrain position, respectively calculate the sum of weight data of multiple erosion layer materials at the terrain position;

[0152] If the sum is greater than the target value, the weight data of each erosion layer material is updated to the ratio of the weight data of each erosion layer material to the sum, and the weight data of the default layer material corresponding to the terrain position is set to 0, wherein the default layer material is a material that matches the landform attributes of the target erosion area;

[0153] If the sum is less than the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to the difference between the target value and the sum;

[0154] If the sum is equal to the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to 0.

[0155] Optionally, the erosion effect determination module is further used to:

[0156] Before determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, performing Gaussian blur calculation on the terrain height data of the post-erosion terrain data to obtain blurred terrain height data;

[0157] Determine the height fuzzy mixing strength, and based on the height fuzzy mixing strength, perform mixing calculation on the terrain height data of the eroded terrain data and the blurred terrain height data, and use the mixed calculation result as the terrain height data of the eroded terrain data.

[0158] Optionally, the erosion information determination module is further used to:

[0159] Receiving selection data for any one of a plurality of preset erosion types, and determining the selected target erosion type, wherein the preset erosion type includes at least one of water erosion, thermal erosion, particle water erosion, and particle wind erosion; or,

[0160] According to the geomorphic attributes of the target erosion area, a target erosion type corresponding to the geomorphic attributes is matched among a plurality of preset erosion types.

[0161] Optionally, the erosion information determination module is further used to: before determining the terrain data of the target erosion area, split the game scene into multiple erosion areas based on the landform attributes of each part of the game scene, and respectively use each erosion area as the target erosion area;

[0162] Correspondingly, the erosion effect determination module is further used to determine the erosion effect data of the game scene based on the erosion effect data of each erosion area.

[0163] It should be noted that for other corresponding descriptions of the functional units involved in the terrain erosion device provided in the embodiment of the present application, reference can be made to Figures 1 to 2A The corresponding description in the method will not be repeated here.

[0164] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0165] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0166] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0167] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0168] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0169] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0170] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0171] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A terrain erosion method, characterized in that: The method comprises: Determine topographic data of a target erosion area and a target erosion type corresponding to the target erosion area; Performing erosion calculation on the terrain data according to the target erosion type to obtain the post-erosion terrain data of the target erosion area and weight data of multiple erosion layer materials; The weight data of multiple erosion layer materials are mixed and calculated to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value; The erosion effect data of the target erosion area is determined according to the post-erosion terrain data and the weight data of each erosion layer material.

2. The method according to claim 1, characterized in that Identify topographic data for target erosion areas, including: Obtain original topographic data of the target erosion area; In the case of receiving noise addition information for a selected range in the target erosion area, performing noise calculation on the selected range based on the target noise type indicated by the noise addition information to update the original terrain data corresponding to the selected range, and using the updated original terrain data corresponding to the target erosion area as the terrain data of the target erosion area; Otherwise, the original terrain data of the target erosion area is directly used as the terrain data of the target erosion area.

3. The method according to claim 2, characterized in that After obtaining the original terrain data of the target erosion area, the method further includes: Amplifying the original terrain data according to the target terrain amplification coefficient to amplify the target erosion area, and using the amplified original terrain data as the original terrain data of the target erosion area; Correspondingly, after determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, the method further includes: The erosion effect data is reduced and calculated according to the target terrain magnification coefficient so that the erosion effect data of the target erosion area matches the target erosion area before magnification.

4. The method according to claim 1, characterized in that: Before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes: Receiving first weight adjustment information for any first erosion layer material among a plurality of erosion layer materials, wherein the first weight adjustment information includes a terrain slope interval to be adjusted and a first weight adjustment rule, and the first weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different terrain slopes; According to the terrain slope data in the post-erosion terrain data, a first adjustment terrain area whose terrain slope is in the terrain slope interval to be adjusted is determined, and according to the first weight adjustment rule, the weight data corresponding to the first adjustment terrain area in the first erosion layer material is adjusted.

5. The method according to claim 1, characterized in that Before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes: Receiving second weight adjustment information for any second erosion layer material among the plurality of erosion layer materials, wherein the second weight adjustment information includes an ambient light occlusion interval to be adjusted and a second weight adjustment rule, and the second weight adjustment rule is used to indicate weight adjustment values ​​corresponding to different ambient light occlusion values; According to the ambient occlusion data in the post-erosion terrain data, a second adjustment terrain area in which the ambient occlusion data is in the ambient occlusion interval to be adjusted is determined, and according to the second weight adjustment rule, the weight data corresponding to the second adjustment terrain area in the second erosion layer material is adjusted.

6. The method according to claim 1, characterized in that Before performing mixed calculation on the weight data of the multiple erosion layer materials, the method further includes: Gaussian blur calculation is performed on the weight data of multiple erosion layer materials, and the weight data of each erosion layer material is updated using the Gaussian blur calculation result.

7. The method according to any one of claims 1 to 6, characterized in that The mixing and calculating of the weight data of the multiple erosion layer materials to update the weight data of each erosion layer material includes: For each terrain position, respectively calculate the sum of weight data of multiple erosion layer materials at the terrain position; If the sum is greater than the target value, the weight data of each erosion layer material is updated to the ratio of the weight data of each erosion layer material to the sum, and the weight data of the default layer material corresponding to the terrain position is set to 0, wherein the default layer material is a material that matches the landform attributes of the target erosion area; If the sum is less than the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to the difference between the target value and the sum; If the sum is equal to the target value, the weight data of each erosion layer material is kept unchanged, and the weight data of the default layer material corresponding to the terrain position is set to 0.

8. The method according to any one of claims 1 to 6, characterized in that Before determining the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of each erosion layer material, the method further includes: Performing Gaussian blur calculation on the terrain height data of the post-erosion terrain data to obtain blurred terrain height data; Determine the height fuzzy mixing strength, and based on the height fuzzy mixing strength, perform mixing calculation on the terrain height data of the eroded terrain data and the blurred terrain height data, and use the mixed calculation result as the terrain height data of the eroded terrain data.

9. The method according to any one of claims 1 to 6, characterized in that Determining the target erosion type corresponding to the target erosion area includes: Receiving selection data for any one of a plurality of preset erosion types, and determining the selected target erosion type, wherein the preset erosion type includes at least one of water erosion, thermal erosion, particle water erosion, and particle wind erosion; or, According to the geomorphic attributes of the target erosion area, a target erosion type corresponding to the geomorphic attributes is matched among a plurality of preset erosion types.

10. The method according to any one of claims 1 to 6, characterized in that Before determining the topographic data of the target erosion area, the method further includes: Based on the geomorphic attributes of each part of the game scene, the game scene is divided into multiple erosion areas, and each erosion area is used as the target erosion area; Accordingly, the method further comprises: Based on the erosion effect data of each erosion area, the erosion effect data of the game scene is determined.

11. A terrain erosion device, characterized in that: The device comprises: An erosion information determination module, used to determine the terrain data of a target erosion area and a target erosion type corresponding to the target erosion area; An erosion calculation module, used to perform erosion calculation on the terrain data according to the target erosion type, to obtain the eroded terrain data of the target erosion area and the weight data of the materials of multiple erosion layers; A weight blending module is used to blend and calculate the weight data of multiple erosion layer materials to update the weight data of each erosion layer material so that the sum of the weight data of multiple erosion layer materials corresponding to the same terrain position reaches the target value; The erosion effect determination module is used to determine the erosion effect data of the target erosion area according to the post-erosion terrain data and the weight data of the material of each erosion layer.

12. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.