Game screen floodlight processing method, device, electronic device and storage medium

By layering virtual object models in the game screen and setting brightness thresholds, the problem of local control of floodlight processing in existing technologies is solved, the local floodlight effect of different object models is optimized, and the whitening phenomenon of the screen is reduced.

CN116703778BActive Publication Date: 2025-09-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310786826.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2025-09-16
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

In the existing technology, the game screen bloom processing cannot be targeted to locally control a virtual object, resulting in the overall bloom processing affecting the rendering effect of the game object model and the bloom intensity of the screen.

Method used

By dividing the virtual object models in the game screen into different layers and assigning white and black in the preset texture map, using Unity's Layer function and URP rendering pipeline, setting the model brightness threshold, extracting the brightness areas of different object models, performing local floodlight processing, and combining the Bloom algorithm to achieve local control.

Benefits of technology

We have implemented localized floodlight processing for different virtual object models in the game screen, avoiding the impact of overall floodlight processing on the rendering effect, and optimized the Bloom algorithm to reduce the problem of whitening on the screen.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116703778B_ABST
    Figure CN116703778B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, device, electronic device, and storage medium for floodlight processing of a game screen. The method can obtain a first model layer and a second model layer of a target game screen, wherein the first and second model layers respectively include a first and a second game object model, and the first and second game object models are assigned white and black, respectively, and drawn into a preset texture map to obtain a target texture map; based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen with a brightness not lower than a model brightness threshold is extracted, and based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen with a brightness not lower than a global brightness threshold is extracted; and floodlight processing is performed based on the brightness area. Thus, different brightness thresholds can be used to extract brightness areas for different virtual object models, thereby realizing local floodlight processing of the game screen.
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 a method, device, electronic device and storage medium for floodlight processing of game images. Background Art

[0002] Bloom, also known as glow, is a phenomenon observed around light caused by factors such as scattering from the lens or the human eye lens. In games, to achieve realistic lighting effects, bloom post-processing is often used to add a glow to virtual objects.

[0003] Related technologies typically extract bright areas from the entire game screen and perform floodlighting based on these areas, resulting in a game screen with a floodlight effect. However, this approach only applies to the entire game screen and cannot perform local floodlighting on a specific virtual object within the game screen. Summary of the Invention

[0004] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for floodlight processing of a game screen, which can implement local floodlight processing of the game screen.

[0005] In a first aspect, an embodiment of the present application provides a method for processing floodlights on a game screen, the method comprising:

[0006] Obtaining a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0007] Assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer respectively, and drawing them into a preset texture map to obtain a target texture map;

[0008] Obtaining a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0009] Extracting, based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and extracting, based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold;

[0010] Floodlight processing is performed based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0011] In a second aspect, an embodiment of the present application provides a floodlight processing device for a game screen, comprising:

[0012] a layer acquisition unit, configured to acquire a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0013] A texture drawing unit, configured to assign white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and draw them into a preset texture map to obtain a target texture map;

[0014] a threshold acquisition unit, configured to acquire a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0015] a brightness region extraction unit, configured to extract, based on the white model region in the target texture map, a brightness region on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and to extract, based on the black model region in the target texture map, a brightness region on the second game object model in the target game screen whose brightness is not less than the global brightness threshold;

[0016] The floodlight processing unit is used to perform floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0017] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the floodlight processing method for the game screen provided in the embodiment of the present application.

[0018] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for processing the floodlight of the game screen provided in the embodiment of the present application is implemented.

[0019] In an embodiment of the present application, a first model layer and a second model layer of a target game screen to be processed can be obtained, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model; the first game object model in the first model layer and the second game object model in the second model layer are respectively assigned white and black, and drawn into a preset texture map to obtain a target texture map; a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer are obtained; based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen whose brightness is not lower than the model brightness threshold is extracted, and based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen whose brightness is not lower than the global brightness threshold is extracted; floodlight processing is performed based on the brightness area in the target game screen to obtain a processed game screen. Thus, different brightness thresholds can be used to extract brightness areas for different virtual object models, thereby realizing local floodlight processing of the game screen. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 This is a flowchart of a method for floodlight processing of a game screen provided in an optional embodiment of the present application.

[0022] Figure 2 This is a schematic diagram of an image after floodlight processing provided by an optional embodiment of the present application.

[0023] Figure 3 This is a schematic diagram of another image after floodlight processing provided by an optional embodiment of the present application.

[0024] Figure 4 This is a schematic diagram of another image after floodlight processing provided by an optional embodiment of the present application.

[0025] Figure 5 It is a structural diagram of a floodlight processing device for a game screen provided in an optional embodiment of the present application.

[0026] Figure 6 This is a schematic structural diagram of an electronic device provided in an optional embodiment of the present application. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0028] The embodiments of the present application provide a method, device, electronic device, and computer-readable storage medium for floodlight processing of a game screen, which can implement floodlight processing of a local area in the game screen.

