Image processing method and device, storage medium, and computer equipment

By converting the game scene rendering texture in linear space to gamma space, alpha-mixed with the interface rendering diagram in gamma space, and then converted back to linear space, the color difference problem in the game display screen is solved and the effect of the game screen is improved.

CN114307143BActive Publication Date: 2025-03-14SHANGHAI PERFECT WORLD SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111675781.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-14
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the game display screen, the color space of the interface rendering image produced by the image processing software in the gamma space is different from the scene picture rendered in the linear space of the game engine, resulting in color difference and affecting the display effect.

Method used

By obtaining the interface rendering diagram of the target game scene and the first scene rendering texture, first convert the first scene rendering texture from linear space to gamma space, generate the second scene rendering texture, and then alpha-mix with the interface rendering diagram to obtain the third scene rendering texture, and finally convert it from gamma space back to linear space to obtain the target scene rendering texture.

Benefits of technology

It solves the color difference problem when images exported by image processing software are mixed in the game engine, and improves the effect of the game screen. There is no need for game developers to manually adjust the image space or correct the image, which improves the image production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114307143B_ABST
    Figure CN114307143B_ABST
Patent Text Reader

Abstract

The present application discloses an image processing method and device, a storage medium, and a computer device, the method comprising: obtaining an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space; converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture; converting the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture. The above scheme solves the problem of color difference after the output image of the image processing software enters the game development engine, and improves the game expressiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image processing method and apparatus, a storage medium, and a computer device. Background Art

[0002] In addition to the in-game scene screen, the game display screen also includes the interactive interface UI. Usually, the game interactive interface is produced in the gamma space through image processing software, such as Photoshop, while the in-game scene screen is generally rendered in the linear space by the game engine. When the image exported by the image processing software is mixed with the in-game scene screen in the linear space through the game engine, the different color spaces of the two will cause color difference in the game screen, resulting in poor display effect. Summary of the invention

[0003] In view of this, the present application provides an image processing method and apparatus, a storage medium, and a computer device.

[0004] According to one aspect of the present application, there is provided an image processing method, comprising:

[0005] Obtain an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space;

[0006] Converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture;

[0007] The third scene rendering texture is converted from the gamma space to the linear space to obtain a target scene rendering texture.

[0008] Optionally, before obtaining the interface rendering image of the target game scene and the first scene rendering texture, the method further includes:

[0009] Cut the initial interface rendering image to obtain multiple interface rendering pixels;

[0010] The relevant information of the plurality of interface rendering pixels is stored in a slice table.

[0011] Optionally, the obtaining of an interface rendering of a target game scene specifically includes:

[0012] The plurality of interface rendering pixels and the cut table are imported into a game engine, and the game engine splices the interface rendering pixels into the interface rendering graph based on the relevant information in the cut table.

[0013] Optionally, before performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture, the method further includes:

[0014] Based on the relevant information of the interface rendering pixels, a UI control is added to the interface rendering image.

[0015] Optionally, the method further comprises:

[0016] Adding a camera stack in the game engine, wherein the camera stack includes a first camera, a UI camera, and a second camera in sequence;

[0017] The properties of the first camera and the second camera are respectively set as overlapping cameras.

[0018] Optionally, converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture specifically includes:

[0019] The first scene rendering texture is converted from the linear space to the gamma space through the first camera to generate a second scene rendering texture; and the second scene rendering texture and the interface rendering image are alpha blended through the UI camera to obtain a third scene rendering texture.

[0020] Optionally, converting the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture specifically includes:

[0021] The third scene rendering texture is converted from the gamma space to the linear space through the second camera to obtain a target scene rendering texture.

[0022] Optionally, the method further comprises:

[0023] Acquire font information of the target game scene, wherein the font information includes a character transparency parameter;

[0024] The character transparency parameter is corrected according to a preset transparency correction equation, wherein the preset correction equation is obtained by fitting the sample transparency initial parameter and the sample transparency correction parameter.

[0025] Optionally, after converting the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture, the method further includes:

[0026] Rendering is performed according to the target scene rendering texture and source color correction parameters corresponding to the target scene rendering texture to obtain a scene graph of the target game scene.

[0027] According to another aspect of the present application, there is provided an image processing device, comprising:

[0028] An image acquisition module, used to acquire an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space;

[0029] An image correction module, configured to convert the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and perform alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture;

