Light control method and storage medium

By acquiring the location data and brightness information of the lighting system, the lighting coefficient of the physical lighting system is automatically adjusted, solving the problem of low lighting control efficiency and achieving efficient lighting matching and image fusion.

CN116506993BActive Publication Date: 2026-05-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-09-09
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, the lighting coefficients of lights are manually adjusted based on the experience of lighting technicians, resulting in low lighting control efficiency and failing to meet the lighting requirements of virtual production.

Method used

By acquiring the location data of the lighting system in the target scene and the brightness information of the virtual lighting system, the lighting coefficient of the physical lighting system is automatically determined, and the physical lighting system is controlled to perform illumination compensation.

Benefits of technology

It improves the control efficiency of physical lighting and its matching degree with virtual scenes, and enhances the visual integration between virtual scenes and real-world foregrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506993B_ABST
    Figure CN116506993B_ABST
Patent Text Reader

Abstract

The application discloses a light control method and a storage medium, and relates to the technical field of light. The method comprises the following steps: acquiring position data of a light system in a target scene; acquiring light information of a virtual light system in a virtual background display screen; determining a light coefficient of the entity light system based on the light information of the virtual light system; and controlling the entity light system to perform light compensation on the target scene by using the light coefficient. On the one hand, the control efficiency of the entity light in the virtual production is improved without manual repeated adjustment of the entity light. On the other hand, since the light coefficient of the entity light is determined based on the light of the virtual light, the matching degree of the entity light and the virtual scene is improved, so that the picture fusion degree of the virtual scene and the real scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of lighting technology, and in particular to a lighting control method and storage medium. Background Technology

[0002] Virtual production refers to a series of computer-aided production and visual filmmaking methods. On a virtual production set, an LED (Light Emitting Diode) screen displays virtual content. In front of the LED screen are actual set props. The camera in the virtual production simultaneously captures both the LED screen and the set props, resulting in a video that blends the images from both. During actual filming, the lights rendered on the LED screen can provide some illumination, but due to the limited brightness of the LED screen itself, it cannot fully meet the lighting requirements of virtual production.

[0003] In related technologies, lighting analysis is often conducted on the set design and shooting lenses based on the lighting technician's personal experience. Various lighting fixtures are placed on-site, and the effects of the images captured by the camera are analyzed in order to adjust the lighting coefficients of the lighting fixtures.

[0004] However, manually adjusting the light coefficient of the lights based on the lighting technician's experience is not very efficient in terms of light control. Summary of the Invention

[0005] This application provides a lighting control method and storage medium, which improves the efficiency of lighting control in virtual filmmaking. The technical solution is as follows:

[0006] On the one hand, a lighting control method is provided, the method comprising:

[0007] Acquire the position data of the lighting system in the target scene, wherein the target scene includes a virtual scene displayed on a virtual background screen and a real foreground, and the lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground;

[0008] Obtain the brightness information of the virtual lighting system in the virtual background display screen, and the brightness information is used to indicate the lighting conditions generated by the virtual lighting system in the virtual background display screen in the target scene;

[0009] The lighting coefficient of the physical lighting system is determined based on the brightness information of the virtual lighting system.

[0010] The physical lighting system is controlled by the light coefficient to perform illumination compensation on the target scene.

[0011] On the other hand, a lighting control device is provided, the device comprising:

[0012] The acquisition module is used to acquire the position data of the lighting system in the target scene. The target scene includes a virtual scene displayed on a virtual background display screen and a real foreground. The lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground.

[0013] The acquisition module is further configured to acquire the brightness information of the virtual lighting system in the virtual background display screen, and the brightness information is used to indicate the lighting conditions generated by the virtual lighting system in the virtual background display screen in the target scene;

[0014] The determination module is used to determine the lighting coefficient of the physical lighting system based on the brightness information of the virtual lighting system;

[0015] The compensation module is used to control the physical lighting system to perform illumination compensation on the target scene using the light coefficient.

[0016] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the lighting control method as described in the above embodiments.

[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the lighting control method as described in the above embodiments.

[0018] On the other hand, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer instructions to implement the lighting control method as described in the above embodiments.

[0019] The beneficial effects of the technical solutions provided in this application include at least the following:

[0020] By acquiring the location data of the lighting system in the target scene and the illumination conditions generated by the virtual lighting system in the target scene, the lighting coefficients of the physical lights in the physical lighting system are automatically controlled. On the one hand, this eliminates the need for repeated manual adjustments to the physical lights, improving the control efficiency of physical lights in virtual production. On the other hand, since the lighting coefficients of the physical lights are determined based on the illumination conditions of the virtual lights, the matching degree between the physical lights and the virtual scene is improved, thereby enhancing the visual integration between the virtual scene and the real foreground. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of a computer system provided in an exemplary embodiment of this application;

[0023] Figure 2 This is a flowchart of a lighting control method provided in an exemplary embodiment of this application;

[0024] Figure 3 This is a schematic diagram of the location information of a lighting system provided in an exemplary embodiment of this application;

[0025] Figure 4 This is a plan view of a physical lighting system provided in an exemplary embodiment of this application;

[0026] Figure 5 This is a flowchart of a lighting control method provided in another exemplary embodiment of this application;

[0027] Figure 6 This is a schematic diagram of the direction information of a physical lighting system provided in an exemplary embodiment of this application;

[0028] Figure 7 This is a schematic diagram of the shooting direction of a camera provided in an exemplary embodiment of this application;

[0029] Figure 8 This is a flowchart of a lighting control method provided in another exemplary embodiment of this application;

[0030] Figure 9 This is a schematic diagram of the angle of virtual lights in a virtual lighting system provided in an exemplary embodiment of this application;

[0031] Figure 10This is a plan view illustrating the positional relationship between a virtual light system and a physical light system provided in an exemplary embodiment of this application;

[0032] Figure 11 This is a planar schematic diagram showing the distance between a virtual light and a spotlight provided in an exemplary embodiment of this application;

[0033] Figure 12 This is an overall flowchart of a lighting control method provided in an exemplary embodiment of this application;

[0034] Figure 13 This is a structural block diagram of a lighting control device provided in an exemplary embodiment of this application;

[0035] Figure 14 This is a structural block diagram of a lighting control device provided in another exemplary embodiment of this application;

[0036] Figure 15 This is a structural block diagram of a computer device provided in an exemplary embodiment of this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0038] In this application, the terms "first" and "second" are used to distinguish between identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first" and "second", nor is there any limitation on the quantity or execution order.

[0039] Virtual production technology is used in the production of video content such as movies and television shows. Virtual production refers to a series of computer-aided production and visual filmmaking methods. On a virtual production set, an LED screen displays virtual content, and actual set props are placed in front of the LED screen. The camera in the virtual production simultaneously captures both the LED screen and the set props, resulting in a video that blends the images from both. During actual filming, the lights rendered on the LED screen can provide some illumination, but due to their inherent brightness, the LED screen cannot fully meet the lighting requirements of virtual production.

[0040] In related technologies, lighting analysis of the set design and camera shots is often based on the lighting technician's personal experience. Various lighting fixtures are placed on-site, and the effects of the footage captured by the camera are analyzed to adjust the lighting coefficients. However, manually adjusting the lighting coefficients based on the lighting technician's experience results in relatively low efficiency in controlling the lighting.

