Illumination baking method and system and computer program product

Through the automated light baking method, the data of virtual subtitles is screened and processed the problem of low manual operation efficiency and light source information interference in existing technologies, and efficient and accurate light stickers are achieved.

CN119379889APending Publication Date: 2025-01-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411489554.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing lighting baking methods rely on manual operation, resulting in low work efficiency and easy interference from light source information when processing multiple virtual subscenes, resulting in baking errors.

Method used

Provide a automated light baking method, obtain the virtual main scene data through the response instruction, screen out the target virtual sub -scene data, and bake light based on these data to generate light maps. This method is screened by data names and grid data of indoor and outdoor scenes to avoid light source information interference.

Benefits of technology

Improve the efficiency of light baking, ensure the correctness of the light map, avoid errors in artificial operation, and automatically handle multiple virtual subtitles in the virtual main scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379889A_ABST
    Figure CN119379889A_ABST
Patent Text Reader

Abstract

The invention provides an illumination baking method and system and a computer program product, and relates to the technical field of computer graphics. The illumination baking method comprises the following steps: in response to an instruction of performing illumination baking on a virtual main scene, obtaining one or more pieces of virtual sub-scene data in virtual main scene data; screening out one or more groups of target virtual sub-scene data to be subjected to illumination baking from the one or more pieces of virtual sub-scene data; and performing illumination baking based on the one or more groups of target virtual sub-scene data to obtain illumination maps corresponding to the one or more target virtual sub-scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graphics, and in particular to a lighting baking method, system and computer program product. Background Art

[0002] Light baking optimizes performance and saves resource consumption by calculating some content in advance. Light baking can process static light and shadow, such as diffuse reflection, indirect light, self-illumination and shadows of static objects. The baked light and shadow information is called light map. Existing light baking relies on manual operation by art staff.

[0003] Some embodiments of this specification provide a light baking method to improve work efficiency. Summary of the invention

[0004] One or more embodiments of the present specification provide a lighting baking method, comprising: in response to an instruction to perform lighting baking on a virtual main scene, obtaining one or more virtual sub-scene data in the virtual main scene data; filtering out one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data; performing lighting baking based on the one or more groups of target virtual sub-scene data, respectively, to obtain lighting maps corresponding to the one or more target virtual sub-scenes.

[0005] According to the lighting baking method described in some embodiments of the present specification, the target virtual sub-scene data includes light source data and mesh data corresponding to the target virtual sub-scene; lighting baking is performed on the target virtual sub-scene data to obtain a light map corresponding to the target virtual sub-scene, including: calculating the lighting effect of the three-dimensional body in the target virtual sub-scene based on the light source data and mesh data in the target virtual sub-scene data; storing the calculated lighting effect as a texture map of the three-dimensional body, and then obtaining the light map corresponding to the target virtual sub-scene.

[0006] According to the lighting baking method described in some embodiments of the present specification, the target virtual sub-scene includes an indoor sub-scene and / or an outdoor sub-scene; the filtering out one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data includes: filtering out light source data and grid data corresponding to one or more indoor sub-scenes from the one or more virtual sub-scene data by a first filtering method; using the light source data and grid data corresponding to each indoor sub-scene as the target virtual sub-scene data corresponding to each indoor sub-scene; and / or, filtering out light source data and one or more grid data corresponding to an outdoor sub-scene from the one or more virtual sub-scene data by a second filtering method; using the light source data and one or more grid data corresponding to the outdoor sub-scene as the target virtual sub-scene data corresponding to the outdoor sub-scene.

[0007] According to the lighting baking method described in some embodiments of the present specification, the data name of the light source data and the data name of the mesh data respectively include a basic segment and a feature segment; wherein the basic segment indicates the virtual sub-scene to which it belongs, and the feature segment indicates that the data type is light source data or mesh data.

[0008] According to the lighting baking method described in some embodiments of this specification, the basic segment in the data name of the light source data corresponding to the indoor sub-scene includes the indoor sub-scene name; the basic segment in the data name of the mesh data corresponding to the indoor sub-scene includes the indoor sub-scene name.

[0009] According to the lighting baking method described in some embodiments of the present specification, the light source data and mesh data corresponding to one or more indoor sub-scenes are filtered out from the one or more virtual sub-scene data by a first filtering method, including: obtaining the light source data corresponding to one or more indoor sub-scenes from the one or more virtual sub-scene data based on the data name; changing the feature segment of the data name of the light source data corresponding to each indoor sub-scene to obtain the data name of the mesh data corresponding to each indoor sub-scene; obtaining the mesh data corresponding to the one or more indoor sub-scenes from the one or more virtual sub-scene data based on the data name of the mesh data corresponding to each indoor sub-scene.

[0010] According to the lighting baking method described in some embodiments of the present specification, the basic segment in the data name of the light source data corresponding to the outdoor sub-scene includes the outdoor sub-scene name; the basic segment in the data name of the mesh data corresponding to the outdoor sub-scene includes the outdoor sub-scene name or includes the outdoor sub-scene name and an identification string that satisfies preset rules, and the feature segment is used to further indicate whether the mesh data is main mesh data.

[0011] According to the lighting baking method described in some embodiments of the present specification, the light source data and one or more grid data corresponding to the outdoor sub-scene are filtered out from the one or more virtual sub-scene data by a second filtering method, including: if the data name of the virtual sub-scene data includes the outdoor sub-scene name and a feature segment indicating that the data type is light source data, then the virtual sub-scene data is used as the light source data corresponding to the outdoor sub-scene; if the data name of the virtual sub-scene data includes the outdoor sub-scene name and a feature segment indicating that the data type is main grid data, then the virtual sub-scene data is used as the main grid data corresponding to the outdoor sub-scene; if the data name of the virtual sub-scene data includes the outdoor sub-scene name, an identification string that satisfies a preset rule, and a feature segment indicating that the data type is grid data, then the virtual sub-scene data is used as the grid data corresponding to the outdoor sub-scene except the main grid data.

[0012] According to the lighting baking method described in some embodiments of the present specification, lighting baking is performed based on the one or more groups of target virtual sub-scene data respectively to obtain light maps corresponding to one or more target virtual sub-scenes, including performing the following baking processing on the one or more groups of target virtual sub-scene data respectively: loading the target virtual sub-scene data into the editor of the game engine; calling the lighting baking interface of the game engine to perform lighting baking on the target virtual sub-scene data to obtain the light map corresponding to the target virtual sub-scene; and unloading the target virtual sub-scene data from the editor.

[0013] According to the lighting baking method described in some embodiments of the present specification, lighting baking is performed based on the one or more groups of target virtual sub-scene data respectively to obtain lighting maps corresponding to one or more target virtual sub-scenes respectively, including executing the baking process on the one or more groups of target virtual sub-scene data in sequence based on a waiting program; wherein the waiting program includes: waiting for the baking process corresponding to the current target virtual sub-scene data to be completed, and then starting the baking process corresponding to the next target virtual sub-scene data.

