Highlight rendering method, device, medium and electronic equipment

By obtaining the highlight intensity and offset parameters of the highlight image, anisotropic highlight calculation and intensity superposition are solved, and the consistency and animation effect of the highlight rendering of cartoon characters' hair highlights is improved, improving the accuracy and user experience of animation imaging.

CN114693859BActive Publication Date: 2025-08-26BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210369427.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-08
Publication Date
2025-08-26
Estimated Expiration
2042-04-08

AI Technical Summary

Technical Problem

In the prior art, it is difficult to change the highlight rendering of cartoon characters' hair based on environmental changes, it is difficult to achieve the motion effect of animation, and it is poor in consistency with the highlight shape drawn by art.

Method used

By obtaining the highlight intensity and offset parameters of the highlight image, anisotropic highlight calculation and intensity superposition are performed to ensure the consistency between the highlight rendering image and the highlight image, and to achieve shape stability and lighting effects during the highlight rendering process.

Benefits of technology

It improves the animation imaging accuracy and user experience of cartoon highlight rendering, ensures the similarity between the highlight rendering image and the real highlight observation, and achieves the shape stability and the accuracy of lighting effects during the highlight rendering process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693859B_ABST
    Figure CN114693859B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a highlight rendering method, device, medium, and electronic device. The method includes: obtaining a highlight image and a hair model of a highlight shape to be rendered; determining a highlight intensity parameter corresponding to the highlight shape based on the highlight image, and determining a highlight offset parameter corresponding to the highlight shape based on the highlight image; performing anisotropic highlight calculation based on the highlight offset parameter and the hair model to obtain an anisotropic offset image; and performing intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image. Therefore, when performing highlight rendering, position offset can be performed based on the highlight offset parameter and the hair model during the calculation of the anisotropic highlight, and intensity superposition can be performed based on the highlight intensity parameter to ensure consistency between the highlight rendered shape and the highlight shape in the highlight image, ensure consistency between cartoon highlight rendering and user drawing, and improve the accuracy of animation imaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to a highlight rendering method, device, medium, and electronic device. Background Art

[0002] In real life, different angles of light shining on hair will show different highlights in our sight. In the hair rendering of cartoon characters, different from the highlight rendering of realistic hair, it usually has blocky highlight shapes, such as Figure 1 A in the figure shows a realistic highlight image of hair. Figure 1 The B in the figure shows the hair highlight image under cartoon rendering.

[0003] In related technologies, during the highlight rendering of hair, artists usually draw the highlight shape. After the hair is highlighted based on the texture style of the drawn highlight shape, the obtained highlight image is difficult to change based on changes in the environment, and it is difficult to achieve the motion effect of animation. Summary of the Invention

[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a highlight rendering method, the method comprising:

[0006] Get the highlight image and hair model of the highlight shape to be rendered;

[0007] determining a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and determining a highlight offset parameter corresponding to the highlight shape according to the highlight image;

[0008] performing anisotropic highlight calculation according to the highlight offset parameter and the hair model to obtain an anisotropic offset image;

[0009] Intensity superposition is performed on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0010] In a second aspect, the present disclosure provides a highlight rendering device, the device comprising:

[0011] An acquisition module, used for acquiring a highlight image and a hair model of a highlight shape to be rendered;

[0012] a determination module, configured to determine a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and to determine a highlight offset parameter corresponding to the highlight shape according to the highlight image;

[0013] a first processing module, configured to perform anisotropic highlight calculation according to the highlight offset parameter and the hair model to obtain an anisotropic offset image;

[0014] The second processing module is configured to perform intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0015] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.

[0016] In a fourth aspect, the present disclosure provides an electronic device, comprising:

[0017] a storage device having a computer program stored thereon;

[0018] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0019] In the above technical solution, when performing highlight rendering, the highlight image is first converted into highlight offset parameters and highlight intensity parameters for representation. This allows for positional offsetting based on the highlight offset parameters and the hair model during the calculation of anisotropic highlights, and intensity superposition based on the highlight intensity parameters. This ensures consistency between the rendered highlight shape and the highlight shape in the highlight image, ensuring consistency between cartoon highlight rendering and user drawing, and improving the accuracy of animation imaging. Furthermore, the above solution ensures both shape stability during highlight rendering and anisotropy of highlight rendering, ensuring the accuracy of lighting effects in the interaction between light and line of sight, and ensuring that rendered highlights are similar to observed real-world highlights, thereby enhancing the user experience.