[0041] This application provides a lighting control method, which is illustrative; please refer to the following examples. Figure 1 The diagram illustrates a computer system provided in an exemplary embodiment. The computer system 100 includes a computer device 110, a virtual background display screen 120, a physical lighting system 130, and a camera 140.

[0042] The computer device 110 has a target application installed and running. This target application can be a traditional application, a cloud application, a mini-program or application module within a host application, or a web platform; this embodiment does not limit the specific application. The target application provides rendering and lighting coefficient adjustment functions.

[0043] Rendering Function: Illustratively, computer device 110 and virtual background display screen 120 are connected via a communication network or data transmission interface. Computer device 110 is equipped with a rendering engine. Virtual production personnel can set the rendering data to be rendered on the virtual background display screen 120 within this rendering engine, or adjust the rendering data based on the image data fed back from the virtual background display screen 120. The rendering data includes rendering data from the virtual lighting system, such as... Figure 1 As shown, the virtual lighting system is implemented as a blue ambient light. When the rendering engine sends the rendering data of the blue ambient light to the virtual background display screen 120, the overall lighting of the virtual scene in the virtual background display screen 120 will be displayed as a blue atmosphere.

[0044] Lighting coefficient adjustment function: Illustratively, computer device 110 is connected to physical lighting system 130 and camera 140 via a communication network or data transmission interface. Computer device 110 is equipped with a lighting control engine. When computer device 110 receives a lighting control command, it can optionally send a data acquisition request to physical lighting system 130. Upon receiving the data acquisition request, physical lighting system 130 sends the position data of its physical lights to computer device 110. Computer device 110 then adjusts the position data according to the specified position. The system sends a shooting command to camera 140 based on the location data. Upon receiving the command, camera 140 captures a fused image of the target scene (including the virtual scene in virtual background display 120 and the foreground scene 150) and sends it to computer device 110. After receiving the captured image, computer device 110 calculates the lighting coefficients of physical lighting system 130 in its lighting control engine based on the location data and the captured image information. If computer device 110 and physical lighting system 130 are connected via a communication network, they establish a communication connection via DMX (Digital Multiplex) protocol to the console of physical lighting system 130, sending the lighting coefficients to the console to control physical lighting system 130. If computer device 110 and physical lighting system 130 are connected via a data transmission interface, computer device 110 can directly transmit the lighting coefficients to the console. Figure 1 As shown, when the virtual lighting system is implemented as a blue ambient light, the surface lights located in the target scene can be controlled to emit the same blue light as the virtual lighting system.

[0045] Optionally, the position data of the physical lighting system 130 can also be set by the production staff in the lighting control engine. In this case, the physical lighting system 130 and the computer device 110 do not need to be connected. After the lighting coefficient is calculated, the production staff can input the lighting coefficient into the console through the input device of the console (e.g., keyboard, mouse, etc.) to realize the control of the physical lighting system 130.

[0046] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the location data involved in this application was obtained with full authorization.

[0047] Based on the above description, the lighting control method provided in the embodiments of this application will be explained. Figure 2 A flowchart of a lighting control method provided in an exemplary embodiment of this application is shown, in which the method is applied to, for example... Figure 1 Taking the computer system 100 shown as an example, the method includes:

[0048] Step 201: Obtain the position data of the lighting system in the target scene.

[0049] The target scene includes a virtual scene displayed on a virtual background screen and a real foreground. The lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground.

[0050] As an illustration, the virtual background display can be implemented as multiple LED screens, including a ring-shaped LED screen, a top LED screen, and a bottom LED screen. Please refer to [reference needed]. Figure 3 The modeling scene 300 of the shooting location includes a 240-degree circular LED screen 301 and a top LED screen 302. Optionally, both the circular LED screen 301 and the top LED screen 302 can be rotated and moved up and down.

[0051] A virtual scene refers to the image displayed on a virtual background screen. Optionally, a virtual scene includes at least one of the following elements: virtual environment, virtual character, virtual object, virtual prop, etc., which is not limited in this embodiment. It should be noted that this virtual scene is a visualized scene, that is, in the physical world, the personnel involved in virtual production can see the images in the virtual scene. Therefore, in the process of virtual production, complex scenes and surreal scenes can be created using virtual scenes.

[0052] Optionally, the creator sets the necessary image data in the rendering engine and renders this image data to a virtual background display screen, thus obtaining a virtual scene. This image data includes data related to a virtual lighting system. If this virtual lighting system is rendered to the virtual background display screen, it will be displayed in the virtual scene. For example, the image data includes rendering data for a street lamp; rendering this street lamp to the virtual background display screen will then display it in the virtual scene. Optionally, the rendering engine includes coefficients for the brightness, color, saturation, position in the virtual scene, and direction of illumination of the virtual lights in the virtual lighting system.

[0053] Optionally, the virtual lighting system includes ambient lighting (e.g., sunlight) and luminaire lighting (e.g., streetlights), etc., which are not limited in this application embodiment.

[0054] Realistic foregrounds refer to physical objects in the physical world, generally including in-screen sets and other set props. In-screen sets and virtual scenes are the scenes that will be filmed by cameras. The resulting merged footage is the final video footage obtained from the virtual production. In-screen sets typically include actors and surrounding real-world stacked scenes. Other set props include cameras, physical lighting systems, and other props that do not need to appear in the video footage.

[0055] Optionally, the physical lighting system includes front lights, spotlights, etc., where front lights are mainly used to illuminate the overall environment of the shooting scene, and spotlights are mainly used to illuminate the subject in a specific direction. For example, if the subject is a person, the spotlight can provide illumination from multiple angles, such as front lighting, 45-degree side lighting, and backlighting.

[0056] Optionally, if the above location data is the three-dimensional location data of the lighting system in the target scene, then the method for obtaining the above location data further includes: obtaining the rendering position of the virtual lighting system in the virtual background display screen; obtaining the positions of the surface lights and spotlights in the physical lighting system arranged according to the preset layout.

[0057] For example, for a virtual lighting system, this positional data is data pre-set by the creator in the rendering engine; or, this positional data is data that the creator adjusts the virtual lighting system in real time based on live footage. For a physical lighting system, this positional data is the preset positional data of the physical lights to be set up in the target scene; or, this positional data is the positional data of existing physical lights in the actual target scene.

[0058] Optionally, the preset layout is used to indicate that the front light and spotlight are arranged on an arc at preset intervals with the target scene as the center, and the front light and spotlight are arranged at intervals.

[0059] This is illustrative; please refer to it. Figure 4 It shows a top view of a preset layout of a physical lighting system, in which rectangular marker 401 represents a front light and cone marker 402 represents a spotlight. The front lights and spotlights are arranged alternately on an arc, and the spacing between each front light and each spotlight is the same.

[0060] It should be noted that the arcs mentioned above are not arcs on a plane, but arcs in three-dimensional space. In other words, the height of each surface light and each spotlight in the target scene is different.

