A virtual character light receiving compensation method and system, an electronic device, and a storage medium

CN122636836BActive Publication Date: 2026-10-23HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611124129.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-23
Estimated Expiration
2046-07-28

Smart Images

  • Figure CN122636836B_ABST
    Figure CN122636836B_ABST
Patent Text Reader

Abstract

The application provides a virtual character light compensation method and system, an electronic device, and a storage medium. The method comprises the following steps: constructing a capability boundary of a physical lamp based on calibration information of the physical lamp; generating an expected lighting state of a target virtual character based on current virtual scene information and associated information of the target virtual character; constructing a lighting difference field by aligning and comparing the capability boundary of the physical lamp and the expected lighting state of the target virtual character; determining a preliminary compensation execution amount by mapping the lighting difference field to each fixed compensation base; wherein the fixed compensation base is a preset structured compensation unit; performing compensation constraint processing and time synchronization processing on the preliminary compensation execution amount based on state information of the target virtual character and response information of the physical lamp to obtain a constrained compensation execution amount; and combining the constrained compensation execution amount with a basic lighting result of the physical lamp to form a dynamic light receiving result of the compensated target virtual character.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual scene construction technology, and in particular to a method and system for compensating for the light received by a virtual character, an electronic device, and a storage medium. Background Technology

[0002] In green screen virtual interactive scenes, characters are typically illuminated by physical lights, and the virtual scene is formed through keying, compositing, or real-time rendering. Because the lighting conditions, interactive events, and lighting requirements of specific areas of the characters in the virtual scene change over time, while physical lights on-site are limited by their installation location, illumination range, control parameters, response speed, and spatial coverage, it is difficult to directly and completely create the complex, dynamic, and localized lighting effects for characters that match the requirements of the virtual scene.

[0003] Existing solutions to this problem typically rely on the overall conditions of physical lighting, i.e., adjusting the position of the physical lights. Alternatively, after generating the virtual scene, uniform post-processing lighting is applied to the entire character image within the virtual scene.

[0004] However, the first method is not only inefficient but also struggles to cover fine-grained lighting needs such as localized color bars, directional changes, and temporal variations. The second method uniformly alters the overall brightness or color, making it difficult to distinguish between the illuminated and unilevered portions of the subject. This means it applies uniform adjustments to all parts, leading to issues like redundant compensation, localized misalignment compensation, and temporal abrupt change compensation, resulting in inconsistencies in area, pose, and the response rhythm of the subject. Therefore, the current methods only offer some improvement and still cannot fully meet the lighting needs of the subject. Summary of the Invention

[0005] In view of the shortcomings of the prior art, this application provides a method and system for compensating for the lighting of virtual characters, an electronic device, and a storage medium to solve the problem that the prior art cannot fully meet the lighting needs of characters.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] The first aspect of this application provides a method for compensating for lighting on virtual characters, including:

[0008] The capability boundary of the physical lamp is constructed based on the calibration information of the physical lamp;

[0009] Based on the current virtual scene information and the association information of the target virtual character, the expected lighting state of the target virtual character is generated.

[0010] An illumination difference field is constructed by aligning and comparing the capability boundary of the physical light with the expected lighting state of the target virtual character.

[0011] By mapping the illumination difference field onto each fixed compensation substrate, a preliminary compensation execution amount is determined; wherein, the fixed compensation substrate is a preset structured compensation unit;

[0012] Based on the state information of the target virtual character and the response information of the physical lamp, the preliminary compensation execution amount is subjected to compensation constraint processing and time synchronization processing to obtain the constraint compensation execution amount;

[0013] The constraint compensation execution amount is combined with the basic lighting result of the physical lamp to form the compensated dynamic lighting result of the target virtual character.

[0014] Optionally, in the above-described method for compensating for lighting on virtual characters, the step of constructing the capability boundary of the physical light based on its calibration information includes:

[0015] Obtain the calibration information of the physical lamp; wherein, the calibration information includes at least the basic parameters of the lamp equipment, offline calibration data, spatial illumination test data, and control response data; the offline calibration data and spatial illumination test data are obtained by performing calibration and testing in the human area;

[0016] The calibration information of the physical lamp is processed to obtain multi-dimensional capability field parameters, and each capability field parameter is structured to obtain the capability boundary of the physical lamp.

[0017] Optionally, in the above-described method for compensating for lighting on virtual characters, generating the expected lighting state of the target virtual character based on the current virtual scene information and the association information of the target virtual character includes:

[0018] Obtain current virtual scene information and associated information of the target virtual character; wherein, the virtual scene information includes virtual scene state, interactive event information, and plot information; the associated information of the target virtual character includes character area and character pose information;

[0019] Based on the virtual scene information and the associated information of the target virtual character, a multi-dimensional lighting state field is generated; wherein, the lighting state field includes the brightness distribution of the character area, color tendency, main light direction, brightness and darkness information, and time change trend.

[0020] The lighting state fields of each dimension are combined to form the expected lighting state of the target virtual character.

[0021] Optionally, in the above-described method for compensating for lighting on virtual characters, the step of aligning and comparing the capability boundary of the physical light with the expected lighting state of the target virtual character to construct a lighting difference field includes:

[0022] Align the capability boundary of the physical lamp and the expected lighting state of the target virtual character to a unified expression domain to obtain the capability boundary vector and the target light-receiving vector;

[0023] The unachievable determination result is determined by judging whether each target light-receiving component in the target light-receiving vector is within the range of the corresponding capability boundary component in the capability boundary vector;

[0024] Based on the capability boundary vector, the target light-receiving vector, and the unachievable determination result, the illumination difference components in each illumination attribute dimension are extracted.

[0025] After unifying the various illumination difference components, an illumination difference field is formed.

[0026] Optionally, in the above-described method for compensating for lighting on virtual characters, the step of determining the initial compensation amount by mapping the lighting difference field to each fixed compensation substrate includes:

[0027] The illumination difference field is mapped onto each fixed compensation substrate to form the candidate compensation demand corresponding to each fixed compensation substrate.

[0028] Based on each of the fixed compensation bases and their corresponding candidate compensation requirements, the action weights corresponding to each of the fixed compensation bases under the set comprehensive constraints are solved.

[0029] Each of the fixed compensation bases is weighted according to its corresponding function weight to obtain the preliminary compensation execution amount.

[0030] Optionally, in the above-described method for compensating for lighting on virtual characters, the step of performing compensation constraint processing and time synchronization processing on the initial compensation execution amount based on the state information of the target virtual character and the response information of the physical light to obtain the constrained compensation execution amount includes:

[0031] Based on the main body region information, boundary transition region information, and background adjacent region information of the target virtual character, the preliminary compensation execution amount is constrained to obtain the first compensation execution amount;

[0032] Based on the local orientation information and action state information of the target virtual character, the first compensation execution amount is adjusted to obtain the second compensation execution amount;

[0033] Based on the response information of the physical lamp, the second compensation execution amount is synchronized and smoothed in time to obtain the constraint compensation execution amount.

[0034] Optionally, in the above-described method for compensating for lighting on virtual characters, the step of constraining the initial compensation execution amount based on the main body region information, boundary transition region information, and background adjacent region information of the target virtual character to obtain a first compensation execution amount includes:

[0035] The initial compensation execution volume is expanded and read according to the compensation base index, spatial location, and time index to obtain each local compensation component;

[0036] Each of the local compensation components is multiplied by the corresponding regional constraint factor to obtain each local constraint compensation component; wherein, the regional constraint factor is generated based on the main body region information, boundary transition region information and background adjacent region information of the target virtual character;

[0037] The various local constraint compensation components are aggregated to obtain the first compensation execution quantity.

[0038] The second aspect of this application provides a virtual character lighting compensation system, including:

[0039] A boundary construction unit is used to construct the capability boundary of the physical lamp based on the calibration information of the physical lamp;

[0040] A state construction unit is used to generate the expected lighting state of the target virtual character based on the current virtual scene information and the association information of the target virtual character.

[0041] The difference field construction unit is used to construct an illumination difference field by aligning and comparing the capability boundary of the physical lamp with the expected illumination state of the target virtual character.

[0042] An execution amount determination unit is used to determine the preliminary compensation execution amount by mapping the illumination difference field to each fixed compensation substrate; wherein, the fixed compensation substrate is a preset structured compensation unit;

[0043] The execution quantity constraint unit is used to perform compensation constraint processing and time synchronization processing on the preliminary compensation execution quantity based on the state information of the target virtual character and the response information of the physical lamp, so as to obtain the constraint compensation execution quantity;