[0014] According to some embodiments of the present specification, the lighting baking method further includes: obtaining the execution progress of lighting baking based on the one or more sets of target virtual sub-scene data; and presenting the execution progress through a display window.

[0015] According to the lighting baking method described in some embodiments of the present specification, the instruction for performing lighting baking on the virtual main scene includes a timer instruction or an instruction generated by triggering a first control in the display window; wherein the timer instruction is generated when the current time satisfies a predetermined baking time condition.

[0016] According to the lighting baking method described in some embodiments of the present specification, the predetermined baking time condition is set through the display window; the virtual main scene is selected through the display window; and the display window pops up in response to a triggering operation on a second control on the editor interface of the game engine.

[0017] One or more embodiments of the present specification provide a lighting baking system, including: an acquisition module, used to respond to an instruction to perform lighting baking on a virtual main scene, and obtain one or more virtual sub-scene data in the virtual main scene data; a screening module, used to filter out one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data; an execution module, used to perform lighting baking based on the one or more groups of target virtual sub-scene data, respectively, to obtain lighting maps corresponding to one or more target virtual sub-scenes.

[0018] One or more embodiments of the present specification provide a computer program product, including computer codes. When at least a portion of the computer codes is executed by a processor, the aforementioned light baking method can be implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] This specification will be further explained by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The same numbers in the drawings represent the same structures or steps.

[0020] Figure 1 It is a schematic diagram of the structure of virtual scene data according to some embodiments of this specification.

[0021] Figure 2 It is a schematic diagram of the main process of the light baking method shown in some embodiments of this specification.

[0022] Figure 3 This is a flowchart for screening target virtual sub-scene data in the lighting baking method shown in some embodiments of this specification.

[0023] Figure 4 It is a flowchart of a baking process in a light baking method according to some embodiments of this specification.

[0024] Figure 5 It is a schematic diagram of the screening process of target virtual sub-scene data corresponding to the indoor sub-scene in the lighting baking method shown in some embodiments of this specification.

[0025] Figure 6 It is a flow chart for screening target virtual sub-scene data corresponding to an outdoor sub-scene in a lighting baking method shown in some embodiments of this specification.

[0026] Figure 7 is a schematic diagram of a display window according to some embodiments of the present specification.

[0027] Figure 8 is an exemplary block diagram of a light baking system according to some embodiments of the present specification. DETAILED DESCRIPTION

[0028] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the contents described below are some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative work, the technical solutions or means disclosed in this specification can also be applied to other scenarios based on these technical contents.

[0029] It should be understood that the "system", "device", "unit" and / or "module" used in this specification is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0030] Unless otherwise specified, technical terms used in this specification to describe components, elements, etc. do not refer to the singular, but may also include the plural. Generally speaking, terms such as "include", "comprise", etc. only indicate that the steps, elements, or components that have been clearly identified are included, and these steps, elements, and components do not constitute an exclusive list, such as the method or device described may also include other steps or components.

[0031] Flowcharts are used in this specification to illustrate the operation steps performed by the device or system of the relevant embodiments, but unless otherwise specified, the order used to describe these steps should not be understood as a limitation on the order in which the steps are performed. A person of ordinary skill in the art can adjust the order in which these steps are performed based on the knowledge and information conveyed by the embodiments of this specification, and the adjustment includes but is not limited to swapping the order, merging multiple steps, and splitting a certain step.

[0032] Computer graphics technology is widely used in the development and production of movie stunts, virtual reality, animation, and video games (or simply games). In some application embodiments of movie stunts, animation, games, etc., model rendering is one of the key steps, which ultimately generates a visual picture based on a 3D model (or mesh, three-dimensional body, etc.), scene settings, and material properties. In some embodiments, model rendering can produce highly realistic images, allowing users to highly customize and create rendered images or scenes, and can capture dynamic effects. However, model rendering takes a long time to render and consumes a lot of resources. Taking games as an example, since there are a large number of 3D models controlled by players in real time in the game, a large amount of real-time dynamic model rendering is often required during the game running process, which undoubtedly increases the amount of calculation when the game is running. Therefore, in order to reduce the amount of calculation when the game is running, in some embodiments, game development can use baking technology for pre-calculation, such as optimizing game performance and saving resource consumption by calculating part of the content in the game in advance. Take lighting baking as an example. Light baking can pre-calculate the static light and shadow in the game scene, such as the diffuse reflection, indirect light, self-illumination and shadow of the static 3D body produced by light sources such as the sun and lights on the surface of the static 3D body. The pre-calculated light and shadow information can be recorded as a light map (Lightmap). During the real-time rendering process when the game is running, this light and shadow information can be quickly applied (such as generating the lighting effect of the static 3D body in the game scene through texture sampling), thereby improving rendering performance and saving computing resources.

[0033] In some embodiments, the visualization scenes of movie stunts, virtual reality, games, etc. can be referred to as virtual scenes. For games, virtual scenes can also be referred to as game scenes. Virtual scenes can be presented through a graphical user interface (GUI), which may include virtual environments, characters, buildings, machinery, props and other elements, thereby restoring at least part of the virtual world. For ease of explanation, some embodiments of this specification are described using virtual scenes of games as the main examples, but it should be understood that the methods or technical means disclosed in the embodiments of this specification are also applicable to things other than games, such as in the production process of movie stunts, virtual reality, animation, etc.

[0034] In some embodiments, the game may include a virtual main scene and a virtual sub-scene. In some embodiments, the virtual main scene may be the main part of the game world, which includes the main environment and interactive content of the game, and the virtual sub-scene may be a part of the virtual main scene, which is used to achieve more complex and detailed scene division, such as a specific area or scene layer. In some embodiments, the virtual sub-scene may be nested in the virtual main scene to form a complete game world together. Without causing confusion, the virtual main scene and the virtual sub-scene may also be collectively referred to as a virtual scene. In some embodiments, the division of the game virtual scene may be based on the game level. Therefore, the virtual main scene and the virtual sub-scene in some embodiments of this specification may also be referred to as the main level and the sub-level. The virtual scene depends on data construction. Corresponding to the virtual main scene and the virtual sub-scene, the virtual main scene data and the virtual sub-scene data may also form a hierarchical relationship. In the data for constructing the virtual scene, light source data (such as Light Level) and mesh data (such as Mesh Level) are two more important types of data. It should be understood that the data for constructing the scene is not limited to light source data and mesh data.

[0035] In some embodiments, light source data (e.g., light levels) may involve the setting and management of light sources, which may specifically include parameters such as the type of light source (e.g., directional light, point light, spotlight, etc.), position, intensity, color, etc. The setting of the light source may affect the lighting effect of the scene.

[0036] In some embodiments, mesh data (e.g., mesh levels) may involve meshes in the scene, such as static meshes. These meshes are the main objects of light baking. For example, during light baking, the lighting information of the surfaces of these meshes is calculated and stored to generate light maps. In some embodiments, the properties of the mesh (e.g., light map resolution) settings may also affect the baking effect and performance.