[0061] In some optional embodiments, the above-mentioned preset layout can be changed according to the changes in the target being filmed in the target scene. For example, the lamps in the physical lighting system are set on the track, and each lamp has a corresponding track coordinate. When the focus of the filming changes from the large stage to a certain person, the lamps can be automatically moved on the track by changing the corresponding track coordinates of each lamp, thereby changing the illumination position of the physical lights and changing the illumination focus of the physical lights from the large stage to a single person.

[0062] Step 202: Obtain the illumination information of the virtual lighting system in the virtual background display screen.

[0063] Lighting information is used to indicate the lighting conditions produced by the virtual lighting system in the virtual background display in the target scene.

[0064] Optionally, the lighting conditions refer to the lighting direction of the virtual lighting system in the target scene, the brightness and chromaticity of the light generated by the virtual lighting system in the target scene, etc.

[0065] To illustrate, when sunlight is included in the virtual lighting system, the lighting effect of the sunlight will be displayed in the virtual scene on the LED screen. The sunlight on the LED screen will also be mapped onto the real foreground, changing the lighting effect in the real foreground. The display of the sunlight in the virtual scene and the lighting effect of the sunlight on the real foreground are the lighting conditions produced by the sunlight in the target scene.

[0066] To illustrate, when a virtual lighting system includes a blue ambient light, the overall blue lighting effect of the blue ambient light will be displayed in the virtual scene on the LED screen. At the same time, the blue ambient light on the LED screen will be mapped onto the real foreground, making the lighting of the scene in the real foreground appear blue. The display of the blue ambient light in the virtual scene and the influence of the blue ambient light on the lighting atmosphere of the real foreground are the lighting conditions produced by the blue ambient light in the target scene.

[0067] Step 203: Determine the lighting coefficient of the physical lighting system based on the brightness information of the virtual lighting system.

[0068] Optionally, the coefficients of the physical lights in the physical lighting system include brightness, color, saturation, and direction of illumination, etc., which are not limited in this application embodiment.

[0069] Optionally, the brightness and chromaticity of the lights in the physical lighting system can be determined based on the brightness information of the virtual lighting system.

[0070] The brightness and chromaticity generated by the virtual lighting system in the virtual scene are determined in the rendering engine. However, the lighting effect generated by the virtual lighting system in the real foreground is the effect projected onto the real foreground through an LED screen. Limited by the brightness of the LED screen itself, this lighting effect cannot maintain consistency with the brightness and chromaticity generated by the virtual lighting system in the virtual scene. Therefore, a physical lighting system is needed to generate sufficient illumination to reduce the difference between the lighting in the real foreground and the lighting in the virtual scene, thereby improving the blending of the captured image. Illustratively, the brightness and chromaticity data of the target scene under the current virtual lighting system can be obtained, and the brightness and chromaticity coefficients of the lights in the physical lighting system can be determined based on this data.

[0071] Optionally, before determining the brightness and chromaticity of the lights in the physical lighting system, it is also necessary to match the physical lights in the physical lighting system and the virtual lights in the virtual lighting system based on the position data of the virtual lighting system and the physical lighting system.

[0072] To illustrate, if the virtual light in the virtual lighting system is implemented as a directional light, that is, a light shining on a certain location in a specified direction, then it is necessary to determine the physical light in the physical lighting system that has the highest matching degree with the virtual light based on the position of the virtual light in the virtual scene. Then, based on the brightness and chromaticity data of the target scene image under the virtual light, the brightness and chromaticity coefficients of the physical light are determined. For example, if virtual light 1 is illuminating from the left side of the character, then it is necessary to determine the physical light in the physical lighting system that has the highest positional matching degree with virtual light 1 as the compensation light for virtual light 1.

[0073] Optionally, the illumination angle of the physical lights in the physical lighting system can be adjusted based on the brightness information of the virtual lighting system.

[0074] Indicatively, after matching the target virtual light and the target physical light based on the lighting direction of the virtual lighting system, the lighting angle of the target physical light can be adjusted according to the lighting angle of the target virtual light, so that the angle at which the target physical light shines on the target object is as consistent as possible with the angle at which the target virtual light shines on the target object. For example, if the target virtual light shines on a person's face at a 45-degree angle, then the shooting angle of the target physical light can be adjusted so that the angle of the light shining on the person's face is also 45 degrees.

[0075] Step 204: Use the lighting coefficient to control the physical lighting system to perform illumination compensation on the target scene.

[0076] Optionally, if the physical lighting system includes multiple physical lights, after determining the lighting coefficients of the multiple physical lights in the physical lighting system according to the current shooting requirements, the multiple physical lights can be controlled to perform illumination compensation on the target scene based on the lighting coefficients.

[0077] In illustrative terms, a communication connection is established with the control console of the physical lighting system via the DMX protocol to control multiple physical lights; or the manufacturer inputs the light coefficients into the control console of the physical lighting system via input devices such as keyboard and mouse, thereby controlling multiple physical lights. This application embodiment does not limit this.

[0078] Optionally, the lighting coefficient is adjusted based on a preset offset parameter; the adjusted lighting coefficient is used to control the physical lighting system to perform illumination compensation on the target scene.

[0079] The preset offset coefficients include overall offset coefficients and partial offset coefficients. The overall offset coefficient is used to adjust the overall lighting coefficients of multiple physical lights in the physical lighting system. For example, when the virtual environment in the virtual scene changes from daytime to nighttime, the lighting coefficients of multiple physical lights can be adjusted uniformly according to this offset coefficient. The partial offset coefficient is used to adjust the lighting coefficients of a single physical light or a group of physical lights. For example, as the plot progresses, to express a character's inner monologue, lighting can be applied to that character individually, and the lighting coefficient of the physical light directly above that character can be adjusted according to the partial offset coefficient.

[0080] Optionally, the method for determining the aforementioned preset offset coefficient further includes:

[0081] Acquire the captured image of the current target scene; perform image style analysis on the captured image to determine the preset offset parameters.

[0082] Optionally, the captured image of the current target scene is input into the image style prediction model to analyze the captured image and obtain its image style; the image style is then analyzed to obtain the preset offset parameters corresponding to the captured image. Illustratively, the image style prediction model extracts color features, texture features, shape features, size features, text features, etc., corresponding to the captured image, and jointly analyzes these multiple features to obtain the image style corresponding to the captured image; then, the image style is analyzed, and the preset offset parameters corresponding to the captured image are output.

[0083] The visual style prediction model is trained using sample images and reference offset parameters. The reference offset parameters are the offset parameters corresponding to the sample images, labeled by professional lighting technicians based on the visual style. The training process of the visual style prediction model is as follows: input the sample images into the sample model to obtain the sample offset parameters of the sample model; train the sample model based on the differences between the sample offset parameters and the reference offset parameters to obtain the aforementioned visual style prediction model.

[0084] In summary, the lighting control method provided in this application automatically controls the lighting coefficients of physical lights in the physical lighting system by acquiring the position data of the lighting system in the target scene and the illumination conditions generated by the virtual lighting system in the target scene. On the one hand, it eliminates the need for repeated manual adjustments to the physical lights, improving the control efficiency of physical lights in virtual production; on the other hand, since the lighting coefficients of the physical lights are determined based on the illumination conditions of the virtual lights, it improves the matching degree between the physical lights and the virtual scene, thereby improving the image fusion between the virtual scene and the real foreground.