[0030] The texture generation module is used to convert the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture.

[0031] Optionally, the device further comprises:

[0032] The cutting module is used to cut the initial interface rendering image to obtain multiple interface rendering pixels before obtaining the interface rendering image of the target game scene and the first scene rendering texture; and store the relevant information of the multiple interface rendering pixels in the cutting table.

[0033] Optionally, the image acquisition module is specifically used to: import the plurality of the interface rendering pixels and the cut table into a game engine, and through the game engine, splice the interface rendering pixels into the interface rendering diagram based on relevant information in the cut table.

[0034] Optionally, the device further comprises:

[0035] A control adding module is used to add UI controls to the interface rendering image based on the relevant information of the interface rendering pixels.

[0036] Optionally, the device further comprises:

[0037] An engine configuration module is used to add a camera stack in the game engine, wherein the camera stack includes a first camera, a UI camera and a second camera in sequence; and the properties of the first camera and the second camera are respectively set to overlapping cameras.

[0038] Optionally, the image correction module is specifically used to: convert the first scene rendering texture from the linear space to the gamma space through the first camera to generate a second scene rendering texture; and perform alpha blending on the second scene rendering texture and the interface rendering image through the UI camera to obtain a third scene rendering texture.

[0039] Optionally, the texture generation module is specifically used to: convert the third scene rendering texture from the gamma space to the linear space through the second camera to obtain a target scene rendering texture.

[0040] Optionally, the device further comprises:

[0041] A font correction module is used to obtain font information of the target game scene, wherein the font information includes character transparency parameters; the character transparency parameters are corrected according to a preset transparency correction equation, wherein the preset correction equation is obtained by fitting a sample transparency initial parameter and a sample transparency correction parameter.

[0042] Optionally, the device further comprises:

[0043] A rendering module is used to convert the third scene rendering texture from the gamma space to the linear space, and after obtaining the target scene rendering texture, render according to the target scene rendering texture and the source color correction parameters corresponding to the target scene rendering texture to obtain a scene graph of the target game scene.

[0044] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned image processing method is implemented.

[0045] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned image processing method when executing the program.

[0046] By means of the above technical solution, the present application provides an image processing method and device, storage medium, and computer equipment, which performs spatial conversion on the rendering texture of the game scene in linear space, converts it from linear space to gamma space, performs alpha blending on the rendering texture and the interface rendering image in gamma space, and then uniformly converts it back to linear space. There is no need for game developers to manually adjust the output space and manually perform image correction, which improves the output efficiency and solves the problem of color difference after the output of the image processing software enters the game development engine, thereby improving the game expression.

[0047] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0049] Figure 1 A schematic diagram of a process flow of an image processing method provided in an embodiment of the present application is shown;

[0050] Figure 2 A schematic diagram showing a flow chart of another image processing method provided in an embodiment of the present application is shown;

[0051] Figure 3 A schematic structural diagram of an image processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0052] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0053] In this embodiment, an image processing method is provided. Figure 1 As shown, the method includes:

[0054] Step 101, obtaining an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space;

[0055] Step 102, converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture;

[0056] Step 103: convert the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture.

[0057] The embodiment of the present application aims to solve the problem of color difference after mixing a scene rendering image produced in a linear space and an interface rendering image generated in a gamma space. By performing spatial conversion on the rendering texture of the scene rendering image, converting it from linear space to gamma space, alpha blending the rendering texture with the interface rendering image in the gamma space, and then uniformly converting them back to linear space, the problem of color change caused by images exported by the image processing software PS when mixed in the linear space of the game engine Unity, resulting in inconsistent artistic effects, is solved.

[0058] In the above embodiment, first, the interface rendering image of any target game scene in the game and the first scene rendering texture corresponding to the scene rendering image are obtained, wherein the scene rendering image can be a picture obtained by the game developer through the game engine or other software in the linear space, and is used for the game display, the first scene rendering texture is the rendering texture required for rendering the scene rendering image, and the interface rendering image can be obtained by the image processing software PS in the gamma space. Secondly, the first scene rendering texture is spatially converted, and the first scene rendering texture in the linear space is converted to the gamma space to obtain the second scene rendering texture in the gamma space, and then the second scene rendering texture converted to the gamma space is alpha-blended with the interface rendering image in the gamma space to obtain a rendering texture that can show the effect of looking at the scene rendering image through the interface rendering image, that is, the third scene rendering texture obtained after alpha blending. Finally, the third scene rendering texture is spatially converted, and it is converted from the gamma space back to the linear space, so that the game screen finally rendered by the target scene rendering texture will not have color difference, thereby improving the effect of the game screen.

