Scene baking method, device, electronic device and storage medium
By reducing the resolution of the images of the baked scene in Unreal Engine 4, the problem of high memory usage of LightMap data in the prior art is solved, and high-precision LightMap data processing is achieved.
Patent Information
- Application Number
- CN202111390640.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-12-31
- Filing Date
- 2021-11-22
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-11-22
AI Technical Summary
When the prior art performs scene baking in Unreal Engine 4, it is difficult to reduce the memory usage of data generated by LightMap while ensuring the LightMap accuracy.
By obtaining multiple images of the scene to be baked, it is divided into images that need to be finely displayed and images that do not need to be finely displayed, and the resolution reduction process is performed on the images that do not need to be finely displayed before baking, and the divided images are baked using the UE4 engine.
While ensuring the accuracy of LightMap, it reduces the memory usage of data generated by LightMap, reduces the memory usage and the size of packages, and improves the user experience.
Smart Images

Figure CN114011065B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of scene baking, and in particular to a scene baking method, device, electronic device and storage medium. Background Art
[0002] Currently, in Unreal Engine 4 (UE4), before the scene is finally output and packaged, it is necessary to perform static baking on the scene. In the traditional method, the scene baking requires setting the light baking (LightMass) parameters, and the final output light map (LightMap) data information is recorded on the scene model.
[0003] Specifically, the entire LightMap baking process is to build the scene in the UE4 engine, arrange the lights, configure the relevant lighting and LightMass parameters, and then bake the build. At this time, the data will be output to LightMass for processing. After LightMass is processed, the data is returned to the UE4 engine. The UE4 engine decodes the data to generate the corresponding LightMap and other data in the log file of the corresponding level. At this time, the higher the accuracy of the LightMap, the more delicate the scene display effect and the more realistic the light and shadow, and the larger the data generated by the LightMap, the larger the package size will be when integrating and packaging the output, and the higher the memory consumption will be. Summary of the invention
[0004] In order to solve the above-mentioned problems existing in the prior art, the embodiments of the present application provide a scene baking method, device, electronic device and storage medium, which can reduce the memory usage of data generated by LightMap while ensuring the accuracy of LightMap.
[0005] In a first aspect, an embodiment of the present application provides a scene baking method, comprising:
[0006] Obtain a first image group of a scene to be baked, where the first image group includes n first scene images of the scene to be baked, where n is an integer greater than or equal to 1;
[0007] Determine m second scene images from n first scene images, where m is an integer greater than or equal to 1 and less than or equal to n;
[0008] Performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images;
[0009] The m second scene images and nm third scene images are baked through the UE4 engine to obtain a baking result of the scene to be baked.
[0010] In this implementation, determining m second scene images from n first scene images includes:
[0011] Get baking parameters;
[0012] According to the baking parameters, determine m first scene images including the labels among the n first scene images, and use the m first scene images as the m second scene images;
[0013] The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
[0014] In this implementation, the remaining nm first scene images are subjected to resolution reduction processing to obtain nm third scene images, including:
[0015] Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups;
[0016] For each of the nm first data groups, weight each first data group by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups;
[0017] For each of the nm second data groups, each second data group is inversely reorganized by reversible bandpass decomposition to obtain nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
[0018] In this implementation, the m second scene images are baked by the UE4 engine, including:
[0019] For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region;
[0020] Performing resolution reduction processing on the second region to obtain three regions;
[0021] Recombining the images according to the first area and the third area to obtain a fourth scene image corresponding to each second scene image;
[0022] The fourth scene image is baked through the UE4 engine.
[0023] In a second aspect, an embodiment of the present application provides a scene baking device, including:
[0024] An acquisition module, used to acquire a first image group of a scene to be baked, wherein the first image group includes n first scene images of the scene to be baked, wherein n is an integer greater than or equal to 1;
[0025] a splitting module, used to determine m second scene images from n first scene images, where m is an integer greater than or equal to 1 and less than or equal to n;
[0026] A resolution processing module, used for performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images;
[0027] The baking module is used to bake the m second scene images and nm third scene images through the UE4 engine to obtain a baking result of the scene to be baked.
[0028] In this implementation, in determining m second scene images from n first scene images, the splitting module is used to:
[0029] Get baking parameters;
[0030] According to the baking parameters, determine m first scene images including the labels among the n first scene images, and use the m first scene images as the m second scene images;
[0031] The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
[0032] In this implementation, in terms of performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images, the resolution processing module is used to:
[0033] Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups;
[0034] For each of the nm first data groups, weight each first data group by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups;
[0035] For each of the nm second data groups, each second data group is inversely reorganized by reversible bandpass decomposition to obtain nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
[0036] In this implementation, in terms of baking the m second scene images through the UE4 engine, the baking module is used to:
[0037] For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region;
[0038] Performing resolution reduction processing on the second region to obtain three regions;
[0039] Recombining the images according to the first area and the third area to obtain a fourth scene image corresponding to each second scene image;
[0040] The fourth scene image is baked through the UE4 engine.
[0041] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method of the first aspect.
[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method of the first aspect.
[0043] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and is computer-operable to cause the computer to execute the method of the first aspect.
[0044] The implementation of the present application has the following beneficial effects:
[0045] It can be seen that in the implementation of the present application, by dividing the images in the scene to be baked into images that need to be displayed finely and images that do not need to be displayed finely, the images that do not need to be displayed finely are subjected to resolution reduction processing before baking. Thus, while ensuring the accuracy of the LightMap after baking the main image, the memory usage of the data generated by the LightMap of the entire scene is reduced, thereby reducing memory usage and the size of the package, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the implementation modes of the present application, the drawings required for use in the description of the implementation modes will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A schematic diagram of a scene baking method provided in an embodiment of the present application;
[0048] Figure 2 A schematic flow chart of a method for determining m second scene images from n first scene images provided in an embodiment of the present application;
[0049] Figure 3 A flowchart of a method for reducing resolution provided in an embodiment of the present application;
[0050] Figure 4 A flowchart of a method for baking m second scene images through a UE4 engine provided in an embodiment of the present application;
[0051] Figure 5 A block diagram of the functional modules of a scene baking device provided in an embodiment of the present application;
[0052] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0055] Reference to "embodiment" herein means that a particular feature, result, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] First of all, it is explained that the scene baking method in this application can be applied to the display scene baking scenes of front-end applications such as games, web pages, and mobile applications. In this application, the scene baking method is mainly explained by taking the display scene baking scene of mobile applications as an example. The scene baking methods in other scenarios are similar to the implementation methods in the scene baking scene of mobile applications, which will not be described here.
[0057] The following will take a mobile phone application as an example to illustrate the specific implementation of the scene baking method of the present application.
[0058] See also Figure 1 , Figure 1 A schematic diagram of a scene baking method provided in an embodiment of the present application. The scene baking method comprises the following steps:
[0059] 101: Obtain a first image group of a scene to be baked.
[0060] In this embodiment, the first image group includes n first scene images of the scene to be baked, where n is an integer greater than or equal to 1. Specifically, in the field of mobile phone applications, when a user clicks or performs other operations in a certain page, the application will jump or change the page according to the user's operation, and the displayed content in the page will change. Based on this, the page information of the next-level page to be jumped or changed can be determined according to the user's operation, and then the first image group corresponding to the scene to be baked, i.e., the next-level page, is obtained according to the page information.
[0061] 102: Determine m second scene images from the n first scene images.
[0062] In this embodiment, m is an integer greater than or equal to 1 and less than or equal to n.
[0063] Exemplarily, the present application provides a method for determining m second scene images from n first scene images, such as Figure 2 As shown, the method includes:
[0064] 201: Get baking parameters.
[0065] In this embodiment, the baking parameters include labels of m first scene images among n first scene images, and the label of each first scene image among the m first scene images is used to identify the corresponding first scene image as an important image that needs to be displayed in a refined manner, and does not need to be processed by reducing the resolution. Specifically, taking the visualization of the garage scene in the mobile phone application as an example, when the garage scene is loaded through page jump or page change, the important images that need to be displayed in a refined manner may be images corresponding to the areas where there are light sources in the scene or the areas affected by the light sources, such as: places with bright light and shadow on the ground, areas where people walk, and shadows in these areas.
[0066] 202: Determine m first scene images including labels among the n first scene images according to the baking parameters, and use the m first scene images as the m second scene images.
[0067] 103: Perform resolution reduction processing on the remaining nm first scene images to obtain nm third scene images.
[0068] Exemplarily, the present application provides a method for reducing resolution, such as Figure 3 As shown, the method includes:
[0069] 301: Decompose each first scene image of the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups.
[0070] The remaining nm first scene images correspond one-to-one to the nm first data groups;
[0071] 302: For each of the nm first data groups, weight each first data group using a preset non-uniform weight vector to obtain nm second data groups.
[0072] The nm second data groups correspond one to one to the nm first data groups;
[0073] 303: For each of the nm second data groups, perform inverse reorganization on each second data group by reversible bandpass decomposition to obtain nm third scene images.
[0074] There are nm second data groups corresponding one-to-one to nm third scene images.
[0075] In this embodiment, the reversible bandpass decomposition may be an image decomposition method such as wavelet transform decomposition and Laplace pyramid decomposition.
[0076] 104: baking the m second scene images and the nm third scene images through the UE4 engine to obtain a baking result of the scene to be baked.
[0077] Exemplarily, the present application embodiment provides a method for baking m second scene images through the UE4 engine, such as Figure 4 As shown, the method includes:
[0078] 401: Perform image segmentation on each second scene image of the m second scene images to obtain a first region and a second region.
[0079] In this embodiment, the image that needs to be displayed in a refined manner can also be segmented into a first area that needs to be displayed in a refined manner and a second area that does not need to be displayed in a refined manner. Therefore, the memory usage of the data generated by the LightMap can be further reduced while ensuring the display effect and light and shadow effect of the part that needs to be displayed in a refined manner.
[0080] 402: Perform resolution reduction processing on the second region to obtain a third region.
[0081] 403: Reorganize the images according to the first area and the third area to obtain a fourth scene image corresponding to each second scene image.
[0082] 404: Baking the fourth scene image through the UE4 engine.
[0083] It can be seen that in the implementation mode of the present application, by dividing the images in the scene to be baked into images that need to be finely displayed and images that do not need to be finely displayed, the images that do not need to be finely displayed are subjected to resolution reduction processing before baking. Thus, while ensuring the accuracy of the LightMap after the main image is baked, the memory usage of the data generated by the LightMap of the entire scene is reduced, thereby reducing memory usage and the size of the package, and improving the user experience. In addition, the images that need to be finely displayed are further segmented into areas that need to be finely displayed and areas that do not need to be finely displayed, and then baked, thereby further reducing the memory usage of the data generated by the LightMap.
[0084] See also Figure 5 , Figure 5 This is a functional module block diagram of a scene baking device provided in an embodiment of the present application. Figure 5 As shown, the scene baking device 5 includes:
[0085] An acquisition module 51 is used to acquire a first image group of a scene to be baked, where the first image group includes n first scene images of the scene to be baked, where n is an integer greater than or equal to 1;
[0086] a splitting module 52, configured to determine m second scene images from n first scene images, wherein m is an integer greater than or equal to 1 and less than or equal to n;
[0087] A resolution processing module 53 is used to perform resolution reduction processing on the remaining nm first scene images to obtain nm third scene images;
[0088] The baking module 54 is used to perform baking processing on the m second scene images and nm third scene images through the UE4 engine to obtain a baking result of the scene to be baked.
[0089] In an embodiment of the present invention, in determining m second scene images from n first scene images, the splitting module 52 is specifically configured to:
[0090] Get baking parameters;
[0091] According to the baking parameters, determine m first scene images including the labels among the n first scene images, and use the m first scene images as the m second scene images;
[0092] The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
[0093] In the embodiment of the present invention, in performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images, the resolution processing module 53 is specifically used to:
[0094] Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups;
[0095] For each of the nm first data groups, weight each first data group by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups;
[0096] For each of the nm second data groups, each second data group is inversely reorganized by reversible bandpass decomposition to obtain nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
[0097] In an embodiment of the present invention, in terms of baking the m second scene images through the UE4 engine, the baking module 54 is specifically used to:
[0098] For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region;
[0099] Performing resolution reduction processing on the second region to obtain three regions;
[0100] Recombining the images according to the first area and the third area to obtain a fourth scene image corresponding to each second scene image;
[0101] The fourth scene image is baked through the UE4 engine.
[0102] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 600 includes a transceiver 601, a processor 602 and a memory 603. They are connected via a bus 604. The memory 603 is used to store computer programs and data, and can transmit the data stored in the memory 603 to the processor 602.
[0103] The processor 602 is used to read the computer program in the memory 603 and perform the following operations:
[0104] Obtain a first image group of a scene to be baked, where the first image group includes n first scene images of the scene to be baked, where n is an integer greater than or equal to 1;
[0105] Determine m second scene images from n first scene images, where m is an integer greater than or equal to 1 and less than or equal to n;
[0106] Performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images;
[0107] The m second scene images and nm third scene images are baked through the UE4 engine to obtain a baking result of the scene to be baked.
[0108] In an embodiment of the present invention, in determining m second scene images from n first scene images, the processor 602 is specifically configured to perform the following operations:
[0109] Get baking parameters;
[0110] According to the baking parameters, determine m first scene images including the labels among the n first scene images, and use the m first scene images as the m second scene images;
[0111] The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
[0112] In an embodiment of the present invention, in terms of performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images, the processor 602 is specifically configured to perform the following operations:
[0113] Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups;
[0114] For each of the nm first data groups, weight each first data group by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups;
[0115] For each of the nm second data groups, each second data group is inversely reorganized by reversible bandpass decomposition to obtain nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
[0116] In an embodiment of the present invention, in terms of baking the m second scene images through the UE4 engine, the processor 602 is specifically configured to perform the following operations:
[0117] For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region;
[0118] Performing resolution reduction processing on the second region to obtain three regions;
[0119] Recombining the images according to the first area and the third area to obtain a fourth scene image corresponding to each second scene image;
[0120] The fourth scene image is baked through the UE4 engine.
[0121] It should be understood that the scene baking device in this application may include a smart phone (such as an Android phone, an iOS phone, a Windows Phone phone, etc.), a tablet computer, a PDA, a laptop computer, a mobile Internet device MID (Mobile Internet Devices, referred to as: MID) or a wearable device, etc. The above scene baking device is only an example, not an exhaustive list, including but not limited to the above scene baking device. In practical applications, the above scene baking device may also include: a smart vehicle terminal, a computer device, etc.
[0122] Through the description of the above implementation modes, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation modes of the present invention or some parts of the implementation modes.
[0123] Therefore, the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement some or all steps of any scene baking method described in the above method implementation. For example, the storage medium may include a hard disk, a floppy disk, an optical disk, a tape, a disk, a USB flash drive, a flash memory, etc.
[0124] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any scene baking method recorded in the above method embodiment.
[0125] It should be noted that, for the above-mentioned various method implementations, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the implementations described in the specification are all optional implementations, and the actions and modules involved are not necessarily required by this application.
[0126] In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0127] In the several embodiments provided in this application, it should be understood that the disclosed device can be implemented in other ways. For example, the device implementation described above is only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units 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 through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0129] 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. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0130] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0131] A person skilled in the art may understand that all or part of the steps in the various methods of the above-mentioned embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0132] The above is a detailed introduction to the implementation methods of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above implementation methods is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A scene baking method, characterized in that: The method comprises: Acquire a first image group of a scene to be baked, where the first image group includes n first scene images of the scene to be baked, where n is an integer greater than or equal to 1; Determining m second scene images from the n first scene images, where m is an integer greater than or equal to 1 and less than or equal to n; Performing resolution reduction processing on the remaining nm images of the first scene to obtain nm images of the third scene; Baking the m second scene images and the nm third scene images through the UE4 engine to obtain a baking result of the scene to be baked; The step of performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images includes: Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups; For each of the nm first data groups, weighting the first data groups by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups; For each of the nm second data groups, inverse reorganization is performed on the second data group through the reversible bandpass decomposition to obtain the nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
2. The method according to claim 1, characterized in that The determining m second scene images from the n first scene images comprises: Get baking parameters; According to the baking parameters, determining m first scene images including labels among the n first scene images, and using the m first scene images as the m second scene images; The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
3. The method according to claim 1, characterized in that The baking process of the m second scene images by using the UE4 engine includes: For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region; Performing resolution reduction processing on the second region to obtain a third region; Recombining images according to the first area and the third area to obtain a fourth scene image corresponding to each of the second scene images; The baking process is performed on the fourth scene image through the UE4 engine.
4. A scene baking device, characterized in that: The device comprises: An acquisition module, configured to acquire a first image group of a scene to be baked, wherein the first image group includes n first scene images of the scene to be baked, wherein n is an integer greater than or equal to 1; a splitting module, configured to determine m second scene images from the n first scene images, wherein m is an integer greater than or equal to 1 and less than or equal to n; A resolution processing module, used for performing resolution reduction processing on the remaining nm images of the first scene to obtain nm images of the third scene; A baking module, used for baking the m second scene images and the nm third scene images through the UE4 engine to obtain a baking result of the scene to be baked; In the aspect of performing resolution reduction processing on the remaining nm first scene images to obtain nm third scene images, the resolution processing module is used to: Decomposing each first scene image in the remaining nm first scene images by reversible bandpass decomposition to obtain nm first data groups, wherein the remaining nm first scene images correspond one-to-one to the nm first data groups; For each of the nm first data groups, weighting the first data groups by a preset non-uniform weight vector to obtain nm second data groups, wherein the nm second data groups correspond one-to-one to the nm first data groups; For each of the nm second data groups, inverse reorganization is performed on the second data group through the reversible bandpass decomposition to obtain the nm third scene images, wherein the nm second data groups correspond one-to-one to the nm third scene images.
5. The device according to claim 4, characterized in that In terms of determining m second scene images from the n first scene images, the splitting module is used to: Get baking parameters; According to the baking parameters, determining m first scene images including labels among the n first scene images, and using the m first scene images as the m second scene images; The baking parameters include labels of m first scene images among the n first scene images, and the label of each first scene image among the m first scene images is used to identify that each first scene image does not need to be processed by reducing the resolution.
6. The device according to claim 4, characterized in that In the aspect of baking the m second scene images by the UE4 engine, the baking module is used for: For each of the m second scene images, perform image segmentation on each of the second scene images to obtain a first region and a second region; Performing resolution reduction processing on the second region to obtain a third region; Recombining images according to the first area and the third area to obtain a fourth scene image corresponding to each of the second scene images; The baking process is performed on the fourth scene image through the UE4 engine.
7. An electronic device, characterized in that: The method comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the one or more programs include instructions for executing the steps in any one of the methods of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Virtual scene display method and device, equipment and storage medium
CN111729307A