[0037] Figure 1 is a schematic diagram of the structure of virtual scene data according to some embodiments of this specification. Figure 1 As shown, the virtual main scene data may include one or more virtual sub-scene data, and the virtual sub-scene data may specifically be light source data, grid data, and other data of the corresponding sub-scene. As an example, the light source data may be light source data of an indoor sub-scene (such as Figure 1 In the indoor sub-scene light source data 1, indoor sub-scene light source data 2, indoor sub-scene light source data 4), it can also be the light source data of the outdoor sub-scene (such as Figure 1 The light source data of the outdoor sub-scene in 3), the grid data can be the grid data of the indoor sub-scene (such as Figure 1In the indoor sub-scene grid data 1, the indoor sub-scene grid data 2, the indoor sub-scene grid data 4), it can also be the outdoor sub-scene grid data (such as Figure 1 The main grid data 3 of the outdoor sub-scene, the grid data 3a of the outdoor sub-scene, etc.).

[0038] Some model making software and game engines provide the function of light baking. In some existing embodiments, the light baking function provided by the model making software, game engine, etc. can be used to complete the light baking of the virtual scene. In actual applications, it is found that if light baking is performed on multiple virtual sub-scenes under the virtual main scene at the same time, the light source information of different sub-scenes will interfere with each other and cause baking errors. For example, the light source in the outdoor sub-scene, such as the sun, cannot shine on the three-dimensional body or mesh body in the indoor sub-scene. When light baking is performed at the same time, the three-dimensional body of the indoor sub-scene will be illuminated by the outdoor light source and the indoor light at the same time, and the resulting light map is contrary to natural common sense. For this reason, art staff need to manually perform light baking on the virtual sub-scenes under the virtual main scene one by one. In some embodiments, an artist can load or open a virtual main scene data in a game in a game engine editor interface (such as loading all virtual sub-scene data under the virtual main scene), open the light baking parameter configuration page by triggering the light baking parameter control in the game engine editor interface, and pre-set the light baking parameters of the virtual main scene in the page. Then, the artist can first manually operate in the editor interface to hide the virtual sub-scene data that does not need to be baked at present, and only retain the virtual sub-scene to be baked and the light source data and mesh data corresponding to the virtual sub-scene, and click the light baking button in the editor interface to bake the current virtual sub-scene. Among them, the light baking parameters may include the resolution of the light map, the shadow quality, the reflection quality, whether to support ambient occlusion, volumetric lighting, transmission, etc. In some embodiments, the sub-scenes under the same main scene can share the same set of light baking parameters. In some embodiments, in response to the light baking instruction provided by the artist (such as clicking the light baking button in the game engine mentioned above), the game engine will start the light baking program (such as the swarm Agent in the Unreal Engine) and send a command to bake the scene to complete the light baking. Furthermore, after the baking is completed, the artist needs to manually hide the virtual sub-scene that has been baked and the light source data and mesh data corresponding to the virtual sub-scene, and manually display the next virtual sub-scene to be baked and the light source data and mesh data corresponding to the virtual sub-scene. In some embodiments, the artist needs to repeat the aforementioned manual baking operation multiple times to complete the lighting baking of multiple virtual sub-scenes under the virtual main scene.

[0039] In some embodiments, when the scene is large and the baking parameters are set high (for example, the light map has a higher resolution and a higher shadow quality), the time taken for light baking may be uncertain and may be very long. Since light baking is overly dependent on manual operation, it will take up a lot of staff time.

[0040] To this end, some embodiments of the present specification propose a lighting baking method, which runs in response to lighting baking instructions, and can automatically perform lighting baking operations on each virtual sub-scene under the virtual main scene, thereby effectively improving work efficiency while ensuring the correct lighting baking effect.

[0041] Figure 2 It is a main flow chart of the light baking method shown in some embodiments of this specification. Figure 2 The process shown can be performed by a computer device. In some embodiments, Figure 2 The illustrated process may be implemented by a light baking system 800 deployed on a computer device.

[0042] In some embodiments, Figure 2 The process shown may be executed in response to an instruction to bake lighting for a virtual main scene. In one or more embodiments of the present specification, the instruction to bake lighting for a virtual main scene may be an instruction to bake lighting for a single virtual sub-scene in the virtual main scene, or an instruction to bake lighting in batches for multiple virtual sub-scenes therein. In some embodiments, the instruction to bake lighting for the virtual main scene may include: a timer instruction or an instruction directly provided by a user.

[0043] In some embodiments, the timer instruction is generated when the current time meets the predetermined baking time condition. In some embodiments, the user can set the predetermined baking time condition. Exemplarily, the predetermined baking time condition set by the user can be 09:00 on Saturday of a certain month and day of a certain year, and the timer instruction is generated when the current time meets 09:00 on Saturday of a certain month and day of a certain year. The timer instruction allows the user to set the time in advance, and the light baking method is run according to the time set by the user after the user leaves. Accordingly, the user can use the computer's idle time to perform light baking, and there is no need to be on duty at the computer device to intervene in the light baking process, which saves labor costs to a large extent.

[0044] In some embodiments, the instruction directly provided by the user can be an instruction directly input by the user. In some embodiments, the instruction can be generated by the user triggering a certain control. Exemplarily, the user can generate the instruction by clicking a button on a certain interface.

[0045] See also Figure 2As shown, the light baking method shown in some embodiments of this specification may specifically include the following steps.

[0046] Step 100 , in response to an instruction to perform lighting baking on a virtual main scene, obtain one or more virtual sub-scene data in the virtual main scene data. In some embodiments, step 100 may be implemented by the acquisition module 810 .

[0047] In some embodiments, the acquisition module 810 can acquire virtual main scene data corresponding to the virtual main scene based on the instruction to perform lighting baking on the virtual main scene, and acquire virtual sub-scene data corresponding to one or more virtual sub-scenes included in the virtual main scene from the virtual main scene data, so as to process the one or more virtual sub-scene data in subsequent steps. As an example, the acquisition module 810 can access the storage medium of the computer device to acquire one or more virtual sub-scene data in the pre-generated virtual main scene data. More descriptions about the virtual main scene data and the virtual sub-scene data can be found in the previous text and will not be repeated here.

[0048] Step 200 , filtering out one or more sets of target virtual sub-scene data to be light-baked from one or more sets of virtual sub-scene data. In some embodiments, step 200 may be implemented by the filtering module 820 .

[0049] In some embodiments, the virtual sub-scene data selected for lighting baking may be referred to as target virtual sub-scene data. Accordingly, the virtual sub-scene corresponding to the target virtual sub-scene data may be referred to as the target virtual sub-scene. In one or more embodiments of the present specification, the target virtual sub-scene may include an indoor sub-scene and / or an outdoor sub-scene.