[0044] The combination unit is used to combine the constraint compensation execution amount with the basic lighting result of the physical lamp to form the compensated dynamic lighting result of the target virtual character.

[0045] Optionally, in the above-described virtual character lighting compensation system, the boundary construction unit includes:

[0046] A calibration information acquisition unit is used to acquire the calibration information of the physical lamp; wherein, the calibration information includes at least the basic parameters of the lamp equipment, offline calibration data, spatial illumination test data, and control response data; the offline calibration data and spatial illumination test data are obtained by performing calibration and testing in the human area;

[0047] The capability boundary construction unit is used to process the calibration information of the physical lamp to obtain multi-dimensional capability field parameters, and to perform structured processing on each capability field parameter to obtain the capability boundary of the physical lamp.

[0048] Optionally, in the above-described virtual character lighting compensation system, the state construction unit includes:

[0049] The demand information acquisition unit is used to acquire current virtual scene information and associated information of the target virtual character; wherein, the virtual scene information includes virtual scene state, interactive event information and plot information; the associated information of the target virtual character includes character area and character pose information;

[0050] The state parameter generation unit is used to generate multiple-dimensional lighting state fields based on the virtual scene information and the associated information of the target virtual character; wherein, the lighting state fields include brightness distribution of the character area, color tendency, main light direction, brightness and darkness information, and time change trend;

[0051] The parameter combination unit is used to combine the lighting state fields of each dimension into the expected lighting state of the target virtual character.

[0052] Optionally, in the above-described virtual character lighting compensation system, the differential field construction unit includes:

[0053] Alignment unit, used to align the capability boundary of the physical lamp and the expected lighting state of the target virtual character to a unified expression domain, to obtain capability boundary vector and target light-receiving vector;

[0054] The determination unit is used to determine the unachievable determination result by judging whether each target light-receiving component in the target light-receiving vector is within the range of the corresponding capability boundary component in the capability boundary vector;

[0055] The extraction unit is used to extract the illumination difference components in each illumination attribute dimension based on the capability boundary vector, the target light-receiving vector, and the unachievable determination result.

[0056] The unification unit is used to unify the various illumination difference components to form an illumination difference field.

[0057] Optionally, in the above-described virtual character lighting compensation system, the execution amount determination unit includes:

[0058] The differential mapping unit is used to map the illumination differential field to each fixed compensation substrate to form the candidate compensation demand corresponding to each fixed compensation substrate.

[0059] The weight calculation unit is used to calculate the action weights corresponding to each of the fixed compensation bases under the set comprehensive constraints, based on each of the fixed compensation bases and their corresponding candidate compensation requirements.

[0060] The weighted determination unit is used to weight each of the fixed compensation bases according to its corresponding function weight to obtain the preliminary compensation execution amount.

[0061] Optionally, in the above-described virtual character lighting compensation system, the execution constraint unit includes:

[0062] The first constraint unit is used to constrain the preliminary compensation execution amount based on the main body region information, boundary transition region information and background adjacent region information of the target virtual character, so as to obtain the first compensation execution amount.

[0063] The second constraint unit is used to adjust the first compensation execution amount based on the local orientation information and action state information of the target virtual character to obtain the second compensation execution amount;

[0064] The synchronization unit is used to synchronize and smooth the second compensation execution amount in time based on the response information of the physical lamp, so as to obtain the constraint compensation execution amount.

[0065] Optionally, in the above-described virtual character lighting compensation system, the first constraint unit includes:

[0066] The expansion unit is used to expand and read the initial compensation execution quantity according to the compensation base index, spatial location, and time index to obtain each local compensation component;

[0067] The component constraint unit is used to multiply each of the local compensation components by the corresponding regional constraint factor to obtain each local constraint compensation component; wherein, the regional constraint factor is generated based on the main body region information, boundary transition region information and background adjacent region information of the target virtual character;

[0068] An aggregation unit is used to aggregate the various local constraint compensation components to obtain a first compensation execution quantity.

[0069] A third aspect of this application provides an electronic device, comprising:

[0070] Memory and processor;

[0071] The memory is used to store programs;

[0072] The processor is used to execute the program, which, when executed, is specifically used to implement the virtual character lighting compensation method as described in any of the above.

[0073] The fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed by a processor, is used to implement the virtual character light compensation method as described in any of the preceding claims.

[0074] This application provides a method for lighting compensation for virtual characters. Based on the calibration information of a physical light source, the method constructs the capability boundary of the physical light, thereby characterizing the lighting portion that the physical light can achieve in the current scene. Based on the current virtual scene information and the associated information of the target virtual character, the method generates the expected lighting state of the target virtual character, thus determining the required lighting state for the target virtual character in the current scene. Therefore, by aligning and comparing the capability boundary of the physical light and the expected lighting state of the target virtual character, a lighting difference field is constructed to characterize the lighting portion that the physical light cannot achieve. Then, by mapping the lighting difference field to various fixed compensation bases, the initial compensation execution amount is determined, i.e., the amount to be executed to compensate for the lighting portion that the physical light cannot achieve. The fixed compensation base is a preset structured compensation unit. Based on the state information of the target virtual character and the response information of the physical light, the initial compensation execution amount is subjected to compensation constraint processing and time synchronization processing to obtain a constrained compensation execution amount. This ensures that the compensation execution amount is consistent with the character's area and posture, and synchronized with the response time of the physical light, guaranteeing that the compensated lighting meets the requirements. Finally, the constraint compensation execution amount is combined with the basic lighting result of the physical lights to form the dynamic lighting result of the target virtual character after compensation. In this way, the constraint compensation amount accurately compensates for the lighting needs of the virtual character in the current scene that cannot be met by physical lights, and can ensure consistency in area, posture and physical light response rhythm, thus well meeting the lighting needs of the virtual character. Attached Figure Description

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

[0076] Figure 1 A flowchart illustrating a method for compensating for lighting on a virtual character, as provided in this application embodiment;

[0077] Figure 2 A flowchart illustrating a method for constructing the capability boundary of a physical lamp, as provided in an embodiment of this application;

[0078] Figure 3 A flowchart illustrating a method for generating the expected lighting state of a target virtual character, as provided in an embodiment of this application;

[0079] Figure 4 A flowchart illustrating a method for constructing an illumination difference field as provided in an embodiment of this application;

[0080] Figure 5 A flowchart illustrating a method for determining the initial compensation execution amount provided in this application embodiment;

[0081] Figure 6 A flowchart illustrating a method for constraining the initial compensation execution amount, provided in an embodiment of this application;

[0082] Figure 7 A flowchart illustrating a method for applying regional and boundary constraints to the initial compensation execution amount, as provided in this application embodiment;

[0083] Figure 8 A schematic diagram of the architecture of a virtual character lighting compensation system provided in this application embodiment;

[0084] Figure 9 This is a schematic diagram of the architecture of an electronic device provided in an embodiment of this application. Detailed Implementation

[0085] The technical solutions of the embodiments of this application will be clearly and completely described 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 of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0086] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] This application provides a method for compensating for the lighting of a virtual character, such as... Figure 1 As shown, it includes the following steps:

[0088] S101. Construct the capability boundary of the physical lamp based on the calibration information of the physical lamp.

[0089] It should be noted that this application proposes a capability boundary for a physical lamp. This capability boundary refers to the achievable light-receiving capability of the physical lamp under current system conditions; specifically, it characterizes the achievable light-receiving capability of the physical lamp under given hardware conditions, control parameter ranges, and spatial constraints. Specifically, it may include a description of the achievable range of the physical lamp in various illumination dimensions.

[0090] Therefore, by obtaining calibration information that can characterize the capabilities of a physical lamp, and by determining the capability boundary information of the physical lamp based on this calibration information, the capability boundary of the physical lamp can be constructed. Thus, based on the capability boundary of the physical lamp, the feasible and unfeasible parts of the physical lamp in terms of light reception can be analyzed.

[0091] Optionally, in another embodiment of this application, one specific implementation of step S101 is as follows: Figure 2 As shown, it includes:

[0092] S201. Obtain the calibration information of the physical lamp.

[0093] The calibration information includes at least the luminaire's basic parameters, offline calibration data, spatial illumination test data, and control response data. The luminaire's basic parameters can be directly read from its rated control range and initial capability reference. The offline calibration data and spatial illumination test data are obtained by performing calibration and testing in populated areas and may include actual coverage data, local area light reception differences, and the distribution characteristics of the main illumination direction. The control response data may include the dynamic response characteristics of the luminaire during changes in brightness, color temperature / hue, and gradation processes.

[0094] S202. Process the calibration information of the physical lamp to obtain multi-dimensional capability field parameters, and perform structured processing on each capability field parameter to obtain the capability boundary of the physical lamp.