[0085] The method provided in this application adjusts the lighting coefficient based on a preset offset parameter. This offset parameter supports unified adjustment of the lighting coefficients of multiple physical lights, as well as individual adjustment of the lighting coefficients of a single or group of physical lights, further improving the control efficiency of the physical lighting system in virtual filmmaking.

[0086] The method provided in this application embodiment can determine preset offset parameters by analyzing the style of the captured image, and link the image style with the preset offset parameters, thereby improving the matching degree between the physical lighting system and the entire captured image.

[0087] In some alternative embodiments, the physical lighting system includes surface lights, and optionally, the light emitted by the surface lights in the physical lighting system simulates the ambient lighting in the virtual lighting system, that is, the overall brightness in the virtual scene. Figure 5 A flowchart of a lighting control method provided in an exemplary embodiment of this application is shown, in which the method is applied to, for example... Figure 1 Taking the computer system 100 shown as an example, the method includes:

[0088] Step 501: Obtain the position data of the lighting system in the target scene.

[0089] The target scene includes a virtual scene displayed on a virtual background screen and a real foreground. The lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground.

[0090] Optionally, the physical lighting system includes multiple front lights, which are mainly used to illuminate the overall environment of the shooting scene, that is, ambient light. For example, when the shooting scene is at night, the brightness of the front lights is small or not emitted, so the brightness of each position in the virtual scene is dark; when it is necessary to create a horror atmosphere, the front lights can emit colored (e.g., red) light, so that each position in the virtual scene is illuminated in red.

[0091] Optionally, the shooting scene can be modeled in a computer device, such as Figure 3As shown, firstly, a camera 303 is added to the modeling scene 300 of the shooting location to determine the shooting position. Secondly, the position 304 of the surface light in the physical lighting system is added to the modeling scene 300 of the shooting location.

[0092] Optionally, the location data can be obtained in at least one of the following ways:

[0093] 1. The position data of the front lights is the preset layout position.

[0094] The position data of the front light is illustrative and is added directly to the modeling scene by the production staff based on the physical lighting system set up on site.

[0095] 2. The position data of the front lights is real-time feedback to the computer equipment.

[0096] To illustrate, the position data of the surface lights is the position data that is fed back to the modeled scene in real time from the console of the physical lighting system.

[0097] Step 502: Obtain the lighting direction of the area light relative to the virtual scene.

[0098] Optionally, after obtaining the position data of multiple front lights, the directional information corresponding to each front light can be obtained based on the position data. Optionally, this directional information is used to indicate the direction perpendicular to the front light and pointing towards the shooting target. For illustration, please refer to [reference needed]. Figure 6 For the front light 601, arrow 602 indicates the direction of the front light 601 relative to the virtual scene.

[0099] Step 503: Image acquisition is performed in the opposite direction of the illumination direction to obtain the brightness information corresponding to the virtual lighting system.

[0100] Optionally, the method for obtaining the brightness information corresponding to the virtual lighting system further includes the following steps:

[0101] Step 1: In the opposite direction of the illumination direction, perform image acquisition according to the preset pixel precision to obtain a sampled image of the target scene, which corresponds to pixel data.

[0102] This is illustrative; please refer to it. Figure 7 If the light direction of the front light 701 is direction 702, then the camera 703 will capture the scene from the opposite direction 704 of direction 702 to capture the scene of the target scene at this time. It is worth noting that the front light 701 is only a position marker used to locate the position of the light, and does not mean that there is a front light emitting light in the target scene at this time. That is to say, the front light is not emitting light at this time. Therefore, the brightness information of the target scene captured by the camera is only realized through the virtual lighting system.

[0103] Optionally, sampling can be performed according to a preset pixel precision. Optionally, the preset pixel precision can be set to a lower pixel value, such as 16×16 pixels, so the pixel data of the sampled image will be 16×16 pixels.

[0104] Optionally, during sampling, data in the sRGB (standard Red Green Blue) linear space is used for image sampling. That is, the colors collected from the physical space are subjected to gamma correction, so that the pixel values ​​in the sampled image are converted into pixel values ​​in the sRGB linear space.

[0105] Step 2: Average the pixel data corresponding to the sampled image to obtain the average pixel value of the sampled image.

[0106] Optionally, the pixel data corresponding to a single sampled image is averaged to obtain the pixel value of the pixel in the R color channel, the pixel value of the pixel in the G color channel, and the pixel value of the pixel in the B color channel corresponding to the single sampled image. Since the pixel data of a single sampled image is weighted and averaged, the pixel values ​​of the R, G, and B color channels of all pixels in a single sampled image are the same.

[0107] Optionally, the above averaging process includes at least one of the following methods:

[0108] 1. Weighted average processing.

[0109] To illustrate, the pixel value of each pixel in each channel is calculated. Taking a single channel as an example, a weight coefficient is assigned to the pixel value of each pixel in a single channel. The weighted pixel values ​​are summed and then averaged with the total number of pixels. The average pixel value of the pixels in that channel is the average pixel value.

[0110] 2. Take the median and average it.

[0111] To illustrate, the pixel value of each pixel in each channel is calculated. For the pixel values ​​of multiple pixels in a single channel, the median of the multiple pixel values ​​is calculated, and this median is used as the average pixel value of the pixels in that channel.

[0112] 3. Take the maximum value and perform average processing.

[0113] In a schematic way, the pixel value of each pixel in each channel is calculated. For the pixel values ​​of multiple pixels in a single channel, the maximum value among the multiple pixel values ​​is calculated, and the maximum value is taken as the average pixel value of the pixels in that channel.

[0114] Optionally, if the difference between the maximum value and the average of multiple pixel values ​​is greater than a preset threshold, the maximum value cannot be used as the average pixel value. Instead, pixel values ​​smaller than the maximum value but greater than other pixel values ​​can be compared with the average value until the difference between the target pixel value and the average value is less than the threshold. Then, the target pixel value is used as the average pixel value.

[0115] It should be noted that the above examples of averaging are merely illustrative and are not intended to limit the scope of this application.

[0116] Step 3: Map the average pixel value to the luminance-chrominance color space to obtain the luminance and chrominance data corresponding to the sampled image as the lighting information of the virtual lighting system. The luminance data is used to indicate the brightness of the sampled image, and the chrominance data is used to indicate the hue and saturation of the sampled image.

[0117] To illustrate, after obtaining the average pixel value corresponding to the sampled image, it is necessary to convert the unit of the pixel value to the physical unit that matches the virtual light.

[0118] Optionally, the obtained average pixel values ​​in the sRGB linear space are converted to data in the XYZ color space. The XYZ color space is a more computationally efficient color space that can be converted to and from the sRGB color space. After conversion to the XYZ space, the data is further converted to color data in the Yxy space, where the xy values ​​indicate chromaticity data and the Y values ​​indicate luminance data. The algorithm for the above conversion is as follows:

[0119] / / First, multiply the pixel value of each color channel of each pixel in the sRGB color space by 100 to obtain the three components var_R, var_G, and var_B.

[0120] var_R = R × 100

[0121] var_G = G × 100

[0122] var_B = B × 100

[0123] / / Secondly, use var_R, var_G, and var_B to perform matrix transformations to obtain data in the XYZ space.

[0124] X=var_R×0.4124+var_G×0.3576+var_B×0.1805