[0029] Specifically, this embodiment will be described from the perspective of a floodlight processing device. The floodlight processing device can be integrated into an electronic device. That is, the method of the embodiment of the present application can be performed by the electronic device. Optionally, the electronic device can include a terminal device. The terminal device can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC).

[0030] The floodlight processing method for game screens provided in the embodiments of the present application can be applied, for example, to a gaming system. The gaming system can include a user terminal device and a server. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device that has receiving and transmitting hardware capable of performing two-way communication over a two-way communication link. The user terminal device can be installed with a gaming server, and the user terminal device and the server can communicate two-way via a network.

[0031] Optionally, the server may be a standalone server, or a server network or server cluster consisting of servers, including but not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server consisting of multiple servers. A cloud server is composed of a large number of computers or network servers based on cloud computing.

[0032] The following is a detailed description of each embodiment in conjunction with the accompanying drawings. It should be noted that the order in which the following embodiments are described does not limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different from that shown in the drawings.

[0033] See also Figure 1 , Figure 1 This is a first flow chart of a method for processing floodlights on a game screen provided by an embodiment of the present application. The method for processing floodlights on a game screen may include the following steps:

[0034] Step 101: Obtain a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0035] In game engines, HDR rendering is usually used to present better and more realistic rendering effects. HDR rendering must also be combined with Tonemapping and Bloom post-processing to achieve better results.

[0036] HDR (High Dynamic Range Rendering) is a high dynamic range rendering. Game engines all support physical lighting parameters, allowing artists to more easily simulate and reproduce various light sources in the real world. The real light ratio in the real world is very large, and in games, it is generally desirable to reproduce this high dynamic range rendering in the rendering to ensure that the rendered image retains more details and contrast.

[0037] HDR rendering can restore various light sources in real life, but the luminous ability of display devices in our daily life, such as TVs and mobile phones, cannot be compared with real-life light sources (such as the sun). Most mobile devices and displays are LDR (Low Dynamic Range). In order for these LDR displays to display high dynamic range rendered images, Tonemapping is used to map the high dynamic range to low dynamic devices. Tonemapping also exists as a common post-processing in game engines.

[0038] The solution of this embodiment is to improve the bloom post-processing used in combination with HDR rendering and tonemapping, namely bloom processing. Figure 2 The capsule on the right uses Bloom post-processing, which gives it a better luminous effect than the capsule on the left.

[0039] In games such as 2D stylized games, bloom post-processing is widely used in character model rendering, giving the character model's skin, hair, and other parts a subtle halo effect.

[0040] The bloom algorithm extracts the bright areas of the game screen, performs a blur calculation on them, and then overlays the bright areas back onto the game screen to create an image with a bloom effect. However, this bloom is applied to all objects in the entire game screen. The principle of bloom is to extract the bright areas of the entire screen using a brightness threshold and perform a blur calculation. If you want to make the less bright areas of the game screen also have a bloom effect, you can only brighten the texture or lower the Bloom brightness threshold. This will either change the rendering effect of the game object model or change the overall bloom intensity of the screen. Therefore, there is currently a lack of a solution to achieve localized control of bloom.

[0041] For example, for Figure 3 , using the floodlight algorithm in related technologies, Figure 3 The bloom intensity of the sphere and cylinder in the image is consistent, and the resulting bloom effect is the same.

[0042] This embodiment proposes a solution for achieving local floodlight control in the game screen without modifying the texture.

[0043] Optionally, the present application can utilize the functions provided by the Unity platform to implement steps 101 and 102. Specifically, Unity provides a Layer function, i.e., functions such as the creation and use of layers. In this embodiment, Unity can be used to place the models of the target game screen into different layers, and the models can be distinguished by layers to implement subsequent local floodlight processing.

[0044] In one example, step 101 may include: creating a character layer in Unity based on a first layer creation operation, receiving an instruction to add a first game object model of a target game screen to the character layer, placing the first game object model into the character layer, and obtaining a first model layer; creating a postprocessing layer in Unity based on a second layer creation operation, receiving an instruction to add a second game object model of the target game screen to the postprocessing layer, and placing the second game object model into the postprocessing layer, and obtaining a second model layer. The types of game objects in this embodiment are not limited and include people, animals, plants, objects, and the like.

[0045] There is no limit on the number of character layers, which can be one or more, and there is no limit on the number of post-processing layers, which can be one or more.

[0046] Step 102: assign white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and draw them into a preset texture map to obtain a target texture map;