[0095] Specifically, based on the calibration information of the physical light, structured capability field parameters are formed after spatial location mapping, range statistics, response curve fitting, and field normalization. These parameters represent the achievable illumination range of the physical light in the context of the person's spatial location and current time state. Optionally, the capability field parameters may include, but are not limited to, the person's spatial location index, time / response frame index, achievable brightness range, achievable color temperature or hue range, main illumination direction coverage capability parameters, local light quality change capability parameters, and gradient response capability parameters.

[0096] Optionally, the capability boundaries of a physical lamp can be symbolically represented using a vector or a set of fields, specifically:

[0097] .

[0098] Where x is the spatial location index of the character; t is the time / response frame index; The achievable range of brightness; The range of color temperature or hue that can be achieved; Parameters related to coverage capability in the main illumination direction; This is a parameter representing the ability to change local light quality. This refers to the parameters of the gradual response capability.

[0099] S102. Based on the current virtual scene information and the associated information of the target virtual character, generate the expected lighting state of the target virtual character.

[0100] Among them, the associated information of the target virtual character is the specified information related to the target virtual character.

[0101] It should be noted that the expected lighting state of the target virtual character describes the lighting requirements that the target virtual character should meet in the current scene, i.e., the expected lighting requirements. Therefore, based on the current virtual scene information and the associated information of the target virtual character, the lighting requirements of the target virtual character in the current scene can be analyzed, and the expected lighting state of the target virtual character can be generated. This facilitates the determination of the lighting requirements of the target virtual character that have been met and those that have not been met by the physical lights, and allows for appropriate compensation for the unmet requirements.

[0102] Optionally, in another embodiment of this application, one specific implementation of step S102 is as follows: Figure 3 As shown, it includes:

[0103] S301. Obtain the current virtual scene information and the associated information of the target virtual character.

[0104] The virtual scene information includes the virtual scene state, interactive event information, and plot information. Plot information includes character relationships or narrative logic. The target virtual character's associated information includes the character's location and pose information. The pose information includes the character's posture or orientation auxiliary information.

[0105] Optionally, the virtual scene state can be obtained through virtual engine rendering parameters, which may include, but are not limited to, the overall lighting tone of the scene, ambient light conditions, and material properties of scene elements. Interactive event information can be generated by the event triggering module, indicating the dynamic adjustment requirements of the event on the lighting of local characters, such as scene effects, lighting changes, or lighting changes triggered by character actions. Character relationships or narrative logic can be provided by the scene management system or the script, limiting the lighting focus and tendency of characters in the current scene. Character area and character posture or orientation auxiliary information can be obtained through a keying system, motion capture equipment, or existing 3D geometric models to determine the spatial distribution and direction of target lighting in local areas of the character.

[0106] S302. Based on the virtual scene information and the associated information of the target virtual character, generate multiple dimensions of lighting status fields.

[0107] The lighting status field includes the brightness distribution of the character area, color tendency, main light direction, brightness and darkness information, and time change trend. Color tendency refers to warm / cool tones or hue. Brightness and darkness information refers to local highlights or shadows.

[0108] Brightness distribution in the subject area: Characterizes the light and shadow relationship between the main subject and local areas. Warm / Cool Tone or Hue Tone: Characterizes the target's lighting requirements in terms of color temperature or hue. Main Light Direction: Characterizes the direction of incidence of the main light source in local areas of the subject. Local Highlight / Shadow Areas: Characterizes the light and shadow distribution in the face, torso, or other key areas. Temporal Trend: Characterizes the dynamic changes in the target's lighting requirements as interactive events or scene states occur.

[0109] Optionally, the virtual light source, ambient light, scene color tone, and virtual lighting direction can be analyzed from the virtual scene state; the event trigger time, change amplitude, and change duration can be analyzed from the interactive event information; the main body area and local partitions of the character can be determined from the character area information; the focus of the character's lighting and the area of ​​visual attention can be determined from the character relationship or narrative logic; and the orientation, occlusion relationship, and visibility of local areas can be determined from the character's posture or orientation auxiliary information. Subsequently, based on the above analysis results, the target lighting requirements in the virtual scene are mapped to the relevant spatial position of the character, forming a structured lighting state field of the target virtual character's lighting state.

[0110] Among them, the brightness distribution of the character area can be generated based on the intensity of the virtual light source, ambient light conditions, the position of the character area, and the area of ​​visual attention; the warm / cool tendency or hue tendency can be generated based on the hue of the virtual scene, the color of the virtual light source, and the color change rules corresponding to the interactive events; the direction of the main light can be generated based on the direction of the virtual light source, the character's orientation, and the spatial relationship of the character's local area; the local highlight / shadow area can be generated based on the local partitioning of the character, the direction of the virtual light source, the occlusion relationship, and the area of ​​narrative attention; the temporal change trend can be generated based on the trigger time, duration, and magnitude of the interactive event, as well as the changes in the lighting state of the virtual scene.

[0111] S303. Combine the lighting state fields of each dimension into the expected lighting state of the target virtual character.

[0112] Specifically, the lighting state fields of various dimensions can be combined according to the task space location x, attribute dimension index k, and time index t to form a unified expected lighting state for the target virtual character. Specifically, it can be expressed as:

[0113] .

[0114] Where x is the spatial location index of the character, and t is the time / response frame index. The brightness distribution of the figure area represents the light and dark relationship that the figure and its local areas should achieve at the current time and spatial location. The color temperature or hue tendency indicates the requirements of the target object in terms of color temperature or color bias when receiving light. The main light direction indicates the incident direction of the main light source on a local area of ​​the person. This provides information on localized highlight and shadow areas, representing the distribution of light and shadow in the face, torso, or other key areas. This represents the trend over time, indicating the dynamic change in the target's lighting requirements as interactive events or scene states change.

[0115] S103. By aligning and comparing the capability boundary of the physical lamp with the expected lighting state of the target virtual character, a lighting difference field is constructed.

[0116] Since the capability boundary of a physical light represents its achievable lighting capacity, and the expected lighting state of the target virtual character represents the lighting requirements that the target virtual character needs to achieve in the current scene, by comparing the two, the difference between the lighting achieved by the physical light and the lighting requirements that the target virtual character needs to achieve can be determined. That is, the difference in lighting that the physical light fails to achieve at various spatial positions of the target virtual character forms a lighting difference field. Therefore, corresponding compensation can be made according to the lighting difference field so that the target virtual character can achieve the expected lighting state.

[0117] Specifically, the capability boundaries of a physical light source and the expected lighting state of the target virtual character can be aligned within a unified representation domain, allowing for comparison. This comparison yields a result, which then identifies the illuminated portions that the physical light source cannot achieve independently. Based on these unachievable portions, multiple types of lighting difference components are extracted and organized into a unified lighting difference field.

[0118] Optionally, in another embodiment of this application, one specific implementation of step S103 is as follows: Figure 4 As shown, it includes:

[0119] S401. Align the capability boundary of the physical light and the expected lighting state of the target virtual character to a unified expression domain to obtain the capability boundary vector and the target light-receiving vector.

[0120] It should be noted that, to ensure the comparability of the physical light's capability boundary and the expected lighting state of the target virtual character, both are first transformed into the same comparative expression domain. Optionally, let x represent the spatial location index within the character's area, m represent the lighting attribute dimension index, and t represent the temporal index. The spatial location index is used to characterize a local location or local partition within the character's main area. The attribute dimension index is used to characterize any lighting attribute, such as brightness, hue, main illumination direction, local highlight / shadow tendency, and any lighting attribute in the temporal trend. The temporal index is used to characterize the state position corresponding to the current frame or current moment. Under this unified expression domain, the physical light's capability boundary and the expected lighting state of the target virtual character are mapped to the following target lighting vector and capability boundary vector, respectively:

[0121] .

[0122] in, This represents the original description of the expected lighting state of the target virtual character at position x at time t. This represents the original description of the capability boundary of the physical lamp at position x at time t. This represents a unified expression mapping function used to convert two types of reference objects into comparison vectors with the same field order, the same dimensional constraints, and the same index structure. Represents the target's light-receiving vector. Represents the capability boundary vector.

[0123] Then we can further define m as the index of the lighting attribute dimension, then... This represents the target value of the target's light-receiving vector in the m-th lighting attribute dimension at position x and time t. Similarly, This represents the realizable range of the capability boundary vector at position x and time t in the m-th illumination attribute dimension. Therefore, comparisons in the unified representation domain can be further implemented at the component-level attribute dimensions, meaning comparisons can be made across various attribute dimensions.