[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings:

[0022] Figure 1 This is a comparison diagram of the highlight images of realistic hair and cartoon hair;

[0023] Figure 2 is a flowchart of a highlight rendering method provided based on an embodiment of the present disclosure;

[0024] Figure 3 is a schematic diagram of a highlight image provided according to an embodiment of the present disclosure;

[0025] Figure 4 It is a schematic diagram of directions under anisotropy in the prior art;

[0026] Figure 5 is a schematic diagram of anisotropic rendering of an image with a fixed range in the prior art;

[0027] Figure 6 is a schematic diagram of an anisotropic migration image provided according to an embodiment of the present disclosure;

[0028] Figure 7 is an image representation of a matrix of highlight intensity parameters provided based on embodiments of the present disclosure;

[0029] Figure 8 is a schematic diagram of a highlight rendering image provided according to an embodiment of the present disclosure;

[0030] Figure 9 is a block diagram of a highlight rendering device provided according to an embodiment of the present disclosure;

[0031] Figure 10 A schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0032] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0033] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0034] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0035] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0036] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0037] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0038] Figure 2 As shown in FIG. , it is a flow chart of a highlight rendering method provided based on an embodiment of the present disclosure, as shown in FIG. Figure 1 As shown, the method may include:

[0039] In step 11, a highlight image of a highlight shape to be rendered and a hair model are obtained. The highlight image can be an image with a highlight shape drawn by an artist. The hair model can be a sphere model, and the surface image of the sphere model can be expanded into a UV image. Accordingly, the highlight image can be a UV image so that it can be mapped onto the hair model. Figure 3 The highlight image shown, where the white area is the highlight shape to be rendered.

[0040] In step 12, a highlight intensity parameter corresponding to the highlight shape is determined according to the highlight image, and a highlight offset parameter corresponding to the highlight shape is determined according to the highlight image.

[0041] The highlight intensity parameter can be used to represent the width information of the highlight shape, and the highlight offset parameter is used to represent the position information of the highlight shape, so that the highlight shape can be uniquely and accurately represented by the highlight intensity parameter and the highlight offset parameter.

[0042] In step 13, anisotropic highlight calculation is performed based on the highlight offset parameters and the hair model to obtain an anisotropic offset image.

[0043] Among them, due to the microscopic structure of the hair, when the hair reflects light, the light will be reflected along the direction of the tangent plane of the hair instead of the usual normal direction, such as Figure 4 As shown in the figure, the cylinder represents a hair, T represents the tangent direction, V represents the viewing direction, L represents the light source direction, and H represents half of the angle between L and V. The light reflection model of the hair uses anisotropic lighting to show highlights on the hair that vary with the light source direction and the viewing direction.

[0044] As an example, the default range and position of highlights in the hair model can be preset. In the prior art, a fixed range of highlights can be generated within the default range based on an anisotropic algorithm. The highlight shape in the anisotropic image is ring-shaped, as shown in FIG. Figure 5 As shown in the white area in the middle, the highlight intensity at each position is the same and is within the default range. The anisotropic highlight algorithm can be an algorithm in the art that is not based on physics, such as the Kajiya-Kay algorithm, or a GGX algorithm that is based on physics, and this disclosure does not limit this.

[0045] As shown in the background technology, in the technical solution disclosed herein, it is necessary to ensure the shape of the highlight. Therefore, in this embodiment, the highlight shape can be offset based on the highlight offset parameter corresponding to the highlight image, and then anisotropic highlight calculation can be performed after the position offset to obtain an anisotropic offset image, such as Figure 6 shown.

[0046] In step 14, intensity superposition is performed on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0047] Among them, when the anisotropic highlight is calculated in step 13, the highlight position is offset, and the corresponding intensity in the highlight image is further superimposed on this basis, so that the highlight shape in the rendered highlight rendering image is controlled based on the offset and intensity corresponding to the highlight image.

[0048] Therefore, in the above technical solution, when performing highlight rendering, the highlight image is first converted into highlight offset parameters and highlight intensity parameters for representation. Therefore, during the calculation of anisotropic highlights, position offset can be performed based on the highlight offset parameters and the hair model, and intensity superposition can be performed based on the highlight intensity parameters. This ensures that the shape of the rendered highlights is consistent with the highlight shape in the highlight image, ensures consistency between cartoon highlight rendering and user drawing, and improves the accuracy of animation imaging. Furthermore, through the above solution, shape stability during highlight rendering can be guaranteed, while anisotropy of highlight rendering can be achieved, ensuring the accuracy of lighting effects in the interaction between light and line of sight, making the rendered highlights similar to real-world highlight observations, and improving the user experience.

[0049] In a possible embodiment, an exemplary implementation of determining the highlight intensity parameter corresponding to the highlight shape according to the highlight image in step 12 may include:

[0050] For each column of the image matrix of the highlight image, the characteristic values ​​of each pixel in the column are accumulated, and a highlight intensity parameter of the column is determined based on the accumulated result corresponding to the column. For example, the highlight intensity parameter of the column can be determined as the ratio of the accumulated result to the height of the column of the highlight image.