[0059] By applying the technical solution of this embodiment, the rendering texture of the game scene in the linear space is spatially converted, and it is converted from the linear space to the gamma space. The rendering texture and the interface rendering image are alpha-blended in the gamma space, and then uniformly converted back to the linear space. There is no need for game developers to manually adjust the output space and manually perform image correction, which improves the output efficiency and solves the problem of color difference after the output of the image processing software enters the game development engine, thereby improving the game expression.

[0060] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another image processing method is provided, such as Figure 2 As shown, the method includes:

[0061] Step 201, cutting the initial interface rendering graph to obtain a plurality of interface rendering pixels; and storing relevant information of the plurality of interface rendering pixels in a cutting table.

[0062] Step 202, importing the plurality of interface rendering pixels and the cut table into the game engine, and splicing the interface rendering pixels into the interface rendering graph based on the relevant information in the cut table by the game engine, and obtaining the first scene rendering texture of the target game scene.

[0063] In the embodiment of the present application, the initial interface rendering map produced by the image processing software PS can be automatically cut by editing the script to obtain multiple interface rendering pixels. Specifically, the naming conventions pre-established in PS can be used to cut the map according to the location of each pixel and other related information through the edited script to obtain each pixel, and the relevant information can be stored in the cutting table according to the naming conventions, for example, the relevant information of the pixel can be stored in an xml file. The cutting table of the xml file can be further imported into the game engine, and the engine generates each pixel into the scene through xml parsing of the location of the pixel and other related information, so as to realize the pixel splicing in the engine to obtain a complete interface rendering map.

[0064] Step 203: Add a UI control to the interface rendering image based on the relevant information of the interface rendering pixel.

[0065] Step 204: convert the first scene rendering texture from the linear space to the gamma space through the first camera to generate a second scene rendering texture; and perform alpha blending on the second scene rendering texture and the interface rendering image through the UI camera to obtain a third scene rendering texture.

[0066] Step 205: convert the third scene rendering texture from the gamma space to the linear space through a second camera to obtain a target scene rendering texture.

[0067] In this embodiment, the game engine can also obtain the UI controls of the pixels at each position based on the relevant information of the interface rendering pixels in the cut chart and the naming rules, and add the corresponding UI controls in the interface rendering chart. Furthermore, the embodiment of the present application can complete the two spatial transformations and alpha blending processing of the image by adding a camera stack in the game engine in advance. Optionally, a camera stack is added to the game engine, wherein the camera stack includes a first camera, a UI camera, and a second camera in sequence; the properties of the first camera and the second camera are respectively set to overlapping cameras.

[0068] Among them, this embodiment uses the Linear to Gamma camera (linear to gamma camera) to transfer the rendering texture of the main camera MainCamera to the Gamma space, performs alpha blending on the rendering texture and the UI image in the Gamma space, and then uniformly transfers them back to the Linear space through the Gamma to Linear camera (gamma to linear camera). This process can be implemented by adding a camera stack. Specifically, the camera stack can be added in the following order: Linear to Gamma Camera>UICamera>Gamma to Linear Camera. It should be noted that in actual application scenarios, two cameras, the first camera Linear to Gamma and the second camera Gamma to Linear, can be created, and they are set to Overaly overlapping camera mode respectively, and the following information is set respectively to save engine performance and improve processing efficiency: the relevant camera tags Tag are set to Linear to Gamma and Gamma to Linear respectively (this tag can be used for progress judgment during the post-processing process), uncheck postprocessing, check clearDepth (clear depth value), uncheck RenderShadows (render shadows), and cullMask is set to Nothing).

[0069] Therefore, through two post-processing steps, the current rendering texture in the three-dimensional scene is converted from linear space to gamma space, and alpha blended with the interface image output in gamma space. The second time, the blended rendering texture is converted back to linear space to achieve color correction of the rendering texture and solve the problem of color difference in its translucent effect.

[0070] Step 206 , rendering is performed according to the target scene rendering texture and the source color correction parameters corresponding to the target scene rendering texture to obtain a scene graph of the target game scene.