[0124] S402. By determining whether each target light-receiving component in the target light-receiving vector is within the range of the corresponding capability boundary component in the capability boundary vector, the unachievable determination result is determined.

[0125] Among them, the determination results of unachievable include the determination results of the light-receiving components of each target in the light-receiving part that are determined to be unachievable by a physical lamp alone.

[0126] Specifically, after completing the alignment described above, for each position x, illumination attribute dimension m, and time t, the corresponding target light-receiving component is determined. Does it fall within the corresponding capability boundary component? Within the achievable range, if the target's light-receiving component is within the achievable range of this capability boundary component, then the lighting requirements of the virtual character at position x, lighting attribute dimension m, and time t can be fully met by the physical light. If the target component exceeds this achievable range, then there are unachievable parts at position x, lighting attribute dimension m, and time t; that is, the physical light cannot meet all the lighting requirements corresponding to the target's light-receiving component, and can only meet some requirements or not at all. Specifically, the unachievable determination result at the component level can be expressed as:

[0127] .

[0128] in, This indicates the unrealizable result of the component level at position x, illumination attribute dimension m, and time t. This is an indicator function. When When this occurs, it indicates that the light component received by the target is determined to be unattainable by a physical lamp alone. When the value is 0, it indicates that the component is within the feasible range of a physical lamp.

[0129] Optionally, if it is necessary to obtain the location-level unachievable judgment result, the judgment results of each attribute dimension at the same location and at the same time can be aggregated simultaneously. Therefore, it can be specifically expressed as:

[0130] .

[0131] S403. Based on the capability boundary vector, the target light-receiving vector, and the unachievable determination result, extract the light difference components in each light attribute dimension.

[0132] It should be noted that the above determination only identifies the target light-receiving components that cannot be fully realized by a physical light source. Therefore, it is necessary to further determine the difference in each of the target light-receiving components that cannot be fully realized by a physical light source across various lighting attribute dimensions, so as to accurately compensate for the difference. Therefore, based on the unrealizable determination results, the light-receiving parts that cannot be realized by a physical light source alone are identified, and they are then categorized and decomposed to output structured lighting difference components.

[0133] Specifically, the unachievable determination result identifies the unachievable target light vector. Then, based on the expected capability boundary vector corresponding to the target light vector, the light difference between the two in each light attribute dimension is determined, thus obtaining the light difference components in each light attribute dimension.

[0134] Optionally, since the unrealizable portion may appear in different lighting attribute dimensions such as brightness, hue, direction, and time variation, this embodiment does not represent the difference with a single error value, but extracts multiple types of lighting difference components according to attribute dimensions. Optionally, let k represent the index of each lighting difference component type, i.e. Where l represents the luminance difference component, c represents the hue difference component, and d represents the directionality difference component. This represents the time-varying difference component. Therefore, k corresponds to the lighting attribute type selected for difference extraction from the lighting attribute dimension index m mentioned above.

[0135] Therefore, at position x and time t, the set of all structured illumination difference components can be represented as:

[0136] .

[0137] in, , , , These represent the brightness difference component, hue difference component, directionality difference component, and time variation difference component, respectively, and are specifically determined based on the difference between the capability boundary vector and the target light-receiving vector.

[0138] Each illumination difference component is determined by the capability boundary vector, the target's light-receiving vector, and the unachievable determination result in the corresponding illumination attribute dimension. Therefore, to ensure that the illumination difference components are consistent with the representation of the unachievable determination result, the illumination difference components can also be represented as:

[0139] .

[0140] in, , , , Let x and t represent the illumination difference component of the k-th class, the target value of the target's light-receiving vector in the illumination attribute dimension k, the realizable range of the entity's capability boundary vector in the illumination attribute dimension k, and the unrealizable determination result in the illumination attribute dimension k, respectively, at position x and time t. This represents the extraction function for the k-th type of illumination difference component.

[0141] Optionally, the brightness difference component can be extracted as the amount by which the target brightness value of the target light-receiving vector exceeds the achievable brightness range of the physical lamp. Therefore, if the achievable brightness range of the physical lamp... The calculation method for the brightness difference component is as follows:

[0142] .

[0143] in, Let x be the target value in the illumination attribute dimension l at position x and time t, i.e., the target brightness value. and These represent the upper and lower bounds of the achievable range of a physical lamp at its corresponding position x and time t in the illumination attribute dimension l, respectively; that is, the lower and upper bounds of the achievable brightness range.

[0144] In other words, the luminance difference component is used to characterize the unattainable difference in brightness and darkness in local areas of a person. When the target luminance value is higher than the upper limit of the achievable luminance of the physical light source, or lower than the lower limit, the excess is extracted as the luminance difference. This component is used in subsequent compensation to handle the residual requirements related to local brightness and darkness compensation.

[0145] Similarly, the hue difference component is used to characterize the unattainable difference in the warm / cool tendency or color bias of the lighting received by a target character. When the lighting state of a target virtual character requires a specific color temperature, warm / cool tendency, or color bias in a certain local area, and the physical light cannot achieve the corresponding range under the current conditions, the corresponding deviation is extracted as the hue difference. This component is used in subsequent compensation to accommodate the residual requirements related to color attribute compensation.

[0146] The directional difference component characterizes the unachievable difference between the target's main illumination direction or local incident direction and the achievable directional coverage capability of the physical light source. When the target's lighting requires the formation of specific directional features in a local area of ​​the subject, but the physical light source is limited by its installation location, illumination angle, or coverage area and cannot form the corresponding direction, the corresponding deviation is extracted as the directional difference. This component is used in subsequent compensation to accommodate residual requirements related to local directional guidance, maintaining stereoscopic effect, and correcting light and shadow relationships.

[0147] The temporal variation difference component characterizes the unattainable difference between the target's lighting change rhythm and the gradual response capability of the physical light. When an interactive event or scene state change requires the character's lighting to change in brightness, hue, or direction within a specific time window, and the physical light cannot match this in terms of response speed, continuity, or gradual change rhythm, the corresponding temporal deviation is extracted as the temporal variation difference. This component is used in subsequent compensation to accommodate residual requirements related to dynamic synchronization, inter-frame continuity, and change rhythm compensation.

[0148] S404. After unifying the various illumination difference components, an illumination difference field is formed.

[0149] Specifically, each illumination difference component is represented uniformly according to its spatial location, temporal index, and component channel.

[0150] Optionally, set A set representing the spatial locations within a character's area. A collection representing time indices. If the channel index represents the illumination difference component, then the illumination difference field can be represented as:

[0151] .

[0152] in, This is an optional extended field used to indicate the validity, priority, or confidence level of the illumination difference component at location x and time t. It can be obtained based on the generation process of the difference component and related input information.

[0153] Correspondingly, the data for any component channel k in the illumination difference field is:

[0154] .

[0155] Therefore, in terms of data organization, the illumination difference field includes at least three types of indexes and fields. The first type is the spatial index field, used to indicate the local location or local partition of the person corresponding to the difference component. The second type is the temporal index field, used to indicate the current frame, current time, or consecutive frame position corresponding to the difference component. The third type is the component channel field, used to distinguish the difference type on different illumination attributes. In addition, extended fields such as valid marker, priority, confidence, or region weight are added to identify whether the illumination difference component enters the subsequent compensation solution, the processing priority of different difference channels, or the importance of the corresponding region.

[0156] Through this unified representation, luminance differences, hue differences, directional differences, and temporal variation differences no longer exist as scattered indices, but are organized into an illumination difference field under the same indexing system. This illumination difference field has a consistent spatial location and temporal index with the expression domain of the unified comparison, and carries the aforementioned structured illumination difference component set on the component channels, thereby ensuring a consistent relationship between the difference source, difference type, and subsequent reading method.

[0157] S104. By mapping the illumination difference field to each fixed compensation substrate, the initial compensation execution amount is determined.

[0158] Since the illumination difference field is determined to be a difference in illumination, it is necessary to further determine the amount that needs to be executed to compensate for this illumination difference field, that is, the actual amount that needs to be compensated. Therefore, the unrealizable difference needs to be converted into the residual illumination compensation control amount that can be executed in the current frame, that is, the preliminary compensation execution amount.

[0159] To convert the realized illumination difference into a compensating quantity, a fixed compensation basis is established, which serves as the basis for the conversion. This fixed compensation basis is a pre-defined structured compensation unit whose field structure and type division remain stable. It is used to accommodate different types of unrealizable differences in the illumination difference field and serves as the basis for subsequent difference mapping and weight calculation. Each fixed compensation basis includes at least the area of ​​effect, illumination attribute tendency, directional tendency, and time response characteristics.