[0051] For example, for each column in the image matrix of the highlight image, the highlight intensity parameter of the column can be calculated using the following formula:

[0052]

[0053] Among them, lightValue is used to represent the highlight intensity parameter of this column;

[0054] Color i It is used to represent the characteristic value of the pixel point in the i-th row in the column, that is, the value of the position of the pixel point in the image matrix of the highlight image;

[0055] tex.height is used to represent the total number of pixels in each column of the highlight image, that is, the height of the column.

[0056] Then, based on the highlight intensity parameter of each column in the image matrix, the highlight intensity parameter corresponding to the highlight shape is determined.

[0057] Among them, for each column in the image matrix, the highlight intensity parameter of the column can be determined as the highlight intensity parameter corresponding to each pixel point in the column, so that the highlight intensity parameter corresponding to each pixel point in the image matrix of the highlight image can be obtained, that is, the highlight intensity parameter corresponding to the highlight shape.

[0058] As an example, the highlight intensity parameter can be represented by a parameter matrix. The parameter matrix has the same size as the image matrix corresponding to the highlight image. Then, the highlight intensity parameter of each pixel point can be plotted to the position corresponding to the same pixel point in the parameter matrix, thereby storing the highlight intensity parameter corresponding to the highlight shape through the parameter matrix. The image representation of the obtained parameter matrix is ​​as follows: Figure 7 shown.

[0059] Therefore, through the above technical solution, the intensity features in the highlight image can be extracted, so that each column in the highlight shape can be processed separately, and the intensity relationship between the columns can be obtained to characterize the highlight shape and provide accurate data support for subsequent highlight rendering.

[0060] In a possible embodiment, an exemplary implementation of determining the highlight offset parameter corresponding to the highlight shape according to the highlight image in step 12 may include:

[0061] For each column in the image matrix of the highlight image, the center row number of the highlight shape corresponding to the column is determined.

[0062] Among them, Figure 3 Taking the column shown as an example, we can traverse each pixel in the column row by row and determine the lowest row number and the highest row number of the corresponding highlight shape in the column based on the characteristic value of each pixel, as shown in FIG. Figure 3 As shown, the lowest row number of the corresponding highlight shape in the determined column is p2, and the highest row number is p1.

[0063] Then, the center row number of the highlight shape corresponding to the column can be determined based on the lowest row number and the highest row number. That is, the center row number can be expressed as:

[0064] 0.5*(bottomIndex+topIndex)

[0065] Among them, bottomIndex is used to represent the lowest row number, and topIndex is used to represent the highest row number.

[0066] The highlight offset parameter of the column is determined based on the center row number of the highlight shape corresponding to the column and the center row number corresponding to the highlight image. The center row number corresponding to the highlight image can be expressed as 0.5*tex.height, and the center row number of the highlight shape corresponding to the column minus the center row number corresponding to the highlight image can be used as the offset row number of the column, that is, the offset of the center of the highlight of the column relative to the center of the image. If the center of the highlight corresponding to the column is exactly at the center of the highlight image, the offset is 0. If the center of the highlight corresponding to the column is lower than the center of the highlight image, the offset is negative. If the center of the highlight corresponding to the column is higher than the center of the highlight image, the offset is positive.

[0067] As an example, the offset row number corresponding to the column can be used as the highlight offset parameter corresponding to the column. As another example, the value range of the offset row number is (-0.5*tex.height, 0.5*tex.height), that is, the extreme value of the offset row number is 0.5*tex.height. Accordingly, the offset row number of the column can be standardized to obtain the highlight offset parameter corresponding to the column. The standardization can be to divide the offset row number by the extreme value, so that the offset parameter can be mapped to between -1 and 1. For example, the highlight offset parameter corresponding to each column can be calculated as follows:

[0068] shiftValue=(bottomIndex+topIndex-tex.height) / tex.height

[0069] Among them, shiftValue is used to represent the highlight offset parameter.

[0070] Then, based on the highlight offset parameter of each column in the highlight image, the highlight offset parameter corresponding to the highlight shape is determined.

[0071] Similarly, for each column in the image matrix, the highlight offset parameters of the column can be determined as the highlight offset parameters corresponding to each pixel point in the column, so that the highlight offset parameters corresponding to each pixel point in the image matrix of the highlight image can be obtained, that is, the highlight offset parameters corresponding to the highlight shape.

[0072] Therefore, through the above technical solution, the offset features in the highlight image can be extracted, so that each column in the highlight shape can be processed separately, and the upper and lower offset relationship between the highlights corresponding to each column and the center of the highlight image can be determined to characterize the highlight shape and provide accurate data support for subsequent highlight rendering.

