Scene baking method, device, equipment and computer-readable medium
By executing baking tasks on the server side and decoupling the game development process, we solved the problems of low development efficiency and high costs caused by software such as Houdini, and achieved efficient game development.
Patent Information
- Application Number
- CN202111654807.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In existing technologies, the baking process of game maps and scenes relies on 3D special effects software such as Houdini, which leads to strict development environment requirements, complex installation and configuration, and affects development efficiency and costs.
Decouple baking tasks from the game development process and execute baking tasks on the server. The client does not need to install baking software or configure the environment. It only needs to send data to the remote server for processing and obtain the baking results.
It improves game development efficiency, reduces costs, simplifies the development process, and reduces dependence on machine environment and performance.
Smart Images

Figure CN114288669B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of three-dimensional computer graphics technology, and in particular to a scene baking method, apparatus, device, and computer-readable medium. Background Art
[0002] As game maps continue to grow in size, and next-generation games demand ever-increasing scene complexity and natural aesthetics, baking game maps and scenes has generally shifted from traditional manual production to procedural generation. For example, algorithms automatically generate terrain height, surface weight maps, vegetation scattering, and water effects. Furthermore, other data that previously required manual artist creation, such as water and snow mask creation and pivot points for wind animation, can now be automatically generated procedurally.
[0003] Currently, programmatic baking of game maps and scenes primarily relies on processing the image data of these maps and scenes using 3D special effects software such as Houdini. However, these software have extremely stringent requirements for the development environment, and the installation and configuration process is complex. Deploying Houdini and other 3D special effects software on every developer's machine is not only time-consuming and labor-intensive, but also significantly impacts the efficiency and effectiveness of scene baking depending on the machine's operating environment and performance. These factors significantly impact game development efficiency.
[0004] There is currently no effective solution to the problems of low efficiency and high cost in game development. Summary of the Invention
[0005] The present application provides a scene baking method, apparatus, device, and computer-readable medium to solve the technical problems of low game development efficiency and high cost.
[0006] According to one aspect of an embodiment of the present application, the present application provides a scene baking method, which is applied to a server and includes:
[0007] Upon receiving a baking task execution request sent by a client, extracting a baking task identification carried in the baking task execution request to call out a target baking task that matches the baking task identification;
[0008] In the target baking task, extract the target scene's mask layer data and baking parameters from the baking task folder that matches the baking task identification identifier. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the baking task folder's address.
[0009] Input the mask layer data and baking parameters into the baking engine, so as to call the baking engine to bake the mask layer data according to the baking parameters to obtain the baking result of the target scene;
[0010] If the baking result indicates that the baking is successful, baking completion information is returned to the client.
[0011] Optionally, before extracting the baking task identification carried in the baking task execution request, the method further includes:
[0012] Upon receiving a baking task creation request sent by a client, creating a target baking task and generating a baking task identification identifier for the target baking task;
[0013] Create a baking task folder that matches the baking task identification;
[0014] The address of the baking task folder and the baking task identification identifier are sent to the client, so that the client uploads the mask layer data and baking parameters of the target scene to be baked to the baking task folder, and sends a baking task execution request to the server with the baking task identification identifier.
[0015] Optionally, inputting the mask layer data and baking parameters into a baking engine to call the baking engine to bake the mask layer data according to the baking parameters includes:
[0016] Determine the data path of the mask layer data and the output directory of the baking results, and configure the environment variables according to the baking parameters. The output directory is the directory in the baking task folder;
[0017] Pass the environment variables, data path, and output directory as parameters to the target script file, so as to call the baking engine through the target script file, and enable the baking engine to extract the mask layer data from the data path based on the environment variables for baking processing;
[0018] When the baking engine exports the baking results to the output directory, the project directory of the target project where the target scene is located is passed to the target script file to associate the baking results with the project file of the target project through the target script file.
[0019] According to another aspect of the embodiments of the present application, the present application provides a scene baking method, which is applied to a client, comprising:
[0020] Sending a baking task execution request carrying a baking task identification identifier to the server, so that the server calls a target baking task according to the baking task identification identifier, and extracts the mask layer data and baking parameters of the target scene from the baking task folder matching the baking task identification identifier in the target baking task to bake the target scene. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder.
[0021] When the baking completion information of the target scene is received from the server, the baking result tag corresponding to the target scene is displayed in the baking list of the target game engine;
[0022] When the target game engine calls the baking result tag, the baking result of the target scene is obtained and the display effect of the target scene is updated with the baking result.
[0023] Optionally, before sending the baking task execution request carrying the baking task identification identifier to the server, the method further includes:
[0024] Send a baking task creation request to the server, so that the server creates the target baking task;
[0025] After receiving the baking task identification and the address of the baking task folder returned by the server, the mask layer data and baking parameters of the target scene are uploaded to the baking task folder.
[0026] Optionally, when the target game engine calls the baking result tag, obtaining the baking result of the target scene and updating the display effect of the target scene with the baking result include one of the following:
[0027] Extract the pre-stored baking results from the client's local memory, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters;
[0028] Extract the baking results from the baking task folder, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters.
[0029] Optionally, before displaying the baking result tag corresponding to the target scene in the baking list of the target game engine, the method further includes determining whether the remote baking is completed in at least one of the following ways:
[0030] Send baking result query requests to the server at preset intervals, and upon receiving baking completion information returned by the server, display the baking result tag corresponding to the target scene in the baking list of the target game engine;
[0031] Monitor the files in the baking task folder, and if the baking results are detected, display the baking result label corresponding to the target scene in the baking list of the target game engine.
[0032] According to another aspect of an embodiment of the present application, the present application provides a scene baking device, which is applied to a server and includes:
[0033] The baking task scheduling module is used to extract the baking task identification carried in the baking task execution request when receiving the baking task execution request sent by the client, so as to call out the target baking task matching the baking task identification;
[0034] A parameter extraction module is used to extract the target scene's mask layer data and baking parameters from a baking task folder that matches the baking task identification identifier in a target baking task. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the baking task folder's address.
[0035] The baking engine scheduling module is used to input the mask layer data and baking parameters into the baking engine, so as to call the baking engine to bake the mask layer data according to the baking parameters to obtain the baking result of the target scene;
[0036] The baking result notification module is used to return baking completion information to the client when the baking result indicates that the baking is successful.
[0037] According to another aspect of the embodiments of the present application, the present application provides a scene baking device, which is applied to a client, including:
[0038] A baking request module is configured to send a baking task execution request carrying a baking task identification identifier to a server, so that the server calls a target baking task according to the baking task identification identifier and extracts the mask layer data and baking parameters of the target scene from a baking task folder matching the baking task identification identifier in the target baking task to bake the target scene. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder.
[0039] A baking tag generation module is used to display the baking result tag corresponding to the target scene in the baking list of the target game engine when receiving the baking completion information of the target scene returned by the server;
[0040] The baking result import module is used to obtain the baking results of the target scene when the target game engine calls the baking result tag, and use the baking results to update the display effect of the target scene.
[0041] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.
[0042] According to another aspect of an embodiment of the present application, the present application further provides a computer-readable medium having a non-volatile program code executable by a processor, where the program code enables the processor to execute the above method.
[0043] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:
[0044] The technical solution of the present application is to extract the baking task identification identifier carried in the baking task execution request sent by the client, so as to call out the target baking task that matches the baking task identification identifier; in the target baking task, extract the mask layer data and baking parameters of the target scene from the baking task folder that matches the baking task identification identifier, wherein the baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder after the client obtains the address of the baking task folder; input the mask layer data and baking parameters into the baking engine, so as to call the baking engine to bake the mask layer data according to the baking parameters to obtain the baking result of the target scene; when the baking result indicates that the baking is successful, the baking end information is returned to the client. This application decouples the baking task from the overall game development process, freeing the baking interface, baking engine, and the call of the engine from the client and placing them on a remote server. The client does not need to install baking-related software or configure the required baking environment. It only needs to send the data to be baked to the remote server, which will call the baking engine for baking. The client can directly obtain the baking results, solving the technical problems of low game development efficiency and high cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 A schematic diagram of the hardware environment of an optional scene baking method provided according to an embodiment of the present application;
[0048] Figure 2 This is a flow chart of an optional scene baking method applied to a server according to an embodiment of the present application;
[0049] Figure 3 A schematic flow chart of an optional scene baking method applied to a client according to an embodiment of the present application;
[0050] Figure 4 This is a block diagram of an optional scene baking device applied to a server according to an embodiment of the present application;
[0051] Figure 5 This is a block diagram of an optional scene baking device applied to a client according to an embodiment of the present application;
[0052] Figure 6 A schematic diagram of an optional electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0054] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of this application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.
[0055] In related technologies, programmatic baking of game maps and scenes primarily involves processing the image data of these maps and scenes using 3D special effects software such as Houdini. However, these 3D special effects software have extremely stringent requirements for the development environment, and the installation and configuration process is complex. Deploying Houdini and other 3D special effects software on every developer's machine is not only time-consuming and labor-intensive, but the machine's operating environment and performance also significantly affect the efficiency and effectiveness of scene baking. These factors severely impact game development efficiency.
[0056] In order to solve the problems mentioned in the background technology, according to one aspect of the embodiments of the present application, an embodiment of a scene baking method is provided.
[0057] Optionally, in the embodiment of the present application, the above scene baking method can be applied to Figure 1 In the hardware environment composed of the client 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the client 101 via a network, and can be used to provide services (such as scene baking services, interface call services, etc.) for the client or the client installed on the client. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: wide area network, metropolitan area network or local area network, and the client 101 includes but is not limited to PC, mobile phone, tablet computer, etc.
[0058] A scene baking method in the embodiment of the present application can be executed by the server 103, such as Figure 2 As shown, the method may include the following steps:
[0059] Step S202: upon receiving a baking task execution request sent by a client, extracting a baking task identification carried in the baking task execution request to retrieve a target baking task that matches the baking task identification.
[0060] Step S204: In the target baking task, extract the mask layer data and baking parameters of the target scene from the baking task folder that matches the baking task identification identifier. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the baking task folder address.
[0061] Step S206: inputting the mask layer data and baking parameters into the baking engine, so as to call the baking engine to bake the mask layer data according to the baking parameters to obtain a baking result of the target scene;
[0062] Step S208: If the baking result indicates that the baking is successful, a baking completion message is returned to the client.
[0063] Through the above steps S202 to S208, the present application decouples the baking task from the overall game development process, freeing the baking interface, baking engine and the call of the engine from the client and placing them on the remote server. The client does not need to install baking-related software or configure the required environment for baking. It only needs to send the data to be baked to the remote server, and the remote server calls the baking engine for baking. The client can directly obtain the baking results, which solves the technical problems of low game development efficiency and high cost.
[0064] In step S202, the client is the development terminal for developing games. Typically, baking software and the required baking environment must be installed on the client. This application transfers these programs to a remote server. When the client needs to bake a target scene, it simply sends a baking task execution request to the server. Upon receiving the baking task execution request from the client, the server extracts the baking task identification carried in the baking task execution request and, based on the baking task identification, selects the target baking task from multiple baking tasks.
[0065] In an embodiment of the present application, the target baking task is created in advance by the server in response to the baking task creation request sent by the client. Also created in advance are the baking task identification identifier of the target baking task and a baking task folder that matches the baking task identification identifier. The baking task folder is a shared folder between the client and the server, and is used to store relevant files and data of the target baking task. Both the server and the client can read data from and store data in the baking task folder.
[0066] Optionally, the server pre-creates the target baking task, the baking task identification identifier, and the baking task folder according to the baking task creation request sent by the client, including the following steps:
[0067] Step 1: upon receiving a baking task creation request sent by a client, create a target baking task and generate a baking task identification identifier for the target baking task;
[0068] Step 2: Create a baking task folder that matches the baking task identification identifier;
[0069] Step 3: Send the address of the baking task folder and the baking task identification identifier to the client, so that the client uploads the mask layer data and baking parameters of the target scene to be baked to the baking task folder, and sends a baking task execution request to the server with the baking task identification identifier.
[0070] In the embodiment of the present application, the client only needs to configure an interface for sending and receiving data, which is called in the game engine on the client in the form of a plug-in. If the game engine triggers a remote baking button, the client sends a baking task creation request to the server. Correspondingly, after receiving the baking task creation request, the server creates a corresponding baking task and generates a baking task identification identifier for the baking task. In order to alleviate the data processing pressure of the server, the server creates a baking task folder that matches the baking task identification identifier in a database or other storage location, so that after obtaining the baking task identification identifier and the address of the baking task folder, the client can upload the data of the scene to be baked to the baking task folder, and send the baking task execution request to the server in a timely manner according to the actual situation and actual needs. After the server receives the baking task execution request, it determines which baking task to execute, and then extracts the data required for baking from the corresponding baking task folder, so that the server does not need to monitor the status of each baking task and the status of each baking task folder from time to time.
[0071] In step S206, the mask layer data and baking parameters are the baking parameters pre-uploaded by the client to the baking task folder. In game engines such as Unreal, Frostbite, and Unity3D, various effects in the scene map are created using mask layers. A mask consists of two parts: a mask layer and a masked layer. The masked layer only displays where there is content in the mask layer. For example, if the masked layer is scenery and the mask layer is a hand, the resulting effect will be scenery in the shape of a hand. A mask layer can only be a single layer, while a masked layer can be multiple layers. This means that the effects displayed by the mask layer can include a wide range of content, such as mountains, rivers, skies, people, and so on. Therefore, using the mask layer data of the target scene, it is possible to bake the target scene. The specific baking method can be set by setting the baking parameters according to the actual situation. By inputting the mask layer data and baking parameters into the baking engine, the baking engine can be called to bake the mask layer data according to the baking parameters, obtaining the baking result of the target scene.
[0072] Optionally, the server inputs the mask layer data and baking parameters into a baking engine, and calls the baking engine to bake the mask layer data according to the baking parameters, including the following steps:
[0073] Step 1: Determine the data path of the mask layer data and the output directory of the baking results, and configure the environment variables according to the baking parameters. The output directory is the directory in the baking task folder.
[0074] Step 2: Pass the environment variables, data path, and output directory as parameters to the target script file, so as to call the baking engine through the target script file, and enable the baking engine to extract the mask layer data from the data path based on the environment variables for baking processing;
[0075] Step 3: When the baking engine exports the baking results to the output directory, the project directory of the target project where the target scene is located is passed to the target script file, so as to associate the baking results with the project file of the target project through the target script file.
[0076] In an embodiment of the present application, the data path of the mask layer data and the output directory of the baking results are both in the baking task folder. The server also needs to configure the environment variables with the baking parameters, and finally pass the data path of the mask layer data, the output directory of the baking results, and the environment variables as parameters to the target script file that controls the baking process, so as to call the baking engine through the target script file to bake the target scene. The target script file can be created using a scripting language such as Python. Taking Python as an example, the baking engine can be called through the node.cook function in the target script file to start baking. After the baking engine outputs the baking results of the target scene to the output directory, the server then passes the project directory of the target scene as a parameter to the target script file, so as to associate the baking results with the project file of the target project through the target script file.
[0077] In this embodiment of the present application, the output directory can be specified in a new output directory under the baking task file instead of the default output directory. This allows the server to debug the baking results to verify whether they meet the baking effect required by the client. If the baking result meets the baking effect required by the client, the baking is confirmed to be successful and the final baking result is placed in the default output directory for the client to retrieve. If the baking result does not meet the baking effect required by the client, the baking engine is re-invoked to bake the target scene again.
[0078] Finally, in step S208 , the server sends a baking completion message to the client to prompt the client to obtain the baking result of the target scene from the baking task folder at any time.
[0079] In the embodiments of the present application, a distributed server, such as a file management server, a baking task scheduling server, and a baking work server, may also be used. The baking task scheduling server receives a baking task execution request sent by a client, schedules a target baking task based on the baking task identification carried in the baking task execution request, and transmits it to the baking work server. The baking work server sends a corresponding data acquisition request to the file management server. The file management server finds the baking task folder that matches the baking task identification, extracts the data required for baking from it, and returns it to the baking work server to invoke the baking engine to bake the target scene.
[0080] This application decouples the baking task from the overall game development process, freeing the baking interface, baking engine, and the call of the engine from the client and placing them on a remote server. The client does not need to install baking-related software or configure the required baking environment. It only needs to send the data to be baked to the remote server, which will call the baking engine for baking. The client can directly obtain the baking results, solving the technical problems of low game development efficiency and high cost.
[0081] According to another aspect of the embodiment of the present application, the present application provides a scene baking method, which can be executed by the client 101, such as Figure 3 As shown, the method may include the following steps:
[0082] Step S302: Send a baking task execution request carrying a baking task identification identifier to the server, so that the server calls a target baking task according to the baking task identification identifier, and extracts the mask layer data and baking parameters of the target scene from a baking task folder matching the baking task identification identifier in the target baking task to bake the target scene. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder.
[0083] Step S304: upon receiving the baking completion information of the target scene returned by the server, displaying the baking result tag corresponding to the target scene in the baking list of the target game engine;
[0084] Step S306: When the target game engine calls the baking result tag, the baking result of the target scene is obtained, and the display effect of the target scene is updated with the baking result.
[0085] Through the above steps S302 to S306, the present application decouples the baking task from the overall game development process, freeing the baking interface, baking engine and the call of the engine from the client and placing them on the remote server. The client does not need to install baking-related software or configure the required environment for baking. It only needs to send the data to be baked to the remote server, and the remote server calls the baking engine for baking. The client can directly obtain the baking results, which solves the technical problems of low game development efficiency and high cost.
[0086] In step S302, the baking task identification identifier is generated in advance by the server for the target baking task. The target baking task is created in advance by the server based on the baking task creation request sent by the client. When the server creates the target task, it also creates a baking task folder that matches the baking task identification identifier so that the server and the client can share the files and data of the target baking task.
[0087] Optionally, before sending the baking task execution request carrying the baking task identification identifier to the server, the method further includes:
[0088] Step 1: Send a baking task creation request to the server to enable the server to create a target baking task;
[0089] Step 2: After receiving the baking task identification identifier and the address of the baking task folder returned by the server, upload the mask layer data and baking parameters of the target scene to the baking task folder.
[0090] In an embodiment of the present application, after the client obtains the address of the baking task folder returned by the server, it can upload the mask layer data and baking parameters required for baking to the baking task folder for the server to retrieve after receiving the baking task execution request.
[0091] In steps S304 and S306, after the client determines that the target scene has been baked successfully, it can display the baking result tag corresponding to the target scene in the baking list of the target game engine to indicate that the baking effect of the target scene is available. At this time, the client can first store the baking result of the target scene in the local memory, so that when the game engine calls the baking result tag, the baking result of the target scene is obtained from the local memory and imported into the game engine. Alternatively, the baking result may not be stored in the local memory first, and when the game engine calls the baking result tag, the baking result of the target scene is obtained from the baking task folder and imported into the game engine.
[0092] In step S306, optionally, obtaining a baking result of the target scene and using the baking result to update the display effect of the target scene includes one of the following:
[0093] Extract the pre-stored baking results from the client's local memory, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters;
[0094] Extract the baking results from the baking task folder, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters.
[0095] In the embodiment of the present application, the control parameters are used to determine whether certain objects or areas need to be updated, such as whether to update the height, whether to update the surface weight, whether to update the vegetation, etc. The game engine can select objects and areas in the target scene from the baking results according to the control parameters for effect update.
[0096] Optionally, before displaying the baking result tag corresponding to the target scene in the baking list of the target game engine, the method further includes determining whether the remote baking is completed in at least one of the following ways:
[0097] Send baking result query requests to the server at preset intervals, and upon receiving baking completion information returned by the server, display the baking result tag corresponding to the target scene in the baking list of the target game engine;
[0098] Monitor the files in the baking task folder, and if the baking results are detected, display the baking result label corresponding to the target scene in the baking list of the target game engine.
[0099] In this embodiment of the present application, the client can also initiate a refresh request to refresh the status of the baking folder, thereby monitoring the files in the baking task folder, and confirming the success of baking when the baking result is detected. It can also directly send a baking result query request to the server, and the server returns a baking end message to confirm that the remote baking is successful.
[0100] This application decouples the baking task from the overall game development process, freeing the baking interface, baking engine, and the call of the engine from the client and placing them on a remote server. The client does not need to install baking-related software or configure the required baking environment. It only needs to send the data to be baked to the remote server, which will call the baking engine for baking. The client can directly obtain the baking results, solving the technical problems of low game development efficiency and high cost.
[0101] According to another aspect of the embodiment of the present application, Figure 4 As shown, a scene baking device is provided, which is applied to a server and includes:
[0102] The baking task scheduling module 401 is configured to, upon receiving a baking task execution request sent by a client, extract the baking task identification carried in the baking task execution request to call out a target baking task that matches the baking task identification;
[0103] The parameter extraction module 403 is used to extract the mask layer data and baking parameters of the target scene from the baking task folder that matches the baking task identification identifier in the target baking task. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder.
[0104] The baking engine scheduling module 405 is used to input the mask layer data and baking parameters into the baking engine, so as to call the baking engine to bake the mask layer data according to the baking parameters to obtain the baking result of the target scene;
[0105] The baking result notification module 407 is configured to return baking completion information to the client when the baking result indicates that the baking is successful.
[0106] It should be noted that the baking task scheduling module 401 in this embodiment can be used to execute step S202 in the embodiment of the present application, the parameter extraction module 403 in this embodiment can be used to execute step S204 in the embodiment of the present application, the baking engine scheduling module 405 in this embodiment can be used to execute step S206 in the embodiment of the present application, and the baking result notification module 407 in this embodiment can be used to execute step S208 in the embodiment of the present application.
[0107] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0108] Optionally, the scene baking device further includes a baking task creation module, which is used to:
[0109] Upon receiving a baking task creation request sent by a client, creating a target baking task and generating a baking task identification identifier for the target baking task;
[0110] Create a baking task folder that matches the baking task identification;
[0111] The address of the baking task folder and the baking task identification identifier are sent to the client, so that the client uploads the mask layer data and baking parameters of the target scene to be baked to the baking task folder, and sends a baking task execution request to the server with the baking task identification identifier.
[0112] Optionally, the baking engine scheduling module is specifically configured to:
[0113] Determine the data path of the mask layer data and the output directory of the baking results, and configure the environment variables according to the baking parameters. The output directory is the directory in the baking task folder;
[0114] Pass the environment variables, data path, and output directory as parameters to the target script file, so as to call the baking engine through the target script file, and enable the baking engine to extract the mask layer data from the data path based on the environment variables for baking processing;
[0115] When the baking engine exports the baking results to the output directory, the project directory of the target project where the target scene is located is passed to the target script file to associate the baking results with the project file of the target project through the target script file.
[0116] According to another aspect of the embodiment of the present application, Figure 5 As shown, a scene baking device is provided, which is applied to a client and includes:
[0117] The baking request module 501 is configured to send a baking task execution request carrying a baking task identification identifier to the server, so that the server calls a target baking task according to the baking task identification identifier and extracts the mask layer data and baking parameters of the target scene from a baking task folder matching the baking task identification identifier in the target baking task to bake the target scene. The baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder.
[0118] The baking tag generation module 503 is used to display the baking result tag corresponding to the target scene in the baking list of the target game engine when the baking completion information of the target scene is received from the server;
[0119] The baking result importing module 505 is used to obtain the baking result of the target scene when the target game engine calls the baking result tag, and use the baking result to update the display effect of the target scene.
[0120] It should be noted that the baking request module 501 in this embodiment can be used to execute step S302 in the embodiment of the present application, the baking tag generation module 503 in this embodiment can be used to execute step S304 in the embodiment of the present application, and the baking result importing module 505 in this embodiment can be used to execute step S306 in the embodiment of the present application.
[0121] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.
[0122] Optionally, the scene baking device further includes a parameter uploading module, which is used to:
[0123] Send a baking task creation request to the server, so that the server creates the target baking task;
[0124] After receiving the baking task identification and the address of the baking task folder returned by the server, the mask layer data and baking parameters of the target scene are uploaded to the baking task folder.
[0125] Optionally, the baking result is imported into a module, specifically for:
[0126] Extract the pre-stored baking results from the client's local memory, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters;
[0127] Extract the baking results from the baking task folder, and import the baking results and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking results to the map of the target scene according to the control parameters.
[0128] Optionally, the scene baking device further includes a baking state judgment module, which is used to:
[0129] Send baking result query requests to the server at preset intervals, and upon receiving baking completion information returned by the server, display the baking result tag corresponding to the target scene in the baking list of the target game engine;
[0130] Monitor the files in the baking task folder, and if the baking results are detected, display the baking result label corresponding to the target scene in the baking list of the target game engine.
[0131] This application decouples the baking task from the overall game development process, freeing the baking interface, baking engine, and the call of the engine from the client and placing them on a remote server. The client does not need to install baking-related software or configure the required baking environment. It only needs to send the data to be baked to the remote server, which will call the baking engine for baking. The client can directly obtain the baking results, solving the technical problems of low game development efficiency and high cost.
[0132] According to another aspect of the embodiment of the present application, the present application provides an electronic device, such as Figure 6 As shown, it includes a memory 601, a processor 603, a communication interface 605 and a communication bus 607. The memory 601 stores a computer program that can be run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 603 executes the computer program, the steps of the above method are implemented.
[0133] The memory and processor in the electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, and the like.
[0134] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0135] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0136] According to another aspect of the embodiments of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above embodiments.
[0137] Optionally, in an embodiment of the present application, a computer-readable medium is configured to store program code for the processor to execute the above steps.
[0138] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0139] When implementing the embodiments of the present application, reference may be made to the above embodiments, which have corresponding technical effects.
[0140] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.
[0141] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0142] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0144] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0145] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0147] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or partly contributed to the prior art or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard drive, a ROM, a RAM, a magnetic disk, or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without further constraints, an element defined by the phrase "comprises a..." does not preclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0148] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.
Claims
1. A scene baking method, applied to a server, characterized in that: include: Upon receiving a baking task execution request sent by a client, extracting a baking task identification identifier carried in the baking task execution request to call out a target baking task that matches the baking task identification identifier, wherein the client is a development terminal for developing a game, and the baking software and baking environment on the development terminal have been pre-transferred to the server; Extracting, in the target baking task, mask layer data and baking parameters of a target scene from a baking task folder that matches the baking task identification identifier, wherein the baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder after the client obtains the address of the baking task folder; Inputting the mask layer data and the baking parameters into a baking engine, so as to call the baking engine to perform baking processing on the mask layer data according to the baking parameters, and obtain a baking result of the target scene; When the baking result indicates that the baking is successful, baking end information is returned to the client.
2. The method according to claim 1, characterized in that Before extracting the baking task identification carried in the baking task execution request, the method further includes: Upon receiving the baking task creation request sent by the client, creating the target baking task and generating the baking task identification identifier for the target baking task; Creating the baking task folder that matches the baking task identification identifier; The address of the baking task folder and the baking task identification identifier are sent to the client, so that the client uploads the mask layer data and the baking parameters of the target scene to be baked to the baking task folder, and sends the baking task execution request to the server with the baking task identification identifier.
3. The method according to claim 2, characterized in that The step of inputting the mask layer data and the baking parameters into a baking engine to call the baking engine to perform baking processing on the mask layer data according to the baking parameters includes: Determine the data path of the mask layer data and the output directory of the baking result, and configure the environment variables according to the baking parameters, wherein the output directory is the directory in the baking task folder; Passing the environment variables, the data path, and the output directory as parameters to a target script file, so as to call the baking engine through the target script file, and causing the baking engine to extract the mask layer data from the data path based on the environment variables for baking processing; When the baking engine exports the baking result to the output directory, the project directory of the target project where the target scene is located is passed to the target script file, so as to associate the baking result with the project file of the target project through the target script file.
4. A scene baking method, applied to a client, wherein the client is a development terminal for developing a game, and the baking software and baking environment on the development terminal are pre-transferred to a server, characterized in that: include: Sending a baking task execution request carrying a baking task identification identifier to a server, so that the server calls a target baking task according to the baking task identification identifier, and extracts the mask layer data and baking parameters of a target scene from a baking task folder matching the baking task identification identifier in the target baking task to bake the target scene, wherein the baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder after the client obtains the address of the baking task folder; Upon receiving the baking completion information of the target scene returned by the server, displaying the baking result tag corresponding to the target scene in the baking list of the target game engine; When the target game engine calls the baking result tag, the baking result of the target scene is obtained, and the display effect of the target scene is updated with the baking result.
5. The method according to claim 4, characterized in that Before sending the baking task execution request carrying the baking task identification identifier to the server, the method further includes: Sending a baking task creation request to the server, so that the server creates the target baking task; After receiving the baking task identification identifier and the address of the baking task folder returned by the server, the mask layer data and the baking parameters of the target scene are uploaded to the baking task folder.
6. The method according to claim 4, characterized in that When the target game engine calls the baking result tag, obtaining the baking result of the target scene, and updating the display effect of the target scene with the baking result includes one of the following: Extracting the pre-stored baking result from the local memory of the client, and importing the baking result and the control parameters of the target scene into the target game engine, so that the target game engine updates the baking result to the map of the target scene according to the control parameters; The baking result is extracted from the baking task folder, and the baking result and the control parameters of the target scene are imported into the target game engine, so that the target game engine updates the baking result to the map of the target scene according to the control parameters.
7. The method according to any one of claims 4 to 6, characterized in that: Before displaying the baking result tag corresponding to the target scene in the baking list of the target game engine, the method further includes determining whether the remote baking is completed in at least one of the following ways: Sending a baking result query request to the server at a preset time interval, and upon receiving the baking end information returned by the server, displaying the baking result tag corresponding to the target scene in the baking list of the target game engine; Monitor the files in the baking task folder, and when the baking result is monitored, display the baking result tag corresponding to the target scene in the baking list of the target game engine.
8. A scene baking device, applied to a server, characterized in that: include: a baking task scheduling module configured to, upon receiving a baking task execution request sent by a client, extract a baking task identification identifier carried in the baking task execution request to call out a target baking task that matches the baking task identification identifier, wherein the client is a development terminal for developing a game, and the baking software and baking environment on the development terminal have been pre-transferred to the server; a parameter extraction module, configured to extract, in the target baking task, mask layer data and baking parameters of a target scene from a baking task folder that matches the baking task identification identifier, wherein the baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder after the client obtains the address of the baking task folder; a baking engine scheduling module, configured to input the mask layer data and the baking parameters into a baking engine, so as to call the baking engine to perform baking processing on the mask layer data according to the baking parameters, and obtain a baking result of the target scene; The baking result notification module is configured to return baking completion information to the client when the baking result indicates that the baking is successful.
9. A scene baking device, applied to a client, wherein the client is a development terminal for developing games, and the baking software and baking environment on the development terminal are pre-transferred to a server, characterized in that: include: a baking request module, configured to send a baking task execution request carrying a baking task identification identifier to a server, so that the server calls a target baking task according to the baking task identification identifier, and extracts, within the target baking task, mask layer data and baking parameters of a target scene from a baking task folder matching the baking task identification identifier to bake the target scene, wherein the baking task folder is pre-created by the server for the target baking task, and the mask layer data and baking parameters are pre-imported into the baking task folder by the client after obtaining the address of the baking task folder; a baking tag generation module, configured to display a baking result tag corresponding to the target scene in a baking list of a target game engine upon receiving baking completion information of the target scene returned by the server; The baking result importing module is used to obtain the baking result of the target scene when the target game engine calls the baking result tag, and use the baking result to update the display effect of the target scene.
10. An electronic device comprising a memory, a processor, a communication interface, and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate via the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 or 4 to 7 are implemented.
11. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that The program code enables the processor to execute the method according to any one of claims 1 to 3 or 4 to 7.
Citation Information
Patent Citations
Cloud light baking-based mobile terminal 3D real-time rendering method and system
CN105321201A
3D model scene automatic rendering method and device and storage medium
CN111243068A