[0047] Unity's URP (Universal Render Pipeline) is a template officially provided by Unity based on SRP (Scriptable Render Pipeline). The renderfeature function is provided in URP. In this embodiment, the renderfeature function can be used to add a CharacterMaskPass module before the Bloom calculation of the game screen. This pass module can automatically select the corresponding Layer according to Unity's Layer function, obtain the mask map of the current Layer object, and write the depth, including the occlusion relationship between objects, so that the position and occlusion relationship between each model in the texture map drawn matches the target game screen.

[0048] Optionally, step 102 may include: obtaining depth information of the first game object model and the second game object model in the target game screen; assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and drawing the colored first game object model and the second game object model into a preset texture map according to the depth information to obtain a target texture map.

[0049] Optionally, the specific steps for generating the target texture map may include: creating a new renderfeature file and naming it CharacterMaskPass. In this renderfeature, all models in the character layer, i.e., the first model layer, are assigned a white color and drawn to a rendertexture. All models in the layer other than the character layer, i.e., the second model layer, are assigned a black color and drawn to the rendertexture again. In this way, a characterMask texture map, i.e., the target texture map, is obtained. When drawing the game object model to the rendertexture, the occlusion relationship between the game object models can be determined based on the depth information of the game object model in the target game screen, and the texture map can be drawn based on the occlusion relationship.

[0050] Therefore, in the target texture map, there are only two colors, black and white, the black area is the second game object model, and the white area is the first game object model.

[0051] Step 103: Obtain a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0052] In this embodiment, compared with the Bloom algorithm in the related art, a threshold parameter of the first game object model, namely the model brightness threshold, denoted as CT, can be added to the original Bloom file. The global brightness threshold in the related art is denoted as T.

[0053] Optionally, CT and T can be set according to actual needs, and there is no limitation in this embodiment. There is no limitation on the relative size of CT and T, and CT can be larger or smaller than T.

[0054] Step 104: extracting a brightness region of the first game object model in the target game screen whose brightness is not less than a model brightness threshold based on the white model region in the target texture map, and extracting a brightness region of the second game object model in the target game screen whose brightness is not less than a global brightness threshold based on the black model region in the target texture map;

[0055] It can be understood that the white model area is the area where the first game object model is located, and the black model area is the area where the second game object model is located.

[0056] In this embodiment, the brightness of the target game screen pixel points corresponding to the white model area position can be used to determine the brightness area whose brightness is not lower than the model brightness threshold, and the brightness of the target game screen pixel points corresponding to the black model area position can be used to determine the brightness area whose brightness is not lower than the global brightness threshold.

[0057] In one example, brightness values ​​can be assigned to the texture pixels in the white model area and the black model area in the target texture map based on the model brightness threshold and the global brightness threshold, respectively. That is, the value of the texture pixels in the white model area of ​​the target texture map is assigned to the model brightness threshold, and the value of the texture pixels in the black model area is assigned to the global brightness threshold. The brightness of the pixel points of the assigned target texture map is then compared with that of the pixel points of the target game screen to extract the brightness area. The method of assigning values ​​is not limited. For example, the pixel points of the target texture map can be traversed, and brightness values ​​can be assigned separately according to whether the value of the traversed texture pixel points is 0 or 1.

[0058] Optionally, this embodiment also provides a solution for quickly performing brightness comparison to extract brightness areas. Step 104 may include: inputting a global brightness threshold, a model brightness threshold, and a target texture map as three parameters of a preset interpolation function into a preset interpolation function in sequence to obtain a brightness reference map, wherein the brightness of the white model area in the brightness reference map is the model brightness threshold, and the brightness of the black model area is the global brightness threshold; comparing the brightness of the brightness reference map with the brightness of the target game screen, extracting a brightness area on the first game object model of the target game screen whose brightness is not less than the model brightness threshold, and a brightness area on the second game object model whose brightness is not less than the global brightness threshold.

[0059] Optionally, the preset interpolation function includes but is not limited to the lerp function. In this embodiment, based on the harmacterMask graph, the lerp function can be used to blend T and CT, thereby being able to modify the character's bloom threshold individually and independently control the bloom intensity of the game object model.

[0060] In Unity's original Bloom algorithm, a threshold parameter T is used to extract the bright areas of the image. For example, if T is 0.8, then areas with brightness greater than 0.8 will be extracted (the extracted bright areas will be used for the next calculation). In this embodiment, by adding a new model brightness threshold CT (the value can be freely adjusted) and using the lerp function to reallocate the threshold parameters, it is possible to use T as the threshold to extract brightness areas for some models, while using CT as the threshold to extract brightness areas for other models.

[0061] As mentioned in the above steps, characterMask is a texture map composed of white and black, where white represents the value 1 and black represents the value 0. Therefore, the lerp function is used to redistribute the distribution of the character threshold CT and the threshold T.