[0073] In one possible embodiment, the highlight offset parameter can also be stored using the image corresponding to the parameter matrix. As described above, the highlight offset parameter ranges from -1 to 1, but when storing data based on an image, its value is typically not negative. Therefore, storing the highlight offset parameter using an image is difficult. Based on this, the present disclosure further provides the following embodiments for further processing the highlight offset parameter.

[0074] Optionally, another exemplary implementation of determining the highlight offset parameter corresponding to the highlight shape based on the highlight offset parameter of each column in the highlight image may include:

[0075] The highlight offset parameter of each column is mapped into a target range to obtain an offset mapping value corresponding to each column, wherein the value of the target range is a positive value.

[0076] Among them, as described in the example above, the value range of the determined highlight offset parameter is (-1, 1), then the highlight offset parameter can be further mapped to the target range, and the lower limit of the target range is greater than 0, that is, the mapped offset mapping value is a positive value, so it can be stored in the image. The value range of the highlight offset parameter is (-1, 1), then for example, the target range can be (0, 1), and can be mapped using the following formula:

[0077] shiftValue'=0.5+0.5*shiftValue

[0078] Here, the shiftValue' is the offset mapping value obtained after mapping the highlight offset parameter shiftValue.

[0079] A parameter image matrix formed by the offset mapping values ​​corresponding to each column is determined as the highlight offset parameters corresponding to the highlight shape.

[0080] Accordingly, the offset mapping value corresponding to each column can be used to determine the value of each pixel in the column, thereby forming the parameter image matrix. The highlight offset parameters corresponding to the highlight shape are stored in the parameter image matrix, and the image representation corresponding to the obtained parameter image matrix is ​​that in each column of the image, the values ​​of the elements contained in the column are the same, and its representation is also the same as Figure 7 A similar strip image is shown.

[0081] Therefore, through the above technical solution, the determined highlight offset parameters can be mapped and stored in the form of images to achieve the conversion from highlight image to highlight offset parameters, ensuring consistency with the highlight image. At the same time, the acquisition and application of highlight offset parameters in the subsequent rendering process can improve the efficiency of highlight rendering.

[0082] As an example, the determined highlight offset parameter and highlight intensity parameter can be stored in the same image. For example, the highlight intensity parameter can be used as the r channel data of the image, and the highlight offset parameter can be used as the g channel data of the image. Accordingly, when the highlight offset parameter and highlight intensity parameter corresponding to the highlight image are subsequently used, the corresponding parameters can be further extracted from the image in the following manner:

[0083] float2 col=tex2D(_MainTex,i.uv).rg

[0084] Among them, float2 col is used to represent the data extracted from the image i.uv, and tex2D is used to represent the sampling syntax, which can obtain the pixel color value of the corresponding position according to uv, use the obtained r channel data as the highlight intensity parameter, and the obtained g channel data as the highlight offset parameter.

[0085] In a possible embodiment, an exemplary implementation of performing anisotropic highlight calculation based on the highlight offset parameter and the hair model to obtain an anisotropic offset image is as follows. This step may include:

[0086] Obtain rendering parameters corresponding to the hair model, where the rendering parameters include a world space normal, a world space tangent, a world space binormal, a world space view direction, and a world space light source direction.

[0087] The hair model may be a hair model known in the art, and this disclosure does not limit this. After determining the hair model, the rendering parameters corresponding to the hair model may be obtained, as shown below:

[0088] worldNormal: world space normal;

[0089] worldTangent: world space tangent;

[0090] worldBinormal: world space binormal;

[0091] worldViewDir: world space view direction;

[0092] worldLightDir: World space light direction.

[0093] Thereafter, the world space binormal is offset based on the highlight offset parameter and the world space normal to obtain an updated world space binormal.

[0094] Among them, as described above, the highlight offset parameter can represent the offset of the center position of the column of highlights relative to the center position of the image, so that the corresponding offset can be determined based on the highlight offset parameter. If the highlight offset parameter is a value after processing by the standard as described above, the corresponding offset can be directly determined. If the highlight offset parameter is data stored in a parameter image matrix, the data in the matrix needs to be mapped to the initial range. For example, the mapping can be performed in the following manner: (2*col.g-1), that is, the offset mapping value within the target range is mapped back to the initial range, and col.g represents the data of the g channel in the image storing the parameters.

[0095] Afterwards, the world space binormal can be offset as follows to obtain the updated world space binormal:

[0096] worldBinormal=

[0097] normalize(worldBinormal+_ShiftScale*(2*col.g-1)*worldNormal

[0098] +_SpecularOffset)