[0050] In some embodiments, the indoor sub-scene may be related to the interior of a building, such as a closed or semi-enclosed space such as a room, corridor, basement, etc. Specifically, the indoor sub-scene may include the environment inside the building and a static three-dimensional body. As an example, the indoor sub-scene 1 may include the ground, walls, haystacks, cabinets, etc. in a warehouse. In some embodiments, the outdoor sub-scene may be related to the outside of the building, such as an open space such as a field, forest, city street, etc. Specifically, the outdoor sub-scene may include an open environment outside the building and a static three-dimensional body. As an example, the outdoor sub-scene 2 may include grass, mountains, vegetation, etc. The target virtual sub-scene data corresponding to the indoor sub-scene and the outdoor sub-scene may include light source data and grid data, respectively, wherein the light source data is used to provide light source information for illuminating the corresponding sub-scene, and the grid data is used to provide information of one or more grid bodies in the corresponding sub-scene.

[0051] In some embodiments, the light source of the indoor sub-scene may include a single light source, or may include multiple light sources of different types, positions, intensities, and colors. For example, the light source of the indoor sub-scene may include outdoor light transmitted from a window, ordinary point light sources such as various types of lamps such as table lamps or chandeliers, spotlights, colored area lights, etc. Exemplarily, in an indoor sub-scene of a top-floor room, the light source may include outdoor light transmitted from a skylight, outdoor light transmitted from a side window, parallel LED light strips arranged at the top of the room, two wall washers, a table lamp located on a table, a colored neon sign behind the door, and an atmosphere light inside a closet. Exemplarily, in another indoor sub-scene of a basement, only one point light source such as a light bulb with a light yellow color and low intensity is included. In some embodiments, since each indoor sub-scene has a different light source arrangement, each indoor sub-scene has a single light source data corresponding to it one by one. Each indoor sub-scene may also have grid data corresponding to it one by one, so for indoor sub-scenes, light source data and grid data are generally one-to-one corresponding.

[0052] In some embodiments, the light source of the outdoor sub-scene may include parallel light provided by the sun. In some embodiments, since the light sources of the outdoor sub-scenes are arranged the same or similarly, for a virtual main scene, the outdoor part thereof may be regarded as a unified outdoor sub-scene. In other words, the virtual main scene may have only one outdoor sub-scene. Further, the grid data of the outdoor sub-scene may be divided into main grid data and sub-grid data according to the spatial position distribution of the grid body. Specifically, the main grid data combined with the sub-grid data can be "spliced" into the overall grid of the outdoor sub-scene. As an example, the grid data of the outdoor sub-scene in a virtual main scene may further include the main grid data and three sub-grid data of the grid data of plot 1, the grid data of plot 2, and the grid data of plot 3, and these grids share a sunlight source, so the outdoor sub-scene may correspond to unified light source data and one or more grid data.

[0053] As previously mentioned, in some embodiments, the correspondence between the light source data and the grid data of the indoor sub-scene and the outdoor sub-scene is different. Therefore, different filtering methods can be used to filter out the target virtual sub-scene data corresponding to the indoor sub-scene and the target virtual sub-scene data corresponding to the outdoor sub-scene from the multiple virtual sub-scene data in the virtual main scene. Figure 3 1 is a schematic diagram of the target virtual sub-scene data screening process in the lighting baking method shown in some embodiments of this specification. Figure 3 As shown, step 200 may include the following step 210 and step 220. It should be noted that the description order of step 210 and step 220 should not be understood as a limitation on the execution order of the steps. In some optional embodiments, either step 210 or step 220 may be omitted.

[0054] Step 210: Filter out light source data and grid data corresponding to one or more indoor sub-scenes from one or more virtual sub-scene data by a first filtering method.

[0055] For more information about the first screening method, see Figure 5 Further, the light source data and grid data corresponding to each indoor sub-scene can be used as the target virtual sub-scene data corresponding to each indoor sub-scene.

[0056] Step 220: Filter out light source data and one or more grid data corresponding to the outdoor sub-scene from the one or more virtual sub-scene data by a second filtering method.

[0057] For more information about the second screening method, see Figure 6 Further, the light source data and one or more grid data corresponding to the outdoor sub-scene may be used as the target virtual sub-scene data corresponding to the outdoor sub-scene.

[0058] Furthermore, the light source data and mesh data corresponding to the same target virtual sub-scene (such as the same indoor sub-scene or the same outdoor sub-scene) may be referred to as a set of target virtual sub-scene data.

[0059] In one or more embodiments of the present specification, step 210 provides a method for identifying indoor sub-scenes and acquiring corresponding light source data and mesh data. Step 210 can acquire indoor sub-scene light source data and mesh data in groups for baking.

[0060] Step 220 provides for identifying an outdoor sub-scene and obtaining light source data, as well as all main mesh data and other mesh data corresponding to the light source data for baking.

[0061] In some embodiments, step 210 may be performed first and then step 220, or step 220 may be performed first and then step 210 to complete baking of all indoor sub-scenes and outdoor sub-scenes. Based on the specific field-based screening methods of steps 210 and 220, indoor sub-scenes and outdoor sub-scenes may be accurately classified.

[0062] In other embodiments, step 210 or step 220 may be performed separately.

[0063] Since there is a one-to-one correspondence between the light source data and the mesh data of the indoor sub-scene, baking errors will occur if multiple indoor sub-scenes are mixed and baked or indoor sub-scenes and outdoor sub-scenes are mixed and baked. Therefore, based on step 210 and step 220, the light source data and mesh data of the indoor sub-scenes in pairs can be selected separately each time to avoid the aforementioned baking errors.

[0064] As mentioned above, in some embodiments, there is a one-to-many relationship between the light source data and the grid data of the outdoor sub-scene. If the light source data and grid data of the outdoor sub-scene are obtained through step 210, multiple grid data will be missed; if the light source data of the outdoor sub-scene is obtained based on the data name of the grid data in step 212 through step 210, a program error will occur that the corresponding light source data cannot be found. Therefore, based on step 220, the light source data, main grid data, and all grid data of the outdoor sub-scene can be obtained, avoiding the aforementioned data acquisition error; at the same time, based on step 220, the indoor sub-grid data will not be found, which can also avoid the aforementioned baking error.

[0065] In one or more embodiments of the present specification, the light source data and the grid data have respective data names, so that the corresponding light source data or grid data can be searched or called based on the data name.

[0066] In some embodiments, the data name of the light source data and the data name of the mesh data may include a basic segment and a feature segment, respectively; wherein the basic segment indicates the virtual sub-scene to which it belongs, and the feature segment indicates that the data type is light source data or mesh data.

[0067] In some embodiments, the basic segment may be a character or string indicating a virtual sub-scene, and exemplarily, the basic segment may be abc. The characteristic segment may be a characteristic character or a characteristic string indicating a data type, and the characteristic segment may be a prefix or a suffix of a data name. Exemplarily, the characteristic segment may be _light for indicating that the data type is light source data, or _mesh for indicating that the data type is mesh data.

[0068] In some embodiments, for a virtual sub-scene abc, the virtual sub-scene data of the virtual sub-scene abc may include light source data (data name is “abc_light”) and mesh data (data name is “abc_mesh”).

[0069] In one or more embodiments of the present specification, the basic segment in the data name of the light source data corresponding to the indoor sub-scene includes the indoor sub-scene name; the basic segment in the data name of the grid data corresponding to the indoor sub-scene includes the indoor sub-scene name.