[0062] For example, if there's a model C in the character layer (the first model layer) with a CT value of 0.5 and a T value of 0.8, then within the target game screen, the area with a brightness greater than 0.5 for model C will be extracted, while the rest of the target game screen will be extracted with a brightness greater than 0.8, resulting in a bright area.

[0063] Lerp(T, CT, characterMask texture map), that is, the global brightness threshold, model brightness threshold and target texture map are input into the preset interpolation function as the three parameters of the preset interpolation function in sequence. The Lerp function can extract the value in the target texture map to determine which one of T and CT it returns. For example, the Lerp function extracts the value of a pixel point in the target texture map as 1 (white model area), and the Lerp function returns CT, indicating that the brightness threshold corresponding to the pixel point is CT. The Lerp function extracts the value of a pixel point in the target texture map as 0 (black model area), and the Lerp function returns T, indicating that the brightness threshold corresponding to the pixel point is T. The Lerp function can be integrated into the Lerp function plug-in. The lerp function plug-in can assign the value returned by the Lerp function to the pixel point corresponding to the value in the target texture map to obtain a brightness reference map.

[0064] by Figure 3 For example, assume that the cylinder model is placed in the character layer and the CT value is 5. That is, only the area with brightness greater than 5 on the cylinder model will be extracted for Bloom calculation. Since the brightness of the entire cylinder is not greater than 5, there is no Bloom effect on the cylinder (see Figure 4 ), thereby achieving local control of Bloom.

[0065] Step 105: Perform floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0066] In this application, improvements are made to the Bloom algorithm. The original Bloom algorithm is a global algorithm, which is prone to the problem of whitening the image after floodlight processing. To this end, this embodiment proposes a new floodlight processing solution, including: blurring the brightness area in the target game image to obtain a blurred image; superimposing the blurred image with the target game image to obtain an initial floodlight image; performing image enhancement processing on the blurred image to obtain an enhanced image; and performing a first fusion processing based on the enhanced image and the initial floodlight image to obtain a processed game image.

[0067] Optionally, the logic for obtaining the initial floodlight image includes:

[0068] Brightness area => Bloom map obtained by fuzzy calculation = Bloom map;

[0069] Bloom graph + current game screen = screen B.

[0070] That is, a blur calculation is performed on the acquired brightness area to obtain a Bloom graph, which is the blurred image. The Bloom graph is then superimposed on the target game image to obtain image B.

[0071] The image directly calculated by addition tends to be whitish. In an optional example, the present application proposes a solution of first enhancing the Bloom graph and then fusing it with the image B, which helps to solve the whitish problem.

[0072] Optionally, the image enhancement processing method is not limited and can be any image enhancement method that helps solve the problem of whitening of the image. For example, the image enhancement processing may include a processing method that improves the color vividness of the image, including but not limited to saturation enhancement processing, brightness enhancement processing, etc.

[0073] Optionally, the step of “performing image enhancement processing on the blurred image to obtain an enhanced image” may include: performing saturation enhancement processing on the blurred image to obtain a high-saturation image; and obtaining the enhanced image based on the high-saturation image.

[0074] Optionally, the specific process of the saturation enhancement processing in this application is not limited. For example, the three image channels of the blurred image are multiplied by the corresponding saturation coefficients to obtain a high-saturation Bloom map. For example, a high-saturation Bloom map = A*Bloom map red channel + B*Bloom map green channel + C*Bloom map blue channel, where the values ​​of A, B, and C are greater than 1.

[0075] Alternatively, the blurred image may be converted from the RGB color space to the HSV (Hue, Saturation, Value) color space, the saturation parameter of the converted image may be increased, and then the image may be converted back to the RGB color space to obtain an enhanced image.

[0076] Optionally, this embodiment also provides another saturation enhancement scheme: multiplying the three image channels of the blurred image by corresponding saturation coefficients to obtain a low-saturation image, where the saturation coefficient has a value range of 0-1; performing a second fusion process based on the low-saturation image and the blurred image to obtain a high-saturation image.

[0077] Optionally, the step of “performing a second fusion process based on the low-saturation image and the blurred image to obtain a high-saturation image” may include:

[0078] The low-saturation image, the blurred image and the saturation intensity are input into the preset interpolation function to obtain a high-saturation image.

[0079] The interpolation function may be a lerp function, and the saturation intensity may be a value greater than 1.

[0080] Optionally, the second fusion process may also include any feasible fusion process, such as addition process and the like.

[0081] Optionally, the three image channels are red, green, and blue primary color channels, and the saturation coefficients of each channel may be the same or different, which is not limited in this embodiment.

[0082] For example, an example logic for saturation boost is:

[0083] Low saturation Bloom image = 0.2125*Bloom image red channel + 0.7154*Bloom image green channel + 0.0721*Bloom image blue channel;

[0084] Bloom map with increased saturation = lerp(low saturation bloom map, bloom map, saturation intensity).