[0099] _ShiftScale represents the first preset parameter of the model, which can be used to adjust the intensity of the shift and can be set based on user experience, such as 1.74. _SpecularOffset represents the second preset parameter of the model, which can be used to control the offset of the highlight position and can be set based on user experience, such as 0.37.

[0100] Anisotropic highlights are calculated based on rendering parameters including the updated world-space binormals, resulting in an anisotropic offset image.

[0101] Among them, after the world space binormal is offset based on the highlight offset parameter, the direction of the half-angle vector corresponding to the world space view direction and the world space light source direction will also change. After that, the dot product information can be calculated based on the offset world space binormal. The dot product information can include the dot product of the world space tangent and the half-angle vector, the dot product of the world space binormal and the half-angle vector, and the dot product of the world space normal and the half-angle vector. The formula is as follows:

[0102] halfDir=normalize(worldLightDir+worldViewDir)

[0103] TdotH=dot(worldTangent,halfDir)

[0104] BdotH=dot(worldBinormal,halfDir)

[0105] NdotH=saturate(dot(worldNormal,halfDir))

[0106] Among them, halfDir is used to represent the half-angle vector, that is, the intermediate angle vector between the world space view direction and the world space light source direction;

[0107] dot() is used to find the dot product of two vectors, that is, the cosine of the angle between the vectors. It can also represent the projected area of ​​a vector on a plane with another vector as the normal.

[0108] TdotH is used to represent the dot product of the world space tangent and the half-angle vector;

[0109] BdotH is used to represent the dot product of the world space binormal and the half-angle vector;

[0110] NdotH is used to represent the dot product of the world space normal and the half-angle vector, and also represents the diffuse light intensity.

[0111] Afterwards, anisotropic highlight calculations can be further performed based on the dot product information calculated above:

[0112] specularLight=max(0,NdotH*

[0113] Trowbridge_ReitzAnisotropic(NdotH,TdotH,BdotH,_Roughness))

[0114] Among them, specularLight is used to represent the highlight value in the anisotropic offset image;

[0115] _Roughness is used to represent the roughness parameter, which can be pre-set according to the rendering material.

[0116] For example, it can be set to 0.35 based on empirical values;

[0117] Trowbridge_ReitzAnisotropic(NdotH, TdotH, BdotH, _Roughness) is used to represent the normal distribution calculation formula, which serves as the basic lighting model for calculating anisotropic lighting in this disclosure. For example, the general function of this formula in the shader can be used to implement anisotropic calculation, which will not be repeated here.

[0118] The parameters in the above code are examples based on empirical values ​​and do not limit the present disclosure.

[0119] Therefore, through the above technical solution, the world space binormals in the hair model can be offset based on the highlight offset parameters corresponding to the highlight shape to be rendered before generating anisotropic highlights, so that anisotropic highlights with offset characteristics can be calculated based on the offset parameters, thereby ensuring the consistency between the rendered image and the drawn highlight shape.

[0120] In a possible embodiment, in step 14, intensity superposition is performed on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image. This step may include:

[0121] An index operation is performed based on the highlight intensity parameter and a preset index to obtain an intensity contrast parameter.

[0122] For example, the exponential operation may be performed based on the following formula: pow(col.r,_Eigcnvaluc);

[0123] Among them, col.r is used to represent the r channel data in the image storing parameters, that is, the highlight intensity parameter described in the present disclosure, _Eigcnvaluc is used to represent the input parameter of the material to be rendered, which can be set to 2.2 based on the empirical value; pow(col.r,_Eigcnvaluc) represents an exponential operation with the highlight intensity parameter col.r as the base and _Eigcnvaluc as the exponent, which is used to adjust the intensity contrast to obtain a more ideal intensity contrast.

[0124] Then, intensity superposition is performed based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendering image.

[0125] The highlight value in the anisotropic offset image may be the value of each pixel in the anisotropic offset image, that is, the specularLight mentioned above.

[0126] As an example, intensity superposition may be performed based on the intensity contrast parameter at each pixel of the anisotropic offset image. For example, the intensity value after superposition may be determined based on the intensity input parameter of the material to be rendered:

[0127] M*_SpecularScale*pow(col.r,_Eigcnvaluc)*specularLight

[0128] Wherein, _SpecularScale represents the intensity input parameter, which can be set to 1.15 based on empirical values, and M is a preset value, which can be set to 10 for example.

[0129] Therefore, the highlight value of each pixel in the anisotropic offset image can be superimposed using the above formula to obtain the corresponding highlight rendering image. Figure 6 The anisotropic migration image after stacking migration is shown. In this image, the highlight intensity of each column is the same (i.e., the width is equal, and the Figure 6 The different widths shown in the figure are caused by stretching the UV image). Based on this image, we can further perform intensity superposition. Then, we can enlarge or reduce the center point corresponding to each column based on the highlight intensity parameter corresponding to the highlight shape in the column, so that the highlight intensity of the column is consistent with the highlight shape. The resulting image is as follows: Figure 8 shown.