[0160] Specifically, the illumination difference field is mapped onto each fixed compensation basis, converting it into a corresponding compensation execution quantity. Since further constraint processing is required, the currently converted compensation execution quantity is used as the initial compensation execution quantity.

[0161] Optionally, a set of fixed compensation bases can be defined, taking the structural characteristics of the illumination difference field and the real-time, stability, and controllability requirements of the compensation execution as inputs. This provides callable and constrainable compensation objects for illumination difference field mapping. Furthermore, the fixed compensation bases are divided into base types and functional divisions according to the difference type, clarifying the residual compensation tasks undertaken by each base, and determining the number of bases and preset parameters.

[0162] Each fixed compensation base Includes scope Lighting attribute vector Directional attributes and time response function Therefore, the set of all fixed compensation bases can be represented as:

[0163] .

[0164] Optionally, in another embodiment of this application, one specific implementation of step S104 is as follows: Figure 5 As shown, it includes:

[0165] S501. Map the illumination difference field to each fixed compensation base to form the candidate compensation demand corresponding to each fixed compensation base.

[0166] Specifically, input illumination difference field and the set of fixed compensation bases This involves mapping each difference channel in the illumination difference field to its corresponding fixed compensation basis, that is, mapping the illumination difference component of each illumination dimension in the illumination difference field to its corresponding fixed compensation basis, forming a set of candidate compensation requirements corresponding to each fixed compensation basis of the current frame. .in, This represents the i-th fixed compensation base. This represents the candidate compensation requirement corresponding to the i-th fixed compensation base in the current frame.

[0167] Optionally, the illumination difference field can be... The data is read according to spatial location, illumination attribute dimension, and time index to obtain each differential component. .in, This represents the difference component in the illumination difference field at spatial location x, illumination attribute dimension k, and time index t. Wherein, , .

[0168] Fixed compensation base As a structured compensation object, it includes basic attributes such as the area of ​​application, illumination attribute tendency, directional tendency, and time response characteristics. Specifically, a corresponding difference field mapping function can be established for each fixed compensation basis. This is used to convert each difference component in the illumination difference field into a candidate compensation requirement for the fixed compensation base:

[0169] .

[0170] Alternatively, the mapping function can also be represented as an aggregation relationship of the difference component contributions:

[0171] .

[0172] in, The difference component represents the difference field of illumination difference. The mapping coefficient to the i-th fixed compensation base. This mapping coefficient can be based on the difference component type, the spatial location of the difference component, the temporal state of the difference component, and the fixed compensation base. The region of effect, illumination attribute tendency, and directional tendency are generated to characterize the contribution of this difference component to the current candidate compensation demand of the fixed compensation base.

[0173] Through the above mapping relationship, the same difference component Different mapping coefficients can be generated for each fixed compensation base based on its spatial location, illumination attribute dimension, and temporal state. Multiple difference components can also be mapped based on their relationship to the same fixed compensation base. The matching relationships are aggregated to form the candidate compensation demand for this fixed compensation base. Therefore, the difference channels in the illumination difference field no longer directly enter the compensation solution as scattered components, but are organized into a set of candidate compensation requirements oriented towards a fixed compensation basis.

[0174] S502. Based on each fixed compensation base and its corresponding candidate compensation demand, solve for the action weights corresponding to each fixed compensation base under the set comprehensive constraints.

[0175] Among them, the comprehensive constraints are the constraints formed by the comprehensive compensation matching degree, regional rationality, temporal stability, and consistency with the actual lighting.

[0176] To determine the strength of each fixed compensation base in the current frame, it is necessary to calculate the corresponding weight of each fixed compensation base. Furthermore, to ensure that the determined compensation amount meets all requirements, it is necessary to determine the comprehensive result under the established constraints, i.e., the weight of the effect under the target comprehensive constraint.

[0177] Specifically, it can be based on the candidate compensation demand. Fixed compensation base The objective function for weight calculation is constructed using the set of relevant constraints. This objective function is used to form a comprehensive constraint among compensation matching, regional rationality, temporal stability, and consistency with the basic lighting of the physical lamps, and to obtain the action weight corresponding to each fixed compensation basis, i.e., the weight vector of the current frame. Therefore, the objective function is specifically:

[0178] .

[0179] in, , , , The corresponding weight coefficients can be set according to the compensation matching priority, regional constraint strength, temporal continuity requirements, and physical lamp coordination requirements. This represents the current weight combination, which is the combination of the currently selected weights.

[0180] For compensation matching items, it can be based on the candidate compensation demand. A set of fixed compensation bases and the current weight combination The deviation between the corresponding compensation responses is obtained and used to evaluate the degree of matching between the current weight combination and the candidate compensation demand. The regional rationality item can be obtained based on the regional attributes of each fixed compensation base, the spatial distribution of candidate compensation demand, and relevant regional information of the person. It is used to evaluate the degree of matching between the current weight combination and the compensation region. For the temporal stability term, it can be based on the weight vector to be solved in the current frame, i.e., the current weight combination. The solved weight vector of the previous frame The relationship between them is obtained and used to constrain the change magnitude of the compensation weight between adjacent frames. The basic lighting consistency term for physical lamps can be obtained based on the illumination attribute tendency of a fixed compensation base, the candidate compensation demand, and relevant information on the basic lighting of physical lamps. It is used to evaluate the degree of synergy between the residual compensation weight combination and the basic lighting of physical lamps.

[0181] Optionally, after obtaining the current frame weight vector Subsequently, based on the compensation output range, real-time requirements, and physical light response rhythm, each weight component can be trimmed, normalized, or smoothed to keep the effect strength of each fixed compensation base within the executable range and reduce abrupt changes between adjacent frames.

[0182] S503. Weight each fixed compensation base according to its corresponding role weight to obtain the preliminary compensation execution amount.

[0183] Specifically, each fixed compensation base According to its corresponding weight Weighting is performed, which means calculating the compensation execution amount corresponding to each fixed compensation base according to the fixed compensation base, and aggregating all supplementary execution amounts to obtain the preliminary compensation execution amount. Therefore, the preliminary compensation execution amount can be expressed as:

[0184] .

[0185] S105. Based on the state information of the target virtual character and the response information of the physical light, perform compensation constraint processing and time synchronization processing on the preliminary compensation execution quantity to obtain the constraint compensation execution quantity.

[0186] Because the target virtual character in the virtual scene changes dynamically from the previous frame to the current frame, and the physical lights require a certain amount of time to respond after receiving a control command, further processing is needed after obtaining the initial compensation execution amount to achieve accurate lighting compensation. Specifically, based on the state information of the target virtual character, state compensation constraint processing is applied to the initial compensation execution amount, and time synchronization processing is performed based on the response information of the physical lights. Only then is the final constrained compensation execution amount used for lighting compensation output, ensuring that the compensation execution amount remains consistent with the current frame's character area distribution, character posture changes, and the physical response state of the physical lights.

[0187] Specifically, the spatial range, local orientation, and inter-frame variation rhythm of the compensation execution amount can be constrained and modulated based on the character's region, boundaries, local orientation, action state, and physical light gradation response information. The character's region, boundaries, local orientation, action state, and physical light gradation response information can be provided by existing region segmentation, keying results, pose estimation, action state recognition, or lighting control feedback results, respectively.

[0188] Optionally, in another embodiment of this application, a specific implementation of step S105 is to sequentially complete region and boundary constraints, local orientation and motion state modulation, and physical light response synchronization and time smoothing. Therefore, in this embodiment of the application, a specific implementation of step S105 is as follows: Figure 6 As shown, it includes:

[0189] S601. Based on the main area information, boundary transition area information, and background adjacent area information of the target virtual character, the preliminary compensation execution amount is constrained to obtain the first compensation execution amount.

[0190] Specifically, based on the main area information, boundary transition area information, and background adjacent area information of the target virtual character, the spatial range of the preliminary compensation execution amount and the transition intensity near the outline are constrained to obtain the compensation execution amount after the area and boundary constraints, and this is regarded as the first step of the compensation execution amount.

[0191] Optionally, the main body region information, boundary transition region information, and background adjacent region information can be obtained from the region information of the target virtual character in the current frame. The main body region information corresponds to the region within the character where stable compensation can be applied. The boundary transition region information corresponds to the region near the character's outline that requires compensation gradient control. The background adjacent region information corresponds to the background region near the character's outline but located outside the main body. Therefore, by using this region information as a constraint, the effectiveness of the compensation execution within the character's relevant spatial range is limited.

[0192] Optionally, in another embodiment of this application, one specific implementation of step S601 is as follows: Figure 7 As shown, it includes:

[0193] S701. The preliminary compensation execution quantity is expanded and read according to the compensation base index, spatial location and time index to obtain each local compensation component.

[0194] Specifically, the initial compensation amount will be implemented. The local compensation components are obtained by expanding the data according to the compensation base index i, spatial location x, and time index t. Where i represents the corresponding fixed-compensation base index, x represents the spatial location of the person, and t represents the current time index.

[0195] S702. Multiply each local compensation component by the corresponding regional constraint factor to obtain each local constraint compensation component.

[0196] To facilitate the application of region and boundary constraints, a region constraint factor is introduced. The region constraint factor can be generated based on the region affiliation of position x, the transition relationship between position x and the character outline boundary, and the attribute information of the effective region of the i-th fixed compensation base, and is used to modulate the generation of local compensation components.

[0197] In this embodiment, the region constraint factor is generated based on the main body region information, boundary transition region information, and background adjacent region information of the target virtual character. Specifically, depending on whether position x is located in the main body region, boundary transition region, or background adjacent region, preservation, gradual attenuation, or suppression effects are respectively applied, thereby obtaining the modulation... Regional constraint factors .

[0198] Therefore, by applying region and boundary constraints to the local compensation component, the method for obtaining the local constraint compensation component can be expressed as follows:

[0199] .

[0200] in, It represents the local constraint compensation component of the i-th fixed compensation base after being constrained by the region and boundary at position x and time t.

[0201] It should be noted that within the main body area of ​​the target virtual character, the region constraint factor is used to preserve the compensation component that matches that area, ensuring that the compensation amount primarily applies to the areas where the character's lighting needs adjustment. Within the boundary transition area, the region constraint factor is used to gradually attenuate the compensation component, creating a continuous transition in compensation intensity near the character's outline. Within the background adjacent area, the region constraint factor is used to suppress the extension of the compensation component into the background area outside the character, thereby reducing the risk of background miscompensation and artifacts near the outline.

[0202] S703. Aggregate the various local constraint compensation components to obtain the first compensation execution quantity.

[0203] In other words, the first compensation execution quantity is the set of local constraint compensation components at each fixed compensation base and each spatial location, specifically expressed as:

[0204] .

[0205] Where N represents the number of fixed compensation bases.

[0206] S602. Based on the local orientation information and action state information of the target virtual character, adjust the first compensation execution amount to obtain the second compensation execution amount.

[0207] Specifically, based on the local orientation information and action state information of the target virtual character, and further considering the layout area division results, the directional tendency, local range of action and local weight of the first compensation execution amount are modulated to obtain the compensation execution amount after posture and action state adjustment, which is the second compensation execution amount.

[0208] Optionally, local orientation information and motion state information can be provided by pose estimation, body keypoint tracking, or motion state recognition results of the target virtual character in the current frame. Local orientation information characterizes the orientation relationship of the character's face, torso, arms, and other body parts relative to the virtual lighting direction or camera direction. Motion state information characterizes whether the character is currently in a state such as turning, raising an arm, turning sideways, moving rapidly, or remaining still. The body local region segmentation results are used to define the range of different local regions that receive compensated modulation.

[0209] Optionally, the specific implementation of step S602 can be similar to that of step S601, firstly adjusting the first compensation execution amount. Expand the data according to the compensation base index i, spatial location x, and time index t to obtain the local compensation components after region and boundary constraints. .in, yes The local readout results at the i-th fixed compensation base and position x are used for attitude and motion state modulation.

[0210] Similarly, to modulate the attitude and motion of the local compensation components after region and boundary constraints, an attitude and motion modulation factor is introduced. The modulation factor is generated based on the local body region to which position x belongs, the orientation information of that local region, the current action state, and the directional tendency of the i-th fixed compensation base. Its product form is the state modulation factor used for modulation.

[0211] Specifically, based on the degree of matching between the local body orientation and the compensating base direction tendency, as well as the influence of the action state on the stability and range of local compensation, corresponding [compensation methods] are generated. .

[0212] Therefore, by using a state modulation factor to modulate the local compensation component after region and boundary constraints with local orientation and motion state, the method to obtain the local compensation component after local orientation and motion state modulation is as follows:

[0213] .

[0214] It should be noted that during modulation, in regions where the local orientation aligns with the direction of the compensation base, the posture modulation factor is used to preserve or enhance the corresponding compensation component, making the compensation component more concentrated on the visible or light-sensitive local areas of the body under the current orientation. In regions where the local orientation deviates from the direction of the compensation base, the posture modulation factor is used to reduce the intensity of the compensation component, reducing local light distortion caused by the inconsistency between the compensation direction and the subject's current posture.

[0215] Within areas where the action state changes, the posture-motion modulation factor can also adjust the local range and weight of the compensation component based on the amplitude of the action, the rate of change in the local area, or the local occlusion relationship of the body. For example, when the arm is raised, the body is turned, or there is rapid movement, the compensation abrupt change amplitude can be reduced for local areas that are more affected by the action, or the compensation effect can be limited to a local range that matches the current action state, so that the compensation execution amount is continuously adjusted as the character's state changes.

[0216] Similarly, the local compensation components modulated by local orientation and motion state are finally aggregated to obtain the compensation execution amount after attitude and motion state adjustment, i.e., the second compensation execution amount:

[0217] .

[0218] S603. Based on the response information of the physical lamp, the second compensation execution quantity is synchronized and smoothed in time to obtain the constraint compensation execution quantity.

[0219] Optionally, in addition to considering the response of the physical light gradation, it is also necessary to consider the transition between the two frames. Therefore, based on the response information of the physical light gradation, the compensation state of the current frame and the compensation state of the previous frame, the inter-frame change rhythm of the second compensation execution amount can be synchronized and smoothed in time, so as to obtain the final constrained compensation execution amount that is consistent with the physical response process of the physical light, and regard it as the constrained compensation execution amount.

[0220] Optionally, in order to describe the compensation changes in the current frame, the following can be used: The compensation change is obtained by comparing it with the compensation state of the preceding frame, i.e., the constraint compensation execution amount of the preceding frame. This compensation change is used to characterize the magnitude of the change in the compensation execution amount of the current frame relative to the previous frame in terms of intensity, local range, or basis weight, and is one of the inputs for time synchronization and smoothing processing.

[0221] Optionally, the gradual change response information of the physical lamp can be obtained from lighting control commands, physical lamp feedback status, response delay, gradual change duration, or a preset response curve. Furthermore, to synchronize the compensation change with the physical gradual change process of the physical lamp, a physical lamp response synchronization factor can also be introduced. This synchronization factor can be generated based on the response progress of the physical lamp from the previous control state to the current control state, and its product is a time modulation parameter used to constrain and compensate for the rate of change.

[0222] Optionally, it can be generated based on the completion percentage, response delay, or gradient duration corresponding to the current moment in the response curve of the physical light. and used to restrict The actual effective range in the current frame.

[0223] Therefore, the compensation execution amount after synchronization with the physical light response can be expressed as:

[0224] .

[0225] in, The constraint compensation execution amount of the preceding frame, based on it and the second compensation execution amount of the current frame. Then the amount of compensation change can be determined, and thus the rate of compensation change can be determined, thereby enabling the response synchronization factor to be used. Time modulation parameters for constraining and compensating for the rate of change.

[0226] Therefore, specifically when the physical light is in the initial stage of the gradient change... This can limit the range of change in the compensation execution amount, ensuring that the compensation change does not abruptly jump before the physical illumination change of the physical lamp. When the physical lamp is in the middle of the gradual change... This ensures that the rate of compensation change corresponds to the response progress of the physical lamp, reducing the misalignment between changes in the physical lamp and changes in residual compensation. When the physical lamp approaches the target state... The compensation change can be gradually released so that the compensation execution amount converges to a compensation level that matches the current light-receiving state of the target.

[0227] Based on the aforementioned synchronization constraints, the amount of compensation execution is simultaneously limited by the current frame's pose and motion modulation result, the compensation state of the preceding frame, and the response progress of the physical light when changing between frames. This results in... It not only inherits the results of posture and motion modulation, but also maintains consistency with the physical gradation process of the physical lamp in the time dimension.

[0228] S106. Combine the constraint compensation execution quantity with the basic lighting result of the physical lamp to form the dynamic lighting result of the target virtual character after compensation.

[0229] The basic lighting result of the physical lamp represents the basic lighting portion that the physical lamp can actually provide under the current control state, spatial illumination characteristics, and physical response capabilities; that is, the lighting portion that the physical lamp has already achieved. The constraint compensation execution quantity represents the residual compensation portion that the physical lamp cannot simply complete. The two have already established a correspondence in terms of character area, local state, and time response through the aforementioned processing. Therefore, they can be combined together during the target virtual character lighting generation process in the current frame to form the final output, i.e., the compensated dynamic lighting result of the target virtual character.