[0085] Furthermore, in order to improve the enhanced image based on the high-saturation image, the following steps are included:

[0086] The highly saturated image and the target game image are mixed through a color filtering algorithm to obtain an enhanced image.

[0087] Optional, because the color filtering algorithm is calculated channel by channel, and the color is composed of three channels: red, green, and blue, it is necessary to calculate them separately to obtain the enhanced image A, that is:

[0088] A red channel = 1-(1-red channel of the bloom image with increased saturation) x (1-red channel of the current game screen)

[0089] A green channel = 1-(1-saturation-enhanced bloom image green channel) x (1-current game screen green channel)

[0090] A blue channel = 1-(1-the blue channel of the bloom image with increased saturation) x (1-the blue channel of the current game screen)

[0091] A = float3 (A red channel, A green channel, A blue channel)

[0092] Image A calculated by the color filtering algorithm performs poorly in white areas, easily causing the originally white image to appear gray. This application also proposes a solution to optimize this graying issue, namely, blending the enhanced image with the initial floodlight image. Optionally, the step of "performing a first fusion process based on the enhanced image and the initial floodlight image to obtain a processed game image" may include blending the enhanced image and the initial floodlight image in a preset ratio to obtain the processed game image.

[0093] For example, using the lerp function to mix images A and B at a 50% ratio to get the final image. That is, the final image => lerp(A,B,0.5).

[0094] Using the method of this embodiment, a first model layer and a second model layer of a target game screen can be obtained, wherein the first and second model layers include first and second game object models, respectively. The first and second game object models are assigned white and black, respectively, and then mapped into a preset texture map to obtain a target texture map. Based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen with a brightness not less than a model brightness threshold is extracted. Based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen with a brightness not less than a global brightness threshold is extracted. Floodlight processing is then performed based on the brightness area. Thus, different brightness thresholds can be used to extract brightness areas for different virtual object models, achieving localized floodlight processing of the game screen.

[0095] Furthermore, this embodiment optimizes the Bloom algorithm. The original Bloom algorithm achieves a bloom effect by directly overlaying a blurred bloom image on the game screen, but this effect can easily cause the image to appear whitish. This embodiment addresses this whitish issue by increasing the saturation of the blurred bloom image and then blending it with the original image using a color filtering algorithm. The filtered image is then blended with the original image at 50%, resolving the issue of the color filtering algorithm causing brighter colors to appear gray, ultimately resulting in an ideal bloom image.

[0096] See also Figure 5 , Figure 5 : is a schematic diagram of the structure of the floodlight processing device for the game screen provided by an embodiment of the present application. The floodlight processing device for the game screen may include:

[0097] A layer acquisition unit 501 is configured to acquire a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0098] A texture drawing unit 502 is configured to assign white and black colors to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and draw the colors into a preset texture map to obtain a target texture map;

[0099] A threshold acquisition unit 503 is configured to acquire a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0100] a brightness region extraction unit 504 configured to extract, based on the white model region in the target texture map, a brightness region on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and to extract, based on the black model region in the target texture map, a brightness region on the second game object model in the target game screen whose brightness is not less than the global brightness threshold;

[0101] The floodlight processing unit 505 is configured to perform floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0102] In an optional example, the floodlight processing unit is used to blur the brightness area in the target game screen to obtain a blurred screen; superimpose the blurred screen with the target game screen to obtain an initial floodlight screen; perform image enhancement processing on the blurred screen to obtain an enhanced screen; and perform a first fusion processing based on the enhanced screen and the initial floodlight screen to obtain a processed game screen.

[0103] In an optional example, the floodlight processing unit is configured to perform saturation enhancement processing on the blurred image to obtain a high-saturation image; and obtain an enhanced image based on the high-saturation image.

[0104] In an optional example, the floodlight processing unit is used to multiply the three image channels of the blurred image by corresponding saturation coefficients to obtain a low-saturation image, wherein the saturation coefficient has a value range of 0-1; and perform a second fusion processing based on the low-saturation image and the blurred image to obtain a high-saturation image.

[0105] In an optional example, the floodlight processing unit is configured to mix the high-saturation image and the target game image through a color filtering algorithm to obtain an enhanced image.

[0106] In an optional example, the floodlight processing unit is configured to mix the enhanced image and the initial floodlight image according to a preset ratio to obtain a processed game image.

[0107] In an optional example, a texture drawing unit is used to obtain depth information of the first game object model and the second game object model in the target game screen; assign white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and draw the colored first game object model and second game object model into a preset texture map according to the depth information to obtain a target texture map.