[0130] Therefore, through the above technical solution, the intensity in the anisotropic offset image can be adjusted based on the highlight intensity parameters corresponding to the highlight shape, so that the rendered highlights can be consistent with the drawn highlight shapes. This can not only realize that the rendered highlights change with the changes in light source and line of sight direction, but also maintain the drawn highlight shapes during the changes, thereby improving the accuracy and diversity of highlight rendering, providing support for animation rendering, and further enhancing the user's viewing experience.

[0131] As another example, to ensure the stylization of cartoon rendering, the present disclosure further provides the following embodiments. An exemplary implementation of performing intensity superposition based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendered image may include:

[0132] performing smoothing on highlight values ​​obtained by intensity superposition of highlight values ​​in the anisotropic offset image;

[0133] The highlight rendering image is generated according to the highlight value obtained after smoothing.

[0134] For example, the highlight value after intensity superposition may be further smoothed based on the following formula, for example:

[0135] specularLight'=smoothstep(W,E,M*_SpecularScale*

[0136] pow(col.r,_Eigcnvaluc)*specularLight)

[0137] 'specularLight' is used to represent the highlight value after smoothing, so that corresponding rendering can be performed based on the highlight value to obtain a highlight rendering image. The specific rendering method can be selected based on the rendering model of the hair model, which is not limited in this disclosure.

[0138] smoothstep is used to represent a smooth step function, which means that the last parameter is smoothly mapped from 0 to 1 according to the values ​​of the first two parameters. For example, W can be set to 0.04 based on empirical values, and E can be set to 0.06 based on empirical values. The exemplary implementation code of the smooth step function smoothstep is as follows:

[0139] float smoothstep(float t1,float t2,float x){

[0140] x=clamp((x-t1) / (t2-t1),0.0,1.0);

[0141] return x*x*(3-2*x);

[0142] }

[0143] The corresponding numerical values ​​in the code are for illustrative purposes only and can be set according to actual application rendering scenarios, and do not limit the present disclosure.

[0144] Therefore, through the above technical solution, the highlight shape can be guaranteed during the highlight rendering process, and the highlights can be further smoothed to fit the block features in the cartoon rendering process, thereby further improving the fit between the rendered image and the cartoon scene.

[0145] The present disclosure also provides a highlight rendering device, such as Figure 9 As shown, the device 10 includes:

[0146] An acquisition module 100 is used to acquire a highlight image and a hair model of a highlight shape to be rendered;

[0147] a determination module 200 for determining a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and determining a highlight offset parameter corresponding to the highlight shape according to the highlight image;

[0148] A first processing module 300 is configured to perform anisotropic highlight calculation based on the highlight offset parameter and the hair model to obtain an anisotropic offset image;

[0149] The second processing module 400 is configured to perform intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0150] Optionally, the determining module includes:

[0151] a first determining submodule, configured to accumulate, for each column of the image matrix of the highlight image, the characteristic values ​​of each pixel in the column, and determine the highlight intensity parameter of the column according to the accumulation result corresponding to the column;

[0152] The second determining submodule is configured to determine the highlight intensity parameter corresponding to the highlight shape based on the highlight intensity parameter of each column in the image matrix.

[0153] Optionally, the determining module includes:

[0154] a third determining submodule, configured to determine, for each column in the image matrix of the highlight image, a center row number of a highlight shape corresponding to the column;

[0155] a fourth determining submodule, configured to determine a highlight offset parameter of the column according to a center row number of a highlight shape corresponding to the column and a center row number corresponding to the highlight image;

[0156] The fifth determining submodule is configured to determine the highlight offset parameter corresponding to the highlight shape based on the highlight offset parameter of each column in the highlight image.

[0157] Optionally, the fifth determining submodule includes:

[0158] A mapping submodule, configured to map the highlight offset parameter of each column into a target range to obtain an offset mapping value corresponding to each column, wherein the target range is a positive value;

[0159] The sixth determining submodule is configured to determine a parameter image matrix formed by the offset mapping values ​​corresponding to each column as highlight offset parameters corresponding to the highlight shape.

[0160] Optionally, the first processing module includes:

[0161] An acquisition submodule is used to obtain rendering parameters corresponding to the hair model, wherein the rendering parameters include a world space normal, a world space tangent, a world space binormal, a world space view direction, and a world space light source direction;

[0162] an offset submodule, configured to offset the world space binormal based on the highlight offset parameter and the world space normal to obtain an updated world space binormal;

[0163] The first processing submodule is configured to perform anisotropic highlight calculation based on rendering parameters including the updated world space binormal to obtain an anisotropic offset image.