[0230] Optionally, the basic lighting results of the solid lamp at spatial location x and time t can be denoted as... This represents the basic lighting portion of the character area actually illuminated by the physical light in the current frame. Therefore, this basic lighting portion corresponds to the lighting components achievable within the physical light's capability boundaries. The constraint compensation execution amount... This refers to the residual compensation part obtained after processing such as constructing the illumination difference field, mapping the fixed compensation basis, solving the weights, and constraining the character's state. Therefore, these two parts respectively handle the feasible and unfeasible difference parts of the physical light. Combining them yields the dynamic lighting result of the target virtual character in the current frame, which can be specifically represented as:

[0231] .

[0232] in, This indicates a combination relationship, used to combine the basic lighting results of the physical light with the constraint compensation execution amount to generate the dynamic lighting results of the target virtual character in the current frame. The specific settings can be configured according to the output color space, brightness range, or area mask constraints.

[0233] Optionally, if the basic lighting result of the physical lamp and the constraint compensation execution amount are in the same lighting expression space, the two can be additively combined to obtain the dynamic lighting result of the target virtual character in the current frame.

[0234] Optionally, the two can be limited, normalized, or cropped according to the output color space, brightness range, area mask, or display constraints before being combined and output. It should be noted that the above processing is all an implementation method of the output combination layer and does not change the processing results of the aforementioned difference field construction, compensation basis weight solution, and character state constraints.

[0235] Finally, the dynamic lighting results of the target virtual character after compensation. This is used as the final light-receiving output object. The scene consistency, interaction consistency, and physical light coordination of this result are jointly defined by the aforementioned target state generation, differential field transmission, compensation constraints, and time synchronization process.

[0236] Specifically, Consistency with the virtual scene state stems from the construction process of the target virtual character's lighting state. The light source positions, scene color tones, spatial relationships, and narrative state in the virtual scene are organized into the lighting state of the target virtual character and used as the target reference for subsequent difference comparisons. Therefore, the final output dynamic lighting result is based on the virtual scene's target lighting requirements for the character area, rather than superimposing a fixed compensation effect on the character area.

[0237] The consistency with changes in interactive events stems from the continuous propagation between the target virtual character's lighting state, lighting difference field, and compensation execution amount. When an interactive event causes a change in the character's lighting requirements, this change is first reflected in the target virtual character's lighting state. The target virtual character's lighting state is then compared with the physical light's capability boundary to form an unrealizable difference. This unrealizable difference is further organized into a lighting difference field, and the compensation execution amount for the current frame is formed through fixed compensation basis mapping and weight solving. Thus, changes in lighting caused by interactive events can be propagated along the processing chain to the final output.

[0238] Consistency with the basic lighting of the physical lamp stems from the physical lamp's capability boundaries and compensation constraint process. The physical lamp's capability boundaries define the range of brightness, hue, directional coverage, local variations, and temporal response that the physical lamp can achieve in its current state. The illumination difference field absorbs the residual portion outside this capability range. After being constrained by region and boundary, modulated by local orientation and action state, and synchronized with the physical lamp's gradual response, the compensated execution amount only participates in the output combination within the range that matches the character's region, character state, and physical lamp response.

[0239] Based on the above processing chain, the dynamic lighting result of the character in the current frame is... It is simultaneously constrained by the virtual scene state, changes in interactive events, the capability boundaries of physical lights, the illumination difference field, the constraints of the character's state, and the synchronization of physical light responses. In terms of formation mechanism, this result corresponds to the target's lighting state; in terms of compensation source, it corresponds to the unrealizable difference of physical lights; and in the output stage, it works together with the basic illumination of physical lights on the character's area, thus forming a dynamic lighting result consistent with the logic of the virtual scene.

[0240] This application provides a method for lighting compensation for virtual characters. Based on the calibration information of a physical light, the capability boundary of the physical light is constructed, thereby characterizing the lighting portion that the physical light can achieve in the current scene. Based on the current virtual scene information and the associated information of the target virtual character, the expected lighting state of the target virtual character is generated, thus determining the lighting requirements for the target virtual character in the current scene. Therefore, by aligning and comparing the capability boundary of the physical light and the expected lighting state of the target virtual character, a lighting difference field is constructed to characterize the lighting portion that the physical light cannot achieve. Then, by mapping the lighting difference field to various fixed compensation bases, the preliminary compensation execution amount is determined, i.e., the amount to be executed to compensate for the lighting portion that the physical light cannot achieve. The fixed compensation base is a preset structured compensation unit. Based on the state information of the target virtual character and the response information of the physical light, the preliminary compensation execution amount is subjected to compensation constraint processing and time synchronization processing to obtain a constrained compensation execution amount, ensuring that the compensation execution amount is consistent with the character's area, posture, etc., and synchronized with the physical light's response time, so as to ensure that the compensated lighting meets the requirements. Finally, the constraint compensation execution amount is combined with the basic lighting result of the physical lights to form the dynamic lighting result of the target virtual character after compensation. In this way, the constraint compensation amount compensates for the lighting needs of the virtual character in the current scene that cannot be met by the physical lights, and can ensure the consistency of area, posture and physical light response rhythm, thus well meeting the lighting needs of the virtual character.

[0241] Another embodiment of this application provides a virtual character lighting compensation system, such as... Figure 8 As shown, it includes:

[0242] Boundary construction unit 801 is used to construct the capability boundary of the physical lamp based on the calibration information of the physical lamp.

[0243] The state construction unit 802 is used to generate the expected lighting state of the target virtual character based on the current virtual scene information and the associated information of the target virtual character.

[0244] The differential field construction unit 803 is used to construct a lighting differential field by aligning and comparing the capability boundary of the physical light with the expected lighting state of the target virtual character.

[0245] The execution amount determination unit 804 is used to determine the preliminary compensation execution amount by mapping the illumination difference field to each fixed compensation substrate. The fixed compensation substrate is a preset structured compensation unit.

[0246] The execution quantity constraint unit 805 is used to perform compensation constraint processing and time synchronization processing on the preliminary compensation execution quantity based on the state information of the target virtual character and the response information of the physical light, so as to obtain the constraint compensation execution quantity.

[0247] Combination unit 806 is used to combine the constraint compensation execution quantity with the basic lighting result of the physical lamp to form the compensated dynamic lighting result of the target virtual character.

[0248] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the boundary construction unit includes:

[0249] The calibration information acquisition unit is used to acquire the calibration information of the physical lamp. This calibration information includes at least the lamp's basic parameters, offline calibration data, spatial illumination test data, and control response data. The offline calibration data and spatial illumination test data are obtained by performing calibration and testing in the human-occupied area.

[0250] The capability boundary construction unit is used to process the calibration information of the physical lamp to obtain multi-dimensional capability field parameters, and to perform structured processing on each capability field parameter to obtain the capability boundary of the physical lamp.

[0251] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the state construction unit includes:

[0252] The demand information acquisition unit is used to acquire current virtual scene information and associated information about the target virtual character. The virtual scene information includes the virtual scene state, interactive event information, and plot information. The associated information about the target virtual character includes the character's area and pose information.

[0253] The state parameter generation unit is used to generate multi-dimensional lighting state fields based on virtual scene information and the associated information of the target virtual character. These lighting state fields include brightness distribution in the character area, color tendency, main light direction, brightness and darkness information, and time variation trend.

[0254] The parameter combination unit is used to combine the lighting state fields of various dimensions into the expected lighting state of the target virtual character.

[0255] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the differential field construction unit includes:

[0256] Alignment units are used to align the capability boundaries of physical lights and the expected lighting state of the target virtual character to a unified representation domain, resulting in capability boundary vectors and target lighting vectors.

[0257] The determination unit is used to determine the unachievable result by judging whether each target light-receiving component in the target light-receiving vector is within the range of the corresponding capability boundary component in the capability boundary vector.

[0258] The extraction unit is used to extract the illumination difference components in each illumination attribute dimension based on the capability boundary vector, the target illumination vector, and the unachievable determination result.

[0259] The unification unit is used to unify the various illumination difference components to form an illumination difference field.

[0260] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the execution quantity determination unit includes:

[0261] The differential mapping unit is used to map the illumination differential field to each fixed compensation substrate to form the candidate compensation demand corresponding to each fixed compensation substrate.

[0262] The weighting unit is used to solve the action weights of each fixed compensation base under the given comprehensive constraints, based on each fixed compensation base and its corresponding candidate compensation demand.