[0108] In an optional example, a brightness area extraction unit is used to input the global brightness threshold, the model brightness threshold and the target texture map as three parameters of the preset interpolation function in sequence to obtain a brightness reference map, wherein the brightness of the white model area in the brightness reference map is the model brightness threshold, and the brightness of the black model area is the global brightness threshold; compare the brightness of the brightness reference map and the target game screen, and extract the brightness area on the first game object model of the target game screen whose brightness is not lower than the model brightness threshold, and the brightness area on the second game object model whose brightness is not lower than the global brightness threshold.

[0109] Using the device of this embodiment, a first model layer and a second model layer of a target game screen can be obtained. The first and second model layers include first and second game object models, respectively. The first and second game object models are assigned white and black, respectively, and then mapped into a preset texture map to obtain a target texture map. Based on the white model area in the target texture map, a luminance area on the first game object model in the target game screen with a luminance not less than a model luminance threshold is extracted. Based on the black model area in the target texture map, a luminance area on the second game object model in the target game screen with a luminance not less than a global luminance threshold is extracted. Floodlighting is then performed based on the luminance area. Thus, different luminance thresholds can be used to extract luminance areas for different virtual object models, achieving localized floodlighting of the game screen.

[0110] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or other terminal devices. Figure 6 As shown, Figure 6 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 600 includes a processor 601 having one or more processing cores, a memory 602 having one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 is electrically connected to the memory 602. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0111] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device 600. By running or loading software programs and / or modules stored in the memory 602 and calling data stored in the memory 602, it executes various functions of the electronic device 600 and processes data, thereby monitoring the electronic device 600 as a whole.

[0112] In the embodiment of the present application, the processor 601 in the electronic device 600 loads instructions corresponding to one or more application processes into the memory 602 according to the following steps, and the processor 601 runs the application stored in the memory 602 to implement various functions:

[0113] Obtaining a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0114] Assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer respectively, and drawing them into a preset texture map to obtain a target texture map;

[0115] Obtaining a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0116] Extracting, based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and extracting, based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold;

[0117] Floodlight processing is performed based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0118] In an optional example, performing floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen includes:

[0119] Performing blur processing on the brightness area in the target game screen to obtain a blurred screen;

[0120] Superimposing the blurred image with the target game image to obtain an initial floodlit image;

[0121] performing image enhancement processing on the blurred image to obtain an enhanced image;

[0122] A first fusion process is performed based on the enhanced image and the initial floodlight image to obtain a processed game image.

[0123] In an optional example, performing image enhancement processing on the blurred image to obtain an enhanced image includes:

[0124] Performing saturation enhancement processing on the blurred image to obtain a high-saturation image;

[0125] An enhanced picture is obtained based on the high-saturation picture.

[0126] In an optional example, performing saturation enhancement processing on the blurred image to obtain a high-saturation image includes:

[0127] Multiplying the three image channels of the blurred image by corresponding saturation coefficients respectively to obtain a low-saturation image, wherein the saturation coefficient has a value range of 0-1;

[0128] A second fusion process is performed based on the low-saturation image and the blurred image to obtain a high-saturation image.

[0129] In an optional example, obtaining an enhanced picture based on the high-saturation picture includes:

[0130] The high-saturation picture and the target game picture are mixed by a color filtering algorithm to obtain an enhanced picture.

[0131] In an optional example, performing a first fusion process based on the enhanced image and the initial floodlight image to obtain a processed game image includes:

[0132] The enhanced image and the initial floodlight image are mixed according to a preset ratio to obtain a processed game image.

[0133] In an optional example, assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and drawing them into a preset texture map to obtain a target texture map includes:

[0134] Obtaining depth information of the first game object model and the second game object model in the target game screen;

[0135] The first game object model in the first model layer and the second game object model in the second model layer are assigned white and black respectively, and the first game object model and the second game object model assigned colors are drawn into a preset texture map according to the depth information to obtain a target texture map.

[0136] In an optional example, extracting a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold based on the white model area in the target texture map, and extracting a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold based on the black model area in the target texture map, includes:

[0137] Inputting the global brightness threshold, the model brightness threshold, and the target texture map as three parameters of a preset interpolation function in sequence into the preset interpolation function to obtain a brightness reference map, wherein the brightness of the white model area in the brightness reference map is the model brightness threshold, and the brightness of the black model area is the global brightness threshold;

[0138] Compare the brightness of the brightness reference map and the brightness of the target game screen, and extract the brightness area on the first game object model of the target game screen whose brightness is not lower than the model brightness threshold, and the brightness area on the second game object model whose brightness is not lower than the global brightness threshold.

[0139] Therefore, different brightness thresholds can be used to extract brightness areas for different virtual object models, thereby achieving local floodlight processing of the game screen.

[0140] The specific implementation of the above operations can be found in the previous embodiments and will not be repeated here.