[0125] Y=var_R×0.2126+var_G×0.7152+var_B×0.0722

[0126] Z=var_R×0.0193+var_G×0.1192+var_B×0.9505

[0127] / / Finally, convert the data in the XYZ space to color data in the Yxy space.

[0128] Y = Y

[0129] x = X / (X + Y + Z)

[0130] y = Y / (X + Y + Z)

[0131] Step 504: Determine the light coefficient of the surface light based on the light information of the virtual lighting system.

[0132] The illuminance coefficient of the front light includes its color temperature and luminance. Optionally, the luminance and chromaticity data corresponding to the sampled image can be converted into the corresponding luminance and color temperature of the front light.

[0133] Optionally, after obtaining the color data in the Yxy space, it is also necessary to convert the units of the color data in the Yxy space to obtain the physical units that match the virtual light. The algorithm for converting chromaticity data xy to light physical units is as follows:

[0134] / / Convert the xy chromaticity data in the Yxy color space to CCT (correlated color temperature).

[0135] n = (x - 0.3320) / (y - 0.1858)

[0136] CCT=-437×n3+3601×n2-6831×n+5517

[0137] For the brightness data Y, since the units of the brightness L of the light to be set and the calculated Y are not consistent, an optional coefficient can be added to control the overall brightness ratio. The formula for calculating the brightness L is as follows:

[0138] Formula 1: L = m × Y

[0139] Here, m is an additional coefficient that can be dynamically adjusted to control the overall brightness ratio.

[0140] Optionally, based on the above steps, the L value is obtained: used to set the brightness of the surface lights in the physical lighting system; the CCT value is obtained: used to set the color temperature of the surface lights in the physical lighting system.

[0141] Step 505: Use the light coefficient to control the area light to perform illumination compensation on the target scene.

[0142] Optionally, the light coefficient of the surface light is adjusted based on a preset offset parameter; the adjusted light coefficient is used to control the surface light to perform illumination compensation on the target scene.

[0143] As an illustration, if the preset offset parameter is implemented as an overall offset coefficient, then the second formula for adjusting the brightness of the surface light is as follows:

[0144] Formula 2: La = La × p, Lb = Lb × p...

[0145] Where p is the overall brightness offset coefficient, and La, Lb, ... are the brightness of the surface lights.

[0146] Formula three for adjusting the color temperature of front lights is as follows:

[0147] Formula 3: CCTTa = CCTTa + o, CCTb = CCTb + o...

[0148] Where o is the overall color temperature offset coefficient, and CCTa, CCTb, ... are the color temperatures of the surface lights.

[0149] To illustrate, if the preset offset parameter is implemented as a partial offset coefficient, the preset offset parameter can adjust the brightness and color temperature of a single front light individually; or, adjust the brightness and color temperature of front lights in a specific area.

[0150] In summary, the lighting control method provided in this application automatically controls the lighting coefficients of physical lights in the physical lighting system by acquiring the position data of the lighting system in the target scene and the illumination conditions generated by the virtual lighting system in the target scene. On the one hand, it eliminates the need for repeated manual adjustments to the physical lights, improving the control efficiency of physical lights in virtual production; on the other hand, since the lighting coefficients of the physical lights are determined based on the illumination conditions of the virtual lights, it improves the matching degree between the physical lights and the virtual scene, thereby improving the image fusion between the virtual scene and the real foreground.

[0151] The method provided in this application obtains the brightness information corresponding to the virtual lighting system by acquiring images of the target scene, thereby determining the lighting coefficient of the front light. The front light is set based on the sampling of the target scene, which improves the matching degree between the front light and the target scene.

[0152] The method provided in this application improves the accuracy of the calculated brightness information by averaging the pixel data corresponding to the sampled image to obtain the brightness information corresponding to the virtual lighting system.

[0153] In some alternative embodiments, the physical lighting system includes a spotlight. Optionally, the light emitted by the spotlight in the physical lighting system simulates the directional light source in the virtual lighting system, that is, the main illumination of a certain object in a certain direction in the virtual scene. Figure 8 A flowchart of a lighting control method provided in an exemplary embodiment of this application is shown, in which the method is applied to, for example... Figure 1 Taking the computer system 100 shown as an example, the method includes:

[0154] Step 801: Obtain the position data of the lighting system in the target scene.

[0155] The target scene includes a virtual scene displayed on a virtual background screen and a real foreground. The lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground.

[0156] Optionally, the physical lighting system includes multiple spotlights. These spotlights are primarily used to illuminate the subject in a specific direction within the shooting scene. For example, if the subject is a person, the spotlights can provide illumination from multiple angles, such as frontal lighting, 45-degree side lighting, and backlighting. Illustratively, the spotlights can simulate the lighting effects of sunlight in a virtual scene.

[0157] Indicative, such as Figure 3 As shown, the position 305 of the spotlight in the physical lighting system is added to the modeled scene 300 of the shooting location.

[0158] Optionally, the location data can be obtained in at least one of the following ways:

[0159] 1. The spotlight position data is the preset layout position.

[0160] As an illustration, the spotlight position data is the position data that the production staff directly added to the modeling scene based on the physical lighting system set up on site.

[0161] 2. The spotlight's position data is real-time feedback to the computer equipment.

[0162] To illustrate, the spotlight's position data is the position data that is fed back to the modeled scene in real time from the console of the physical lighting system.

[0163] Step 802: Obtain the illumination information of the virtual lighting system in the virtual background display screen.

[0164] Optionally, the virtual lighting system includes virtual parallel lights, which are a set of parallel light rays in a virtual scene. The lighting information includes first angle data, which is used to indicate the rotation range of the virtual parallel lights in a preset direction.

[0165] Virtual parallel light, also known as directional light, is a set of parallel rays with a fixed direction of illumination, similar to the effect of sunlight.

[0166] Optionally, the above angle data can be implemented as Euler angle data for a virtual parallel light, which includes three angles (pitch, yaw, roll). Pitch is the pitch angle, representing the angle by which the virtual parallel light rotates around the x-axis; yaw is the yaw angle, representing the angle by which the virtual parallel light rotates around the y-axis; and roll is the roll angle, representing the angle by which the virtual parallel light rotates around the z-axis. Therefore, the first angle data is implemented as the value of the yaw angle of the virtual parallel light, which is also the angle by which the virtual parallel light rotates around the y-axis.

[0167] This is illustrative; please refer to it. Figure 9 In the modeling scene 900 of the shooting location, the parallel light group 901 is the direction and angle of the virtual parallel light rendered on the LED screen. With point A as the center, a coordinate system is established. Based on this coordinate system, the Euler angle data of the virtual parallel light can be determined, including the value of the yaw angle of the virtual parallel light.

[0168] Step 803: Obtain the second angle data of the spotlight.

[0169] The second angle data is used to indicate the range of rotation of the light produced by the spotlight in the target scene in a preset direction.

[0170] Optionally, the second angle data is implemented as the value of the yaw angle of the light produced by the spotlight, that is, the angle of rotation of the light produced by the spotlight around the y-axis.