[0070] In some embodiments, the example indoor sub-scene name may include characters or strings for indicating the sub-scene name, such as abc1, and characteristic characters or strings for indicating that the sub-scene is an indoor sub-scene, such as _indoor or _ind.

[0071] In some embodiments, the data name of the light source data of an indoor sub-scene may be abc1_indoor_light, and the data name of the mesh data of the indoor sub-scene may be abc1_indoor_mesh. In some embodiments, the data name of the light source data of another indoor sub-scene may be abc2_ind_lt, and the data name of the mesh data of the indoor sub-scene may be abc2_ind_ms.

[0072] In the above embodiment, each light source data abc1_indoor_light of an indoor sub-scene corresponds to a mesh data abc1_indoor_mesh of an indoor sub-scene. It can be understood that, corresponding to the same indoor sub-scene, the corresponding light source data and mesh data may have the same basic segment.

[0073] In one or more embodiments of the present specification, the basic segment in the data name of the light source data corresponding to the outdoor sub-scene includes the outdoor sub-scene name; the basic segment in the data name of the grid data corresponding to the outdoor sub-scene includes the outdoor sub-scene name or includes the outdoor sub-scene name and an identification string that satisfies preset rules.

[0074] In some embodiments, the outdoor sub-scene name may include characters or strings for indicating the sub-scene name, such as abcd. In some further embodiments, the outdoor sub-scene name may include characters or strings for indicating the sub-scene name, such as abcd, and characteristic characters or strings for indicating that the sub-scene is an outdoor sub-scene, such as _outdoor or _otd. Exemplarily, the outdoor sub-scene name may also be abcd_outdoor or abcd_otd.

[0075] The preset rules may stipulate the character types (such as symbols, numbers, letters, etc.) and / or the order of characters in the string. In some embodiments, the identification string that satisfies the preset rules may be, for example, a string of _x01_y02, which includes two consecutive substrings, each of which includes an underscore, a letter, and two numbers arranged in sequence. By identifying the string, the location of the plot where each outdoor sub-scene is located can be determined. In some embodiments, the preset rules can be characterized based on regular expressions. For example, a preset rule can be expressed as TEXT "_x\d{2}_y\d{2}".

[0076] In other embodiments, the preset rule may be adjusted according to actual needs, for example, it may also be _a001b001, _x01_y01_z01, etc.

[0077] In some embodiments, the data name of the light source data of the outdoor sub-scene may be abcd1_light or abcd1_otd_light, and the mesh data of the outdoor sub-scene may be abcd1_mesh or abcd1_otd_mesh. In other embodiments, the data name of the light source data of the outdoor sub-scene may be abcd2_light, and the mesh data of the outdoor sub-scene may be abcd2_x00_y00_mesh, abcd2_x01_y01_mesh, abcd2_x01_y02_mesh, abcd2_x02_y01_mesh, abcd2_x01_y03_mesh, etc.

[0078] In some embodiments, the mesh data of the outdoor sub-scene may further include main mesh data and sub-mesh data. In one or more embodiments of the present specification, the feature segment may be used to further indicate whether the mesh data is the main mesh data, for example, a prefix, a suffix, etc. may be used to further indicate whether the mesh data is the main mesh data. Exemplarily, the suffix may be _maimesh, which is distinguished from the suffix _mesh of the mesh data. In some embodiments, the mesh data of the outdoor sub-scene may be abcd_mainmesh or abcd_otd_mainmesh. In some embodiments, the basic segment of the data name of the main mesh data of the outdoor sub-scene may only include the outdoor sub-scene name, and the feature segment is a character or string indicating that the data type is the main mesh data. The basic segment of the data name of the sub-mesh data of the outdoor sub-scene includes both the outdoor sub-scene name and the identification string, and the feature segment indicates that the data type is mesh data but not the main mesh data. As an example, there are multiple mesh data of a certain outdoor sub-scene, namely abcd_otd_mainmesh, abcd _otd_x01_y01_mesh, and abcd _otd_x01_y02_mesh.

[0079] Categorizing and naming virtual sub-scene data helps to quickly filter out target virtual sub-scene data corresponding to different sub-scenes. For more information about filtering target virtual sub-scene data based on data name, see the following section on Figure 5 as well as Figure 6 Related instructions.

[0080] Step 300 , performing lighting baking based on one or more sets of target virtual sub-scene data, respectively, to obtain lighting maps corresponding to one or more target virtual sub-scenes. In some embodiments, step 300 may be implemented by the execution module 830 .

[0081] In one or more embodiments of the present specification, the target virtual sub-scene data is subjected to lighting baking to obtain a lighting map corresponding to the target virtual sub-scene, which may specifically include: calculating the lighting effect of the three-dimensional body in the target virtual sub-scene based on the light source data and mesh data in the target virtual sub-scene data; storing the calculated lighting effect as a texture map of the three-dimensional body, and then obtaining the lighting map corresponding to the target virtual sub-scene. As an example, the lighting effect may include diffuse reflection, indirect light, self-luminescence and other lighting effects generated by the light source in the virtual sub-scene on the surface of each three-dimensional body therein. Since the lighting effect is also a feature of the surface of the three-dimensional body, the lighting effect of the three-dimensional body can be stored in the form of a texture map (such as a lighting texture map). The set of texture maps of one or more three-dimensional bodies in a virtual sub-scene can be called the lighting map corresponding to the target virtual sub-scene. Specifically, the lighting texture maps of each three-dimensional body in a target virtual sub-scene can be spliced ​​into a larger map as the aforementioned light map.

[0082] In one or more embodiments of the present specification, step 300 includes performing baking processing on one or more groups of target virtual sub-scene data respectively. Figure 4 is a flowchart of a baking process in a light baking method according to some embodiments of this specification, see Figure 4 As shown, the baking process includes the following steps 310 , 320 , and 330 .

[0083] Step 310: Load the target virtual sub-scene data into the editor of the game engine.

[0084] In some embodiments, loading can be understood as adding one of the target virtual sub-scene data obtained through step 200 to the editor of the game engine so as to use the lighting baking function provided by the game engine. Specifically, the corresponding target virtual data sub-scene data can be added to the editor through the data loading function interface provided by the game engine, such as LoadLevel(). In some embodiments, after a set of target virtual sub-scene data is loaded in the editor, the corresponding sub-scene screen can be seen in the editor interface.

[0085] Step 320, calling the lighting baking interface of the game engine, performing lighting baking on the target virtual sub-scene data, and obtaining a lighting map corresponding to the target virtual sub-scene.

[0086] Through the lighting baking interface, the lighting baking calculation program in the game engine can be used to process the target virtual sub-scene data, perform lighting effect calculations, and finally obtain the lighting map corresponding to the target virtual sub-scene. As an example, a computer program can call the game engine's control trigger instruction to achieve "soft triggering" of the lighting baking button in the editor interface. "Soft triggering" refers to triggering controls in the graphical user interface through computer programs or instructions, rather than triggering controls through direct human-computer interaction behaviors such as finger touches and mouse clicks.