[0141] Optional, such as Figure 6 As shown, the electronic device 600 further includes: a touch screen 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. Among them, the processor 601 is electrically connected to the touch screen 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607 respectively. Those skilled in the art will understand that Figure 6 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0142] The touch display screen 603 can be used to display a graphical user interface and receive user operations generated by the graphical user interface. The touch display screen 603 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED) or the like may be used to configure the display panel. The touch panel may be used to collect user touch operations thereon or near the touch panel (such as operations performed by the user using any suitable object or accessory such as a finger, stylus or the like on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 601, and can receive the command sent by the processor 601 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 601 to determine the type of touch event, and then the processor 601 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 603 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize input and output functions. That is, the touch display screen 603 can also be used as part of the input unit 606 to realize the input function.

[0143] In the embodiment of the present application, the processor 601 executes the application program to generate a graphical user interface on the touch screen 603. The touch screen 603 is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.

[0144] The radio frequency circuit 604 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.

[0145] The audio circuit 605 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 605 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. On the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 605 and converted into audio data. The audio data is then output to the processor 601 for processing, and then sent to another electronic device through the radio frequency circuit 604, or the audio data is output to the memory 602 for further processing. The audio circuit 605 may also include an earphone jack to provide communication between external headphones and the electronic device.

[0146] The input unit 606 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0147] Power supply 607 is used to supply power to various components of electronic device 600. Optionally, power supply 607 can be logically connected to processor 601 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. Power supply 607 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0148] although Figure 6 Not shown in the figure, the electronic device 600 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0149] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0151] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any of the methods for processing floodlights on a game screen provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0152] Obtaining a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model;

[0153] Assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer respectively, and drawing them into a preset texture map to obtain a target texture map;

[0154] Obtaining a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer;

[0155] Extracting, based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and extracting, based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold;

[0156] Floodlight processing is performed based on the extracted brightness area and the target game screen to obtain a processed game screen.

[0157] In an optional example, performing floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen includes:

[0158] Performing blur processing on the brightness area in the target game screen to obtain a blurred screen;

[0159] Superimposing the blurred image with the target game image to obtain an initial floodlit image;

[0160] performing image enhancement processing on the blurred image to obtain an enhanced image;

[0161] A first fusion process is performed based on the enhanced image and the initial floodlight image to obtain a processed game image.

[0162] In an optional example, performing image enhancement processing on the blurred image to obtain an enhanced image includes:

[0163] Performing saturation enhancement processing on the blurred image to obtain a high-saturation image;

[0164] An enhanced picture is obtained based on the high-saturation picture.

[0165] In an optional example, performing saturation enhancement processing on the blurred image to obtain a high-saturation image includes:

[0166] Multiplying the three image channels of the blurred image by corresponding saturation coefficients respectively to obtain a low-saturation image, wherein the saturation coefficient has a value range of 0-1;

[0167] A second fusion process is performed based on the low-saturation image and the blurred image to obtain a high-saturation image.

[0168] In an optional example, obtaining an enhanced picture based on the high-saturation picture includes:

[0169] The high-saturation picture and the target game picture are mixed by a color filtering algorithm to obtain an enhanced picture.

[0170] In an optional example, performing a first fusion process based on the enhanced image and the initial floodlight image to obtain a processed game image includes:

[0171] The enhanced image and the initial floodlight image are mixed according to a preset ratio to obtain a processed game image.

[0172] In an optional example, assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and drawing them into a preset texture map to obtain a target texture map includes:

[0173] Obtaining depth information of the first game object model and the second game object model in the target game screen;

[0174] The first game object model in the first model layer and the second game object model in the second model layer are assigned white and black respectively, and the first game object model and the second game object model assigned colors are drawn into a preset texture map according to the depth information to obtain a target texture map.

[0175] In an optional example, extracting a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold based on the white model area in the target texture map, and extracting a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold based on the black model area in the target texture map, includes:

[0176] Inputting the global brightness threshold, the model brightness threshold, and the target texture map as three parameters of a preset interpolation function in sequence into the preset interpolation function to obtain a brightness reference map, wherein the brightness of the white model area in the brightness reference map is the model brightness threshold, and the brightness of the black model area is the global brightness threshold;

[0177] Compare the brightness of the brightness reference map and the brightness of the target game screen, and extract the brightness area on the first game object model of the target game screen whose brightness is not lower than the model brightness threshold, and the brightness area on the second game object model whose brightness is not lower than the global brightness threshold.

[0178] Therefore, different brightness thresholds can be used to extract brightness areas for different virtual object models, thereby achieving local floodlight processing of the game screen.