[0171] To illustrate, for a spotlight in a physical lighting system, a three-dimensional rectangular coordinate system is established with the light emitted by the spotlight as the z-axis, the straight line perpendicular to the light upward as the y-axis, and the straight line perpendicular to both the z-axis and the y-axis as the x-axis. Using this rectangular coordinate system as a reference coordinate system, the value of the yaw angle of the light produced by the spotlight is determined.

[0172] Step 804: Determine the spotlight's light coefficient based on the first angle data and the second angle data.

[0173] Optionally, if the spotlight includes multiple candidate spotlights, the method for determining the spotlight's light coefficient further includes the following steps:

[0174] Step 1: Select the candidate spotlight with the smallest difference between the first angle data and the second angle data corresponding to the multiple candidate spotlights.

[0175] To illustrate, the yaw angle values ​​corresponding to multiple candidate spotlights are calculated separately. The difference between the yaw angle value corresponding to the virtual parallel light and the yaw angle values ​​corresponding to the multiple candidate spotlights is calculated. The candidate spotlight with the smallest difference is determined as the spotlight, that is, the spotlight that matches the virtual parallel light used for the difference calculation.

[0176] Please refer to Figure 10 It shows a planar schematic diagram illustrating the positional relationship between the virtual parallel light and the physical lighting system, such as... Figure 10 As shown, after calculating the value of the yaw angle corresponding to the virtual parallel light 1001, the values ​​of the yaw angles corresponding to spotlights 1-8 are calculated respectively. Spotlight 8 1002, whose value is closest to the yaw angle corresponding to the virtual parallel light 1001, is used as the simulated light in the real foreground of the virtual parallel light 1001 for light compensation of the virtual parallel light 1001.

[0177] Step 2: Determine the adjustment coefficient based on the distance between the virtual lighting system and the spotlight.

[0178] Among them, distance and adjustment coefficient are negatively correlated.

[0179] Alternatively, in the physical world, the brightness of light decreases as the distance between the illuminated object and the light source increases. (For illustrative purposes, please refer to...) Figure 11 If, in the virtual lighting system, the spotlight that matches the virtual parallel light 1101 is 1102, and to simulate the lighting effect of the virtual parallel light 1101 on object C, it is necessary to obtain the light brightness of the virtual parallel light 1101 at point B, rather than the initial brightness of the virtual parallel light 1101, which is the light brightness at point A.

[0180] Optionally, based on the distance from point A to point B, the adjustment factor can be calculated using Formula 4 as follows:

[0181] Formula 4: i = 1 / (1 + dist2)

[0182] Where dist is the distance from point A to point B, and i is the adjustment coefficient.

[0183] Step 3: Determine the spotlight's light coefficient based on the adjustment factor.

[0184] Step 805: Use the light coefficient to control the spotlight to perform illumination compensation on the target scene.

[0185] Optionally, the spotlight's light coefficient is adjusted based on preset offset parameters; the adjusted light coefficient is used to control the spotlight to perform illumination compensation on the target scene.

[0186] For illustrative purposes, if the preset offset parameter is implemented as an overall offset coefficient, the preset offset parameter can adjust the brightness and color temperature of the spotlight as a whole. The adjustment formula can be found in Formula 2 and Formula 3, which will not be elaborated here.

[0187] To illustrate, if the preset offset parameter is implemented as a partial offset coefficient, the preset offset parameter can adjust the brightness and color temperature of a single spotlight individually; or, the brightness and color temperature of spotlights in a specific area can be adjusted.

[0188] In summary, the lighting control method provided in this application automatically controls the lighting coefficients of physical lights in the physical lighting system by acquiring the position data of the lighting system in the target scene and the illumination conditions generated by the virtual lighting system in the target scene. On the one hand, it eliminates the need for repeated manual adjustments to the physical lights, improving the control efficiency of physical lights in virtual production; on the other hand, since the lighting coefficients of the physical lights are determined based on the illumination conditions of the virtual lights, it improves the matching degree between the physical lights and the virtual scene, thereby improving the image fusion between the virtual scene and the real foreground.

[0189] The method provided in this application embodiment obtains the spotlight's light coefficient based on the analysis of the first angle data of the virtual light and the second angle data of the spotlight. The spotlight is then set based on the analysis of the angle data, which improves the matching degree between the spotlight and the target scene.

[0190] The method provided in this application embodiment determines the virtual light that best matches the target spotlight by using the difference between the first angle data of the virtual light and the second angle data of the spotlight, thereby improving the accuracy of matching between the spotlight and the virtual light.

[0191] The method provided in this application adjusts the brightness of the spotlight tube based on the distance between the virtual light and the spotlight, thereby improving the fusion effect of the spotlight when performing lighting compensation on the target scene and further improving the matching degree between the spotlight and the target scene.

[0192] In some optional embodiments, the above-mentioned physical lighting system includes both surface lights and spotlights. Optionally, in a preset lighting layout, the surface lights and spotlights are evenly distributed in the real foreground, and the surface lights are used to simulate the ambient lighting in the virtual scene, while the spotlights are used to simulate the directional light source in the virtual scene. Figure 12 This paper presents an overall flowchart of a lighting control method provided in an embodiment of this application. The method includes:

[0193] S1201: In the target scene, determine the camera's shooting range and shooting angle.

[0194] Indicative, such as Figure 3 As shown, the target scene (i.e. the shooting scene) is modeled, and a camera 303 is added to the modeled scene 300 to determine the shooting range and shooting angle of the camera.

[0195] S1202: Add the location of the physical lighting system in the target scene.

[0196] Indicative, such as Figure 3 As shown, position data of a physical lighting system is added to the modeling scene 300. The physical lighting system includes multiple surface lights and multiple spotlights.

[0197] Optionally, the virtual production staff can directly add the position data of the physical lighting system to the modeling scene 300 based on the layout of multiple front lights and multiple spotlights on the shooting location; or, the control console of the physical lighting system on the shooting location can directly upload multiple front lights and multiple spotlights to the computer device, and the computer will automatically add the labels of multiple front lights and multiple spotlights to the corresponding positions in the modeling scene 300 based on the received position data.

[0198] S1203: Obtain the orientation information of the area light in the target scene.

[0199] Optionally, based on the position data of the front lights obtained in step 1203 and the position of the LED screen in the modeling scene 300, the direction information of the front lights in the target scene can be obtained. This direction information is used to indicate the direction of the light illumination from the front lights. Optionally, the direction information of each front light in the modeling scene 300 in the target scene is obtained, thereby calculating their light coefficients.

[0200] S1204: Sample the target scene from the opposite direction of the front light.

[0201] This is illustrative; please refer to it. Figure 7 If the light direction of the front light 701 is direction 702, then the camera 703 will capture the scene from the opposite direction 704 of direction 702 to capture the scene of the target scene at this time. It is worth noting that the front light 701 is only a position marker used to locate the position of the light, and does not mean that there is a front light emitting light in the target scene at this time.

[0202] Optionally, when sampling the image in the target scene, the sampled image uses data in the sRGB linear space, which can obtain a brightness information with a wider range of brightness. At the same time, the pixel precision of the sampled image can be set to a relatively low value, such as 16×16 pixels, which can indirectly obtain a blurred average value.

[0203] S1205: Averaging the sampled image to obtain the chromaticity and luminance information of the front light.