[0164] Optionally, the second processing module includes:

[0165] A second processing submodule is configured to perform an exponential operation based on the highlight intensity parameter and a preset index to obtain an intensity contrast parameter;

[0166] The superposition submodule is configured to perform intensity superposition based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendering image.

[0167] Optionally, the superposition submodule includes:

[0168] a third processing submodule, configured to smooth highlight values ​​obtained by intensity superposition of highlight values ​​in the anisotropic offset image;

[0169] The fourth processing submodule is configured to generate the highlight rendering image according to the highlight value obtained after the smoothing process.

[0170] Reference below Figure 10 , which shows a schematic structural diagram of an electronic device 600 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0171] like Figure 10 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0172] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 10 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0173] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0174] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0175] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0176] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0177] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device is caused to: obtain a highlight image and a hair model of a highlight shape to be rendered; determine a highlight intensity parameter corresponding to the highlight shape based on the highlight image, and determine a highlight offset parameter corresponding to the highlight shape based on the highlight image; perform anisotropic highlight calculation based on the highlight offset parameter to obtain an anisotropic offset image; and perform intensity superposition on the anisotropic offset image based on the highlight intensity parameter and the hair model to obtain a highlight rendering image corresponding to the highlight image.

[0178] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0180] The modules described in the embodiments of the present disclosure may be implemented in software or hardware. In some cases, the name of a module does not limit the module itself. For example, the acquisition module may also be described as a "module for acquiring a highlight image and a hair model of a highlight shape to be rendered."

[0181] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0182] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0183] According to one or more embodiments of the present disclosure, Example 1 provides a highlight rendering method, wherein the method includes:

[0184] Get the highlight image and hair model of the highlight shape to be rendered;

[0185] determining a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and determining a highlight offset parameter corresponding to the highlight shape according to the highlight image;

[0186] performing anisotropic highlight calculation according to the highlight offset parameter and the hair model to obtain an anisotropic offset image;

[0187] Intensity superposition is performed on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0188] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the highlight intensity parameter corresponding to the highlight shape according to the highlight image includes:

[0189] For each column in the image matrix of the highlight image, accumulating the characteristic values ​​of each pixel in the column, and determining the highlight intensity parameter of the column according to the accumulation result corresponding to the column;

[0190] Based on the highlight intensity parameter of each column in the image matrix, the highlight intensity parameter corresponding to the highlight shape is determined.

[0191] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein determining, based on the highlight image, a highlight offset parameter corresponding to the highlight shape includes:

[0192] For each column in the image matrix of the highlight image, determining a center row number of a highlight shape corresponding to the column;

[0193] determining a highlight offset parameter of the column according to a center row number of a highlight shape corresponding to the column and a center row number corresponding to the highlight image;

[0194] Based on the highlight offset parameter of each column in the highlight image, a highlight offset parameter corresponding to the highlight shape is determined.

[0195] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, wherein determining the highlight offset parameter corresponding to the highlight shape based on the highlight offset parameter of each column in the highlight image includes:

[0196] Mapping the highlight offset parameter of each column into the target range to obtain the offset mapping value corresponding to each column, wherein the value of the target range is a positive value;

[0197] A parameter image matrix formed by the offset mapping values ​​corresponding to each column is determined as the highlight offset parameters corresponding to the highlight shape.

[0198] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the performing anisotropic highlight calculation based on the highlight offset parameter and the hair model to obtain the anisotropic offset image includes:

[0199] Obtaining rendering parameters corresponding to the hair model, wherein the rendering parameters include a world space normal, a world space tangent, a world space binormal, a world space view direction, and a world space light source direction;

[0200] offsetting the world space binormal based on the highlight offset parameter and the world space normal to obtain an updated world space binormal;

[0201] Anisotropic highlights are calculated based on rendering parameters including the updated world-space binormals, resulting in an anisotropic offset image.

[0202] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the performing intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image includes:

[0203] Performing an exponential operation based on the highlight intensity parameter and a preset index to obtain an intensity contrast parameter;

[0204] Intensity superposition is performed based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendering image.

[0205] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein the performing intensity superposition based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight-rendered image includes:

[0206] performing smoothing on highlight values ​​obtained by intensity superposition of highlight values ​​in the anisotropic offset image;

[0207] The highlight rendering image is generated according to the highlight value obtained after smoothing.

[0208] According to one or more embodiments of the present disclosure, Example 8 provides a highlight rendering device, wherein the device includes:

[0209] An acquisition module, used for acquiring a highlight image and a hair model of a highlight shape to be rendered;

[0210] a determination module, configured to determine a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and to determine a highlight offset parameter corresponding to the highlight shape according to the highlight image;

