Game terrain making method and device
By using automated data conversion and access methods, the problems of high operating costs and low efficiency in the process of game terrain creation have been solved, enabling efficient and flexible game terrain creation.
Patent Information
- Application Number
- CN202311763261.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-01-10
AI Technical Summary
In the current game terrain creation process, frequent manual operations increase operational and time costs, reducing production efficiency and flexibility.
By searching for the baked files of the local terrain editing component and performing data transformation based on the transformation mapping relationship, the transformed files are stored in the system directory of the game engine. The target local terrain editing component is launched to edit the game terrain layer, and the terrain layer is output in the game engine for production, realizing the automatic integration of multiple local terrain editing components with the game engine.
It reduces the operational and time costs of game terrain, lowers editing complexity, and improves the efficiency of game terrain creation and the flexibility of erosion operations.
Smart Images

Figure CN119292505A_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 game terrain. Background Art
[0002] During the game development process, game terrain needs to be created according to different game scenes. At this time, third-party editing software is usually required to generate and edit the terrain.
[0003] At present, the existing game terrain generation or editing usually requires manual access to local third-party editing software, generating terrain height maps in the third-party editing software, and manually importing this terrain height map into the game engine for integrated production of game scenes. However, frequent manual operations will increase the operating cost and time cost of the game terrain, greatly reducing the efficiency of game terrain production. At the same time, manual access and import operations will also increase the complexity of game terrain editing, reducing the efficiency and flexibility of game terrain production. Summary of the invention
[0004] In view of this, the present invention provides a method and device for making game terrain, the main purpose of which is to solve the problems of low efficiency and poor flexibility in the existing game terrain making.
[0005] According to one aspect of the present invention, a method for making a game terrain is provided, comprising:
[0006] Searching for a baked file of at least one local terrain editing component, performing data conversion on the baked file based on a conversion mapping relationship, and storing the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine;
[0007] Under the condition that the target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit the game terrain layer, and at least one of the obtained game terrain layers is stored in the baking file;
[0008] The game engine calls the baking file in the system directory to output the game terrain layer, and produces the game terrain based on the game terrain layer.
[0009] Furthermore, before starting the target local terrain editing component to edit the game terrain layer, the method further includes:
[0010] Acquire a target area terrain mask created in the game engine, and perform data conversion on the target area terrain mask based on the conversion mapping relationship to obtain terrain data;
[0011] The starting of the target local terrain editing component to edit the game terrain layer includes:
[0012] Retrieving the terrain data through the target local terrain editing component and outputting the terrain data in an editing interface;
[0013] Terrain erosion information is obtained through the target local terrain editing component, and erosion processing is performed on the terrain data based on the terrain erosion information to obtain at least one of the game terrain layers to be stored in the baking file.
[0014] Furthermore, after storing the obtained at least one game terrain layer in the baking file, the method further includes:
[0015] When the game terrain layer is updated in the target local terrain editing component, an updated terrain layer is obtained, and the updated terrain layer is updated into the baked file;
[0016] Outputting an update instruction of the baking file in the game engine to retrieve the updated baking file and outputting the updated terrain layer.
[0017] Furthermore, after making the game terrain based on the game terrain layer, the method further includes:
[0018] Under the condition that terrain erosion adjustment data produced for the game terrain is obtained in the game engine, data conversion is performed on the terrain erosion adjustment data based on the conversion mapping relationship to obtain erosion adjustment data;
[0019] The erosion adjustment data is retrieved through the target local terrain editing component, and the stored game terrain layer is eroded to obtain an adjusted terrain erosion layer to be stored in the baking file.
[0020] Furthermore, the method further comprises:
[0021] Under the condition that any one of the game terrain layer, the updated terrain layer and the terrain erosion layer is detected to be stored in the baked file, data conversion is performed on the baked file based on the conversion mapping relationship to complete the conversion and update of the baked file.
[0022] Furthermore, the method further comprises:
[0023] Under the condition that a baking file corresponding to the target area terrain mask is generated, generating an output log of the baking file;
[0024] Under the condition that the target baking file in the output log is selected in the game engine, the target game terrain layer of the target baking file is retrieved to output the terrain erosion obtained by baking based on the target game terrain layer.
[0025] Further, searching for a baked file of at least one local terrain editing component and performing data conversion on the baked file based on a conversion mapping relationship includes:
[0026] Searching, through the game engine, for a data access interface of at least one local terrain editing component, and determining a first data format of a baked file of the data access interface;
[0027] Under the condition that there is a second data format having a conversion relationship with the first data format in the conversion mapping relationship, converting the first data format into the second data format;
[0028] Under the condition that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship, the first data format is output to indicate importing a second data format matching the first data format.
[0029] Furthermore, the making of the game terrain based on the game terrain layer includes:
[0030] The game scene data and erosion weight corresponding to the game terrain layer are obtained, and the game terrain layer and the game scene data are combined and baked based on the erosion weight to obtain an eroded terrain.
[0031] According to another aspect of the present invention, there is provided a device for making game terrain, comprising:
[0032] A search module, configured to search for a baked file of at least one local terrain editing component, perform data conversion on the baked file based on a conversion mapping relationship, and store the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine;
[0033] A storage module, used for starting the target local terrain editing component to edit the game terrain layer under the condition that the target local terrain editing component is selected by the game engine, and storing at least one of the obtained game terrain layers in the baking file;
[0034] The production module is used to call the baking file in the system directory through the game engine to output the game terrain layer, and produce the game terrain based on the game terrain layer.
[0035] Furthermore, the device further comprises: an acquisition module,
[0036] The acquisition module is used to acquire the target area terrain mask created in the game engine, and perform data conversion on the target area terrain mask based on the conversion mapping relationship to obtain terrain data;
[0037] The storage module is specifically used to retrieve the terrain data through the target local terrain editing component and output the terrain data in the editing interface; obtain terrain erosion information through the target local terrain editing component, and erode the terrain data based on the terrain erosion information to obtain at least one of the game terrain layers to be stored in the baking file.
[0038] Furthermore, the device also includes:
[0039] An update module, used for obtaining an update terrain layer when the game terrain layer is updated in the target local terrain editing component, and updating the update terrain layer into the baking file;
[0040] The output module is used to output an update instruction of the baking file in the game engine, so as to retrieve the updated baking file and output the updated terrain layer.
[0041] Furthermore, the device also includes:
[0042] A conversion module, for obtaining terrain erosion adjustment data produced for the game terrain in the game engine, and performing data conversion on the terrain erosion adjustment data based on the conversion mapping relationship to obtain erosion adjustment data;
[0043] The adjustment module is used to retrieve the erosion adjustment data through the target local terrain editing component, and perform erosion adjustment on the stored game terrain layer to obtain the adjusted terrain erosion layer to store in the baking file.
[0044] Further,
[0045] The conversion module is also used to perform data conversion on the baking file based on the conversion mapping relationship when it is detected that any one of the game terrain layer, the updated terrain layer, and the terrain erosion layer is stored in the baking file, so as to complete the conversion and update of the baking file.
[0046] Furthermore, the device also includes:
[0047] A generation module, for generating an output log of the baking file under the condition of generating a baking file corresponding to the target area terrain mask;
[0048] The calling module is used to call the target game terrain layer of the target baking file under the condition that the target baking file in the output log is selected in the game engine, so as to output the terrain erosion obtained by baking based on the target game terrain layer.
[0049] Furthermore, the search module is specifically used to search for a data access interface of at least one local terrain editing component through the game engine, and determine a first data format of a baked file of the data access interface; under the condition that there is a second data format having a conversion relationship with the first data format in the conversion mapping relationship, convert the first data format into the second data format; under the condition that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship, output the first data format to indicate the import of a second data format matching the first data format.
[0050] Furthermore, the production module is specifically used to obtain game scene data and erosion weights corresponding to the game terrain layer, and combine and bake the game terrain layer and the game scene data based on the erosion weights to obtain eroded terrain.
[0051] 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 above-mentioned method for making game terrain.
[0052] 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;
[0053] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned method for making game terrain.
[0054] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0055] The present invention provides a method and device for making game terrain. Compared with the prior art, the embodiment of the present invention searches for a baking file of at least one local terrain editing component, performs data conversion on the baking file based on a conversion mapping relationship, and stores the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baking files and a second data format of the game engine; under the condition that a target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit a game terrain layer, and at least one obtained game terrain layer is stored in the baking file; the baking file in the system directory is called by the game engine to output the game terrain layer, and the game terrain is made based on the game terrain layer, thereby realizing automatic access of multiple local terrain editing components to the game engine, reducing the operation cost and operation time cost of the game terrain, reducing the editing complexity of the game terrain, realizing the efficiency of game terrain production, and thus improving the operational flexibility of game terrain erosion.
[0056] 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
[0057] 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:
[0058] Figure 1 A flow chart of a method for making game terrain provided by an embodiment of the present invention is shown;
[0059] Figure 2 A schematic diagram of an interface for selecting a local Gaea component provided by an embodiment of the present invention is shown;
[0060] Figure 3 A flow chart of another method for making game terrain provided by an embodiment of the present invention is shown;
[0061] Figure 4 A schematic diagram of a game erosion terrain provided by an embodiment of the present invention is shown;
[0062] Figure 5 A block diagram showing a device for making game terrain provided by an embodiment of the present invention;
[0063] Figure 6 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0064] 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.
[0065] The embodiment of the present invention provides a method for making a game terrain, such as Figure 1 As shown, the method includes:
[0066] 101. Search for a baked file of at least one local terrain editing component, perform data conversion on the baked file based on a conversion mapping relationship, and store the baked file after data conversion in a system directory of the game engine.
[0067] In an embodiment of the present invention, the current execution end, as the execution end for executing the production of game terrain, can be a local server or a local terminal device to produce the game terrain in the game scene. The current execution end searches through the game engine installed in the local device to determine the baking file of the local terrain editing component installed in the local device. At this time, the game engine can be the UE engine (Unreal Engine), and the local terrain editing component can be Gaea software or WorldMachine software used to create various natural and fantasy style terrains and provide rich erosion nodes and parameters, so as to be used as a terrain erosion tool to produce terrain erosion effects. Among them, the baking file is a file used by different local terrain editing components to save terrain nodes and parameter information, so as to be edited and baked in the component. For example, the baking file corresponding to Gaea is a Tor file, and the baking file corresponding to WorldMachine is a Tmd file. The embodiment of the present invention does not make specific limitations. After the current execution end searches for the baking file in the local system cache or cached local storage space, it can perform data conversion on the baking file based on the pre-configured conversion mapping relationship, and store the converted baking file in the system directory of the game engine, so that when the game engine bakes the terrain, it can retrieve the baking file with matching data format from the system directory to produce the game terrain.
[0068] It should be noted that the conversion mapping relationship in the embodiment of the present invention includes the conversion relationship between the first data format of different baking files and the second data format of the game engine, that is, the terrain layer output in the corresponding data format in different local terrain editing components will be stored in the baking file. When the game engine needs to make terrain based on the terrain layer, the baking file will be called to use the terrain layer. At this time, the first data format of the baking file needs to be converted into the second data format required by the game engine. Therefore, it can be automatically converted based on the pre-configured conversion mapping relationship. For example, the conversion mapping relationship includes the conversion relationship between the first data format of the Tmd file, the first data format of the Tor file, and the second data format applicable to the UE engine, which is not specifically limited in the embodiment of the present invention.
[0069] 102. Under the condition that a target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit a game terrain layer, and at least one obtained game terrain layer is stored in the baking file.
[0070] In an embodiment of the present invention, the target local terrain editing component selected by the game engine can be selected by the user through the development interface in the game engine, and a data connection with the target local terrain editing component can be established. It can also be automatically selected according to the development requirements for different game scenes in the game engine. The embodiment of the present invention does not make specific limitations. At the same time, when the target local terrain editing component is selected from multiple local terrain editing components, the current execution end edits the game terrain layer by installing the target local terrain editing component with the local. At this time, after starting the target local terrain editing component, the developer can edit the game terrain layer in this component, or directly automatically generate the basic terrain layer, etc., to store at least one game terrain layer obtained after editing in the baking file. For example, clicking the local Gaea baking button will automatically trigger baking. At this time, a console window of the target local terrain editing component will be presented in the interface for terrain layer editing.
[0071] It should be noted that the game terrain layer in the embodiment of the present invention is a layer of terrain height for terrain erosion. At this time, each layer can correspond to an erosion effect. Each layer can be highly edited and drawn based on the terrain erosion effect in the game scene by the developer, or it can be highly edited and produced based on the automatic drawing tool in the target local terrain editing component, so that multiple game terrain layers can be baked and produced according to weights. The embodiment of the present invention does not make specific limitations. In addition, since the baking file is stored in the system file directory of the game engine, when the game terrain layer is stored in the baking file, if the data format of the game terrain layer does not match the data format of the baking file after data conversion, it can be converted based on the conversion mapping relationship, so that each time it is stored in the baking file, the data format of the game terrain layer can be directly called and used by the game engine. For example, Figure 2 As shown, after the developer selects Gaea local baking in the game engine, the baking file Tor is displayed from the system directory of the game engine. At this time, the temporary storage baking file can be modified in the advanced settings of the Gaea local baking directory, and is stored in the Intermediate folder of the system directory of the game engine by default, which is not specifically limited in the embodiment of the present invention.
[0072] 103. Retrieve the baking file in the system directory through the game engine to output the game terrain layer, and produce the game terrain based on the game terrain layer.
[0073] In an embodiment of the present invention, when it is necessary to produce game terrain, the current execution end calls the baking file in the system directory through the game engine, and outputs the game terrain layer of the baking file in the game engine. At this time, since the baking file is after data conversion, the data format of the game terrain layer stored in the baking file is a data format suitable for the game engine. Therefore, the game engine can directly output the game terrain layer, thereby producing the game terrain based on the game terrain layer.
[0074] An embodiment of the present invention provides a method for producing game terrain, which realizes automatic access of multiple local terrain editing components to a game engine, reduces the operating cost and operating time cost of the game terrain, reduces the editing complexity of the game terrain, realizes the high efficiency of game terrain production, and thus improves the operational flexibility of game terrain erosion.
[0075] The embodiment of the present invention provides another method for making game terrain, such as Figure 3 As shown, the method includes:
[0076] 201. Search for a data access interface of at least one local terrain editing component through the game engine, and determine a first data format of a baked file of the data access interface.
[0077] In order to reduce the tediousness of manually accessing and importing the local terrain editing component, the current execution end first searches for the data access interface of the local terrain editing component installed in the local device to determine the first data format of the baked file according to the corresponding data access interface. Among them, the first data format is the file data format corresponding to Gaea or WorldMachine as the local terrain editing component, such as the data format of the Tor file or the data format of the Tmd file. The Tmd file is the engineering file format of WorldMachine, which is used to save the nodes and parameter settings of the terrain, etc. The embodiment of the present invention does not make specific limitations.
[0078] It should be noted that when searching for the data access interface, a search can be performed from the installation packages of various local terrain editing components to determine whether there is an open link for the baked file, so as to determine the data access interface and open the corresponding baked file from the game engine through the data access interface that opens the link. The embodiment of the present invention does not make specific limitations.
[0079] 202a. If there is a second data format having a conversion relationship with the first data format in the conversion mapping relationship, convert the first data format into the second data format.
[0080] In order to automatically and effectively import the baking file into the game engine and automatically retrieve data for terrain baking, the current execution end first detects whether there is a second data format with a conversion relationship corresponding to the first data format in the conversion mapping relationship. When there is a second data format with a conversion relationship with the first data format, it means that the current execution end can directly perform data format conversion based on the conversion mapping relationship to convert the first data format into a second data format suitable for the game engine, and store the converted baking file in the system directory of the game engine. In addition, the conversion of data formats includes conversion of resolution, conversion between different bases, etc., which are not specifically limited in the embodiments of the present invention.
[0081] For example, in the Gaea component, TerrainDefinition configures two floating-point parameters, which define the ratio at which the terrain layer imported from the game engine is converted into terrain in the Gaea component. Therefore, if the height map resolution is 1024*1024, and if the pixel is set to 0.5 meters, the game terrain layer edited in the Gaea component has a resolution of 512 meters*512. If the height map pixel color is set to 1 in the game engine, the terrain height is 512 meters, and the overall height ratio of the terrain can be determined. Therefore, the conversion of the first data format to the second data format is to convert 1024*1024 into 512 meters*512, which is not specifically limited in the embodiment of the present invention.
[0082] In the embodiment of the present invention, step 202b parallel to step 202a outputs the first data format under the condition that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship to indicate the import of the second data format matching the first data format.
[0083] In order to realize automatic import of baked files, when the current execution end determines that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship, it can output the first data format based on the interface of the game engine to instruct the developer to manually import the second data format for data conversion with the first data format.
[0084] In the embodiment of the present invention, step 203 after step 202a is to obtain the target area terrain mask created in the game engine, and perform data conversion on the target area terrain mask based on the conversion mapping relationship to obtain terrain data.
[0085] When the data conversion of the baking file is completed, it means that the baking file can be called by the game engine at this time. In order to realize that the game engine automatically calls the game terrain layer in the baking file for terrain production, the current execution end first obtains the target area terrain mask created in the game engine. Among them, the target area terrain mask is obtained by masking the target terrain area selected for the expected erosion terrain production in the game engine. In this process, a component HouTuErosionActor that implements the erosion function can be created in the game engine, and the selected target terrain area is masked and drawn by HouTuErosionActor. The embodiment of the present invention does not make specific limitations. At the same time, after the current execution end determines that the target area terrain mask has been created in the game engine, the target area terrain mask that conforms to the game engine data format is converted based on the corresponding relationship between the first data format and the second data format in the conversion mapping relationship to obtain terrain data in a data format suitable for the target local terrain editing component.
[0086] In addition, in the embodiment of the present invention, the HouTu Terrain Actor component (abbreviated as HTAA), which is a component inside the UE engine for storing and managing terrain data, can interact with the HouTuErosionActor component, which is not specifically limited in the embodiment of the present invention.
[0087] 204. Retrieve the terrain data through the target local terrain editing component, and output the terrain data in an editing interface.
[0088] In order to realize the automatic import of terrain into the erosion editing tool to reduce the tediousness of terrain erosion production, the current execution end starts the selected target local terrain editing component to retrieve terrain data for editing through this target local terrain editing component. Among them, after the target local terrain editing component retrieves the terrain data, it outputs the terrain data according to the editing interface suitable for itself. For example, after selecting Gaea as the target local terrain editing component, the terrain data can be directly output in the editing interface of Gaea, and the embodiment of the present invention does not make specific limitations.
[0089] In one embodiment of the present invention, if the target local terrain editing component is WorldMachine, the output file format suitable for the WorldMachine component can be a Tor file, which is used to save the height map and layer data of the terrain. The data output by the WorldMachine component is converted back into a format that can be imported by the game UE and imported into the UE engine by converting the mapping relationship. The embodiment of the present invention does not make specific limitations.
[0090] 205. Obtain terrain erosion information through the target local terrain editing component, and perform erosion processing on the terrain data based on the terrain erosion information to obtain at least one of the game terrain layers to store in the baking file.
[0091] In order to achieve the terrain erosion effect, the current execution end produces the game terrain layer through the target local terrain editing component. Among them, the terrain erosion information is the parameters of the erosion effect selected or configured in the target local terrain editing component. At this time, since terrain erosion is used to characterize a terrain effect such as water flow and wind force that simulates nature, the parameters of the erosion effect can be added to the terrain. That is, the terrain erosion information can include but is not limited to the number of terrain layers, the degree of terrain distortion, the terrain erosion material, etc., which is not specifically limited in the embodiment of the present invention. In addition, the terrain erosion information can be based on the input and writing by the developer through the target local terrain editing component, or it can be configured based on the default terrain erosion effect in the target local terrain editing component, so as to perform erosion processing in the target local terrain editing component based on the acquired terrain erosion information to obtain the game terrain layer.
[0092] It should be noted that since the local terrain editing component is the Gaea software or WorldMachine software used to create various natural and fantasy style terrains and provide rich erosion nodes and parameters, after the current execution end starts the target local terrain editing component, the target local terrain editing component can directly perform erosion processing based on the imported terrain data and the acquired terrain erosion information, thereby obtaining the game terrain layer, and storing all the game terrain layers in the baking file. At this time, since the baking file is after data conversion, when storing the game terrain layer, format conversion is also required so that the game engine can directly call the game terrain layer with data format adaptation in the baking file, which is not specifically limited in the embodiment of the present invention.
[0093] 206. When the game terrain layer is updated in the target local terrain editing component, obtain an updated terrain layer, and update the updated terrain layer into the baking file.
[0094] In order to effectively and conveniently update the data in the baking file and improve the effect of erosion baking based on the terrain layer, the current execution end monitors in real time whether the developer has completed the update operation of the generated game terrain layer in the target local terrain editing component. When it is determined that the game terrain layer is to be updated, the current execution end stores the updated terrain layer in the baking file through the target local terrain editing component. Among them, the updated terrain layer is a layer generated by the developer each time an update is performed. For example, after each change of a terrain height, an updated terrain layer is obtained, and at the same time, this updated terrain layer is stored in the baking file.
[0095] It should be noted that before storing the updated terrain layer in the baking file, since the data format of the baking file is suitable for the game engine, it is necessary to convert the data of the updated terrain layer so as to store it in the baking file that can be directly called by the game engine.
[0096] For example, in order to achieve a rich and varied material erosion effect on the terrain, each game terrain layer will be configured with an erosion weight, that is, when a new layer is added here, the erosion weight is also configured. After adding a new layer, it is necessary to control which parts of the terrain are affected by this layer. When using the game terrain layer output by the WorldMachine component, the WorldMachine component marks which places are rocks and which places are rivers during the erosion process. By reading these marks, the rock map and river map can be determined according to the marks.
[0097] 207. Outputting an update instruction of the baking file in the game engine to retrieve the updated baking file and output the updated terrain layer.
[0098] In order to facilitate the operation of updating terrain erosion and thus reduce the operation steps of updating the terrain layer, the current execution end outputs an update indication in the editing interface in the game engine to inform the developer that there is an updated terrain layer in the baking file, so as to timely retrieve the updated terrain layer in the updated baking file for update baking production, which is not specifically limited in the embodiment of the present invention.
[0099] 208. Retrieve the baking file in the system directory through the game engine to output the game terrain layer, and produce the game terrain based on the game terrain layer.
[0100] In the embodiment of the present invention, the method for implementing step 208 is the same as that for step 103, which will not be described in detail here.
[0101] In addition, after waiting for the baking to be completed, the baking results will be automatically loaded in the game engine so that developers can see the terrain erosion results. At the same time, since the Tor file output by Gaea has been cached, you can click Rollback to return the terrain to the original uneroded initial terrain. And, by clicking Execute, continue to apply the last Gaea output terrain layer to bake again.
[0102] In another embodiment of the present invention, for further definition and explanation, the step of making a game terrain based on the game terrain layer includes:
[0103] The game scene data and erosion weight corresponding to the game terrain layer are obtained, and the game terrain layer and the game scene data are combined and baked based on the erosion weight to obtain an eroded terrain.
[0104] In order to realize terrain erosion based on the game terrain layer and achieve a realistic display effect of the game terrain, when the current execution end uses the game engine to make the terrain of the game terrain layer, specifically, first obtain the game scene data and erosion weight corresponding to the game terrain layer. Among them, the game scene data is used to characterize the scene where the game terrain is located, such as a desert scene, a mountain scene, etc., and the erosion weight is used to characterize the color weight of the game terrain layer when baking. For example, if the erosion weight is large, the color value corresponding to the game terrain layer is darker during baking, which is not specifically limited in the embodiment of the present invention.
[0105] It should be noted that since the game terrain layer is a layer of terrain height for terrain erosion, when performing combined baking, all game terrain layers can be baked at once according to the terrain height, and terrain erosion can be produced by combining the color corresponding to the erosion weight baking, as shown below: Figure 4In addition, in the embodiment of the present invention, the game scene data and the erosion weight can be configured in advance in the game engine according to different game scene development requirements, and the embodiment of the present invention does not make specific limitations.
[0106] In another embodiment of the present invention, for further definition and description, the method further includes:
[0107] Under the condition that terrain erosion adjustment data produced for the game terrain is obtained in the game engine, data conversion is performed on the terrain erosion adjustment data based on the conversion mapping relationship to obtain erosion adjustment data;
[0108] The erosion adjustment data is retrieved through the target local terrain editing component, and the stored game terrain layer is eroded to obtain an adjusted terrain erosion layer to be stored in the baking file.
[0109] In order to reduce the cumbersomeness of terrain erosion operations and thus improve the production efficiency of terrain erosion, the current execution end monitors in real time whether the baked game terrain is adjusted in the game engine to obtain terrain erosion adjustment data. Among them, the terrain erosion adjustment data may include but is not limited to the height adjustment data, color adjustment data, material adjustment data, etc. of the game terrain layer, and the developer can enter it based on the editing interface in the game engine, and the embodiment of the present invention does not make specific restrictions. At this time, in order to automatically import the terrain erosion adjustment data into the target local terrain editing component, the current execution end converts the terrain erosion adjustment data based on the conversion relationship to obtain the erosion adjustment data, so that it can be directly retrieved and used in the target local terrain editing component. Specifically, the developer can retrieve the terrain height adjustment data entered in the game engine and converted the data based on the target local terrain editing component Gaea, and adjust the height of the original game terrain layer in Gaea according to the terrain height adjustment data to obtain the adjusted terrain erosion layer, so as to store and update it in the baking file.
[0110] In another embodiment of the present invention, for further definition and description, the method further includes:
[0111] Under the condition that any one of the game terrain layer, the updated terrain layer and the terrain erosion layer is detected to be stored in the baked file, data conversion is performed on the baked file based on the conversion mapping relationship to complete the conversion and update of the baked file.
[0112] In order to achieve the purpose of timely and effective terrain baking, the current execution end can also detect in real time whether any of the game terrain layer, update terrain layer, and terrain erosion layer is stored in the baking file. At this time, if it is detected that any of the game terrain layer, update terrain layer, and terrain erosion layer is stored, it means that the baking file needs to be updated. The data format of the game terrain layer, update terrain layer, and terrain erosion layer to be stored can be converted, and the overall data conversion can be performed based on the baking file that has been stored in the game terrain layer, update terrain layer, and terrain erosion layer, so as to reduce the tediousness of the operation by updating the baking file once.
[0113] In another embodiment of the present invention, for further definition and description, the steps further include:
[0114] Under the condition that a baking file corresponding to the target area terrain mask is generated, generating an output log of the baking file;
[0115] Under the condition that the target baking file in the output log is selected in the game engine, the target game terrain layer of the target baking file is retrieved to output the terrain erosion obtained by baking based on the target game terrain layer.
[0116] In order to facilitate the screening of game terrain layers to meet different terrain erosion production requirements, the current execution end generates an output log according to the time of updating the baking file or converting the data format when determining the target area terrain mask and generating the corresponding baking file. At this time, the output log links the baking file content according to the time and baking file identifier. At the same time, the current execution end displays this output log through the game engine so that the developer can select the baking file identifier from the input log, open the target baking file through the link, and call the target game terrain layer of the target baking file. After the target game terrain layer is selected, this target game terrain layer can be output in the game engine and then baked, which is not specifically limited in the embodiment of the present invention.
[0117] For example, after adjusting the terrain erosion effect to a satisfactory level, the Tor file of the corresponding Gaea component will be replaced so that other developers can reuse this Tor file. For example, click "Replace original Tor" to replace the original Tor file with the Tor file currently being edited, and then call this Tor file when reproducing terrain erosion baking at other locations.
[0118] For example, after adjusting the terrain erosion effect to your satisfaction, the Tmd file of the corresponding WorldMachine component will be replaced so that other developers can reuse this Tmd file. For example, click "Replace original Tmd" to replace the original Tmd file with the Tmd file currently being edited, and then call this Tmd file when reproducing terrain erosion baking in other locations.
[0119] The embodiment of the present invention provides a method for making game terrain. Compared with the prior art, the embodiment of the present invention searches for a baking file of at least one local terrain editing component, performs data conversion on the baking file based on a conversion mapping relationship, and stores the baked file after data conversion in the system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baking files and a second data format of the game engine; under the condition that the target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit a game terrain layer, and at least one obtained game terrain layer is stored in the baking file; the baking file in the system directory is called by the game engine to output the game terrain layer, and the game terrain is made based on the game terrain layer, thereby realizing automatic access of multiple local terrain editing components to the game engine, reducing the operation cost and operation time cost of the game terrain, reducing the editing complexity of the game terrain, realizing the efficiency of game terrain production, and thus improving the operational flexibility of game terrain erosion.
[0120] Furthermore, as a response to the above Figure 1 The embodiment of the present invention provides a device for making game terrain, such as Figure 5 As shown, the device comprises:
[0121] A search module 31 is used to search for a baked file of at least one local terrain editing component, and perform data conversion on the baked file based on a conversion mapping relationship, and store the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine;
[0122] The storage module 32 is used to start the target local terrain editing component to edit the game terrain layer under the condition that the target local terrain editing component is selected by the game engine, and store at least one of the obtained game terrain layers in the baking file;
[0123] The production module 33 is used to call the baking file in the system directory through the game engine to output the game terrain layer, and produce the game terrain based on the game terrain layer.
[0124] Furthermore, the device further comprises: an acquisition module,
[0125] The acquisition module is used to acquire the target area terrain mask created in the game engine, and perform data conversion on the target area terrain mask based on the conversion mapping relationship to obtain terrain data;
[0126] The storage module is specifically used to retrieve the terrain data through the target local terrain editing component and output the terrain data in the editing interface; obtain terrain erosion information through the target local terrain editing component, and erode the terrain data based on the terrain erosion information to obtain at least one of the game terrain layers to be stored in the baking file.
[0127] Furthermore, the device also includes:
[0128] An update module, used for obtaining an update terrain layer when the game terrain layer is updated in the target local terrain editing component, and updating the update terrain layer into the baking file;
[0129] The output module is used to output an update instruction of the baking file in the game engine, so as to retrieve the updated baking file and output the updated terrain layer.
[0130] Furthermore, the device also includes:
[0131] A conversion module, for obtaining terrain erosion adjustment data produced for the game terrain in the game engine, and performing data conversion on the terrain erosion adjustment data based on the conversion mapping relationship to obtain erosion adjustment data;
[0132] The adjustment module is used to retrieve the erosion adjustment data through the target local terrain editing component, and perform erosion adjustment on the stored game terrain layer to obtain the adjusted terrain erosion layer to store in the baking file.
[0133] Further,
[0134] The conversion module is also used to perform data conversion on the baking file based on the conversion mapping relationship when it is detected that any one of the game terrain layer, the updated terrain layer, and the terrain erosion layer is stored in the baking file, so as to complete the conversion and update of the baking file.
[0135] Furthermore, the device also includes:
[0136] A generation module, for generating an output log of the baking file under the condition of generating a baking file corresponding to the target area terrain mask;
[0137] The calling module is used to call the target game terrain layer of the target baking file under the condition that the target baking file in the output log is selected in the game engine, so as to output the terrain erosion obtained by baking based on the target game terrain layer.
[0138] Furthermore, the search module is specifically used to search for a data access interface of at least one local terrain editing component through the game engine, and determine a first data format of a baked file of the data access interface; under the condition that there is a second data format having a conversion relationship with the first data format in the conversion mapping relationship, convert the first data format into the second data format; under the condition that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship, output the first data format to indicate the import of a second data format matching the first data format.
[0139] Furthermore, the production module is specifically used to obtain game scene data and erosion weights corresponding to the game terrain layer, and combine and bake the game terrain layer and the game scene data based on the erosion weights to obtain eroded terrain.
[0140] The embodiment of the present invention provides a device for making game terrain. Compared with the prior art, the embodiment of the present invention searches for a baking file of at least one local terrain editing component, performs data conversion on the baking file based on a conversion mapping relationship, and stores the baked file after data conversion in the system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baking files and a second data format of the game engine; under the condition that a target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit a game terrain layer, and at least one obtained game terrain layer is stored in the baking file; the baking file in the system directory is called by the game engine to output the game terrain layer, and the game terrain is made based on the game terrain layer, thereby realizing automatic access of multiple local terrain editing components to the game engine, reducing the operation cost and operation time cost of the game terrain, reducing the editing complexity of the game terrain, realizing the efficiency of game terrain production, and thus improving the operational flexibility of game 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 a game terrain in any of the above method embodiments.
[0142] Figure 6 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 6 As shown, the terminal may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0144] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0145] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0146] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in the above-mentioned embodiment of the method for making game terrain.
[0147] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0148] The processor 402 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 406 is used to store the program 410. The memory 406 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 410 may be specifically configured to enable the processor 402 to perform the following operations:
[0151] Searching for a baked file of at least one local terrain editing component, performing data conversion on the baked file based on a conversion mapping relationship, and storing the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine;
[0152] Under the condition that the target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit the game terrain layer, and at least one of the obtained game terrain layers is stored in the baking file;
[0153] The game engine calls the baking file in the system directory to output the game terrain layer, and produces the game terrain based on the game terrain layer.
[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 game terrain, characterized in that: include: Searching for a baked file of at least one local terrain editing component, performing data conversion on the baked file based on a conversion mapping relationship, and storing the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine; Under the condition that the target local terrain editing component is selected by the game engine, the target local terrain editing component is started to edit the game terrain layer, and at least one of the obtained game terrain layers is stored in the baking file; The baking file in the system directory is retrieved by the game engine to output the game terrain layer, and the game terrain is produced based on the game terrain layer.
2. The method according to claim 1, characterized in that Before starting the target local terrain editing component to edit the game terrain layer, the method further includes: Acquire a target area terrain mask created in the game engine, and perform data conversion on the target area terrain mask based on the conversion mapping relationship to obtain terrain data; The starting of the target local terrain editing component to edit the game terrain layer includes: Retrieving the terrain data through the target local terrain editing component and outputting the terrain data in an editing interface; Terrain erosion information is obtained through the target local terrain editing component, and erosion processing is performed on the terrain data based on the terrain erosion information to obtain at least one of the game terrain layers to be stored in the baking file.
3. The method according to claim 2, characterized in that After storing the obtained at least one game terrain layer in the baking file, the method further includes: When the game terrain layer is updated in the target local terrain editing component, an updated terrain layer is obtained, and the updated terrain layer is updated into the baked file; Outputting an update instruction of the baking file in the game engine to retrieve the updated baking file and outputting the updated terrain layer.
4. The method according to claim 2, characterized in that: After the game terrain is produced based on the game terrain layer, the method further includes: Under the condition that terrain erosion adjustment data produced for the game terrain is obtained in the game engine, data conversion is performed on the terrain erosion adjustment data based on the conversion mapping relationship to obtain erosion adjustment data; The erosion adjustment data is retrieved through the target local terrain editing component, and the stored game terrain layer is eroded to obtain an adjusted terrain erosion layer to be stored in the baking file.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Under the condition that any one of the game terrain layer, the updated terrain layer and the terrain erosion layer is detected to be stored in the baked file, data conversion is performed on the baked file based on the conversion mapping relationship to complete the conversion and update of the baked file.
6. The method according to claim 2, characterized in that The method further comprises: Under the condition that a baking file corresponding to the target area terrain mask is generated, generating an output log of the baking file; Under the condition that the target baking file in the output log is selected in the game engine, the target game terrain layer of the target baking file is retrieved to output the terrain erosion obtained by baking based on the target game terrain layer.
7. The method according to claim 1, characterized in that The step of searching for a baked file of at least one local terrain editing component and performing data conversion on the baked file based on a conversion mapping relationship includes: Searching, through the game engine, for a data access interface of at least one local terrain editing component, and determining a first data format of a baked file of the data access interface; Under the condition that there is a second data format having a conversion relationship with the first data format in the conversion mapping relationship, converting the first data format into the second data format; Under the condition that there is no second data format having a conversion relationship with the first data format in the conversion mapping relationship, the first data format is output to indicate importing a second data format matching the first data format.
8. The method according to claim 1, characterized in that The making of game terrain based on the game terrain layer comprises: The game scene data and erosion weight corresponding to the game terrain layer are obtained, and the game terrain layer and the game scene data are combined and baked based on the erosion weight to obtain an eroded terrain.
9. A device for making game terrain, characterized in that: include: A search module, configured to search for a baked file of at least one local terrain editing component, perform data conversion on the baked file based on a conversion mapping relationship, and store the baked file after data conversion in a system directory of the game engine, wherein the conversion mapping relationship includes a conversion relationship between a first data format of different baked files and a second data format of the game engine; A storage module, used for starting the target local terrain editing component to edit the game terrain layer under the condition that the target local terrain editing component is selected by the game engine, and storing at least one of the obtained game terrain layers in the baking file; The production module is used to call the baking file in the system directory through the game engine to output the game terrain layer, and produce the game terrain based on the game terrain layer.
10. 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 terrain according to any one of claims 1 to 8.
11. 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 terrain as described in any one of claims 1-8.