[0204] Optionally, the obtained sampled images need to be averaged, and a weighted average of the 16×16 pixels in the image obtained from a single light source is performed to obtain an RGB value. Then, this RGB value is converted into data in the XYZ space, and finally, the data in the XYZ space is converted into data in the Yxy space, where Y is the brightness information of a single front light source, and xy is the chromaticity information of a single front light source. The specific algorithm can be found in step 503, and will not be repeated here.

[0205] S1206: Converts the chromaticity and brightness information of the front lights from engine units to light physical units.

[0206] Among them, the physical units of light refer to the CCT value of the light and the brightness (L) of the light.

[0207] Optionally, for the chromaticity information of the front light, the data xy in the Yxy space needs to be converted into CCT values. The conversion algorithm can be found in step 504. For the brightness data of the front light, a coefficient needs to be added between the brightness L of the light and the brightness information Y of the front light to control the overall brightness ratio. The specific formula is Formula 1 (refer to step 504).

[0208] Based on the above steps, the L value can be obtained, which is used to set the brightness of a single front light; the CCT value is used to set the color temperature of a single front light.

[0209] S1207: Obtain the direction information of virtual lights in the virtual lighting system.

[0210] In a schematic way, the position information of the parallel light source in the virtual lighting system is obtained, thereby obtaining its angle, which is the direction information of the virtual light. Optionally, a spotlight from a physical lighting system is used to simulate the main light effect produced by the parallel light in the virtual lighting system, thereby compensating for the illumination produced by the parallel light source in the virtual lighting system.

[0211] Optionally, the above angles refer to the Euler angles (roll, pitch, yaw) of the parallel light source. This application mainly focuses on the value of the yaw angle corresponding to the parallel light source.

[0212] S1208: Based on the direction information of the virtual light, determine the spotlight that best matches this direction from multiple spotlights.

[0213] This is illustrative; please refer to it. Figure 10 Each spotlight is placed on a flat arc line and has a corresponding yaw angle value. Spotlight No. 8 1002, whose yaw angle value is closest to that of virtual parallel light 1001, is used as the simulated light for virtual parallel light 1001 in the real foreground and is used to compensate for the lighting of virtual parallel light 1001.

[0214] S1209: Determine the chromaticity and brightness information of the spotlight based on the distance between the virtual light and the spotlight.

[0215] Optionally, for the chromaticity information of the spotlight, the chromaticity data corresponding to the virtual light is determined as the chromaticity information of the spotlight that matches it. The chromaticity data corresponding to the virtual light is set by the creator in the rendering engine of the computer device.

[0216] Optionally, for the brightness information of the spotlight, it is necessary to consider the attenuation simulation of the distance between the virtual light's position and the spotlight in the physical lighting system. Illustratively, first calculate the distance between the virtual light and the spotlight, then determine the attenuation coefficient according to Formula 4 (step 804). Multiply the original brightness value of the virtual light by this attenuation coefficient to obtain the attenuated brightness value of the light, which is the brightness information of the spotlight.

[0217] S1210: Converts the chromaticity and brightness information of the spotlight from engine units to light physical units.

[0218] Similarly, the chromaticity and luminance information of the spotlight should also be converted into the CCT value and luminance L of the light. The conversion steps can be found in step 504.

[0219] S1211: Transmits control information to the physical lighting system via the DMX protocol.

[0220] In illustrative terms, if the physical lighting system and the computer device communicate based on the DMX protocol, then after the computer device obtains the lighting coefficients of each light in the physical lighting system, it can transmit them to the physical lighting system, thereby controlling each light in the physical lighting system.

[0221] S1212: Provides the first interface for overall control of the brightness and color temperature shift of the lights.

[0222] Optionally, the lighting coefficients can be further processed in the DMX protocol, and the overall lighting control can be weighted in terms of brightness and offset in terms of color temperature, so as to facilitate the overall debugging of the physical lighting system through the first interface later.

[0223] S1213: Provides a second interface for independent control of light brightness and color temperature shift.

[0224] Optionally, the computer equipment also provides a second interface for individually controlling the brightness and color temperature shift of one or more lights, making it easier for production staff to create an artistic atmosphere based on the shooting scene.

[0225] Please refer to Figure 13 The diagram illustrates a structural block diagram of a lighting control device provided in an exemplary embodiment of this application, the device comprising:

[0226] The acquisition module 1300 is used to acquire the position data of the lighting system in the target scene. The target scene includes a virtual scene displayed on a virtual background display screen and a real foreground. The lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground.

[0227] The acquisition module 1300 is further configured to acquire the brightness information of the virtual lighting system in the virtual background display screen, and the brightness information is used to indicate the lighting conditions generated by the virtual lighting system in the virtual background display screen in the target scene;

[0228] The determining module 1310 is used to determine the lighting coefficient of the physical lighting system based on the brightness information of the virtual lighting system;

[0229] The compensation module 1320 is used to control the physical lighting system to perform illumination compensation on the target scene using the light coefficient.

[0230] Please refer to Figure 14 In some optional embodiments, the physical lighting system includes a surface light; the acquisition module 1300 is further configured to acquire the illumination direction of the surface light relative to the virtual scene; the acquisition module 1300 is further configured to perform image acquisition in the opposite direction of the illumination direction to obtain the brightness information corresponding to the virtual lighting system.

[0231] In some optional embodiments, the acquisition module 1300 includes:

[0232] The sampling unit 1301 is used to acquire an image in the opposite direction of the illumination direction according to a preset pixel precision to obtain a sampled image of the target scene, wherein the sampled image corresponds to pixel data;

[0233] The pixel processing unit 1302 is used to perform averaging processing on the pixel data corresponding to the sampled image to obtain the average pixel value of the sampled image.

[0234] The conversion unit 1303 is used to map the average pixel value to a luminance-chrominance color space to obtain the luminance data and chrominance data corresponding to the sampled image as the light information corresponding to the virtual lighting system. The luminance data is used to indicate the brightness of the sampled image, and the chrominance data is used to indicate the hue and saturation of the sampled image.

[0235] In some optional embodiments, the physical lighting system includes a spotlight, and the virtual lighting system includes virtual parallel lights, wherein the virtual parallel lights refer to a set of parallel light rays in the virtual scene, and the brightness information includes first angle data, which is used to indicate the rotation range of the virtual parallel lights in a preset direction; the determining module 1310 includes:

[0236] The acquisition unit 1311 is used to acquire the second angle data of the spotlight, the second angle data being used to indicate the rotation range of the light generated by the spotlight in the target scene in the preset direction;

[0237] The determining module 1310 is further configured to determine the light coefficient of the spotlight based on the first angle data and the second angle data.

[0238] In some optional embodiments, the spotlight includes a plurality of candidate spotlights; the determining module 1310 includes:

[0239] Matching unit 1312 is used to determine the candidate spotlight corresponding to the smallest difference among the differences between the first angle data and the second angle data corresponding to the multiple candidate spotlights as the spotlight;

[0240] The determining module 1310 is further configured to determine an adjustment coefficient based on the distance between the virtual lighting system and the spotlight, wherein the distance is negatively correlated with the adjustment coefficient;

[0241] The determining module 1310 is also used to determine the light coefficient of the spotlight based on the adjustment coefficient.