[0211] a first processing module, configured to perform anisotropic highlight calculation according to the highlight offset parameter and the hair model to obtain an anisotropic offset image;

[0212] The second processing module is configured to perform intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image.

[0213] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processing device, the steps of the method described in any one of Examples 1-7 are implemented.

[0214] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, including:

[0215] a storage device having a computer program stored thereon;

[0216] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-7.

[0217] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0218] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0219] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. A highlight rendering method, characterized in that: The method comprises: Get the highlight image and hair model of the highlight shape to be rendered; For each column in the image matrix of the highlight image, accumulating the characteristic values ​​of each pixel in the column, and determining the highlight intensity parameter of the column according to the accumulation result corresponding to the column; and determining the highlight intensity parameter corresponding to the highlight shape based on the highlight intensity parameter of each column in the image matrix; For each column in the image matrix of the highlight image, determining the center row number of the highlight shape corresponding to the column; determining a highlight offset parameter for the column based on the center row number of the highlight shape corresponding to the column and the center row number corresponding to the highlight image; determining a highlight offset parameter corresponding to the highlight shape based on the highlight offset parameter of each column in the highlight image; Obtaining rendering parameters corresponding to the hair model, the rendering parameters including a world space normal, a world space tangent, a world space binormal, a world space view direction, and a world space light source direction; offsetting the world space binormal based on the highlight offset parameter and the world space normal to obtain an updated world space binormal; performing anisotropic highlight calculation based on the rendering parameters including the updated world space binormal to obtain an anisotropic offset image; Performing an exponential operation based on the highlight intensity parameter and a preset index to obtain an intensity contrast parameter; Intensity superposition is performed based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendering image.

2. The method according to claim 1, characterized in that The determining, based on the highlight offset parameter of each column in the highlight image, the highlight offset parameter corresponding to the highlight shape includes: Mapping the highlight offset parameter of each column into the target range to obtain the offset mapping value corresponding to each column, wherein the value of the target range is a positive value; A parameter image matrix formed by the offset mapping values ​​corresponding to each column is determined as the highlight offset parameters corresponding to the highlight shape.

3. The method according to claim 1, characterized in that The obtaining the highlight rendering image by intensity superposition based on the intensity contrast parameter and the highlight value in the anisotropic offset image includes: performing smoothing on highlight values ​​obtained by intensity superposition of highlight values ​​in the anisotropic offset image; The highlight rendering image is generated according to the highlight value obtained after smoothing.

4. A highlight rendering device, characterized in that: The device comprises: An acquisition module, used for acquiring a highlight image and a hair model of a highlight shape to be rendered; a determination module, configured to determine a highlight intensity parameter corresponding to the highlight shape according to the highlight image, and to determine a highlight offset parameter corresponding to the highlight shape according to the highlight image; a first processing module, configured to perform anisotropic highlight calculation according to the highlight offset parameter and the hair model to obtain an anisotropic offset image; a second processing module, configured to perform intensity superposition on the anisotropic offset image based on the highlight intensity parameter to obtain a highlight rendering image corresponding to the highlight image; Wherein, the determination module includes: a first determination submodule, for accumulating the characteristic values ​​of each pixel in each column of the image matrix of the highlight image, and determining the highlight intensity parameter of the column according to the accumulation result corresponding to the column; a second determination submodule, for determining the highlight intensity parameter corresponding to the highlight shape based on the highlight intensity parameter of each column in the image matrix; a third determination submodule, for determining the center row number of the highlight shape corresponding to the column for each column in the image matrix of the highlight image; a fourth determination submodule, for determining the highlight offset parameter of the column according to the center row number of the highlight shape corresponding to the column and the center row number corresponding to the highlight image; a fifth determination submodule, for determining the highlight offset parameter corresponding to the highlight shape based on the highlight offset parameter of each column in the highlight image; The first processing module includes: an acquisition submodule for acquiring rendering parameters corresponding to the hair model, wherein the rendering parameters include a world space normal, a world space tangent, a world space binormal, a world space view direction, and a world space light source direction; an offset submodule for offsetting the world space binormal based on the highlight offset parameter and the world space normal to obtain an updated world space binormal; and a first processing submodule for performing anisotropic highlight calculation based on the rendering parameters including the updated world space binormal to obtain an anisotropic offset image; The second processing module includes: a second processing submodule, used to perform exponential operation based on the highlight intensity parameter and a preset index to obtain an intensity contrast parameter; and an overlay submodule, used to perform intensity overlay based on the intensity contrast parameter and the highlight value in the anisotropic offset image to obtain the highlight rendered image.

5. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method according to any one of claims 1 to 3 are implemented.

6. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Hair highlight rendering method, device and equipment and storage medium

    CN113763525A