[0087] Step 330: Unload the target virtual sub-scene data from the editor.

[0088] Unloading can be understood as removing the target virtual sub-scene data that has completed the baking calculation from the editor of the game engine so as to perform lighting baking on the next target virtual sub-scene data. Specifically, the corresponding target virtual data sub-scene data can be removed from the editor through the data unloading function interface provided by the game engine, such as UnloadLevel(). In some embodiments, after the target virtual sub-scene data is removed, the corresponding sub-scene screen will be closed.

[0089] In some embodiments, after obtaining each set of light source data and mesh data of an indoor sub-scene or an outdoor sub-scene through the aforementioned step 200, a baking process is performed, that is, step 310 (for example, loading the light source data and mesh data corresponding to the sub-scene into the editor of the game engine), step 320, and step 330 to achieve baking of the target virtual sub-scene. In other embodiments, after obtaining multiple sets of target virtual sub-scene data under the virtual main scene through the aforementioned step 200, the aforementioned baking process is performed on each target virtual sub-scene data one by one.

[0090] In one or more embodiments of the present specification, the aforementioned baking process may be performed concurrently on multiple groups of target virtual sub-scene data under the virtual main scene, or may be performed sequentially.

[0091] In actual applications, the lighting baking program in the model making software or game engine may be single-threaded and cannot bake multiple sets of target virtual sub-scene data in parallel. For example, the Unreal Engine's lighting baking program swarmAgent cannot bake multiple scenes at the same time. When performing baking processing of multiple virtual sub-scenes under a single virtual main scene, if the next target virtual sub-scene data request is directly sent to perform baking processing before the swarm Agent completes the baking processing of the target virtual sub-scene data, it will cause baking failure. In order to solve this problem, in some embodiments, the baking processing can be performed sequentially on one or more sets of target virtual sub-scene data screened in step 200 based on the waiting program.

[0092] In some embodiments, the waiting procedure may include: waiting for the baking process corresponding to the current target virtual sub-scene data to be completed, and then starting the baking process corresponding to the next target virtual sub-scene data. More specifically, the waiting procedure may include: querying whether the swarm has completed the lighting baking of the current target virtual sub-scene data, and if so, sending an instruction to bake the next target virtual sub-scene data, and if not, waiting. In some embodiments, a Timer timer may be established as a child thread to query the swarm every preset time whether the current baking has been completed. In some embodiments, if the swarm has not completed the baking, a log such as "still baking lighting" is output.

[0093] Figure 5 2 is a schematic diagram of a process for screening target virtual sub-scene data corresponding to an indoor sub-scene in a lighting baking method according to some embodiments of this specification. It may be a further implementation of the aforementioned step 210. Figure 5 As shown, step 210 may further include the following steps.

[0094] Step 211: acquiring light source data corresponding to one or more indoor sub-scenes from one or more virtual sub-scene data based on the data name.

[0095] In some embodiments, light source data whose data name includes a specific indoor sub-scene name can be searched in one or more virtual sub-scene data. For example, light source data whose data name includes abc3 can be searched (it can be pre-specified before the project starts that only indoor sub-scenes can use data names including abc3). In other embodiments, light source data whose data name includes an indoor sub-scene name and characteristic characters indicating that the sub-scene is an indoor sub-scene can be searched in one or more virtual sub-scene data. For example, light source data whose data name includes abc4 and _indoor can be searched. Based on the foregoing, in some embodiments, the light source data may include a characteristic segment indicating that the data type is light source data, such as a characteristic segment of _light. Therefore, the light source data in multiple data can be acquired based on the characteristic segment.

[0096] In some embodiments, the light source data corresponding to one of the indoor sub-scenes can be obtained by searching in one or more virtual sub-scene data: a feature character indicating that the sub-scene is an indoor sub-scene, and a feature segment indicating that the data type is light source data. For example, the sub-scene data including the _indoor string and the _light string can be searched to obtain the light source data corresponding to one of the indoor sub-scenes. Exemplarily, the data name of a light source data in one or more virtual sub-scene data and the corresponding light source data can be obtained through step 211, for example, the data name of the light source data M_abc4_indoor_light and the corresponding light source data M_abc4_indoor_light can be obtained.

[0097] Step 212: Change the feature segment of the data name of the light source data corresponding to each indoor sub-scene to obtain the data name of the mesh data corresponding to each indoor sub-scene.

[0098] In some embodiments, the feature segment of the data name of the light source data corresponding to each indoor sub-scene is changed to obtain the data name of the mesh data corresponding to each indoor sub-scene. Before the change, the feature segment is used to indicate that the data type is light source data. After the change, the feature segment is used to indicate that the data type is mesh data, thereby obtaining a set of one-to-one corresponding data names of the light source data and mesh data of the indoor sub-scene. Continuing with the previous example, the feature segment _light of the data name of the light source data M_abc4_indoor_light, which is used to indicate that the data type is light source data, can be changed to _mesh, which is used to indicate that the data type is mesh data, to obtain the data name of the mesh data M_abc4_indoor_mesh.

[0099] Step 213: acquiring mesh data corresponding to one or more indoor sub-scenes from one or more virtual sub-scene data based on the data name of the mesh data corresponding to each indoor sub-scene.

[0100] Continuing with the previous example, based on the data name M_abc4_indoor_mesh, the mesh data M_abc4_indoor_mesh corresponding to the data name can be searched from one or more virtual sub-scene data.

[0101] Through step 211, step 212, and step 213, one or more groups of one-to-one corresponding light source data and grid data of indoor sub-scenes can be obtained.

[0102] In some embodiments, steps 211, 212, and 213 are looped to traverse all virtual sub-scene data, thereby obtaining light source data and mesh data of all indoor sub-scenes in the virtual main scene.

[0103] Figure 6 This is a flowchart of screening target virtual sub-scene data corresponding to an outdoor sub-scene in the lighting baking method shown in some embodiments of this specification, which can be a further implementation of the aforementioned step 220. Figure 6 As shown, step 220 may include the following steps 221, 222, and 223. It should be noted that the order of description of steps 221, 222, and 223 should not be understood as a limitation on the order of step execution. In some optional embodiments, one of steps 222 and 223 may even be omitted.

[0104] Step 221: If the data name of the virtual sub-scene data includes the name of the outdoor sub-scene and a feature segment indicating that the data type is light source data, the virtual sub-scene data is used as the light source data corresponding to the outdoor sub-scene.

[0105] In some embodiments, the light source data corresponding to the outdoor sub-scene can be obtained by searching for a data name including an outdoor sub-scene name and a feature segment indicating that the data type is light source data in one or more virtual sub-scene data. Exemplarily, the light source data corresponding to the outdoor sub-scene can be obtained by searching for a data name including an outdoor sub-scene name of abcd3 (it can be pre-specified before the project starts that only outdoor sub-scenes can use data names including abcd3) and a feature segment that is a string indicating that the data type is light source data, such as _light, so as to obtain the light source data corresponding to the outdoor sub-scene, for example, obtaining the light source data D_abcd3_light corresponding to the outdoor sub-scene.