[0263] The weighted determination unit is used to weight each fixed compensation base according to its corresponding role weight to obtain the preliminary compensation execution amount.

[0264] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the execution constraint unit includes:

[0265] The first constraint unit is used to constrain the preliminary compensation execution amount based on the main area information, boundary transition area information, and background adjacent area information of the target virtual character, so as to obtain the first compensation execution amount.

[0266] The second constraint unit is used to adjust the first compensation execution amount based on the local orientation information and action state information of the target virtual character to obtain the second compensation execution amount.

[0267] The synchronization unit is used to synchronize and smooth the second compensation execution quantity in time based on the response information of the physical lamp, so as to obtain the constraint compensation execution quantity.

[0268] Optionally, in another embodiment of the virtual character lighting compensation system provided in this application, the first constraint unit includes:

[0269] The expansion unit is used to expand and read the initial compensation execution quantity according to the compensation base index, spatial location, and time index to obtain each local compensation component.

[0270] The component constraint unit is used to multiply each local compensation component by its corresponding regional constraint factor to obtain each local constraint compensation component. The regional constraint factor is generated based on the target virtual character's main body region information, boundary transition region information, and background adjacent region information.

[0271] The aggregation unit is used to aggregate the various local constraint compensation components to obtain the first compensation execution quantity.

[0272] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the implementation process of the corresponding steps in the above method embodiments, and will not be repeated here.

[0273] Another embodiment of this application provides an electronic device, such as... Figure 9 As shown, it includes:

[0274] Memory 901 and processor 902.

[0275] The memory 901 is used to store the program.

[0276] The processor 902 is used to execute the program stored in the memory 901. When the program is executed, it is specifically used to implement the virtual character lighting compensation method provided in any of the above embodiments.

[0277] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed by a processor, is used to implement the virtual character light compensation method provided in any of the above embodiments.

[0278] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0279] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0280] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for compensating for lighting on a virtual character, characterized in that, include: The capability boundary of the physical lamp is constructed based on the calibration information of the physical lamp. The capability boundary of the physical lamp is used to characterize the achievable light-receiving capability of the physical lamp under the current system conditions. Based on the current virtual scene information and the association information of the target virtual character, the expected lighting state of the target virtual character is generated. An illumination difference field is constructed by aligning and comparing the capability boundary of the physical light with the expected lighting state of the target virtual character. By mapping the illumination difference field to each fixed compensation substrate, the initial compensation execution amount is determined; wherein, the fixed compensation substrate is a preset structured compensation unit; the field structure and type division of the structured compensation unit remain stable, and are used to respectively accept different types of unrealizable differences in the illumination difference field; Based on the state information of the target virtual character and the response information of the physical light, the preliminary compensation execution amount is subjected to compensation constraint processing and time synchronization processing to obtain the constraint compensation execution amount. This includes: constraining the preliminary compensation execution amount based on the main body area information, boundary transition area information, and background adjacent area information of the target virtual character, adjusting it based on the local orientation information and action state information of the target virtual character, and then performing time synchronization and smoothing based on the response information of the physical light to obtain the constraint compensation execution amount. The constraint compensation execution amount is combined with the basic lighting result of the physical lamp to form the compensated dynamic lighting result of the target virtual character.

2. The method according to claim 1, characterized in that, The capability boundary of the physical lamp is constructed based on the calibration information of the physical lamp, including: Obtain the calibration information of the physical lamp; wherein, the calibration information includes at least the basic parameters of the lamp equipment, offline calibration data, spatial illumination test data, and control response data; the offline calibration data and spatial illumination test data are obtained by performing calibration and testing in the human area; The calibration information of the physical lamp is processed to obtain multi-dimensional capability field parameters, and each capability field parameter is structured to obtain the capability boundary of the physical lamp.

3. The method according to claim 1, characterized in that, The step of generating the expected lighting state of the target virtual character based on the current virtual scene information and the association information of the target virtual character includes: Obtain current virtual scene information and associated information of the target virtual character; wherein, the virtual scene information includes virtual scene state, interactive event information, and plot information; the associated information of the target virtual character includes character area and character pose information; Based on the virtual scene information and the associated information of the target virtual character, a multi-dimensional lighting state field is generated; wherein, the lighting state field includes the brightness distribution of the character area, color tendency, main light direction, brightness and darkness information, and time change trend; The lighting state fields of each dimension are combined to form the expected lighting state of the target virtual character.

4. The method according to claim 1, characterized in that, The step of aligning and comparing the capability boundary of the physical light with the expected lighting state of the target virtual character to construct a lighting difference field includes: Align the capability boundary of the physical lamp and the expected lighting state of the target virtual character to a unified expression domain to obtain the capability boundary vector and the target light-receiving vector; The unachievable determination result is determined by judging whether each target light-receiving component in the target light-receiving vector is within the range of the corresponding capability boundary component in the capability boundary vector; Based on the capability boundary vector, the target light-receiving vector, and the unachievable determination result, the illumination difference components in each illumination attribute dimension are extracted. After unifying the various illumination difference components, an illumination difference field is formed.

5. The method according to claim 1, characterized in that, The step of determining the initial compensation execution amount by mapping the illumination difference field to each fixed compensation substrate includes: The illumination difference field is mapped onto each fixed compensation substrate to form the candidate compensation demand corresponding to each fixed compensation substrate. Based on each of the fixed compensation bases and their corresponding candidate compensation requirements, the action weights corresponding to each of the fixed compensation bases under the set comprehensive constraints are solved. Each of the fixed compensation bases is weighted according to its corresponding function weight to obtain the preliminary compensation execution amount.

6. The method according to claim 1, characterized in that, Based on the state information of the target virtual character and the response information of the physical light, the initial compensation execution quantity is subjected to compensation constraint processing and time synchronization processing to obtain the constrained compensation execution quantity, including: Based on the main body region information, boundary transition region information, and background adjacent region information of the target virtual character, the preliminary compensation execution amount is constrained to obtain the first compensation execution amount; Based on the local orientation information and action state information of the target virtual character, the first compensation execution amount is adjusted to obtain the second compensation execution amount; Based on the response information of the physical lamp, the second compensation execution amount is synchronized and smoothed in time to obtain the constraint compensation execution amount.

7. The method according to claim 6, characterized in that, The first compensation execution amount is obtained by constraining the preliminary compensation execution amount based on the main body region information, boundary transition region information, and background adjacent region information of the target virtual character, including: The initial compensation execution volume is expanded and read according to the compensation base index, spatial location, and time index to obtain each local compensation component; Each of the local compensation components is multiplied by the corresponding regional constraint factor to obtain each local constraint compensation component; wherein, the regional constraint factor is generated based on the main body region information, boundary transition region information and background adjacent region information of the target virtual character; The various local constraint compensation components are aggregated to obtain the first compensation execution quantity.

8. A virtual character lighting compensation system, characterized in that, include: A boundary construction unit is used to construct the capability boundary of the physical lamp based on the calibration information of the physical lamp. The capability boundary of the physical lamp is used to characterize the achievable light-receiving capability of the physical lamp under the current system conditions. A state construction unit is used to generate the expected lighting state of the target virtual character based on the current virtual scene information and the association information of the target virtual character. The difference field construction unit is used to construct an illumination difference field by aligning and comparing the capability boundary of the physical lamp with the expected illumination state of the target virtual character. An execution quantity determination unit is used to determine the initial compensation execution quantity by mapping the illumination difference field to each fixed compensation substrate; wherein, the fixed compensation substrate is a preset structured compensation unit; the field structure and type division of the structured compensation unit remain stable, and it is used to respectively accept different types of unrealizable differences in the illumination difference field; An execution quantity constraint unit is used to perform compensation constraint processing and time synchronization processing on the preliminary compensation execution quantity based on the state information of the target virtual character and the response information of the physical light, to obtain a constraint compensation execution quantity. This includes: constraining the preliminary compensation execution quantity based on the main body area information, boundary transition area information, and background adjacent area information of the target virtual character; adjusting it based on the local orientation information and action state information of the target virtual character; and then performing time synchronization and smoothing based on the response information of the physical light to obtain the constraint compensation execution quantity. The combination unit is used to combine the constraint compensation execution amount with the basic lighting result of the physical lamp to form the compensated dynamic lighting result of the target virtual character.

9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program, which, when executed, is specifically used to implement the virtual character lighting compensation method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, is used to implement the virtual character lighting compensation method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Illumination information processing method and device, electronic equipment and storage medium

    CN116485704A

  • Virtual and real light alignment method and device, electronic equipment and medium

    CN117496095A