Method, apparatus, device, medium and product for adjusting color tone
By generating a lookup table within the Unreal Engine, the cumbersome LUT generation process was solved, enabling efficient and smooth human-computer interaction for virtual scene color adjustment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
AI Technical Summary
Generating lookup tables (LUTs) in Unreal Engine is cumbersome, has low human-computer interaction efficiency, and cannot be directly verified and iterated inside or outside Unreal Engine.
By embedding a LUT generation channel within Unreal Engine, a lookup table is generated by acquiring reference materials, and the color adjustment results are displayed directly within the engine, avoiding switching between the engine and the environment.
It improves the efficiency of virtual scene color tone adjustment and human-computer interaction, and realizes a complete and smooth process from reference materials to color tone adjustment.
Smart Images

Figure CN122156557A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Unreal Engine, and in particular to a method, apparatus, device, medium, and product for adjusting color tones. Background Technology
[0002] When editing / configuring virtual scenes in Unreal Engine, it is usually necessary to adjust the color tone of the virtual scene through a look-up table (LUT). For example, if the virtual scene edited in Unreal Engine is in a warm color tone, then the virtual scene will be adjusted to a cool color tone after mapping between warm and cool colors through a LUT.
[0003] In related technologies, colorists manually adjust curves, color wheels, contrast, and saturation through repeated trial and error in external post-production software to obtain a LUT (Low-Ended Screen). The LUT is then imported into Unreal Engine and applied to a virtual scene to obtain color grading for the virtual scene.
[0004] However, the above-mentioned method is cumbersome in generating LUTs and has low human-computer interaction efficiency. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and product for adjusting color tone. The technical solution is as follows: On the one hand, a method for adjusting color tone is provided, the method comprising: During the editing process of a virtual scene in Unreal Engine, an operation to acquire reference materials is received. The virtual scene corresponds to a first color tone, and the reference materials are used to provide a second color tone. Receive a lookup table generation operation, the lookup table generation operation being used to instruct the generation of a lookup table based on the virtual scene and the reference material, the lookup table being used to provide a mapping relationship of pixels from the first hue to the second hue; In response to the lookup table generation operation, the color adjustment result of the virtual scene switching from the first color tone to the second color tone is displayed.
[0006] On the other hand, a hue adjustment device is provided, the device comprising: The receiving module is used to receive the acquisition operation of reference material during the editing process of virtual scene in Unreal Engine. The virtual scene corresponds to a first color tone, and the reference material is used to provide a second color tone. The receiving module is further configured to receive a lookup table generation operation, wherein the lookup table generation operation is configured to instruct the generation of a lookup table based on the virtual scene and the reference material, wherein the lookup table is configured to provide a mapping relationship between pixels from the first hue to the second hue; The display module is used to display the color adjustment result of the virtual scene switching from the first color tone to the second color tone in response to the lookup table generation operation.
[0007] In an optional embodiment, the display module is further configured to display a scene parameter configuration area during the editing process of the virtual scene in the Unreal Engine. The scene parameter configuration area is used to configure the scene parameters of the virtual scene and includes a lookup table configuration item. The receiving module is also configured to receive the acquisition operation of the reference material based on the lookup table configuration item.
[0008] In an optional embodiment, the receiving module is further configured to perform one or more of the following operations: The upload operation for the reference image is received based on the lookup table configuration item, and the reference image corresponds to the second color tone; The lookup table configuration item receives input for a hue hint word, which describes the second hue. The lookup table configuration item receives a selection operation for hue keywords, which are pre-provided keywords used to describe hues.
[0009] In an optional embodiment, the receiving module is further configured to perform one or more of the following operations: Based on the lookup table configuration item, the system receives a selection operation for the reference image from a local image library or an online image library; Based on the lookup table configuration item, the system receives an upload operation for a reference video; it also receives a selection operation for a reference image in the reference video, wherein the reference image is an image frame in the reference video.
[0010] In an optional embodiment, the apparatus further includes: The acquisition module is used to acquire scene images of the virtual scene in response to the lookup table generation operation; The generation module is used to generate the lookup table based on the scene image and the reference material; The display module is further configured to adjust the pixel points of the image captured from the virtual scene through the lookup table, and display the virtual scene in the second color tone.
[0011] In an optional embodiment, the generation module is further configured to generate a first lookup table based on the pixel distribution statistical characteristics between the scene image and the reference material, wherein the first lookup table is used to globally align the color distribution between the scene image and the reference material in the color space; The generation module is further configured to generate a second lookup table using a pre-trained diffusion model. The second lookup table is used to express the differences between the scene and the reference material from the perspective of style features. The generation module is also used to integrate the first lookup table and the second lookup table to obtain the lookup table.
[0012] In an optional embodiment, the generation module is further configured to acquire noise data and a basic lookup table, wherein the basic lookup table is a preset lookup table; input the noise data, the basic lookup table, the scene image, and the reference material into the diffusion model, generate differential data with the scene image and the reference material as constraints, wherein the differential data is used to express the deviation based on the basic lookup table; and superimpose the differential data onto the basic lookup table to obtain the second lookup table.
[0013] In an optional embodiment, the acquisition module is further configured to, in response to the lookup table generation operation, acquire scene video of the virtual scene around the current viewpoint in the virtual scene as the anchor point; and extract scene frames from the scene video, wherein the scene frames are image frames in the scene video.
[0014] In an optional embodiment, the acquisition module is further configured to perform semantic matching between the reference material and the image frames in the scene video to obtain a semantic matching result, wherein the semantic matching result includes the semantic matching degree between the image frames in the scene video and the reference material respectively; and to obtain image frames from the scene video whose semantic matching degree with the reference material meets the matching degree requirement as the scene image.
[0015] In an optional embodiment, the apparatus further includes: The transmission module is used to send the scene video and the reference material to the inference terminal, and the inference terminal is used to generate the lookup table based on the scene video and the reference material; and to receive the lookup table fed back by the inference terminal.
[0016] In an optional embodiment, the transmission module is further configured to send the scene video and the reference material to the inference terminal based on the full-duplex communication channel established between the Unreal Engine and the inference terminal.
[0017] In an optional embodiment, the display module is further configured to display the scene image of the virtual scene in the scene preview window; The display module is further configured to, in response to the lookup table generation operation, display the virtual scene in the scene preview window with the second color tone as the result of the color tone adjustment.
[0018] In an optional embodiment, the display module is further configured to display the virtual scene in a scene preview window in a comparative display manner in response to the lookup table generation operation, wherein a first portion of the virtual scene is displayed in the first color tone, and a second portion of the virtual scene is displayed in the second color tone.
[0019] In an optional embodiment, the receiving module is further configured to receive a hue adjustment operation on the lookup table, the hue adjustment operation being used to adjust the hue intensity of the second hue based on the lookup table; The display module is also used to synchronously adjust the color adjustment result of the virtual scene based on the color adjustment operation.
[0020] In an optional embodiment, the display module is further configured to generate lookup tables for multiple viewport ranges respectively in response to the lookup table generation operation; and display the hue adjustment result of the virtual scene switching from the first hue to the target hue based on the lookup tables corresponding to the multiple viewport ranges respectively, including the first viewport range switching from the first hue to the second hue.
[0021] In an optional embodiment, the display module is further configured to perform one or more of the following operations: In response to the lookup table generation operation, the current viewpoint is divided into multiple viewport ranges based on a pre-configured scene region; and the lookup table is generated for each of the multiple viewport ranges. In response to the lookup table generation operation, the virtual scene within the observation range of the current viewpoint is identified, and the virtual scene is divided into multiple viewport ranges; the lookup table is generated for each of the multiple viewport ranges.
[0022] On the other hand, a computer device is provided, the computer device comprising: a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the hue adjustment method as described above.
[0023] On the other hand, a computer-readable storage medium is provided that stores a computer program, which is loaded and executed by a processor to implement the hue adjustment method described above.
[0024] On the other hand, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium, wherein a processor retrieves the computer instructions from the computer-readable storage medium, causing the processor to load and execute them to implement the hue adjustment method as described above.
[0025] The beneficial effects of the technical solutions provided in this application include at least the following: By embedding LUT generation within Unreal Engine, when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be imported through the acquisition of reference materials. A lookup table is then generated within Unreal Engine to provide a mapping from the first color tone to the second color tone. After generating the lookup table, there's no need to switch between Unreal Engine and its interface; the color adjustment result of switching from the first to the second color tone in the virtual scene can be directly displayed within Unreal Engine based on the lookup table. In other words, Unreal Engine provides a complete and seamless process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency and overall efficiency of color adjustment in virtual scenes. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the layout of a computer device provided in an exemplary embodiment of this application; Figure 2 This is a schematic diagram of the layout of a computer system provided in an exemplary embodiment of this application; Figure 3 This is a flowchart of a hue adjustment method provided in an exemplary embodiment of this application; Figure 4 This is a schematic diagram of an interface for uploading reference images from a local image library, provided in an exemplary embodiment of this application. Figure 5 This is a schematic diagram of an interface for obtaining reference images from an online image library, provided in an exemplary embodiment of this application. Figure 6 This is a schematic diagram of the interface for a lookup table generation operation provided in an exemplary embodiment of this application; Figure 7 This is a schematic diagram of the overall process provided in an exemplary embodiment of this application; Figure 8 This is a flowchart of a hue adjustment method provided in another exemplary embodiment of this application; Figure 9 This is a schematic diagram illustrating the process of determining a scene screen provided in an exemplary embodiment of this application; Figure 10This is a schematic diagram illustrating the process of sending scene videos and reference materials provided in an exemplary embodiment of this application; Figure 11 This is a schematic diagram illustrating the process of receiving and using a lookup table according to an exemplary embodiment of this application; Figure 12 This is a flowchart of a hue adjustment method provided in another exemplary embodiment of this application; Figure 13 This is a schematic diagram of a lookup table generation process provided in an exemplary embodiment of this application; Figure 14 This is a flowchart of a hue adjustment method provided in yet another exemplary embodiment of this application; Figure 15 This is a schematic diagram of an exemplary embodiment of the present application providing a scene preview window; Figure 16 This is a schematic diagram of the overall architecture of a hue adjustment method provided in an exemplary embodiment of this application; Figure 17 This is a schematic diagram illustrating the overall architecture details of a hue adjustment method provided in an exemplary embodiment of this application; Figure 18 This is a structural block diagram of a hue adjustment device provided in an exemplary embodiment of this application; Figure 19 This is a structural block diagram of a hue adjustment device provided in another exemplary embodiment of this application; Figure 20 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0029] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0030] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0031] It should be understood that although the terms first, second, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0032] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user-related data (e.g., various touch operations, operation data, account identifiers, game data, etc.). These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their relevant data is being collected. This ensures that the application only begins the steps for collecting user-related data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without receiving confirmation from the user), the steps for collecting user-related data end, meaning no user-related data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0033] First, a brief introduction to the terms used in the embodiments of this application: A Look-Up Table (LUT) is a color mapping data structure that typically stores the mapping relationship from input RGB to output RGB in the form of a three-dimensional color cube. It is used to achieve fast, reusable, and consistent color grading / style applications. In post-production, it is often stored in formats such as .cube, while in Unreal Engine, it is often used as a LUT Texture (two-dimensional texture encoding three-dimensional LUT) for post-processing calculations.
[0034] In this embodiment of the application, the LUT is used to provide a mapping relationship for mapping a virtual scene from a first hue to a second hue. For example, for the image captured by the virtual scene, for the pixel value of a pixel in the image, the pixel value corresponding to the first hue is found in the LUT, and the mapping result corresponding to the pixel value in the second hue is obtained in the LUT. So when rendering the pixel, the pixel value corresponding to the mapping result is used to render, and the hue adjustment result of the virtual scene from the first hue to the second hue is obtained.
[0035] Virtual scene: This refers to a virtual scene displayed or provided by the client when running on the terminal. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional 3D world, or a purely fictional 3D world. A virtual scene can be any of the following: 2D, 2.5D, or 3D. Optionally, this virtual scene is a scene developed and configured using the Unreal Engine.
[0036] Response: Used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which multiple operations are performed.
[0037] Unreal Engine is a complete development tool designed to provide developers with end-to-end support, from design visualization and cinematic experiences to creating high-quality games. Unreal Engine integrates rendering, collision detection, artificial intelligence (AI), graphics, networking, and file systems. This unified design provides a solid foundation for the development of complex interactive applications, especially for the editing and configuration of virtual scenes.
[0038] When editing / configuring virtual scenes in Unreal Engine, it's typically necessary to adjust the color tone of the virtual scene using a Look-Up Table (LUT). For example, if the virtual scene edited in Unreal Engine is in a warm color tone, a LUT is used to map it between warm and cool tones, thus adjusting the virtual scene to a cool color tone. In related technologies, colorists manually adjust curves, color wheels, contrast, and saturation through repeated trial and error in external post-production software to obtain a LUT. This LUT is then imported into Unreal Engine and applied to the virtual scene to achieve the desired color grading.
[0039] However, the above solution lacks a closed loop within Unreal Engine during the LUT generation process. LUT generation / color adjustment still occurs outside of Unreal Engine, making it impossible to quickly verify and iterate under Unreal Engine's real-time rendering conditions such as camera, lighting, materials, and volumetric fog.
[0040] Based on the above, this application provides a method for adjusting color tone. It changes the way Unreal Engine obtains LUTs by embedding a LUT generation channel within Unreal Engine, improving the fit between the generated LUT and the actual representation of the virtual scene.
[0041] In this embodiment, the generation of the LUT is embedded within the Unreal Engine. This means that when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be introduced through the acquisition of reference materials. A lookup table is then generated within Unreal Engine, providing a mapping relationship from the first color tone to the second color tone. After generating the lookup table, there is no need to switch between Unreal Engine and external environments. Within Unreal Engine, the color adjustment result of switching from the first color tone to the second color tone in the virtual scene can be directly displayed based on the lookup table. In other words, Unreal Engine provides a complete and smooth process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency for performing color adjustments on virtual scenes and increasing the efficiency of color adjustment.
[0042] This embodiment involves an Unreal Engine client and a LUT inference client. The Unreal Engine client displays the Unreal Engine interface, such as a preview window or configuration window for the virtual scene. After acquiring reference materials, the Unreal Engine client sends the scene data and reference materials of the virtual scene to the inference client. The inference client generates a lookup table based on the scene data and reference materials of the virtual scene and feeds the lookup table back to the Unreal Engine client, so that the Unreal Engine client displays the color adjustment result of the virtual scene from a first color tone to a second color tone. The Unreal Engine client and the inference client can be deployed on the same computer device or on different computer devices.
[0043] The Unreal Engine client and the inference client are deployed on the same computer device: Figure 1 This is a schematic diagram of the layout of a computer device 100 provided in an exemplary embodiment of this application, as shown below. Figure 1 As shown, the computer device 100 is equipped with an Unreal Engine client 110 and an inference client 120.
[0044] Optionally, the Unreal Engine client 110 and the inference client 120 are connected via a full-duplex communication channel. The Unreal Engine client 110 displays a configuration interface for the virtual scene, which is used to configure relevant parameters of the virtual scene, such as shadow information and highlight information. The Unreal Engine client 110 is also used to configure a lookup table for the virtual scene, thereby using the lookup table to switch the virtual scene from a first color tone to a second color tone.
[0045] The Unreal Engine 110 receives operations for acquiring reference materials, such as receiving an upload operation for a reference image, which is an image displayed in a second tone. The Unreal Engine 110 also configures the virtual scene, that is, the Unreal Engine 110 currently includes scene data and reference materials for the virtual scene.
[0046] The Unreal Engine client 110 sends scene data and reference materials to the inference client 120 through a full-duplex communication channel. The inference client 120 then generates a lookup table (LUT) based on the scene data and reference materials and feeds the generated LUT back to the Unreal Engine client 110.
[0047] After receiving the lookup table (LUT), the Unreal Engine 110 switches the virtual scene from the first color tone to the second color tone based on the LUT and displays the color adjustment result of the virtual scene switching from the first color tone to the second color tone.
[0048] The computer device 100 described above includes at least one of the following: smartphone, tablet computer, wearable device, PC (Personal Computer), laptop computer, and desktop computer. The following embodiments illustrate this by using a desktop computer as an example.
[0049] The Unreal Engine client and the inference client are deployed on different computer devices: Figure 2 This is a layout diagram of a computer system 200 provided in an exemplary embodiment of this application, as shown below. Figure 2 As shown, the computer system 200 includes a first device 210 and a second device 220. The first device 210 is equipped with Unreal Engine and is implemented as the Unreal Engine end, while the second device 220 is equipped with an inference network and is implemented as the inference end.
[0050] Optionally, the Unreal Engine and the inference network are connected via a full-duplex communication channel, that is, the Unreal Engine of the first device 210 is connected to the inference network in the second device 220 via a full-duplex communication channel.
[0051] The configuration interface for the virtual scene in Unreal Engine is displayed in the first device 210. The configuration interface is used to configure the relevant parameters of the virtual scene.
[0052] The first device 210 receives operations for acquiring reference materials, such as receiving an upload operation for a reference image, which is an image represented by a second tone, and configures a virtual scene on the first device 210, that is, the first device 210 currently acquires scene data and reference materials for a virtual scene.
[0053] The Unreal Engine side of the first device 210 sends scene data and reference materials to the inference side of the second device 220 through a full-duplex communication channel. The inference side then generates a lookup table (LUT) based on the scene data and reference materials and feeds the generated LUT back to the first device 210.
[0054] After receiving the lookup table (LUT), the first device 210 switches the virtual scene with the first color tone to the second color tone based on the lookup table LUT, and displays the color adjustment result of the virtual scene switching from the first color tone to the second color tone.
[0055] The device type of the first device 210 mentioned above includes at least one of the following: smartphone, tablet computer, wearable device, PC, laptop computer, and desktop computer. The following embodiments illustrate the first device 210 as including a desktop computer.
[0056] The device type of the aforementioned second device 220 includes at least one of the following: smartphones, tablets, wearable devices, PCs, laptops, desktop computers, and servers. When the second device 220 is implemented as a server, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services such as cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and basic cloud computing services such as big data and artificial intelligence platforms. The server can also be a node in a blockchain system. A server includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center.
[0057] Those skilled in the art will understand that the number of the aforementioned devices may be more or less. This application does not limit the number or type of devices.
[0058] Figure 3 This is a flowchart illustrating a hue adjustment method provided in an exemplary embodiment of this application. The method is executed by a computer device, which may be... Figure 1 The computer device 100 shown, or the computer device may be Figure 2 The first device 210 is shown. The method includes at least some of the steps in steps 320 to 360.
[0059] Step 320: During the editing process of the virtual scene in Unreal Engine, receive the operation of acquiring reference materials.
[0060] The virtual scene corresponds to the first color tone, while the reference materials are used to provide the second color tone.
[0061] The solution provided in this embodiment is based on Unreal Engine. That is, the received operations, such as the acquisition of reference materials or the subsequent lookup table generation operation, are all executed in Unreal Engine, thereby realizing the introduction of a direct channel for generating lookup tables within Unreal Engine.
[0062] Optionally, the virtual scene is a scene designed externally and imported into Unreal Engine, or the virtual scene is a scene created and designed within Unreal Engine. In this embodiment, a three-dimensional virtual scene is used as an example for illustration.
[0063] Unreal Engine provides editing capabilities for virtual scenes. These editing capabilities include, but are not limited to, scene construction, object manipulation, environment shaping, interaction logic, and visual presentation.
[0064] Scene building refers to the ability of developers to add 3D models to a virtual scene and adjust parameters such as the position, size, and orientation of the 3D models. In other words, in terms of scene building, developers can configure the layout, rotation, and scaling of elements in the virtual scene.
[0065] Object manipulation refers to the ability to perform detailed configurations on models in a virtual scene, such as the visual attributes of the model's surface (e.g., color, chromaticity, roughness, normals, etc.) and the model's physical parameters (e.g., mass, friction, etc.).
[0066] Environment shaping is used to configure environmental elements such as terrain and vegetation in virtual scenes. In the environment shaping function, the terrain tool can be used to edit the terrain in the virtual scene, such as introducing terrain such as mountains, valleys and rivers; the vegetation generation tool can be used to configure the ecological rules in the virtual scene, such as generating trees and grasslands on the terrain, and configuring the relationship between vegetation and the altitude in the virtual scene, etc.
[0067] Interaction logic is used to configure dynamic events in a virtual scene, such as the interaction logic that causes virtual doors and windows to open and close when a virtual object approaches them.
[0068] Visual presentation is used to configure elements such as lighting and special effects in virtual scenes. For example, it can configure light sources in virtual scenes, such as point lights, spotlights, directional lights, and reflected lights. Visual presentation can also configure complex particle effects in virtual scenes, such as flames, smoke, magic, and weather systems (raindrops).
[0069] It is worth noting that the virtual scene editing functions provided in the Unreal Engine described above are merely illustrative examples, and the embodiments of this application do not limit them.
[0070] Optionally, in this embodiment of the application, Unreal Engine also provides the function of color tone transformation of virtual scenes, wherein Unreal Engine provides the function of color tone transformation of the entire or part of the virtual scene by generating a difference table (LUT).
[0071] Optionally, based on the current first hue of the virtual scene and the second hue provided by the reference material, a lookup table is generated. The lookup table provides the mapping relationship between pixels from the first hue to the second hue. Thus, when rendering the virtual scene, the pixels of the first hue in the image are mapped through the lookup table to obtain the pixels of the second hue, and the pixels of the second hue are rendered, ultimately resulting in a virtual scene with the second hue.
[0072] In some embodiments, during the editing of a virtual scene in Unreal Engine, a scene parameter configuration area is displayed. The scene parameter configuration area is used to configure the scene parameters of the virtual scene. The scene parameter configuration area includes lookup table configuration items, and the acquisition operation of reference materials is received based on the lookup table configuration items.
[0073] In other words, Unreal Engine provides a scene parameter configuration area for virtual scenes. Through the lookup table configuration item in the scene parameter configuration area, the reference material acquisition operation can be performed directly to obtain the reference material to generate the lookup table. This process is built in the scene parameter configuration area inside Unreal Engine, avoiding switching back and forth between Unreal Engine and improving the efficiency of obtaining the lookup table.
[0074] The scene parameter configuration area is a region provided by Unreal Engine for configuring one or more dimensions of a virtual scene. Optionally, the scene parameter configuration area is implemented as a scene parameter configuration interface.
[0075] The scene parameter configuration area is used to configure color-related parameters of the virtual scene, or it can be used to configure multi-dimensional parameters of the virtual scene, including color-related parameters.
[0076] Reference materials are used to provide a secondary color tone. Reference materials can take one or more of the following forms: 1. Reference materials include reference images, which correspond to the second tone; The system then receives upload operations for reference images based on the lookup table configuration. The reference image can be implemented as a static single image, or as an image frame from a dynamic reference video, or as a moving image.
[0077] By acquiring reference images as reference materials, the tonal requirements of the second tone can be expressed in the simplest and most intuitive way, that is, the tone presented by the reference image. Thus, when switching the tone of the virtual scene based on the reference image, there is a more accurate reference, which improves the accuracy and efficiency of adjusting the tone of the virtual scene.
[0078] Optionally, the reference image is implemented as a photograph of a physical environment, where the physical environment exhibits a second tone; or, the reference image is implemented as an image acquired from a virtual environment, where the virtual environment exhibits a second tone; or, the reference image is implemented as an image acquired from a combination of a physical environment and a virtual environment. The second tone refers to the tone presented by the reference image; optionally, the second tone refers to the tone presented by the environment and / or image elements of the reference image.
[0079] In some embodiments, when receiving an upload operation for a reference image, one or more of the following methods are included: 1.1 Receive selection operations for reference images from a local image library or an online image library based on the lookup table configuration item; The local image library and the online image library are explained separately.
[0080] Local Image Library: The lookup table configuration item includes a local image upload control. In response to a trigger operation on the local image upload control, a display window of the local image library is displayed, showing images stored in the local image library. Based on the display window, a selection operation on a reference image in the local image library is received, thereby obtaining the reference image.
[0081] The selected reference image in the local image library can be one or more images; this embodiment does not limit this. The local image library refers to an image library stored locally on the computer device, or, alternatively, an image library linked to an account and stored in the cloud. This embodiment does not limit the concept or storage location of the local image library.
[0082] Indicative Figure 4 This is a schematic diagram of an interface for uploading reference images from a local image library, provided in an exemplary embodiment of this application. Figure 4 As shown, the scene parameter configuration area 400 is first displayed. The scene parameter configuration area 400 displays a lookup table configuration item 410, which includes a local image upload control 411. In response to receiving a trigger operation on the local image upload control 411, a display window 420 of the local image library is displayed. Images in the local image library are displayed in the display window 420. The selection operation of the reference image in the display window 420 is received, thereby realizing the upload of the reference image.
[0083] Optionally, for images in the local image library, the scene similarity between each image and the virtual scene is identified, and the images in the local image library are displayed in order of scene similarity from high to low.
[0084] Online Image Library: The lookup table configuration includes an online image search control. In response to a trigger operation on the online image search control, an online search window is displayed, and search operations are received within the online search window. These search operations include at least one, such as link input and keyword input. The link input operation is used to input a link to the image resource of the reference image, while the keyword input operation is used to input keywords for the online search of the reference image. Based on the input keywords, the online image library is searched to obtain multiple candidate images matching the keywords, allowing the user to select a reference image from among them. For example, entering the keyword "blues moment" searches for candidate images corresponding to "blues moment," and the user can select the candidate image whose scene type is closest to the virtual scene. Alternatively, after obtaining multiple candidate images, the system automatically identifies the scene similarity between the candidate images and the virtual scene, displaying the candidate images in descending order of scene similarity.
[0085] Indicative Figure 5 This is a schematic diagram of an interface for obtaining reference images from an online image library, provided in an exemplary embodiment of this application, such as... Figure 5 As shown, the scene parameter configuration area 400 is first displayed, which includes a lookup table configuration item 410. The lookup table configuration item 410 includes an online image search control 511. In response to a trigger operation on the online image search control 511, an online search window 520 is displayed. The online search window 520 includes a link input box 521 and a keyword input box 522. In response to a link input operation in the link input box 521, the image resource provided in the link is directly obtained as a reference image. In response to a keyword input operation in the keyword input box 522, an online search is performed based on the input keyword to obtain multiple candidate images that match the keyword, so that the user can select a reference image from the multiple candidate images that match the keyword.
[0086] By selecting reference images from local or online image libraries, users can use locally saved images or images uploaded to publicly available websites as reference images, thus improving the efficiency and convenience of obtaining reference images.
[0087] 1.2 Receive upload operation for reference video based on lookup table configuration item; receive selection operation for reference image in reference video, where reference image is image frame in reference video.
[0088] The method for uploading reference videos is similar to that for uploading reference images, and will not be repeated here. After the reference video is uploaded, a preview window for the reference video is displayed. The reference video is played in the preview window, and a drag bar is displayed in the preview window. The drag bar is used to locate timestamps on the timeline of the reference video. Dragging operations on the drag bar are received, and the image frame corresponding to the dynamically determined timestamp in the reference video is displayed based on the drag bar position confirmation operation. Based on the confirmation operation of the drag bar position, the image frame corresponding to the timestamp where the drag bar is located is determined as the reference image. For example, if the drag bar is dragged to the timestamp position of 20 seconds in the reference video, the image frame corresponding to the 20-second position in the reference video is obtained as the reference image.
[0089] First, a reference video is obtained, and then a reference image is selected from the reference video. If the reference video has already been saved on the computer device, there is no need to perform additional screenshot or image capture operations on the reference video. The reference image can be selected directly from the Unreal Engine using the reference video, which improves the efficiency of human-computer interaction.
[0090] 1.3 The system receives input for image-generated prompts based on a lookup table configuration item and generates prompts accordingly. The image-generated prompts are input into a large language model. After the large language model analyzes and predicts the image-generated prompts, it obtains a reference image corresponding to each prompt. In other words, the image-generated prompts are implemented as a prompt input to the large language model.
[0091] As an illustration, a prompt input box is displayed in the lookup table configuration. This box receives input of image generation prompts, which Unreal Engine then feeds into the large language model. The large language model outputs a predicted reference image that matches the second-tone color scheme. As an illustration, the prompt "Generate me an image of a blues moment by a lighthouse on the beach" is input into the prompt box. The large language model then analyzes the prompt and outputs a reference image. The large language model is a pre-trained machine learning model.
[0092] In some embodiments, after the large language model outputs a reference image, the generated reference image is displayed in the current scene parameter configuration area. If the user needs to adjust the reference image, they can continue to enter advanced adjustment prompts in the prompt input box, such as "This image is too light in color, increase the saturation." The large language model will refer to images from historical time periods to generate prompts and adjustment prompts, as well as reference images generated from historical time periods, to make adjustments and output the adjusted reference image.
[0093] It is worth noting that the above-described methods for obtaining reference images are merely illustrative examples, and the specific methods for obtaining reference images are not limited in the embodiments of this application.
[0094] 2. Reference materials include hue cues, which are used to describe the secondary hue; The system then receives input for hue hints based on the lookup table configuration. These hue hints are directly applied to the subsequent lookup table generation process.
[0095] In some embodiments, tone hints can be used as a single reference material to adjust the tone of a virtual scene, or tone hints can be used as auxiliary information to jointly adjust the tone of a virtual scene. For example, the reference material includes a reference image and tone hints, and the tone hints are implemented as "adjust the virtual scene to the same or similar tone as the uploaded image".
[0096] By using color cues to express the color requirements of the second color tone when adjusting a virtual scene in text form, users are not required to find reference images or perform other operations, which improves the convenience of operation.
[0097] 3. Reference materials include color tone keywords, which are pre-provided keywords used to describe color tones.
[0098] It receives the selection operation of hue keywords based on the lookup table configuration item. In this case, Unreal Engine provides multiple candidate hue keywords in advance, and receives the selection operation among multiple candidate hue keywords.
[0099] As an illustration, Unreal Engine provides pre-defined candidate color keywords such as "gloomy," "warm," "romantic," and "cute." It accepts the selection operation of color keywords from the candidate color keywords, and the color keywords are directly applied to the subsequent generation process of the lookup table.
[0100] By using color keywords, users can select from multiple candidate color keywords provided by Unreal Engine, thereby expressing the color requirements of the second color when adjusting the virtual scene. This eliminates the need for users to find additional reference images, improving the convenience of the operation.
[0101] The above-described method of obtaining reference materials is merely an illustrative example. This application does not limit the material format or specific method of obtaining the reference materials. It is worth noting that the reference materials are obtained in Unreal Engine and directly applied to the materials used to generate the lookup table.
[0102] Step 340: Receive the lookup table generation operation.
[0103] The lookup table generation operation is used to instruct the generation of a lookup table based on the virtual scene and reference materials. The lookup table is used to provide the mapping relationship between pixels from the first hue to the second hue.
[0104] Optionally, the lookup table configuration item also includes a lookup table generation control, which receives trigger operations on the lookup table generation control as lookup table generation operations. The lookup table generation operation is an operation received in Unreal Engine based on the reference materials configured in the lookup table configuration item. In other words, both the reference material acquisition operation and the lookup table generation operation are operations within Unreal Engine, and there is a continuous sequential relationship between the two operations.
[0105] Indicative Figure 6 This is a schematic diagram of the interface for a lookup table generation operation provided in an exemplary embodiment of this application, such as... Figure 6 As shown, the lookup table configuration item 410 also includes a lookup table generation control 610. After uploading the reference image 620, receiving a click operation on the lookup table generation control 610 is equivalent to receiving a lookup table generation operation.
[0106] Step 360: In response to the lookup table generation operation, display the color adjustment result of the virtual scene switching from the first color tone to the second color tone.
[0107] In response to the lookup table generation operation, a lookup table is generated based on the request triggered by Unreal Engine, and the virtual scene with the first color tone is switched to a virtual scene with the second color tone for display based on the lookup table.
[0108] The process of generating the lookup table is implemented internally on the Unreal Engine side, or on the inference side. In this embodiment, the process of generating the lookup table is implemented on the inference side as an example. That is, after obtaining reference materials on the Unreal Engine side and receiving the lookup table generation operation, the scene data and reference materials of the virtual scene are sent to the inference side, and the inference side generates the lookup table.
[0109] In this configuration, the Unreal Engine and the inference client are configured on the same computer device, or they can be configured on different computer devices. Optionally, a full-duplex communication channel is established between the Unreal Engine and the inference client. Regardless of whether the Unreal Engine and the inference client are configured on the same or different computer devices, the Unreal Engine sends reference materials and scene data of the virtual scene to the inference client through the full-duplex communication channel. The inference client then generates a lookup table based on the reference materials and scene data of the virtual scene, and sends the lookup table back to the Unreal Engine through the full-duplex communication channel. After receiving the lookup table, the Unreal Engine switches the virtual scene from a first color tone to a second color tone for display.
[0110] Indicative Figure 7This is a schematic diagram of the overall process provided in an exemplary embodiment of this application, such as... Figure 7 As shown, in this overall process, a virtual scene 710 first runs in the Unreal Engine 110, and reference material 720 is acquired in the Unreal Engine 110. The virtual scene 710 is represented by a first color tone, and the reference material 720 is represented by a second color tone. The reference material 720 includes at least one of the following forms: reference image, color tone cue word, color tone keyword, etc. In this embodiment, the reference material 720 is implemented as a reference image for explanation. After triggering the lookup table generation operation, a lookup table 730 is generated based on the virtual scene and the reference material, thereby providing a mapping relationship between the first color tone and the second color tone. The lookup table is generated by the Unreal Engine 110 by calling the inference network of the inference terminal 120. After acquiring the lookup table, the Unreal Engine 110 maps the virtual scene of the first color tone to the virtual scene of the second color tone based on the lookup table. That is, for the pixels in the image captured from the virtual scene of the first color tone, the pixel values are mapped through the lookup table, thereby mapping the pixels from the first color tone to the second color tone. During rendering, the second color tone mapping is used to obtain the virtual scene of the second color tone.
[0111] In summary, the method provided in this application embeds LUT generation within Unreal Engine. This means that when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be introduced through the acquisition of reference materials. A lookup table generation operation is then performed within Unreal Engine to instruct the generation of a lookup table, which provides the mapping relationship from the first color tone to the second color tone. After generating the lookup table, there is no need to switch between Unreal Engine and external environments. Within Unreal Engine, the color adjustment result of switching from the first color tone to the second color tone in the virtual scene can be directly displayed based on the lookup table. In other words, Unreal Engine provides a complete and smooth process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency for performing color adjustments on virtual scenes and increasing the efficiency of color adjustment.
[0112] In an optional embodiment, the lookup table is generated based on scene images and reference materials captured from the virtual scene. Figure 8 This is a flowchart of a hue adjustment method provided in another exemplary embodiment of this application, which can be used with... Figure 3 The illustrated embodiments can be combined to implement a complete solution, or each can be implemented as a complete solution on its own. The method is executed by a computer device, such as... Figure 8 As shown, when implementing step 360 above, it includes at least one of the following steps.
[0113] Step 810: In response to the lookup table generation operation, capture the scene image of the virtual scene.
[0114] Among them, the Unreal Engine side performs the capture of scene images of the virtual scene. For example, the Unreal Engine side captures scene videos and selects scene images from the scene videos, or the Unreal Engine side performs the capture of scene videos and selects scene images from the scene videos at the inference end.
[0115] In some embodiments, when capturing scene images of a virtual scene, one frame of scene image is captured, or multiple frames of scene image are captured.
[0116] If a single frame of scene image is captured, that frame is used as the representative of the first color tone to generate a lookup table. If multiple frames of scene image are captured, the first color tone of the multiple frames is combined to generate a lookup table, or, a lookup table is generated separately for each scene corresponding to the multiple frames.
[0117] In this embodiment, we will first describe the process of capturing a single frame of a scene.
[0118] In some embodiments, the methods for capturing scene images of a virtual scene include one or more of the following: 1. In response to the lookup table generation operation, the current viewpoint is used as the acquisition point to directly capture the scene image of the virtual scene.
[0119] In other words, for Unreal Engine, there exists a viewpoint within the virtual scene. This viewpoint represents the observation point and direction from which the virtual scene is displayed. For example, the viewpoint represents the position and shooting direction of the virtual camera capturing images of the virtual scene. Optionally, Unreal Engine also provides a scene preview window, which displays a preview of the current virtual scene (currently displayed in the first color tone). The current viewpoint represents the image capture position and direction corresponding to the preview image of the virtual scene displayed in the scene preview window. That is, the image captured from the current viewpoint is the preview image displayed in the scene preview window.
[0120] This can be understood as the preview screen displayed in the scene preview window.
[0121] 2. In response to the lookup table generation operation, take the current viewpoint in the virtual scene as the anchor point and capture scene video of the virtual scene around the anchor point; extract scene frames from the scene video, which are image frames in the scene video.
[0122] By capturing scene videos and using the current viewpoint as the benchmark for color tone switching in the virtual scene, the system rotates around the viewpoint and captures scene videos, thereby improving the comprehensiveness of color tone expression in the virtual scene. By using scene videos to obtain more suitable reference materials and scene images that are more suitable for generating lookup tables, the accuracy of lookup table generation is improved.
[0123] In other words, after receiving the lookup table generation operation, the current viewpoint of observing the virtual scene is used as the reference acquisition point. The scene is captured by rotating around a preset angle in place. For example, the current viewpoint is used as the anchor point and the scene video is captured in place. Optionally, the angular velocity of rotation and the acquisition frequency of scene video are preset. For example, the rotation is performed at an angular velocity of 15° / s and image frames are captured at a speed of 16 frames / s to form scene video.
[0124] The aforementioned rotation includes at least one of the following methods: 2.1 Rotating horizontally by a preset angle with the current viewpoint as the anchor point; 2.2 Rotating by a preset angle with the current viewpoint as the anchor point according to a preset rotation rule, such as first rotating horizontally by 90°, then vertically upward by 90°, etc.; 2.3 Rotating by a preset angle in a random direction. The rotation method of the viewpoint is not limited in the embodiments of this application.
[0125] After acquiring the scene video, a single image frame is selected from the scene video as the scene frame, wherein the scene frame is selected from the scene video based on at least one of the following schemes: First, semantic matching is performed on the image frames in the reference material and the scene video to obtain semantic matching results. The semantic matching results include the semantic matching degree between the image frames in the scene video and the reference material respectively. Image frames in the scene video that meet the semantic matching degree requirements with the reference material are obtained as scene images.
[0126] In some embodiments, semantic matching is performed between image frames in the scene video and reference material, wherein a first semantic feature representation of the reference material is obtained using a pre-trained machine learning model, and a second semantic feature representation of the image frame is obtained, and a similarity calculation is performed on the first semantic feature representation and the second semantic feature representation to obtain the semantic matching degree between the image frame and the reference material.
[0127] Optionally, semantic matching can be performed on each image frame in the scene video and the reference material, or semantic matching can be performed on multiple keyframes in the scene video and the reference material.
[0128] Based on semantic matching results, the image frame with the highest semantic matching degree is selected as the scene frame from the image frames of the scene video. For example, the scene video captured from the current viewpoint includes image frames captured indoors and image frames captured outdoors; the reference material is an image that provides a second tone for the indoor scene, then the scene frame obtained from the scene video is the selected image frame captured indoors.
[0129] Indicative Figure 9 This is a schematic diagram illustrating the process of determining a scene image provided in an exemplary embodiment of this application, such as... Figure 9 As shown, after acquiring the scene video 900, the scene video includes multiple image frames. That is, the scene video is obtained by playing multiple image frames in sequence. Semantic matching is performed on multiple image frames and reference material 720 respectively, so as to obtain the semantic matching degree 920 between multiple image frames and reference material respectively. The image frame with the highest semantic matching degree 920 is obtained from the scene video 900 and used as the scene picture 930.
[0130] Based on semantic matching degree, image frames that meet the semantic matching degree requirements are selected from the scene video as scene images. In other words, when the semantic matching degree is high, reference materials are used as targets for tone adjustment, and tone analysis is performed on the scene images of the virtual scene, thereby improving the accuracy and adaptability of tone adjustment for the virtual scene.
[0131] Second, play the scene video and determine the scene frame from multiple image frames of the scene video based on the user's selection operation.
[0132] To illustrate, after the scene video is acquired, it is played in the preview area of the uploaded material. The preview area or the surrounding area of the scene video also displays a timeline. The selection operation of the timestamp on the timeline is received, and the scene scene is determined from the scene video based on the selection operation.
[0133] 3. In response to the lookup table generation operation, display the acquisition control. The acquisition control is used to indicate the acquisition of scene images of the virtual scene and to receive the viewpoint adjustment operation of the virtual scene. The viewpoint adjustment operation includes at least one of the viewpoint position adjustment operation and the viewpoint direction adjustment operation. After adjusting the observation viewpoint of the virtual scene based on the viewpoint adjustment operation, in response to the received trigger operation of the acquisition control, acquire scene images of the virtual scene under the current viewpoint.
[0134] Indicatively, the system first receives a lookup table generation operation. Based on the lookup table generation operation, it displays a capture control in the scene preview window of the virtual scene. It then receives viewpoint movement and / or viewpoint rotation operations in the scene preview window. After adjusting to the target position / viewpoint direction, it receives a trigger operation on the capture control, thereby triggering the capture of the virtual scene image to obtain the scene image.
[0135] It is worth noting that the above-described method for determining the scene is merely an illustrative example, and the embodiments of this application do not limit it.
[0136] Optionally, when acquiring multiple frames of scene images, the acquisition scheme for multiple frames of scene images can refer to the acquisition scheme for single frames of scene images. For example, select the multiple image frames with the highest semantic matching degree as scene images, or receive the selection operation of multiple timestamps on the time axis and use the image frames corresponding to the multiple timestamps as scene images.
[0137] Step 820: Generate a lookup table based on the scene images and reference materials.
[0138] In some embodiments, the inference engine analyzes scene footage and parameter materials to generate a lookup table. The inference engine and Unreal Engine may be on the same computer device or different computer devices. In this embodiment, the example is that the Unreal Engine sends a scene video to the inference engine, which then captures scene footage from the video and generates a lookup table based on the scene footage and reference materials.
[0139] In other words, from the perspective of Unreal Engine, the scene video and reference materials are sent to the inference end. The inference end is used to generate a lookup table based on the scene video and reference materials, and then Unreal Engine receives the lookup table fed back by the inference end.
[0140] In some embodiments, the inference terminal selects scene frames from the scene video and generates a lookup table based on the scene frames and reference materials.
[0141] Optionally, the Unreal Engine client sends scene videos and reference materials to the inference client via a full-duplex communication channel established between the Unreal Engine and the inference client.
[0142] The reasoning process for generating the lookup table is executed by the inference end, while the Unreal Engine end is responsible for data collection and result presentation. The two sides work together to switch the color tone of the virtual scene, which improves work efficiency and the efficiency of generating lookup tables and switching color tones.
[0143] Optionally, the scene video is compressed before being sent to the inference end. The scene video recorded by the Unreal Engine for the virtual scene typically has high resolution and bitrate; direct transmission would significantly increase network latency and decoding costs for the inference end. Therefore, in this embodiment, the recording results are preprocessed using a converter on the Unreal Engine (or intermediate layer): the scene video is uniformly encoded into H.264 or H.265 format, and the bitrate is controlled within a reasonable upper limit required for inference; simultaneously, the resolution is scaled proportionally to the target size (e.g., 512×512) according to the input requirements of the inference network, and the frame rate and total duration are limited. In extremely low bandwidth scenarios, the video can also be directly extracted into image sequences before transmission, further reducing the amount of communication per transmission. The compressed video reduces the transmission time of the full-duplex communication channel and makes the computation of the inference end in the frame extraction and feature extraction stages more efficient, thus shortening the overall end-to-end generation latency.
[0144] Indicative Figure 10 This is a schematic diagram illustrating the transmission process of scene video and reference materials provided in an exemplary embodiment of this application, such as... Figure 10 As shown, the process includes at least the following stages: Editor Viewpoint 1010: This means observing the virtual scene according to the current viewpoint position and / or viewing direction, thereby displaying the scene image of the virtual scene in the scene preview window.
[0145] Read position / or orientation parameter 1020: Retrieves the viewpoint position and / or viewing direction of the current observation of the virtual scene. This corresponds to the viewpoint position and / or viewing direction of the virtual scene displayed in the scene preview window.
[0146] Generate a 1030-degree orbital trajectory: This means that based on the current viewpoint, the orbital operation of the viewpoint in the virtual scene is performed. For example, a 360° orbital trajectory in the horizontal direction is performed in place at the viewpoint position.
[0147] Trigger Engine Recording 1040: This means that while rotating around the viewpoint according to the orbital trajectory, the virtual scene is recorded simultaneously to generate a scene video.
[0148] Video Compression 1050: The recorded scene video is compressed using a converter, and the scene video is uniformly encoded into H.264 or H.265 format, and the bit rate is controlled within a reasonable upper limit required for inference.
[0149] Segmented Upload 1060: The compressed scene video is uploaded to the inference end through a full-duplex communication channel, and the inference end generates a lookup table based on the compressed scene video and reference materials.
[0150] In some embodiments, there is a correspondence between the generation of the lookup table and the scene region in the virtual scene, and a correspondence between the scene region and the scene image selected when generating the lookup table. Then, for a single reference material, multiple reference materials, a single scene image, or multiple scene images, at least one of the following situations exists.
[0151] I. A single reference material, and a single scene image.
[0152] For example, a user can upload a single reference image as reference material, or select a frame from a scene video after recording the scene video as the scene frame, thus creating a single reference material and a single scene frame.
[0153] For a single scene image, which is a scene image captured for the first scene area in the virtual scene, a correspondence between the scene image and the first scene area is established. After generating a lookup table based on the scene image and reference materials, a correspondence between the lookup table and the first scene area is established. Thus, the lookup table is applied to the observation and rendering process of the first scene area.
[0154] Schematic illustration: From the perspective of observing a virtual scene, when the first scene area is within the viewpoint's field of view, the color tone of the corresponding pixels in the first scene area is adjusted using a lookup table. Optionally, the first scene area corresponds to a region in the virtual scene, which can be expressed using the virtual scene's world coordinate system. Optionally, if the first scene area is implemented as an indoor area, then differentiated rendering is performed for indoor and outdoor areas. For example, if the lookup table is used to adjust the color tone of the indoor area of the first scene area, then when the viewpoint's field of view includes both the indoor and outdoor areas of the first scene area (e.g., the first scene area is a house, and the house is in an open state; the indoor area is represented by the interior scene of the house as seen through the open door, and the outdoor area is represented by the exterior facade of the house), then the color tone transformation is performed on the indoor area using a lookup table, while the color tone transformation for the outdoor area is performed without using this lookup table or using another lookup table.
[0155] II. A single reference material, and multiple scene images.
[0156] For example, a user might upload a single reference image as source material, and then select multiple scene frames from the recorded scene video that have the highest semantic similarity to the reference image but do not belong to the same scene area. This results in a single reference image and multiple scene frames. For instance, in an open virtual outdoor scene, if the captured scene video includes scene frames of forest area A and forest area B, both of which meet the semantic similarity requirements with the reference image, then the scene frames would include the scene frames corresponding to forest area A and forest area B, respectively.
[0157] A correspondence is established between multiple scene images and multiple second scene regions, where the i-th scene image corresponds to the i-th second scene region, and i is a positive integer. That is, the i-th scene image is a scene image captured from the i-th second scene region. After generating the i-th lookup table based on the i-th scene image and reference material, a correspondence is established between the i-th lookup table and the i-th second scene region. Thus, the i-th lookup table is applied to the observation and rendering process of the i-th second scene region.
[0158] Indicatively, from the perspective of observing a virtual scene, when the i-th second scene region is within the field of view, the hue of the corresponding pixel in the i-th second scene region is adjusted using the i-th lookup table.
[0159] 3. Multiple reference materials, and a single scene image.
[0160] For example, a user might upload multiple reference images as source material, or select a single frame from a recorded scene video as the scene frame. This results in a situation with multiple reference materials and a single scene frame. The multiple reference materials are used for comprehensive analysis to generate a lookup table corresponding to the scene frame.
[0161] For a single scene image, which is a scene image captured from the third scene area in the virtual scene, a correspondence between the scene image and the third scene area is established. After generating a lookup table based on the scene image and reference materials, a correspondence between the lookup table and the third scene area is established. Thus, the lookup table is applied to the observation and rendering process of the third scene area.
[0162] To illustrate, in the perspective of observing a virtual scene, when the third scene area is within the field of view, the color tone of the corresponding pixels in the third scene area is adjusted using a lookup table.
[0163] IV. Multiple reference materials, and multiple scene images.
[0164] For example, a user can upload multiple reference images as reference materials at once. Each reference image is used as a reference material for a scene. In other words, for each reference image, a scene is selected from the scene video to match it. Based on the pairing relationship between the reference image and the scene, a lookup table is generated for each scene.
[0165] For example, a user uploads reference image 1, captured from an indoor scene, and reference image 2, captured from an outdoor scene. For reference image 1, scene frame 'a' is selected from the scene video to match it; for reference image 2, scene frame 'b' is selected from the scene video to match it. That is, there are two matching relationships: reference image 1 - scene frame 'a' and reference image 2 - scene frame 'b'. Scene frame 'a' is captured from the fourth scene region, and scene frame 'b' is captured from the fifth scene region. Therefore, a correspondence is established between scene frame 'a' and the fourth scene region, and a correspondence is established between scene frame 'b' and the fifth scene region.
[0166] A lookup table is generated based on the matching relationship between reference image 1 and scene image a. This lookup table is used to adjust the color tone of the rendered image in the fourth scene area. Similarly, a lookup table is generated based on the matching relationship between reference image 2 and scene image b. This lookup table is used to adjust the color tone of the rendered image in the fifth scene area.
[0167] It is worth noting that the correspondence between the above-mentioned reference materials, scene images, and lookup tables is only an illustrative example, and the embodiments of this application do not limit it.
[0168] In some embodiments, multiple reference materials are used as an example, that is, the user uploads multiple reference materials to generate different tone switching effects for different viewport ranges.
[0169] Optionally, in response to the lookup table generation operation, lookup tables are generated separately for multiple viewport ranges. The tonal adjustment result of the virtual scene switching from a first hue to a target hue is displayed based on the lookup tables corresponding to the multiple viewport ranges. This includes switching the first viewport range from the first hue to the second hue, where the first viewport range is the viewport range corresponding to the reference material for the second hue. For example, if the reference material for the second hue is material captured from a forest scene, then the first viewport range is the viewport range in the virtual scene corresponding to the forest scene area.
[0170] In some embodiments, the multiple viewport ranges are pre-configured, or they are automatically identified in real time. For example, in response to a lookup table generation operation, multiple viewport ranges are obtained by dividing the current viewpoint based on a pre-configured scene region, and lookup tables are generated for each of the multiple viewport ranges. Alternatively, in response to a lookup table generation operation, the virtual scene within the observation range of the current viewpoint is identified, the virtual scene is divided into multiple viewport ranges, and lookup tables are generated for each of the multiple viewport ranges.
[0171] Indicatively, the first viewport range is determined based on the distribution of the forest scene area; that is, the forest scene area is observed within the first viewport range. Similarly, the second viewport range is determined based on the distribution of the ocean scene area; that is, the ocean scene area is observed within the second viewport range.
[0172] It is worth noting that the granularity of the viewport range can be coarser or finer, and this embodiment does not limit this.
[0173] Step 830: Adjust the pixels of the captured image of the virtual scene using a lookup table to display the virtual scene in a second color tone.
[0174] In some embodiments, after obtaining the lookup table, a format conversion is performed on the lookup table to obtain a two-dimensional texture mapping table, thereby adjusting the pixels of the image captured from the virtual scene through the two-dimensional texture mapping table to display the virtual scene in a second tone.
[0175] From the Unreal Engine perspective, it receives the progress feedback from the inference end and the final generated lookup table (.cube file); it parses the lookup table returned by the inference end, converts it into a LUT 2D texture format supported by the Unreal Engine, and writes it to the content browser to form a reusable engine asset; the post-processing binding module automatically locates the existing post-process volume component in the scene or creates a global post-processing volume component as needed, binds the LUT 2D texture format to its settings, and makes it effective immediately.
[0176] Indicative Figure 11 This is a schematic diagram illustrating the process of receiving and using a lookup table according to an exemplary embodiment of this application, as shown below. Figure 11 As shown, the process includes at least the following stages: Receive Lookup Table 1110: This means receiving the lookup table sent by the inference engine on the Unreal Engine side. The lookup table, generated by the inference engine based on reference materials and the scene, is used to switch the virtual scene from a first-tone representation to a second-tone representation. This lookup table is represented as a .cube file.
[0177] Resolution Size / Gamut 1120: This refers to the resolution lookup table's size and / or color gamut. The size and color gamut of a LUT are two core and interrelated technical parameters that jointly determine the LUT's color conversion capabilities, accuracy, and applicable scenarios. The LUT's size essentially refers to the number of sampling points it uses for color conversion, directly determining the precision and detail with which the LUT can map and adjust colors when processing images. The LUT's color gamut refers to the range of colors a color system or device can represent or reproduce. In the LUT context, color gamut involves two key aspects: input color gamut and output color gamut. The input color gamut refers to the color space range of the original image or video that the LUT is designed to receive, while the output color gamut refers to the color space standard that the final output image conforms to after LUT conversion.
[0178] Expand into a 2D texture layout 1130: Expand the lookup table into a 2D texture layout based on the size and / or color gamut of the lookup table. The 3D lookup table is implemented as a 3D array, and the 3D array is mapped to 2D texture coordinates, thereby expanding the lookup table into a 2D texture layout.
[0179] Create 2D texture assets 1140: that is, generate 2D texture resources based on 2D texture layout.
[0180] Locate / create post-processing volume components 1150: Among them, the post-processing volume component is a core component in Unreal Engine used to control the post-processing effects of the scene. It can adjust visual effects such as color, depth of field, exposure, and glow, and is divided into modes such as global effect and local area effect. Locate or create post-processing volume components corresponding to the global / local area.
[0181] Binding 2D Texture Assets 1160: Binds 2D texture resources to post-processing volume components for use in the rendering process of virtual scenes.
[0182] Viewport Live Update 1170: After binding 2D texture resources to post-processing volume components, when displaying the virtual scene in the scene preview window, the virtual scene is switched from the first color tone to the second color tone according to the mapping result of the lookup table.
[0183] It is worth noting that when the lookup table is applied to the entire virtual scene, the scene is displayed in the second color tone for the entire virtual scene; when the lookup table is applied to a local area of the virtual scene, the first color tone is switched to the second color tone for the local area according to the lookup table, while for other areas, other lookup tables are used for color tone switching, or no lookup table is used for color tone switching.
[0184] In summary, the method provided in this application embeds LUT generation within Unreal Engine. This means that when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be introduced through the acquisition of reference materials. A lookup table generation operation is then performed within Unreal Engine to instruct the generation of a lookup table, which provides the mapping relationship from the first color tone to the second color tone. After generating the lookup table, there is no need to switch between Unreal Engine and external environments. Within Unreal Engine, the color adjustment result of switching from the first color tone to the second color tone in the virtual scene can be directly displayed based on the lookup table. In other words, Unreal Engine provides a complete and smooth process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency for performing color adjustments on virtual scenes and increasing the efficiency of color adjustment.
[0185] The method provided in this embodiment generates a lookup table by using the tonal differences between the acquired scene images and reference materials. The lookup table then expresses the mapping relationship between the first tone and the second tone. In other words, the lookup table is generated according to the characteristics of the first tone expressed by the scene images and the characteristics of the second tone expressed by the reference materials, thereby realizing the mapping between the first tone and the second tone and improving the accuracy and efficiency of mapping virtual scenes to the second tone.
[0186] In some embodiments, the generation of the lookup table involves techniques related to both statistical properties and diffusion models. Figure 12 This is a flowchart of a hue adjustment method provided in another exemplary embodiment of this application, which can be used with... Figure 3 The illustrated embodiments and / or Figure 8 The illustrated embodiments can be combined to form a complete solution, or each can be implemented as a separate complete solution. The method is executed by a computer device, which is the device configured for the inference engine. The device configured for the inference engine may be the same as or different from the device on which the Unreal Engine is located. Figure 12 As shown, generating a lookup table includes at least one of the following steps.
[0187] Step 1220: Generate a first lookup table based on the pixel distribution statistics between the scene image and the reference material.
[0188] The first lookup table is used to globally align the color distribution between the scene and the reference material in the color space.
[0189] In some embodiments, reference materials and scene images are acquired, encoding is performed on the reference materials and scene images to obtain encoded feature representations of the reference materials and scene images, and prediction is performed on the encoded feature representations based on a pre-trained extractor to acquire pixel statistical features of the reference materials and scene images, and a first lookup table is obtained based on the pixel statistical features.
[0190] Optionally, firstly, a quantitative analysis of the pixel value distribution of the reference material and scene image is performed (e.g., calculating the minimum, maximum, mean, and variance, or constructing a complete grayscale histogram); then, based on a deterministic goal (e.g., stretching the dynamic range to 0-255, or matching the current histogram to an ideal reference distribution), a mathematical mapping function is established; finally, this function is applied to all possible input pixel values (usually 0-255), the corresponding output values are calculated, and this series of input-output pairs is stored as a first lookup table.
[0191] To illustrate, the process of generating the first lookup table includes the following steps: 1. Image Statistical Feature Extraction: First, calculate the global statistical features of the reference material and scene images. The two most critical parameters are the minimum and maximum pixel values that actually appear in the reference material and scene images. For example, by traversing the reference material and scene images or analyzing their histograms, if the pixel values are found to be concentrated between 100 and 150, then the minimum pixel value = 100 and the maximum pixel value = 150.
[0192] 2. Mapping Function Design: Based on the extracted statistical features, a deterministic mapping function is designed. The most commonly used is the linear stretching function. Its goal is to linearly map the pixel values within the original range to the target range.
[0193] 3. LUT Filling and Generation: Create a one-dimensional array of preset length as the first lookup table. Then, iterate through all possible input indices, calculate the corresponding output value according to the mapping function described above, and fill it into the first lookup table.
[0194] 4. Application and Output of LUT: The generated first lookup table is an independent, storable data structure. In this embodiment, using... Refers to the first lookup table.
[0195] Step 1240: Generate a second lookup table using the pre-trained diffusion model.
[0196] The second lookup table is used to express the differences between the scene and the reference material from the perspective of style features.
[0197] Optionally, noise data and a base lookup table are obtained, where the base lookup table is a preset lookup table; the noise data, the base lookup table, the scene image, and the reference material are input into the diffusion model, and differential data is generated with the scene image and the reference material as constraints. The differential data is used to express the deviation based on the base lookup table; the differential data is superimposed on the base lookup table to obtain a second lookup table.
[0198] The process of generating differential data for a second lookup table using a diffusion model is an innovative technical approach that combines the generative capabilities of diffusion models with the efficient color mapping characteristics of LUTs. It utilizes diffusion models to learn complex color distributions and output style differences as an advanced method for reusable LUTs.
[0199] In some embodiments, the color and style evolution path from noise to reference material learned by the diffusion model during the denoising process is encoded into a static, fast-querying second lookup table.
[0200] In this embodiment, when generating the second lookup table based on the diffusion model, it mainly targets high-level style features such as "atmosphere, color intention, and emotional tendency" that are difficult to characterize through simple statistics. The diffusion model is used to explicitly generate LUT difference data and superimpose it onto the basic LUT to obtain the second lookup table.
[0201] When inputting data into the diffusion model, noise data and scene images can be input together. For example, noise data can be superimposed on the scene image to obtain a noise image. The noise image, reference material, and basic lookup table are then input into the diffusion model. The noise image is denoised using the reference material as a constraint to obtain differential data.
[0202] In this embodiment, Refers to the second lookup table.
[0203] It is worth noting that steps 1220 and 1240 can be implemented as serial steps or as parallel steps. For example, step 1220 can be executed first and then step 1240, or step 1240 can be executed first and then step 1220, or steps 1220 and 1240 can be executed in parallel.
[0204] The noise data is denoised by using a diffusion model to obtain differential data. The differential data is used to express the deviation on the baseline of the base lookup table, thus obtaining a second lookup table. This table expresses the tonal difference between the scene and the reference material from the perspective of style features, improving the accuracy and efficiency of lookup table generation.
[0205] Step 1260: Integrate the first lookup table and the second lookup table to obtain the lookup table.
[0206] After generating the first lookup table and the second lookup table, a match operation is performed on the first lookup table and the second lookup table to obtain a lookup table, which is used to perform the switching mapping from the first hue to the second hue.
[0207] Illustrative lookup table .in, This represents the sampling composite operation of the first lookup table and the second lookup table, that is, using The output is used as an index and then... The mapping process overlays low-level corrections and high-level stylizations into a smooth, continuous final lookup table that can be directly used in industrial post-production software and Unreal Engine.
[0208] This can be understood as follows: after generating the first lookup table and the second lookup table, the use of the first lookup table and the second lookup table is sequential; or during the generation of the lookup table, the mapping relationship between the first lookup table and the second lookup table is sequentially combined to obtain the lookup table.
[0209] Indicative Figure 13 This is a schematic diagram of a lookup table generation process provided in an exemplary embodiment of this application, such as... Figure 13 As shown, after receiving the scene video 900, the image frame with the highest semantic similarity to the reference material 720 is selected from the scene video 900 as the scene picture 930.
[0210] After acquiring the reference material 720 and the scene image 930, on the one hand, the reference material 720 and the scene image 930 are input into the encoder 1340 to obtain the encoded feature representation of the reference material and the scene image, and on the other hand, the pre-trained extractor 1350 is used to perform prediction on the encoded feature representation to obtain the pixel statistical features of the reference material and the scene image, and the first lookup table is obtained based on the pixel statistical features.
[0211] On the other hand, noise data 1360, basic lookup table 1370, reference material 720 and scene image 930 are input into the pre-trained diffusion model 1380. The diffusion model 1380 is used to denoise the noise data 1360 to obtain differential data. The differential data is then combined with the basic lookup table 1370 to obtain the second lookup table.
[0212] A lookup table 730 is obtained by combining the first lookup table and the second lookup table. The lookup table 730 can be expressed as a .cube file or converted into a two-dimensional texture layout and bound to the post-processing volume component of Unreal Engine.
[0213] In summary, the method provided in this application generates lookup tables from both statistical characteristics and diffusion models. This method can express the tone mapping relationship from scene images to reference materials from the perspective of pixel statistical characteristics, as well as from higher-dimensional perspectives such as style, atmosphere, tone intention, and emotional tendency. It takes into account the tone mapping relationship between scene images and reference materials at different levels, from apparent color to semantic style, and from low-dimensional to high-dimensional, thus improving the mapping accuracy from the first tone to the second tone.
[0214] In an optional embodiment, on the Unreal Engine side, after obtaining the lookup table, the results of the color tone changes in the virtual scene can be viewed in real time and dynamically. Figure 14 This is a flowchart of a hue adjustment method provided in another exemplary embodiment of this application, which can be used with... Figure 3 The illustrated embodiments and / or Figure 8 The illustrated embodiments and / or Figure 12 The illustrated embodiments can be combined to form a complete solution, or each can be implemented as a complete solution on its own. The method is executed by a computer device, which is a device configured on the Unreal Engine side, such as... Figure 14 As shown, displaying a virtual scene includes at least one of the following steps.
[0215] Step 1420: Display the scene of the virtual scene in the scene preview window.
[0216] The scene preview window is a window provided by Unreal Engine for previewing virtual scenes. When no lookup table generation operation is received, the scene image displayed in the scene preview window is in the first color tone.
[0217] Optionally, the scene preview window is a window displayed when a preview operation is received on the Unreal Engine side, or the scene preview window is a window that is permanently displayed on the Unreal Engine side.
[0218] Indicative Figure 15 This is a schematic diagram of an exemplary embodiment of the present application providing a scene preview window interface, such as... Figure 15 As shown, a scene preview window 1510 is displayed in the Unreal Engine program interface. The scene preview window 1510 displays the scene screen of the virtual scene. In the absence of a lookup table generation operation, the scene screen in the scene preview window 1510 is presented with an industrial color tone.
[0219] In some embodiments, for the virtual scene displayed in the scene preview window, the viewing position / direction of the virtual scene can be adjusted through adjustment operations. For the virtual scene in the scene preview window, one or more of the following editing / control methods are available: First, receive the view adjustment operation.
[0220] Among them, when displaying the scene of a virtual scene, the virtual scene is displayed from a first-person perspective, or a preset virtual character is used as a controlled character and the virtual scene is displayed from a third-person perspective.
[0221] The viewpoint adjustment operation includes viewpoint position adjustment operation and / or viewpoint direction adjustment operation. The viewpoint position adjustment operation is used to determine the position of the virtual camera that captures images of the virtual scene within the virtual scene. When the virtual scene is displayed in a first-person perspective, the scene lake surface captured by the camera model is presented in a first-person perspective. In this case, the viewpoint position adjustment operation is used to control the movement of the camera model within the virtual scene. The viewpoint direction adjustment operation is used to control the rotation of the camera model's acquisition direction within the virtual scene, simulating actions such as turning and directional movements of the virtual character within the virtual scene.
[0222] Second, it allows users to perform visual editing operations on scene elements within a virtual scene.
[0223] For example, it can receive drag operations on scene elements in a virtual scene to adjust the position of the scene elements in the virtual scene; it can receive scaling control operations on scene elements in a virtual scene (such as two-finger touch operation) to adjust the display size of the scene elements in the virtual scene; it can receive rotation control operations on scene elements in a virtual scene (such as gravity press followed by sliding operation) to adjust the orientation of the scene elements in the virtual scene.
[0224] Third, it allows users to receive special effects editing operations on virtual scenes.
[0225] For example, it can receive operations to add raindrop particles to a virtual scene, thereby simulating entering a rainy day in the virtual scene; it can also receive operations to add conditional effects to scene elements in the virtual scene, and display the effects on the scene elements when the scene elements meet the conditions for the effects to be displayed.
[0226] It is worth noting that the above-described methods for editing / controlling virtual scenes are merely illustrative examples, and the embodiments of this application do not limit them.
[0227] Step 1440: In response to the lookup table generation operation, the virtual scene is displayed in the scene preview window with a second hue as the result of the hue adjustment.
[0228] In some embodiments, when displaying a virtual scene in a second hue in a scene preview window, at least one of the following schemes is included: 1. In response to the lookup table generation operation, the scene area where the lookup table is applied is uniformly rendered and displayed in the scene preview window using a second-tone color scheme.
[0229] In other words, the pixel values of all rendered pixels in the scene area of the virtual scene are mapped through the lookup table, and the virtual scene with the second tone is displayed according to the mapping result.
[0230] 2. In response to the lookup table generation operation, a virtual scene is displayed in the scene preview window in a comparison display mode, wherein a first part of the virtual scene is displayed in a first color tone, and a second part of the virtual scene is displayed in a second color tone.
[0231] To illustrate, a diagonal line is drawn for the scene preview window. The first part of the virtual scene on the first side of the diagonal is displayed in the first hue, and the second part of the virtual scene on the second side of the diagonal is displayed in the second hue.
[0232] In other words, the virtual scene is divided into two parts by a diagonal line, and the two parts are displayed in different ways, thus creating a contrast between the first and second color tones. This means that users can maintain their observation of the first color tone through the virtual scene on the first side of the diagonal, and can also update their observation of the second color tone through the virtual scene on the second side of the diagonal.
[0233] It is worth noting that the above-described method of dividing the diagonal is only an illustrative example. The diagonal can also be implemented as a central axis, a quarter line, etc. This embodiment does not limit this.
[0234] By displaying virtual scenes in a comparative manner, it is possible to retain a preview of the virtual scene with the first color tone and also to add a preview of the virtual scene with the second color tone. This improves the efficiency of comparing between the first and second color tones, avoids the tedious operation process of users repeatedly switching color tones to achieve comparison, and improves the efficiency of human-computer interaction.
[0235] 3. In response to the lookup table generation operation, the virtual scene is displayed in the first color tone. When an interactive operation is received on the scene screen of the virtual scene, the virtual scene is displayed in the second color tone based on the interaction position of the interactive operation.
[0236] Indicatively, after receiving the lookup table generation operation, the virtual scene is initially displayed in the first color tone in the scene preview window. When the pointer hovers over the first position in the scene preview window, the virtual scene is displayed in the second color tone in the display area corresponding to the first position. The display area corresponding to the first position includes a circular display area divided with a preset radius centered on the first position.
[0237] Optionally, for Schemes 2 and 3 above, since the virtual scene with the second color tone is only in the preview state, that is, the virtual scene has not yet been confirmed to switch to the second color tone using a lookup table, in response to receiving the switch confirmation operation, the virtual scene is displayed in the scene preview window with the second color tone. That is, the display of the virtual scene with the first color tone is canceled and the virtual scene is switched to be displayed with the second color tone.
[0238] It is worth noting that the above-described scheme of displaying virtual scenes with a second hue is merely an illustrative example, and the embodiments of this application do not limit it.
[0239] In some embodiments, after displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone, fine-tuning can also be performed on the virtual scene with the second color tone.
[0240] Receive hue adjustment operations on the lookup table. The adjustment operations are used to adjust the hue intensity of the second hue based on the lookup table. Based on the hue adjustment operations, the hue adjustment results of the virtual scene are adjusted synchronously.
[0241] In some embodiments, based on the hue adjustment operation, the intensity coefficient corresponding to the hue intensity of the second hue is determined. The mapping result from the first hue to the second hue in the lookup table is then combined with the intensity coefficient to obtain the hue adjustment result of the virtual scene.
[0242] To illustrate, the intensity coefficient corresponding to the hue intensity is between 0.8 and 1.2. After determining the intensity coefficient based on the hue adjustment operation, the intensity coefficient is applied to the pixel value after the pixel is mapped from the first hue to the second hue to obtain the pixel value, thereby obtaining the hue adjustment result of the virtual scene.
[0243] In summary, the method provided in this application embodiment can view the color tone change results of the virtual scene in real time and dynamically after obtaining the lookup table. It can not only directly view the color tone adjustment results, but also display the color tone adjustment results in a comparative display mode, or selectively display the color tone adjustment results in a dynamic selection mode, thereby improving the human-computer interaction efficiency of displaying color tone adjustment results. Users can intuitively understand the comparison before and after the color tone switch.
[0244] Figure 16 This is a schematic diagram of the overall architecture of a hue adjustment method provided in an exemplary embodiment of this application, as shown below. Figure 16 As shown, the overall architecture includes the following parts.
[0245] 1. Unreal Engine 110: Used to acquire reference materials, capture scene videos, and switch the color tone of virtual scenes according to a lookup table.
[0246] 2. Full-duplex communication channel 1620; used for data interaction between Unreal Engine 110 and inference 120.
[0247] 3. Inference terminal 120: Users generate lookup tables based on scene images and reference materials.
[0248] like Figure 16As shown, on the Unreal Engine 110, reference material 720 and scene video 900 are first acquired; the reference material 720 and scene video 900 are sent to the inference end 120 through the full-duplex communication channel 1620; after receiving the reference material 720 and scene video 900, the inference end 120 predicts the first lookup table 1631 according to the pixel distribution statistical characteristics, and analyzes the difference between the scene and the reference material from the style feature dimension through the diffusion model to obtain the second lookup table 1632; combining the first lookup table 1631 and the second lookup table 1632, the lookup table 730 is obtained.
[0249] The inference terminal 120 sends the lookup table 730 back to the Unreal Engine terminal 110 via the full-duplex communication channel 1620.
[0250] After receiving the lookup table, the Unreal Engine 110 switches the virtual scene from the first color tone to the second color tone, and obtains the color adjustment result 1613 of the virtual scene.
[0251] Figure 17 This is a schematic diagram illustrating the overall architecture details of a hue adjustment method provided in an exemplary embodiment of this application, as shown below. Figure 17 As shown, the overall architecture involves the Unreal Engine 110, the full-duplex communication channel 1620, and the inference terminal 120. These three components work together to complete the entire chain from scene material acquisition to the final application of the LUT. The Unreal Engine 110 runs in the engine's editor process, uniformly handling all engine-side operations such as material acquisition, video compression, data uploading, result reception, texture asset generation, and post-processing binding. The inference terminal 120 can be deployed either locally on the same workstation or on a remote GPU computing node, responsible for inference operations such as video decoding and frame sampling, color migration preprocessing, LUT generation based on the diffusion model, LUT overlay and composite, and .cube file export. The two terminals establish a full-duplex persistent connection via the WebSocket protocol, enabling low-latency bidirectional data transmission and real-time progress synchronization. This three-layer separation architecture allows for flexible configuration of inference computing power. In single-machine production scenarios, it can be used directly locally, while in multi-person collaboration or large-scale shot production scenarios, the inference terminal can be horizontally expanded to a remote cluster, while the interface and operation of the plugin remain unchanged, making it completely transparent to artists and technical artists.
[0252] The overall architecture details include the following process.
[0253] Full-duplex communication channel 1620: Step 1721, Handshake & Capability Negotiation.
[0254] That is, a handshake and capability negotiation are performed between the Unreal Engine 110 and the Inference 120 to establish a communication channel. The handshake is used to determine the connection line between the Unreal Engine 110 and the Inference 120, and the capability negotiation is used to synchronize the data processing capabilities of the Unreal Engine 110 to the Inference 120, and to synchronize the data processing capabilities of the Inference 120 to the Unreal Engine 110.
[0255] Step 1722, Task creation.
[0256] That is, a communication task is established between the Unreal Engine 110 and the Inference 120, wherein a long connection is established between the Unreal Engine 110 and the Inference 120 to ensure that data interaction can be continuously performed between the Unreal Engine 110 and the Inference 120.
[0257] Unreal Engine version 110: Step 1711, Camera Control & Surround Recording.
[0258] That is, on the Unreal Engine 110, based on the current viewpoint, the virtual camera is controlled to rotate around the viewpoint, and the scene is recorded during the rotation to obtain the scene video.
[0259] Step 1712, format compression.
[0260] Optionally, the recorded scene video can be compressed using a converter to uniformly encode the scene video into H.264 or H.265 format, and the bitrate can be controlled within a reasonable upper limit required for inference.
[0261] Step 1713: Send the scene video and reference materials through the communication client.
[0262] The communication client is used to provide a full-duplex communication channel 1620 between itself and the inference terminal 120.
[0263] Full-duplex communication channel 1620: Step 1723: Upload video segments.
[0264] The compressed scene video is uploaded to the inference terminal 120 in the form of segments. For example, every 20 frames are sent to the inference terminal 120 as a segment.
[0265] Step 1724: Inference progress feedback.
[0266] The inference terminal 120 feeds back the progress of generating the lookup table to the Unreal Engine terminal 110 in real time through the full-duplex communication channel 1620.
[0267] Inference Terminal 120: Step 1731, Video Decoding & Frame Extraction.
[0268] The inference terminal 120 decodes the received scene video and extracts frames from the scene video based on the semantics of the reference material to obtain scene images. The semantic similarity between the scene images and the reference material meets the similarity requirements.
[0269] Step 1732, color migration preprocessing.
[0270] In other words, for color migration events between scene images and reference materials, the scene images and reference materials are first preprocessed, such as size alignment, color space conversion, normalization, etc.
[0271] Step 1733, Feature Extraction.
[0272] The scene images and reference materials are encoded and their features are extracted to obtain the pixel distribution statistical characteristics of the scene images and reference materials, and then a first lookup table is generated based on the pixel distribution statistical characteristics.
[0273] Step 1734, diffusion denoising.
[0274] Using the reference material as a constraint, the noise data is denoised using a diffusion model to obtain a second lookup table. The second lookup table is used to express the differences between the scene and the reference material from the perspective of style features.
[0275] Step 1735: Generate the lookup table.
[0276] Combine the first lookup table and the second lookup table to obtain a lookup table for setting the second hue to the first hue.
[0277] Full-duplex communication channel 1620: Step 1725: Lookup table returned.
[0278] After generating the lookup table, the inference terminal 120 sends the lookup table back to the Unreal Engine terminal 110 via the full-duplex communication channel 1620.
[0279] Unreal Engine version 110: Step 1714: Look up the generated table texture assets.
[0280] The three-dimensional lookup table is converted into a two-dimensional texture asset, which is then stored so that the pixels of the first tone can be mapped onto the texture asset to obtain the pixel values of the second tone.
[0281] Step 1715: Bind the post-processing volume component.
[0282] In summary, the method provided in this application embeds LUT generation within Unreal Engine. This means that when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be introduced through the acquisition of reference materials. A lookup table generation operation is then performed within Unreal Engine to instruct the generation of a lookup table, which provides the mapping relationship from the first color tone to the second color tone. After generating the lookup table, there is no need to switch between Unreal Engine and external environments. Within Unreal Engine, the color adjustment result of switching from the first color tone to the second color tone in the virtual scene can be directly displayed based on the lookup table. In other words, Unreal Engine provides a complete and smooth process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency for performing color adjustments on virtual scenes and increasing the efficiency of color adjustment.
[0283] This solution provides an in-engine automatic LUT generation solution that combines an Unreal Engine plugin, a communication channel, and an inference terminal. It completes material acquisition and result application within the Unreal Engine, achieving a closed-loop color grading process. LUTs are explicitly generated using a diffusion model, balancing reference intent alignment and structural fidelity. Surround recording provides more scene-covering input, improving LUT adaptability to the current shot / scene. Format compression and communication channel transmission enable flexible deployment in local / remote inference environments. The output is an industry-compatible .cube file that is automatically converted to a 2D texture, resulting in asset-based and reusable color grading results.
[0284] This application embodiment integrates into the project as an Unreal Engine plugin, providing a complete operation entry and function panel within the editor. Users can complete the entire process without switching to any external tools. Internally, the plugin is divided into several collaborative functional modules: the viewpoint and camera control module reads the current editor viewpoint coordinates and orientation, and generates a surround shooting trajectory around that viewpoint; the video recording and export module utilizes the engine's built-in recording or sequence rendering capabilities to output the surround process as a temporary video file; the format compression module then compresses the video, performing resolution scaling, bitrate control, and frame rate adjustment to reduce subsequent transmission costs; the communication client module establishes a persistent connection with the local or remote inference service, uploads video and reference materials in segments, and receives progress feedback and the final .cube result from the inference end in real time; the asset generation module parses the returned .cube, converts it to a texture format supported by Unreal Engine, and writes it to the content browser to form reusable engine assets; the post-processing binding module automatically locates existing post-processing volume components in the scene or creates a global post-processing volume component as needed, binds the 2D texture to its settings, and applies it immediately.
[0285] After completing the scene setup, lighting, and camera configuration in Unreal Engine's scene editor, users can directly select or specify a reference image asset in the plugin panel and then click the "Generate LUT and Apply" button to start the fully automated workflow. The plugin first reads the position and orientation parameters of the current editor viewpoint, generates a surround trajectory centered on this, and triggers engine recording to fully capture color and lighting information from all directions around the scene. After recording, the plugin uses a compression tool to compress the video, limiting the resolution, controlling the bitrate, and standardizing the encoding format to obtain a file of suitable size for network transmission before uploading.
[0286] Subsequently, the plugin establishes a connection with the inference engine via a full-duplex communication channel, sending the compressed video and reference materials to the local or remote inference engine. Upon receiving the data, the inference engine sequentially performs video decoding and frame extraction, color migration preprocessing, diffusion model LUT generation and composite, and finally sends the generated .cube file back to the plugin via the full-duplex communication channel. After receiving the .cube file, the plugin automatically completes asset conversion and post-processing binding. Users can instantly see the style and tone changes of the global scene in the viewport without any additional operation. If the effect is unsatisfactory, users can directly replace the reference image and trigger it again, completing the iterative loop within the engine.
[0287] Compared to sampling only a single frame, recording a complete circle around the current viewpoint can cover the material response, lighting distribution, and color composition in all directions of the scene. This allows the inference end to generate a LUT based on more comprehensive scene information, thereby reducing the risk of local color distortion caused by incomplete input and improving the overall stability and visual consistency of the LUT in the global picture.
[0288] The embodiments of this application use WebSocket instead of ordinary HTTP requests as the transmission protocol. The core reason is that the video data volume is large and the inference time is uncertain. It is necessary to support segmented upload, progress streaming back and asynchronous result notification on a single connection. WebSocket's full-duplex feature just meets the above requirements. The communication process unfolds in stages: After the connection is established, a handshake and capability negotiation are completed first, with both parties exchanging metadata such as version number, supported video encoding formats, maximum fragment size, and timeout policy. Then, the Unreal Engine sends a task creation message, carrying parameters such as the unique ID of this task, reference graph identifier, target LUT output specifications (e.g., 16³ or 32³), and output format. Next, the video fragment uploading stage begins, with each fragment accompanied by a sequence number, total fragment count, and verification information. The inference end concatenates these fragments in sequence and starts inference after receiving the data. During inference, the inference end continuously sends back the current stage progress (frame extraction, preprocessing, diffusion iteration steps, export) to the Unreal Engine so that the real-time status is displayed on the dashboard. After inference is complete, the inference end sends back the .cube file byte stream along with metadata such as LUT size and color gamut range. The Unreal Engine receives this data and enters the assetization process. The task ID mechanism also supports concurrent multi-task scheduling and reconnection recovery after disconnection, ensuring high availability even in production environments with fluctuating network conditions.
[0289] To ensure the system remains stable and usable under complex conditions such as network fluctuations, long-term inference, and diverse assets in real-world film and television production environments, this solution also incorporates a robust exception handling mechanism. At the communication layer, if a WebSocket connection is interrupted, the Unreal Engine will automatically attempt to reconnect and query the inference server for the status of existing tasks using the task identifier. If the task is still executing, it will continue to wait for the result without re-uploading data. If fragment verification fails, only the corresponding fragment will be retransmitted without affecting the overall process. If inference times out, the Unreal Engine will display a timeout message and return an error code and log summary, allowing the user to determine whether to reduce the video resolution and retry. At the asset layer, if a LUT size discrepancy is detected during .cube parsing, the plugin will automatically perform trilinear resampling alignment. If the color gamut range declaration is abnormal, automatic cropping and normalization will be performed to ensure that the data written to the texture is always within the valid value range. Furthermore, the plugin provides an adaptation layer for different Unreal Engine versions to accommodate subtle differences in texture encoding layout or interfaces between different engine versions, reducing version migration costs.
[0290] This approach, by deeply integrating diffusion model LUT generation with Unreal Engine plugins, yields significant benefits in at least the following aspects: First, this solution significantly improves the iterative efficiency of virtual production and color grading of film and television footage. In the traditional workflow, colorists must complete all adjustments in external professional software before importing the LUT into Unreal Engine to view the actual effect. Once the scene lighting, materials, or exposure strategy changes, this back-and-forth process must be repeated. This solution, through a complete closed loop of recording, transmission, inference, and automatic attachment within the engine, compresses the above multi-tool jumps into a single trigger operation, significantly shortening the cycle from "reference intent" to "real-time rendering in the engine."
[0291] Secondly, this solution effectively reduces the heavy reliance on manual color grading skills and external tool licenses. Users only need to provide a reference image and trigger generation to automatically obtain industry-compatible lookup tables and texture assets usable by Unreal Engine. There is no need to master the color grading node operations of professional post-production software, which lowers the technical threshold for quickly establishing color styles in the early stages of virtual production.
[0292] Furthermore, this approach outperforms frame-by-frame generation schemes in terms of preserving structural details and maintaining scene color consistency. Since the final output is a LUT operator rather than a pixel-level modification, its application across the entire scene is essentially a lookup operation. This avoids introducing geometric loss and naturally ensures that image frames within the same scene undergo identical color transformations, eliminating the flickering and detail degradation problems common in generative frame-by-frame schemes.
[0293] Furthermore, this solution boasts strong engineering deployability. The lightweight and universal nature of the protocol allows for seamless switching between local single-machine and remote GPU clusters for the inference end. The compression tool strategy flexibly adapts to different network environments, making the entire solution suitable for various production scales, from single-person production to multi-person collaboration. The output lookup table is fully compatible with mainstream post-production software ecosystems, allowing simultaneous entry into engine production and offline final color grading without altering the traditional review workflow.
[0294] Figure 18 This is a structural block diagram of a hue adjustment device provided in an exemplary embodiment of this application, such as... Figure 18 As shown, the device includes: The receiving module 1810 is used to receive a reference material acquisition operation during the editing process of a virtual scene in Unreal Engine, wherein the virtual scene corresponds to a first color tone and the reference material is used to provide a second color tone; The receiving module 1810 is further configured to receive a lookup table generation operation, wherein the lookup table generation operation is configured to instruct the generation of a lookup table based on the virtual scene and the reference material, wherein the lookup table is configured to provide a mapping relationship between pixels from the first hue to the second hue; Display module 1820 is configured to display the color adjustment result of the virtual scene switching from the first color tone to the second color tone in response to the lookup table generation operation.
[0295] In an optional embodiment, the display module 1820 is further configured to display a scene parameter configuration area during the editing process of the virtual scene in the Unreal Engine. The scene parameter configuration area is used to configure the scene parameters of the virtual scene and includes a lookup table configuration item. The receiving module 1810 is further configured to receive the acquisition operation of the reference material based on the lookup table configuration item.
[0296] In an optional embodiment, the receiving module 1810 is further configured to perform one or more of the following operations: The upload operation for the reference image is received based on the lookup table configuration item, and the reference image corresponds to the second color tone; The lookup table configuration item receives input for a hue hint word, which describes the second hue. The lookup table configuration item receives a selection operation for hue keywords, which are pre-provided keywords used to describe hues.
[0297] In an optional embodiment, the receiving module 1810 is further configured to perform one or more of the following operations: Based on the lookup table configuration item, the system receives a selection operation for the reference image from a local image library or an online image library; Based on the lookup table configuration item, the system receives an upload operation for a reference video; it also receives a selection operation for a reference image in the reference video, wherein the reference image is an image frame in the reference video.
[0298] In an optional embodiment, such as Figure 19 As shown, the device further includes: The acquisition module 1830 is used to acquire scene images of the virtual scene in response to the lookup table generation operation; Generation module 1840 is used to generate the lookup table based on the scene image and the reference material; The display module 1820 is further configured to adjust the pixel points of the image captured from the virtual scene through the lookup table, and display the virtual scene in the second color tone.
[0299] In an optional embodiment, the generation module 1840 is further configured to generate a first lookup table based on the pixel distribution statistical characteristics between the scene image and the reference material, wherein the first lookup table is used to globally align the color distribution between the scene image and the reference material in the color space; The generation module 1840 is further configured to generate a second lookup table using a pre-trained diffusion model. The second lookup table is used to express the difference between the scene and the reference material from the perspective of style features. The generation module 1840 is further configured to integrate the first lookup table and the second lookup table to obtain the lookup table.
[0300] In an optional embodiment, the generation module 1840 is further configured to acquire noise data and a basic lookup table, wherein the basic lookup table is a preset lookup table; input the noise data, the basic lookup table, the scene image, and the reference material into the diffusion model, generate differential data with the scene image and the reference material as constraints, wherein the differential data is used to express the deviation based on the basic lookup table; and superimpose the differential data onto the basic lookup table to obtain the second lookup table.
[0301] In an optional embodiment, the acquisition module 1830 is further configured to, in response to the lookup table generation operation, acquire scene video of the virtual scene around the current viewpoint in the virtual scene as the anchor point; and extract scene frames from the scene video, wherein the scene frames are image frames in the scene video.
[0302] In an optional embodiment, the acquisition module 1830 is further configured to perform semantic matching between the reference material and the image frames in the scene video to obtain a semantic matching result, wherein the semantic matching result includes the semantic matching degree between the image frames in the scene video and the reference material respectively; and to obtain the image frames in the scene video whose semantic matching degree with the reference material meets the matching degree requirement as the scene image.
[0303] In an optional embodiment, the apparatus further includes: The transmission module 1850 is used to send the scene video and the reference material to the inference terminal, the inference terminal is used to generate the lookup table based on the scene video and the reference material, and to receive the lookup table fed back by the inference terminal.
[0304] In an optional embodiment, the transmission module 1850 is further configured to send the scene video and the reference material to the inference terminal based on the full-duplex communication channel established between the Unreal Engine and the inference terminal.
[0305] In an optional embodiment, the display module 1820 is further configured to display the scene image of the virtual scene in the scene preview window; The display module 1820 is further configured to, in response to the lookup table generation operation, display the virtual scene in the scene preview window with the second color tone as the result of the color tone adjustment.
[0306] In an optional embodiment, the display module 1820 is further configured to display the virtual scene in a scene preview window in a contrastive display manner in response to the lookup table generation operation, wherein a first portion of the virtual scene is displayed in the first color tone, and a second portion of the virtual scene is displayed in the second color tone.
[0307] In an optional embodiment, the receiving module 1810 is further configured to receive a hue adjustment operation on the lookup table, the hue adjustment operation being used to adjust the hue intensity of the second hue based on the lookup table; The display module 1820 is also used to synchronously adjust the color adjustment result of the virtual scene based on the color adjustment operation.
[0308] In an optional embodiment, the display module 1820 is further configured to generate lookup tables for multiple viewport ranges respectively in response to the lookup table generation operation; and display the hue adjustment result of the virtual scene switching from the first hue to the target hue based on the lookup tables corresponding to the multiple viewport ranges respectively, including the first viewport range switching from the first hue to the second hue.
[0309] In an optional embodiment, the display module 1820 is further configured to perform one or more of the following operations: In response to the lookup table generation operation, the current viewpoint is divided into multiple viewport ranges based on a pre-configured scene region; and the lookup table is generated for each of the multiple viewport ranges. In response to the lookup table generation operation, the virtual scene within the observation range of the current viewpoint is identified, and the virtual scene is divided into multiple viewport ranges; the lookup table is generated for each of the multiple viewport ranges.
[0310] In summary, the apparatus provided in this application embeds LUT generation within Unreal Engine. This means that when editing a virtual scene in Unreal Engine, reference materials providing a second color tone can be introduced through the acquisition of reference materials. A lookup table is then generated within Unreal Engine, providing a mapping relationship from the first color tone to the second color tone. After generating the lookup table, there is no need to switch between Unreal Engine and external environments. Within Unreal Engine, the color adjustment result of switching from the first color tone to the second color tone in the virtual scene can be directly displayed based on the lookup table. In other words, Unreal Engine provides a complete and smooth process from uploading reference materials to color adjustment to displaying the result, improving the human-computer interaction efficiency for performing color adjustments on virtual scenes and increasing the efficiency of color adjustment.
[0311] It should be noted that the specific limitations of the embodiments of the one or more tone adjustment devices provided above can be found in the limitations of the tone adjustment methods described above, and will not be repeated here. Each module of the above device can be implemented entirely or partially by software, hardware, or a combination thereof. Each module can be embedded in the processor of the computer device in hardware form or independent of the processor, or it can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0312] This application also provides a computer device, which includes: a processor and a memory, wherein the memory stores a computer program; the processor is used to execute the computer program in the memory to implement the hue adjustment method provided in the above-described method embodiments.
[0313] Figure 20 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application.
[0314] The computer device can be a portable mobile terminal, such as a smartphone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), or handheld game console. The computer device may also be referred to as a user device, portable terminal, or other names.
[0315] Typically, computer equipment includes: processor 2001 and memory 2002.
[0316] Processor 2001 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 2001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 2001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 2001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 2001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0317] The memory 2002 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 2002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 2002 are used to store at least one instruction, which is executed by the processor 2001 to implement the hue adjustment method provided in the embodiments of this application.
[0318] In some embodiments, the computer device may also optionally include: a peripheral device interface 2003 and at least one peripheral device. Specifically, the peripheral device includes at least one of: a radio frequency circuit 2004, a touch display screen 2005, a camera assembly 2006, an audio circuit 2007, and a power supply 2008.
[0319] Peripheral device interface 2003 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 2001 and memory 2002. In some embodiments, processor 2001, memory 2002 and peripheral device interface 2003 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 2001, memory 2002 and peripheral device interface 2003 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0320] The radio frequency (RF) circuit 2004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 2004 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 2004 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the RF circuit 2004 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 2004 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 2004 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0321] The touch display screen 2005 is used to display a user interface (UI). This UI may include graphics, text, icons, video, and any combination thereof. The touch display screen 2005 also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to the processor 2001 for processing. The touch display screen 2005 is used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one touch display screen 2005, located on the front panel of the computer device; in other embodiments, there may be at least two touch display screens, respectively located on different surfaces of the computer device or in a folded design; in some embodiments, the touch display screen 2005 may be a flexible display screen, located on a curved or folded surface of the computer device. Furthermore, the touch display screen 2005 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The touch display screen 2005 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0322] The camera assembly 2006 is used to acquire images or videos. Optionally, the camera assembly 2006 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is used for video calls or selfies, and the rear-facing camera is used for taking photos or videos. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, and a wide-angle camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, and panoramic shooting and VR (Virtual Reality) shooting by fusion of the main camera and the wide-angle camera. In some embodiments, the camera assembly 2006 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash is a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0323] Audio circuitry 2007 provides an audio interface between the user and the computer device. Audio circuitry 2007 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to processor 2001 for processing, or input to radio frequency circuitry 2004 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the computer device. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from processor 2001 or radio frequency circuitry 2004 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, audio circuitry 2007 may also include a headphone jack.
[0324] The power supply 2008 is used to supply power to various components in a computer device. The power supply 2008 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 2008 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired connection, while a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0325] In some embodiments, the computer device further includes one or more sensors 2009. The one or more sensors 2009 include, but are not limited to, an accelerometer 2010, a gyroscope 2011, a pressure sensor 2012, an optical sensor 2013, and a proximity sensor 2014.
[0326] Accelerometer 2010 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by a computer device. For example, accelerometer 2010 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 2001 can control touchscreen display 2005 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 2010. Accelerometer 2010 can also be used for games or for acquiring user motion data.
[0327] The gyroscope sensor 2011 can detect the orientation and rotation angle of the computer device. The gyroscope sensor 2011 can work in conjunction with the accelerometer sensor 2010 to collect the user's 3D movements on the computer device. Based on the data collected by the gyroscope sensor 2011, the processor 2001 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0328] The pressure sensor 2012 can be disposed on the side bezel of the computer device and / or the lower layer of the touch display screen 2005. When the pressure sensor 2012 is disposed on the side bezel of the computer device, it can detect the user's grip signal on the computer device and perform left / right hand recognition or quick operation based on the grip signal. When the pressure sensor 2012 is disposed on the lower layer of the touch display screen 2005, it can control operable controls on the UI interface based on the user's pressure operation on the touch display screen 2005. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0329] The optical sensor 2013 is used to collect ambient light intensity. In one embodiment, the processor 2001 can control the display brightness of the touch screen 2005 based on the ambient light intensity collected by the optical sensor 2013. Specifically, when the ambient light intensity is high, the display brightness of the touch screen 2005 is increased; when the ambient light intensity is low, the display brightness of the touch screen 2005 is decreased. In another embodiment, the processor 2001 can also dynamically adjust the shooting parameters of the camera assembly 2006 based on the ambient light intensity collected by the optical sensor 2013.
[0330] The proximity sensor 2014, also known as a distance sensor, is typically located on the front of a computer device. The proximity sensor 2014 is used to detect the distance between the user and the front of the computer device. In one embodiment, when the proximity sensor 2014 detects that the distance between the user and the front of the computer device is gradually decreasing, the processor 2001 controls the touchscreen display 2005 to switch from a screen-on state to a screen-off state; when the proximity sensor 2014 detects that the distance between the user and the front of the computer device is gradually increasing, the processor 2001 controls the touchscreen display 2005 to switch from a screen-off state to a screen-on state.
[0331] Those skilled in the art will understand that Figure 20 The structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0332] In an exemplary embodiment, this application provides a chip including programmable logic circuits and / or program instructions, which, when run on a computer device, are used to implement the hue adjustment method provided in the above method embodiments.
[0333] This application also provides a computer-readable storage medium storing a computer program that is loaded and executed by a processor to implement the hue adjustment method provided in the above method embodiments.
[0334] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the processor of the computer device to load and execute the hue adjustment method provided in the above-described method embodiments.
[0335] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0336] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0337] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0338] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for adjusting color tone, characterized in that, The method includes: During the editing process of a virtual scene in Unreal Engine, an operation to acquire reference materials is received. The virtual scene corresponds to a first color tone, and the reference materials are used to provide a second color tone. Receive a lookup table generation operation, the lookup table generation operation being used to instruct the generation of a lookup table based on the virtual scene and the reference material, the lookup table being used to provide a mapping relationship of pixels from the first hue to the second hue; In response to the lookup table generation operation, the virtual scene is displayed as a color adjustment result of switching from the first color tone to the second color tone based on the lookup table. The lookup table is generated based on the scene image of the virtual scene and the reference material. The lookup table includes a first lookup table generated based on the pixel distribution statistical characteristics between the scene image and the reference material, and a second lookup table generated by a pre-trained diffusion model based on the differences in style feature dimension between the scene image and the reference material.
2. The method according to claim 1, characterized in that, During the editing process of a virtual scene in Unreal Engine, receiving operations to acquire reference materials includes: During the editing process of the virtual scene in the Unreal Engine, a scene parameter configuration area is displayed. The scene parameter configuration area is used to configure the scene parameters of the virtual scene, and the scene parameter configuration area includes lookup table configuration items. The operation to retrieve the reference material is received based on the lookup table configuration item.
3. The method according to claim 2, characterized in that, The receiving of the acquisition operation for the reference material based on the lookup table configuration item includes one or more of the following: The upload operation for the reference image is received based on the lookup table configuration item, and the reference image corresponds to the second color tone; The lookup table configuration item receives input for a hue hint word, which describes the second hue. The lookup table configuration item receives a selection operation for hue keywords, which are pre-provided keywords used to describe hues.
4. The method according to claim 3, characterized in that, The process of receiving the upload operation for the reference image based on the lookup table configuration item includes one or more of the following: Based on the lookup table configuration item, the system receives a selection operation for the reference image from a local image library or an online image library; The upload operation for the reference video is received based on the lookup table configuration item; The system receives a selection operation for a reference image in the reference video, wherein the reference image is an image frame in the reference video.
5. The method according to claim 1, characterized in that, The step of responding to the lookup table generation operation by displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone based on the lookup table includes: In response to the lookup table generation operation, scene images of the virtual scene are captured; The lookup table is generated based on the scene image and the reference material; The lookup table is used to adjust the pixel count of the captured image of the virtual scene, and the virtual scene is displayed in the second color tone.
6. The method according to claim 5, characterized in that, The process of generating the lookup table based on the scene image and the reference material includes: Based on the pixel distribution statistical characteristics between the scene image and the reference material, a first lookup table is generated. The first lookup table is used to globally align the color distribution between the scene image and the reference material in the color space. A second lookup table is generated using a pre-trained diffusion model. This second lookup table is used to express the differences between the scene and the reference material from the perspective of style features. The first lookup table and the second lookup table are combined to obtain the lookup table.
7. The method according to claim 6, characterized in that, The generation of the second lookup table through the pre-trained diffusion model includes: Obtain noise data and a basic lookup table, wherein the basic lookup table is a preset lookup table; The noise data, the basic lookup table, the scene image, and the reference material are input into the diffusion model. Differential data is generated with the scene image and the reference material as constraints. The differential data is used to express the deviation based on the basic lookup table. The differential data is superimposed onto the basic lookup table to obtain the second lookup table.
8. The method according to claim 5, characterized in that, The step of capturing scene images of the virtual scene in response to the lookup table generation operation includes: In response to the lookup table generation operation, scene video of the virtual scene is captured around the current viewpoint in the virtual scene, using the current viewpoint as the anchor point. Extract the scene frame from the scene video, where the scene frame is an image frame from the scene video.
9. The method according to claim 8, characterized in that, Extracting the scene footage from the scene video includes: Semantic matching is performed between the reference material and the image frames in the scene video to obtain semantic matching results, the semantic matching results including the semantic matching degree between the image frames in the scene video and the reference material respectively; Image frames from the scene video that meet the semantic matching requirements with the reference material are used as the scene frames.
10. The method according to claim 8, characterized in that, The process of generating the lookup table based on the scene image and the reference material includes: The scene video and the reference material are sent to the inference terminal, which is used to generate the lookup table based on the scene video and the reference material; Receive the lookup table fed back by the inference terminal.
11. The method according to claim 10, characterized in that, Sending the scene video and the reference material to the inference terminal includes: Based on the full-duplex communication channel established between the Unreal Engine and the inference client, the scene video and the reference materials are sent to the inference client.
12. The method according to claim 1, characterized in that, The method further includes: The scene preview window displays the scene of the virtual scene; The step of displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone in response to the lookup table generation operation includes: In response to the lookup table generation operation, the virtual scene is displayed in the scene preview window with the second color tone as the result of the color tone adjustment.
13. The method according to claim 12, characterized in that, In response to the lookup table generation operation, displaying the virtual scene in the scene preview window with the second color tone as the result of the color tone adjustment includes: In response to the lookup table generation operation, the virtual scene is displayed in the scene preview window in a comparative display manner, wherein a first part of the virtual scene is displayed in the first color tone, and a second part of the virtual scene is displayed in the second color tone.
14. The method according to claim 1, characterized in that, After displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone based on the lookup table in response to the lookup table generation operation, the method further includes: Receive a hue adjustment operation on the lookup table, the hue adjustment operation being used to adjust the hue intensity of the second hue based on the lookup table; Based on the aforementioned tone adjustment operation, the tone adjustment result of the virtual scene is adjusted synchronously.
15. The method according to claim 1, characterized in that, The step of responding to the lookup table generation operation by displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone based on the lookup table includes: In response to the lookup table generation operation, the lookup table is generated for each of the multiple viewport ranges; The lookup tables corresponding to the multiple viewport ranges are used to display the color adjustment results of the virtual scene switching from the first color tone to the target color tone, including the first viewport range switching from the first color tone to the second color tone.
16. The method according to claim 15, characterized in that, In response to the lookup table generation operation, the lookup tables are generated for multiple viewport ranges, including one or more of the following: In response to the lookup table generation operation, the current viewpoint is divided into multiple viewport ranges based on a pre-configured scene region; and the lookup table is generated for each of the multiple viewport ranges. In response to the lookup table generation operation, the virtual scene within the observation range of the current viewpoint is identified, and the virtual scene is divided into multiple viewport ranges; the lookup table is generated for each of the multiple viewport ranges.
17. A color tone adjustment device, characterized in that, The device includes: The receiving module is used to receive the acquisition operation of reference material during the editing process of virtual scene in Unreal Engine. The virtual scene corresponds to a first color tone, and the reference material is used to provide a second color tone. The receiving module is further configured to receive a lookup table generation operation, wherein the lookup table generation operation is configured to instruct the generation of a lookup table based on the virtual scene and the reference material, wherein the lookup table is configured to provide a mapping relationship between pixels from the first hue to the second hue; The display module is configured to respond to the lookup table generation operation by displaying the color adjustment result of the virtual scene switching from the first color tone to the second color tone based on the lookup table. The lookup table is generated based on the scene image of the virtual scene and the reference material. The lookup table includes a first lookup table generated based on the pixel distribution statistical characteristics between the scene image and the reference material, and a second lookup table generated by a pre-trained diffusion model based on the differences in style feature dimension between the scene image and the reference material.
18. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the hue adjustment method as described in any one of claims 1 to 16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the hue adjustment method as described in any one of claims 1 to 16.
20. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium, from which a processor retrieves the computer instructions, causing the processor to load and execute them to implement the hue adjustment method as described in any one of claims 1 to 16.