[0106] Step 222: If the data name of the virtual sub-scene data includes the name of the outdoor sub-scene and a feature segment indicating that the data type is the main grid data, the virtual sub-scene data is used as the main grid data corresponding to the outdoor sub-scene.

[0107] In some embodiments, the main mesh data corresponding to the outdoor sub-scene can be obtained by searching for a feature segment whose data name includes the outdoor sub-scene name and indicates that the data type is the main mesh data in one or more virtual sub-scene data. Continuing with the previous example, the data name includes the outdoor sub-scene name abcd3 (it can be pre-specified before the project starts that only the outdoor sub-scene can use the data name including abcd3) and the feature segment is a feature segment indicating that the data type is the main mesh data, such as _mainmesh, to obtain the main mesh data corresponding to the outdoor sub-scene, for example, the main mesh data D_abcd3_mainmesh corresponding to the outdoor sub-scene can be obtained.

[0108] Step 223, if the data name of the virtual sub-scene data includes the outdoor sub-scene name, an identification string that satisfies a preset rule, and a feature segment indicating that the data type is mesh data, the virtual sub-scene data is used as mesh data corresponding to the outdoor sub-scene except for the main mesh data.

[0109] In some embodiments, the grid data corresponding to the outdoor sub-scene other than the main grid data can be obtained by searching for a data name including an outdoor sub-scene name, a flag string satisfying a preset rule, and a feature segment indicating that the data type is grid data in one or more virtual sub-scene data. The flag string satisfying the preset rule is similar to the above, so it is not repeated. In some embodiments, it can be determined whether it satisfies the preset rule by checking whether the flag string matches a regular expression. Continuing with the previous example, you can search for data names including the outdoor sub-scene name abcd3 (you can pre-define before the project starts that only outdoor sub-scenes can use data names including abcd3), a marker string that matches the regular expression TEXT "_x\d{2}_y\d{2}", and a feature segment indicating that the data type is mesh data, such as _mesh, so as to obtain one or more mesh data corresponding to the outdoor sub-scene except the main mesh data, for example, obtain the sub-mesh data D_abcd3_x00_y00_mesh, D_abcd3_x01_y01_mesh, D_abcd3_x01_y02_mesh, D_abcd3_x02_y01_mesh, D_abcd3_x01_y03_mesh corresponding to the outdoor sub-scene.

[0110] Through steps 221, 222 and 223, the light source data of an outdoor sub-scene, the main grid data of an outdoor sub-scene corresponding thereto, and the grid data other than the main grid data of one or more outdoor sub-scenes corresponding thereto can be obtained.

[0111] Figure 7 is a schematic diagram of a display window according to some embodiments of this specification. Figure 7 In one or more embodiments of the present specification, a display window is provided, which may include a display area for the current time, a display area for the scheduled baking time, an input box for inputting the scheduled baking time, a first control for selecting a virtual main scene, and for sending an instruction to perform batch lighting baking on the virtual main scene, such as Figure 7 In some embodiments, the user may trigger the first control to generate the aforementioned instruction, for example, the user may generate the instruction by clicking a button of the first control of the display window interface.

[0112] The lighting baking method shown in one or more embodiments of this specification can be packaged into a plug-in integrated into the model making software or game engine, and a second control is added to the editor interface of the model making software or game engine. In response to the user's triggering operation of the second control, the lighting baking method shown in some embodiments of this specification can be executed, and further the aforementioned display window can pop up in response to the triggering operation of the second control on the editor interface. The user can interact through the display window. Specifically, the user can select the virtual main scene to be baked, set the predetermined baking time, or directly click the first control through the display window to realize automatic and batch lighting baking of each sub-scene under the virtual main scene, and the corresponding light map can be automatically saved.

[0113] In one or more embodiments of the present specification, the execution progress of lighting baking based on one or more sets of target virtual sub-scene data is also obtained; the execution progress is presented through the aforementioned display window. In some embodiments, the execution progress can be displayed as a progress bar. In some embodiments, the execution progress can be displayed as a percentage, such as 15%. In some embodiments, the execution progress can also be displayed as a completion amount, such as 2 / 99 pieces have been baked. As an example, it can be displayed through Figure 7 The progress bar in the figure shows the progress of the lighting baking execution of the current virtual main scene.

[0114] Figure 8 is an exemplary block diagram of a light baking system according to some embodiments of this specification, see Figure 8 As shown, the lighting baking system 800 includes: an acquisition module 810, a screening module 820 and an execution module 830. In some embodiments, the acquisition module 810 is used to respond to an instruction to perform batch lighting baking on the virtual main scene, and obtain one or more virtual sub-scene data in the virtual main scene data. In some embodiments, the screening module 820 is used to filter out one or more groups of target virtual sub-scene data to be light-baked from one or more virtual sub-scene data. In some embodiments, the execution module 830 is used to perform lighting baking based on one or more groups of target virtual sub-scene data, respectively, to obtain light maps corresponding to one or more target virtual sub-scenes.

[0115] For more information about each module, see Figure 2~Figure 6 The relevant description of will not be repeated here. It should be understood that Figure 8The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or control codes contained in a processor, such as a disk, CD or DVD-ROM, etc., and such codes are provided in a carrier medium or a memory of a programmable device. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).

[0116] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules without deviating from this principle to form a subsystem connected to other modules. Or some modules may be split to obtain more modules or multiple units under the module. Such variations are all within the scope of the disclosure of this specification.

[0117] In one or more embodiments of the present specification, a computer program product is also provided, including computer instructions or computer codes, which can implement the above-mentioned light baking method when at least part of the computer instructions or computer codes are executed by a processor. In some embodiments, the computer program product may only involve computer instructions or computer codes, which may be carried by a storage medium or a processing device. In other embodiments, the computer program product may also be a storage medium or a processing device containing the aforementioned computer instructions or computer codes. The processing device may include one or more processors, and a storage medium.

[0118] In some embodiments, the processor may be a combination of one or more of the following processors: a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a programmable logic controller (PLC), a reduced instruction set computer (RISC), and a microprocessor.

[0119] In some embodiments, the storage medium may include a combination of one or more of the following: a mass storage, a removable storage, a volatile read-write memory, and a read-only memory (ROM). Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state hard disk, and the like. Exemplary removable storage may include a flash disk, a floppy disk, an optical disk, a memory card, a compressed hard disk, a magnetic tape, and the like. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary random access memory may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance memory (Z-RAM), and the like. Exemplary read-only memory may include a masked read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital multifunction hard disk read-only memory, and the like.