[0179] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0180] Since the computer program stored in the storage medium can execute the steps in any of the methods for processing the floodlight of a game screen provided in the embodiments of the present application, the beneficial effects that can be achieved by any of the methods for processing the floodlight of a game screen provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0181] The above is a detailed introduction to the floodlight processing method, device, electronic device and computer-readable storage medium for game screens provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for floodlight processing of a game screen, characterized in that: include: Obtaining a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model; Assigning white and black to the first game object model in the first model layer and the second game object model in the second model layer respectively, and drawing them into a preset texture map to obtain a target texture map; Obtaining a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer; Extracting, based on the white model area in the target texture map, a brightness area on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and extracting, based on the black model area in the target texture map, a brightness area on the second game object model in the target game screen whose brightness is not less than the global brightness threshold; Floodlight processing is performed based on the extracted brightness area and the target game screen to obtain a processed game screen.

2. The method for processing floodlights on a game screen according to claim 1, wherein: The step of performing floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen includes: Performing blurring on the brightness area extracted from the target game screen to obtain a blurred screen; Superimposing the blurred image with the target game image to obtain an initial floodlit image; performing image enhancement processing on the blurred image to obtain an enhanced image; A first fusion process is performed based on the enhanced image and the initial floodlight image to obtain a processed game image.

3. The method for processing floodlights on a game screen according to claim 2, wherein: The performing image enhancement processing on the blurred image to obtain an enhanced image includes: Performing saturation enhancement processing on the blurred image to obtain a high-saturation image; An enhanced picture is obtained based on the high-saturation picture.

4. The method for processing floodlights on a game screen according to claim 3, wherein: The step of performing saturation enhancement processing on the blurred image to obtain a high-saturation image includes: Multiplying the three image channels of the blurred image by corresponding saturation coefficients respectively to obtain a low-saturation image, wherein the saturation coefficient has a value range of 0-1; A second fusion process is performed based on the low-saturation image and the blurred image to obtain a high-saturation image.

5. The method for processing floodlights on a game screen according to claim 3, wherein: The step of obtaining an enhanced picture based on the high-saturation picture includes: The high-saturation picture and the target game picture are mixed by a color filtering algorithm to obtain an enhanced picture.

6. The method for floodlight processing of a game screen according to claim 2, characterized in that: The performing a first fusion process based on the enhanced image and the initial floodlight image to obtain a processed game image includes: The enhanced image and the initial floodlight image are mixed according to a preset ratio to obtain a processed game image.

7. The method for processing floodlights on a game screen according to any one of claims 1 to 6, wherein: The step of assigning white and black colors to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and drawing them into a preset texture map to obtain a target texture map includes: Obtaining depth information of the first game object model and the second game object model in the target game screen; The first game object model in the first model layer and the second game object model in the second model layer are assigned white and black respectively, and the first game object model and the second game object model assigned colors are drawn into a preset texture map according to the depth information to obtain a target texture map.

8. The method for processing floodlights on a game screen according to any one of claims 1 to 6, wherein: The step of extracting a brightness region of the first game object model in the target game screen having a brightness not lower than the model brightness threshold based on the white model region in the target texture map, and extracting a brightness region of the second game object model in the target game screen having a brightness not lower than the global brightness threshold based on the black model region in the target texture map, comprises: Inputting the global brightness threshold, the model brightness threshold, and the target texture map as three parameters of a preset interpolation function in sequence into the preset interpolation function to obtain a brightness reference map, wherein the brightness of the white model area in the brightness reference map is the model brightness threshold, and the brightness of the black model area is the global brightness threshold; Compare the brightness of the brightness reference map and the brightness of the target game screen, and extract the brightness area on the first game object model of the target game screen whose brightness is not lower than the model brightness threshold, and the brightness area on the second game object model whose brightness is not lower than the global brightness threshold.

9. A floodlight processing device for a game screen, characterized in that: include: a layer acquisition unit, configured to acquire a first model layer and a second model layer of a target game screen to be processed, wherein the first model layer includes a first game object model in the target game screen, and the second model layer includes a second game object model in the target game screen except the first game object model; A texture drawing unit, configured to assign white and black to the first game object model in the first model layer and the second game object model in the second model layer, respectively, and draw them into a preset texture map to obtain a target texture map; a threshold acquisition unit, configured to acquire a global brightness threshold corresponding to the target game screen and a model brightness threshold corresponding to the first model layer; a brightness region extraction unit, configured to extract, based on the white model region in the target texture map, a brightness region on the first game object model in the target game screen whose brightness is not less than the model brightness threshold, and to extract, based on the black model region in the target texture map, a brightness region on the second game object model in the target game screen whose brightness is not less than the global brightness threshold; The floodlight processing unit is used to perform floodlight processing based on the extracted brightness area and the target game screen to obtain a processed game screen.

10. An electronic device, characterized in that: include: A memory storing executable program code, and a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the floodlight processing method for the game screen according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that The storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the floodlight processing method for a game screen according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Floodlight information processing method, device thereof, storage medium, processor and terminal

    CN107492139A

  • Image floodlight processing method and device and storage medium

    CN112700377A