[0071] Due to the linear data generated in the shader, in the "linear color space", the rendering target is sRGBframebuffer (sRGB frame buffer), the linear data will be converted to sRGB, and the image will look redder than the real effect when previewed. To solve this problem, in an embodiment of the present application, when rendering, a LUT color correction can be performed. Specifically, in the process of rendering through the target scene rendering texture, the color data of each pixel in the scene to be rendered is first calculated based on the target scene rendering texture, and the color output is saved in the frame buffer, and then rendering is performed by reading the frame buffer. After the color data of each pixel is calculated, in order to prevent the direct use of the data for rendering will cause color difference in the image color, the color data of each pixel in the frame buffer is first color corrected using the source color correction parameters, and then the color data of each pixel after color correction is written to the frame buffer, so that the corrected color data in the frame buffer can be used for scene graph rendering later. Among them, the method of correcting the color data of each pixel in the frame buffer can be to increase the corresponding preset values ​​to the RGB channel values ​​of the pixel color data, such as R channel color value +0.008, G channel color value +0.008, and B channel color value +0.02.

[0072] In an embodiment of the present application, optionally, it also includes: obtaining font information of the target game scene, wherein the font information includes character transparency parameters; correcting the character transparency parameters according to a preset transparency correction equation, wherein the preset correction equation is obtained by fitting sample transparency initial parameters and sample transparency correction parameters.

[0073] Since the embodiment of the present application performs image color correction in a customized manner and does not use the inherent functions of the game engine, when using the game engine, the interface rendering diagram in the engine needs to uncheck sRGB, and since the font is filled with a solid color, sRGB cannot be unchecked, so the font may appear darker and darker. If the game scene contains font information, the font information can also be corrected. For the three RGB values, only normal gamma correction is required (i.e., saturate (pow (rgb, 0.454545))), but the semi-transparent or gradient transparent pixels in Ps directly perform gamma correction in the engine, which will cause the transparent gradient of the picture to be displayed incorrectly. This is because the game engine Unity has a curve change for semi-transparent correction. Therefore, the embodiment of the present application obtains a change curve by color correction of the sample transparent data, and then uses the fitted change curve to realize the correction of character transparency. After the character transparency parameters of the font are corrected, when the scene graph is finally rendered, the color data of each pixel in the scene can be calculated based on the corrected character transparency parameters, and saved in the frame buffer for subsequent rendering.

[0074] Among them, an optional form of the fitting equation is: Y = a + b · X + c · X 2 +d·X 3 +e·X 4 +f·X 5 +g·X 6 +h·X 7 +i·X 8 +j·X 9 +k·X 10 , where a, b, c, d, e, f, g, h, i, j, and k are all constants obtained by fitting, X is the character transparency parameter before correction, and Y is the character transparency parameter after correction.

[0075] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides an image processing device, such as Figure 3 As shown, the device comprises:

[0076] An image acquisition module, used to acquire an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space;

[0077] An image correction module, configured to convert the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and perform alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture;

[0078] The texture generation module is used to convert the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture.

[0079] Optionally, the device further comprises:

[0080] The cutting module is used to cut the initial interface rendering image to obtain multiple interface rendering pixels before obtaining the interface rendering image of the target game scene and the first scene rendering texture; and store the relevant information of the multiple interface rendering pixels in the cutting table.

[0081] Optionally, the image acquisition module is specifically used to: import the plurality of the interface rendering pixels and the cut table into a game engine, and through the game engine, splice the interface rendering pixels into the interface rendering diagram based on relevant information in the cut table.

[0082] Optionally, the device further comprises:

[0083] A control adding module is used to add UI controls to the interface rendering image based on the relevant information of the interface rendering pixels.

[0084] Optionally, the device further comprises:

[0085] An engine configuration module is used to add a camera stack in the game engine, wherein the camera stack includes a first camera, a UI camera and a second camera in sequence; and the properties of the first camera and the second camera are respectively set to overlapping cameras.

[0086] Optionally, the image correction module is specifically used to: convert the first scene rendering texture from the linear space to the gamma space through the first camera to generate a second scene rendering texture; and perform alpha blending on the second scene rendering texture and the interface rendering image through the UI camera to obtain a third scene rendering texture.

[0087] Optionally, the texture generation module is specifically used to: convert the third scene rendering texture from the gamma space to the linear space through the second camera to obtain a target scene rendering texture.

[0088] Optionally, the device further comprises:

[0089] A font correction module is used to obtain font information of the target game scene, wherein the font information includes character transparency parameters; the character transparency parameters are corrected according to a preset transparency correction equation, wherein the preset correction equation is obtained by fitting a sample transparency initial parameter and a sample transparency correction parameter.

[0090] Optionally, the device further comprises:

[0091] A rendering module is used to convert the third scene rendering texture from the gamma space to the linear space, and after obtaining the target scene rendering texture, render according to the target scene rendering texture and the source color correction parameters corresponding to the target scene rendering texture to obtain a scene graph of the target game scene.

[0092] It should be noted that for other corresponding descriptions of the functional units involved in the image processing device provided in the embodiment of the present application, reference can be made to Figure 1 to Figure 2 The corresponding description in the method will not be repeated here.

[0093] Based on the above Figure 1 to Figure 2 The method shown in the embodiment of the present application is accordingly provided with a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 to Figure 2 The image processing method shown.

[0094] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0095] Based on the above Figure 1 to Figure 2 The method shown, and Figure 3 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 to Figure 2 The image processing method shown.

[0096] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.

[0097] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0098] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.

[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platforms, or by hardware to spatially transform the rendering texture of the game scene in linear space, convert it from linear space to gamma space, perform alpha blending of the rendering texture and the interface rendering image in gamma space, and then uniformly convert it back to linear space. There is no need for game developers to manually adjust the output space and manually perform image correction, which improves the output efficiency, solves the problem of color difference after the output of the image processing software enters the game development engine, and improves the game expression.

[0100] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0101] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. An image processing method, characterized in that: include: Obtain an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space; Converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture; The third scene rendering texture is converted from the gamma space to the linear space to obtain a target scene rendering texture.

2. The method according to claim 1, characterized in that Before obtaining the interface rendering image of the target game scene and the first scene rendering texture, the method further includes: Cut the initial interface rendering image to obtain multiple interface rendering pixels; The relevant information of the plurality of interface rendering pixels is stored in a slice table.

3. The method according to claim 2, characterized in that The obtaining of the interface rendering of the target game scene specifically includes: The plurality of interface rendering pixels and the cut table are imported into a game engine, and the game engine splices the interface rendering pixels into the interface rendering graph based on the relevant information in the cut table.

4. The method according to claim 3, characterized in that Before performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture, the method further includes: Based on the relevant information of the interface rendering pixels, a UI control is added to the interface rendering image.

5. The method according to claim 3, characterized in that: The method further comprises: Adding a camera stack in the game engine, wherein the camera stack includes a first camera, a UI camera, and a second camera in sequence; The properties of the first camera and the second camera are respectively set as overlapping cameras.

6. The method according to claim 5, characterized in that The converting the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and performing alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture specifically includes: The first scene rendering texture is converted from the linear space to the gamma space through the first camera to generate a second scene rendering texture; and the second scene rendering texture and the interface rendering image are alpha blended through the UI camera to obtain a third scene rendering texture.

7. The method according to claim 6, characterized in that The converting the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture specifically includes: The third scene rendering texture is converted from the gamma space to the linear space through the second camera to obtain a target scene rendering texture.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Acquire font information of the target game scene, wherein the font information includes a character transparency parameter; The character transparency parameter is corrected according to a preset transparency correction equation, wherein the preset transparency correction equation is obtained by fitting the sample transparency initial parameter and the sample transparency correction parameter.

9. The method according to any one of claims 1 to 7, characterized in that After converting the third scene rendering texture from the gamma space to the linear space to obtain the target scene rendering texture, the method further includes: Rendering is performed according to the target scene rendering texture and source color correction parameters corresponding to the target scene rendering texture to obtain a scene graph of the target game scene.

10. An image processing device, characterized in that: include: An image acquisition module, used to acquire an interface rendering image and a first scene rendering texture of a target game scene, wherein the interface rendering image is generated in a gamma space, and the first scene rendering texture is applied in a linear space; An image correction module, configured to convert the first scene rendering texture from the linear space to the gamma space to generate a second scene rendering texture, and perform alpha blending on the second scene rendering texture and the interface rendering image to obtain a third scene rendering texture; The texture generation module is used to convert the third scene rendering texture from the gamma space to the linear space to obtain a target scene rendering texture.

11. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

12. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Non-linear editing system for home entertainment environments

    CA2260993A1

  • Data Process Device And Display Device Having The Same

    CN106205474A