[0120] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) being able to automatically bake one or more virtual sub-scene data in the virtual main scene data in response to instructions without user supervision; (2) being able to filter the light source data and mesh data corresponding to the indoor sub-scene through the first filtering mode for baking, thereby avoiding baking errors caused by the mixing of indoor light sources and outdoor light sources. (3) The light source data, main grid data, and multiple sub-grid data corresponding to the outdoor sub-scene can be filtered through the second filtering mode for baking, thereby avoiding baking errors caused by the mixing of indoor and outdoor light sources; (3) The required virtual sub-scene data can be accurately obtained through data name setting, and the virtual sub-scene data can be classified; (4) The program simulates user operations to realize the loading or unloading of virtual sub-scenes in the editor, and the baking process is realized with the help of the lighting baking function of the game engine, thereby improving development efficiency; (5) By executing the baking process threads and waiting programs in sequence, the stable baking of the swarm is ensured, thereby avoiding the crash of the swarm due to baking multiple scenes at the same time; (6) The display window provides intuitive execution progress observation; (7) The timing module is set to allow the automatic generation of instructions to start baking according to the user's preset time when the user leaves the operation interface, further improving work efficiency; (8) It can be integrated into the game engine as a plug-in, which is easy to use.

[0121] It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained.

[0122] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are taught in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

Claims

1. A light baking method, characterized in that: include: In response to an instruction to perform lighting baking on a virtual main scene, obtaining one or more virtual sub-scene data in the virtual main scene data; Filtering out one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data; Lighting baking is performed based on the one or more groups of target virtual sub-scene data to obtain light maps corresponding to the one or more target virtual sub-scenes.

2. The light baking method according to claim 1, characterized in that: The target virtual sub-scene data includes light source data and grid data corresponding to the target virtual sub-scene; Performing lighting baking on the target virtual sub-scene data to obtain a lighting map corresponding to the target virtual sub-scene, including: calculating the lighting effect of the three-dimensional body in the target virtual sub-scene based on the light source data and mesh data in the target virtual sub-scene data; The calculated lighting effect is stored as a texture map of the three-dimensional body, thereby obtaining a lighting map corresponding to the target virtual sub-scene.

3. The light baking method according to claim 1, characterized in that: The target virtual sub-scene includes an indoor sub-scene and / or an outdoor sub-scene; The step of selecting one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data includes: Filtering out light source data and grid data corresponding to one or more indoor sub-scenes respectively from the one or more virtual sub-scene data by a first screening method; using the light source data and grid data corresponding to each indoor sub-scene as target virtual sub-scene data corresponding to each indoor sub-scene; and / or, The light source data and one or more grid data corresponding to the outdoor sub-scene are filtered out from the one or more virtual sub-scene data through a second filtering method; the light source data and one or more grid data corresponding to the outdoor sub-scene are used as target virtual sub-scene data corresponding to the outdoor sub-scene.

4. The light baking method according to claim 3, characterized in that: The data name of the light source data and the data name of the mesh data respectively include a basic segment and a feature segment; wherein the basic segment indicates the virtual sub-scene to which it belongs, and the feature segment indicates that the data type is light source data or mesh data.

5. The light baking method according to claim 4, characterized in that: The basic segment in the data name of the light source data corresponding to the indoor sub-scene includes the indoor sub-scene name; the basic segment in the data name of the grid data corresponding to the indoor sub-scene includes the indoor sub-scene name.

6. The light baking method according to claim 4 or 5, characterized in that: The step of filtering out light source data and grid data corresponding to one or more indoor sub-scenes from the one or more virtual sub-scene data by a first filtering method includes: Based on the data name, acquiring light source data corresponding to one or more indoor sub-scenes from the one or more virtual sub-scene data; The characteristic segment of the data name of the light source data corresponding to each indoor sub-scene is changed to obtain the data name of the grid data corresponding to each indoor sub-scene; The mesh data corresponding to the one or more indoor sub-scenes are acquired from the one or more virtual sub-scene data based on the data name of the mesh data corresponding to each indoor sub-scene.

7. The light baking method according to claim 4, characterized in that: The basic segment in the data name of the light source data corresponding to the outdoor sub-scene includes the outdoor sub-scene name; the basic segment in the data name of the grid data corresponding to the outdoor sub-scene includes the outdoor sub-scene name or includes the outdoor sub-scene name and an identification string that satisfies preset rules, and the feature segment is used to further indicate whether the grid data is main grid data.

8. The light baking method according to claim 7, characterized in that: The step of filtering out light source data and one or more grid data corresponding to an outdoor sub-scene from the one or more virtual sub-scene data by a second filtering method includes: If the data name of the virtual sub-scene data includes the outdoor sub-scene name and a feature segment indicating that the data type is light source data, the virtual sub-scene data is used as the light source data corresponding to the outdoor sub-scene; If the data name of the virtual sub-scene data includes the outdoor sub-scene name and a feature segment indicating that the data type is the main grid data, the virtual sub-scene data is used as the main grid data corresponding to the outdoor sub-scene; If the data name of the virtual sub-scene data includes the outdoor sub-scene name, an identification string that satisfies a preset rule, and a feature segment indicating that the data type is grid data, the virtual sub-scene data is used as the grid data corresponding to the outdoor sub-scene except for the main grid data.

9. The light baking method according to claim 1, characterized in that: The performing lighting baking based on the one or more sets of target virtual sub-scene data to obtain lighting maps corresponding to the one or more target virtual sub-scenes respectively includes performing the following baking processing on the one or more sets of target virtual sub-scene data respectively: Loading the target virtual sub-scene data into an editor of a game engine; Calling the lighting baking interface of the game engine to perform lighting baking on the target virtual sub-scene data to obtain a lighting map corresponding to the target virtual sub-scene; The target virtual sub-scene data is unloaded from the editor.

10. The light baking method according to claim 9, characterized in that: The performing lighting baking based on the one or more groups of target virtual sub-scene data to obtain lighting maps corresponding to the one or more target virtual sub-scenes respectively comprises sequentially performing the baking process on the one or more groups of target virtual sub-scene data based on a waiting program; The waiting procedure includes: after waiting for the baking process corresponding to the current target virtual sub-scene data to be completed, starting the baking process corresponding to the next target virtual sub-scene data.

11. The light baking method according to claim 1, characterized in that: Also includes: Obtaining the execution progress of lighting baking based on the one or more sets of target virtual sub-scene data; The execution progress is presented through a display window.

12. The light baking method according to claim 1, characterized in that: The instruction for performing lighting baking on the virtual main scene includes a timer instruction or an instruction generated by triggering a first control in the display window; wherein the timer instruction is generated when the current time satisfies a predetermined baking time condition.

13. The light baking method according to claim 12, characterized in that: The predetermined baking time condition is set through the display window; the virtual main scene is selected through the display window; and the display window pops up in response to a triggering operation on a second control on an editor interface of the game engine.

14. A light baking system, characterized in that: include: An acquisition module, configured to acquire one or more virtual sub-scene data in the virtual main scene data in response to an instruction to perform lighting baking on the virtual main scene; A screening module, used to screen out one or more groups of target virtual sub-scene data to be light-baked from the one or more virtual sub-scene data; The execution module is used to perform lighting baking based on the one or more groups of target virtual sub-scene data to obtain lighting maps corresponding to the one or more target virtual sub-scenes.

15. A computer program product, comprising computer codes, which, when at least part of the computer codes are executed by a processor, can implement the light baking method according to any one of claims 1 to 13.