[0242] In some optional embodiments, the light information includes luminance data and chromaticity data corresponding to the virtual lighting system; the determining module 1310 includes:

[0243] The adjustment unit 1313 is used to adjust the brightness data based on the adjustment coefficient;

[0244] The determining module 1310 is further configured to determine the light coefficient of the spotlight based on the adjusted brightness data and chromaticity data.

[0245] In some optional embodiments, the compensation module 1320 is further configured to adjust the light coefficient based on a preset offset parameter; the compensation module 1320 is further configured to control the physical lighting system to perform illumination compensation on the target scene with the adjusted light coefficient.

[0246] In some optional embodiments, the acquisition module 1300 is further configured to acquire the current shooting image of the target scene; the determination module 1310 is further configured to perform image style analysis on the image style of the shooting image and determine the preset offset parameter.

[0247] In some optional embodiments, the acquisition module 1300 is further configured to acquire the rendering position of the virtual lighting system in the virtual background display screen; the acquisition module 1300 is further configured to acquire the positions of the surface light and the spotlight in the physical lighting system arranged according to a preset layout.

[0248] In some optional embodiments, the preset layout is used to instruct the surface lights and the spotlights to be arranged at preset intervals on an arc with the target scene as the center, and the surface lights and the spotlights are arranged at intervals.

[0249] In summary, the lighting control device provided in this application automatically controls the lighting coefficients of the physical lights in the physical lighting system by acquiring the position data of the lighting system in the target scene and the illumination conditions generated by the virtual lighting system in the target scene. On the one hand, it eliminates the need for repeated manual adjustments to the physical lights, improving the control efficiency of physical lights in virtual production; on the other hand, since the lighting coefficients of the physical lights are determined based on the illumination conditions of the virtual lights, it improves the matching degree between the physical lights and the virtual scene, thereby improving the image fusion between the virtual scene and the real foreground.

[0250] It should be noted that the lighting control device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the lighting control device and the lighting control method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0251] Figure 15This illustration shows a structural block diagram of a computer device 1500 provided in an exemplary embodiment of this application. The computer device 1500 may be a smartphone, tablet computer, Moving Picture Experts Group Audio Layer III (MP3) player, Moving Picture Experts Group Audio Layer IV (MP4) player, laptop computer, or desktop computer. The computer device 1500 may also be referred to as a user device, portable computer device, laptop computer device, desktop computer device, or other names.

[0252] Typically, computer device 1500 includes a processor 1501 and a memory 1502.

[0253] Processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1501 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). Processor 1501 may also include a main processor and a coprocessor. The main processor, also known as the Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1501 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1501 may also include an Artificial Intelligence (AI) processor, which is used to handle computational operations related to machine learning.

[0254] The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1502 is used to store at least one instruction, which is executed by the processor 1501 to implement the lighting control method provided in the method embodiments of this application.

[0255] This is illustrative; the computer device 1500 also includes other components, as those skilled in the art will understand. Figure 15 The structure shown does not constitute a limitation on the computer device 1500, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0256] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. This program can be stored in a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a computer device. The computer-readable storage medium stores at least one instruction, at least one program segment, a code set, or an instruction set, which is loaded and executed by the processor to implement any of the lighting control methods described in the above embodiments.

[0257] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The sequence numbers of the embodiments in this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0258] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor reads and executes the computer instructions from the computer-readable storage medium to implement the lighting control method described in the above embodiments.

[0259] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0260] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A lighting control method, characterized in that, The method includes: Acquire the position data of the lighting system in the target scene, wherein the target scene includes a virtual scene displayed on a virtual background screen and a real foreground, and the lighting system includes a virtual lighting system in the virtual scene and a physical lighting system in the real foreground, wherein the physical lighting system includes at least one of a surface light and a spotlight. The brightness information of the virtual lighting system in the virtual background display screen is obtained. The brightness information is used to indicate the lighting conditions generated by the virtual lighting system in the target scene. The brightness information includes at least one of the sampled image brightness information corresponding to the front light and the first angle data corresponding to the spotlight. The sampled image brightness information is the brightness information of the sampled image of the target scene obtained after image acquisition in the opposite direction of the illumination direction. The illumination direction is the illumination direction of the front light relative to the virtual scene. The first angle data is used to indicate the rotation range of the virtual parallel light in the virtual lighting system in a preset direction. The lighting coefficient is determined based on the brightness information, and the lighting coefficient includes at least one of the surface light lighting coefficient determined based on the brightness information of the sampled image and the spotlight lighting coefficient determined based on the first angle data; The physical lighting system is controlled by the light coefficient to perform illumination compensation on the target scene.

2. The method according to claim 1, characterized in that, The brightness information includes the brightness information of the sampled image corresponding to the surface light; The step of obtaining the brightness information of the virtual lighting system in the virtual background display screen includes: Image acquisition is performed in the opposite direction of the illumination direction according to a preset pixel precision to obtain a sampled image of the target scene, and the sampled image corresponds to pixel data; The pixel data corresponding to the sampled image is averaged to obtain the average pixel value of the sampled image. The average pixel value is mapped to a luminance-chrominance color space to obtain the luminance data and chrominance data corresponding to the sampled image. The luminance data is used to indicate the brightness of the sampled image, and the chrominance data is used to indicate the hue and saturation of the sampled image.

3. The method according to claim 1, characterized in that, The brightness information includes the first angle data corresponding to the spotlight; The determination of the light coefficient based on the brightness information includes: Acquire the second angle data of the spotlight, the second angle data being used to indicate the rotation range of the light generated by the spotlight in the target scene in the preset direction; Based on the first angle data and the second angle data, the spotlight light coefficient is determined.

4. The method according to claim 3, characterized in that, The spotlight includes multiple candidate spotlights; Determining the spotlight light coefficient based on the first angle data and the second angle data includes: The candidate spotlight with the smallest difference between the first angle data and the second angle data corresponding to the plurality of candidate spotlights is determined as the spotlight. An adjustment coefficient is determined based on the distance between the virtual lighting system and the spotlight, wherein the distance is negatively correlated with the adjustment coefficient. The spotlight light coefficient is determined based on the adjustment coefficient.

5. The method according to claim 4, characterized in that, The brightness information also includes the brightness data and chromaticity data corresponding to the virtual lighting system; Determining the spotlight lamp light coefficient based on the adjustment coefficient includes: The brightness data is adjusted based on the adjustment coefficient. Based on the adjusted brightness and chromaticity data, the spotlight light coefficient is determined.

6. The method according to any one of claims 1 to 5, characterized in that, The step of controlling the physical lighting system to perform illumination compensation on the target scene using the light coefficient includes: The light coefficient is adjusted based on preset offset parameters; The adjusted lighting coefficient is used to control the physical lighting system to perform illumination compensation on the target scene.

7. The method according to claim 6, characterized in that, The method further includes: Acquire the captured image of the target scene; The image style of the captured image is analyzed to determine the preset offset parameter.

8. The method according to any one of claims 1 to 5, characterized in that, The acquisition of the position data of the lighting system in the target scene includes: Obtain the rendering position of the virtual lighting system in the virtual background display screen; Obtain the positions of the surface light and the spotlight in the physical lighting system arranged according to a preset layout.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the lighting control method as described in any one of claims 1 to 8.