Model Rendering Method, Device, Computer Device, and Storage Medium

By obtaining and using the three-dimensional model of the face, skin detail map and oil area distribution map, determining the target highlight effect information, and rendering the three-dimensional model, the problem of poor performance of highlight effect in the existing technology is solved, and the realism after rendering is enhanced.

CN114972647BActive Publication Date: 2025-07-01BEIJING SWEET SUGARSOFT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210607083.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-07-01
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

When rendering the face of hyperrealistic characters, the highlights are more average, and the details of the face cannot be effectively expressed, resulting in a poor sense of reality after rendering.

Method used

By obtaining a three-dimensional model of the target face, a first map for characterizing the skin details of the human face, and a second map for characterizing the distribution of the oil area of ​​the face, the target highlight effect information used to reflect the oil effect of the human face is determined, and the three-dimensional model is rendered based on this information.

Benefits of technology

The rendering effect with different highlights in different facial areas is achieved, making the highlight effect of the three-dimensional model closer to the reflection effect of the real face on light, and improving the realism after rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972647B_ABST
    Figure CN114972647B_ABST
Patent Text Reader

Abstract

The present disclosure provides a model rendering method, apparatus, computer device, and storage medium. The method includes: obtaining a three-dimensional model of a target face, a first texture map for characterizing the details of the face skin, and a second texture map for characterizing the distribution of the facial grease areas; determining target specular effect information for reflecting the facial grease effect based on the first texture map and the second texture map; and rendering the three-dimensional model based on the target specular effect information to obtain a target rendered model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a model rendering method, apparatus, computer device, and storage medium. Background Art

[0002] When rendering the face of an object such as a hyper-realistic character, in order to improve the authenticity of the hyper-realistic character after rendering and display, a highlight effect under light is added during the rendering of the hyper-realistic character. Since the hyper-realistic character does not actually exist, a highlight effect texture map is usually created for the hyper-realistic character by manual drawing, so as to add a highlight effect to the hyper-realistic character using the highlight effect texture map. In fact, a real human face has more surface details. For example, the grease layer on the surface of the human face has a higher-intensity highlight effect under light. This rendering method cannot express these details, and the performance of the highlight effect across the entire face is relatively average, resulting in poor realism after rendering. Summary of the Invention

[0003] Embodiments of the present disclosure at least provide a model rendering method, apparatus, computer device, and storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a model rendering method, including: obtaining a three-dimensional model of a target human face, a first texture map for characterizing the skin details of the human face, and a second texture map for characterizing the distribution of the grease areas of the human face; determining target highlight effect information for reflecting the grease effect of the human face based on the first texture map and the second texture map; and rendering the three-dimensional model based on the target highlight effect information to obtain a target rendered model.

[0005] In this way, for the three-dimensional model of the target human face, a first texture map for characterizing the skin details of the human face and a second texture map for characterizing the distribution of the grease areas of the human face can be obtained. Since both the skin details and the distribution of the grease areas of the human face affect the highlight effect reflected by the human face under light, the target highlight information determined using the first texture map and the second texture map can, after rendering the three-dimensional model, obtain a target rendered model with different highlight performances in different facial regions, making the highlight effect of the three-dimensional model after rendering closer to the reflection effect of a real human face under light and improving the realism of the three-dimensional model of the human face after rendering.

[0006] In an alternative implementation, the first texture map is generated in the following manner: Obtain a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to represent the texture information corresponding to the oily area in the facial skin details, and the second texture normal map is used to represent the texture information corresponding to the non-oily area in the facial skin details; Based on the current shooting pose of the target face, adjust the sharpness of the first texture normal map and the second texture normal map respectively, and generate the first texture map based on the sharpness-adjusted first texture normal map and second texture normal map.

[0007] In this way, since the first texture map can express the texture information of different areas on the human face skin, the rendered 3D model can have more detailed texture effects in different areas of the face by using the first texture map, and at the same time can have different display effects under light, making the obtained target rendered model more realistic.

[0008] In an alternative implementation, before determining the target specular effect information for reflecting the facial oil effect based on the first texture map and the second texture map, it further includes: Obtain the lighting direction of the target face and the shooting direction of the target face in the current shooting pose; Determine the specular range angle for the 3D model based on the lighting direction and the shooting direction; Determine the display light intensity of each vertex corresponding to the facial oil area in the 3D model based on the specular range angle and the normal direction of each vertex corresponding to the facial oil area in the 3D model.

[0009] In this way, by considering multiple factors such as the lighting direction, shooting direction, and normal direction of each vertex to determine the display light intensity, the specular effect of the face under real lighting conditions can be more accurately simulated. That is, after rendering and displaying the 3D model using the determined display light intensity, the corresponding displayed face will be more realistic.

[0010] In an alternative implementation, the pixel value of each pixel point in the second texture map is used to represent the display light intensity threshold of the corresponding vertex in the 3D model; The determining the display light intensity of each vertex corresponding to the facial oil area in the 3D model based on the specular range angle and the normal direction of each vertex corresponding to the facial oil area in the 3D model includes: Determine the display light intensity of each vertex in the facial oil area based on the display light intensity threshold corresponding to each vertex in the facial oil area, the specular range angle, and the normal direction of each vertex in the 3D model.

[0011] In this way, the second texture map can also make the rendered 3D model exhibit a realistic reflection effect with light intensity attenuation when the oil layer reflects light by correspondingly determining the display light intensity threshold for different pixel points.

[0012] In an alternative embodiment, determining the display light intensity of each vertex in the facial grease area based on the display light intensity thresholds corresponding to the respective vertices in the facial grease area, the highlight range angle, and the normal direction corresponding to each vertex in the three-dimensional model includes: performing a dot product operation on the highlight range angle and the normal direction corresponding to each vertex in the three-dimensional model to obtain the basic light intensity information corresponding to each vertex in the three-dimensional model; and adjusting the basic light intensity information by using the display light intensity thresholds corresponding to the respective vertices to obtain the display light intensity of each vertex in the facial grease area.

[0013] In an alternative embodiment, determining the target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map includes: determining the target highlight effect information for reflecting the facial grease effect based on the first texture map, the second texture map, and the display light intensity of each vertex corresponding to the facial grease area.

[0014] In this way, the first texture map can be used to perform texture rendering on the three-dimensional model of the target face. According to the second texture map and the third texture map, highlight rendering can be performed on the area where the grease is distributed in the three-dimensional model. The display light intensity set during the highlight rendering can be obtained by the display light intensity determined for each vertex in the facial grease area.

[0015] In an alternative embodiment, it further includes: obtaining a third texture map for characterizing the average highlight effect of the face; and determining the target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map includes: determining the target highlight information based on the first texture map, the second texture map, and the third texture map.

[0016] In this way, determining the third texture map for characterizing the average effect of the face for the three-dimensional model can supplement the basic light reflection effect of the face on light, excluding the special textures and the area distribution of the grease layer, thereby improving the authenticity of rendering the three-dimensional model.

[0017] In a second aspect, an embodiment of the present disclosure further provides a model rendering device, including: an acquisition module, configured to acquire a three-dimensional model of a target face, a first texture map for characterizing the facial skin details, and a second texture map for characterizing the distribution of the facial grease area; a determination module, configured to determine target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map; and a rendering module, configured to perform rendering on the three-dimensional model based on the target highlight effect information to obtain a target rendered model.

[0018] In an alternative implementation, the first texture map is generated in the following manner: Obtain a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to represent the texture information corresponding to the oily area in the facial skin details, and the second texture normal map is used to represent the texture information corresponding to the non-oily area in the facial skin details; Based on the current shooting pose of the target face, adjust the sharpness of the first texture normal map and the second texture normal map respectively, and generate the first texture map based on the sharpness-adjusted first texture normal map and second texture normal map.

[0019] In an alternative implementation, before determining the target specular effect information for reflecting the facial oil effect based on the first texture map and the second texture map, the determining module is further configured to: Obtain the lighting direction of the target face and the shooting direction of the target face in the current shooting pose; Determine the specular range angle of the 3D model based on the lighting direction and the shooting direction; Determine the display light intensity of each vertex corresponding to the facial oil area based on the specular range angle and the normal direction of each vertex corresponding to the facial oil area in the 3D model.

[0020] In an alternative implementation, the pixel value of each pixel point in the second texture map is used to represent the display light intensity threshold of the corresponding vertex in the 3D model; when the determining module determines the display light intensity of each vertex corresponding to the facial oil area based on the specular range angle and the normal direction of each vertex corresponding to the facial oil area in the 3D model, it is configured to: Determine the display light intensity of each vertex in the facial oil area based on the display light intensity threshold corresponding to each vertex in the facial oil area, the specular range angle, and the normal direction of each vertex in the 3D model respectively.

[0021] In an alternative implementation, when the determining module determines the display light intensity of each vertex in the facial oil area based on the display light intensity threshold corresponding to each vertex in the facial oil area, the specular range angle, and the normal direction of each vertex in the 3D model respectively, it is configured to: Perform a dot product operation on the specular range angle and the normal direction of each vertex in the 3D model respectively to obtain the basic light intensity information corresponding to each vertex in the 3D model; Adjust the basic light intensity information using the display light intensity threshold corresponding to each vertex respectively to obtain the display light intensity of each vertex in the facial oil area.

[0022] In an alternative implementation, when determining the target specular effect information for reflecting the facial grease effect based on the first texture map and the second texture map, the determining module is configured to: determine the target specular effect information for reflecting the facial grease effect based on the first texture map, the second texture map, and the display light intensity of each vertex corresponding to the facial grease area.

[0023] In an alternative implementation, the rendering display device further includes a processing module configured to: obtain a third texture map for characterizing the average specular effect of the face; when determining the target specular effect information for reflecting the facial grease effect based on the first texture map and the second texture map, the determining module is configured to: determine the target specular information based on the first texture map, the second texture map, and the third texture map.

[0024] In a third aspect, an alternative implementation of the present disclosure further provides a computer device, including a processor and a memory. The memory stores machine-readable instructions executable by the processor. The processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the machine-readable instructions execute the steps in the first aspect or any possible implementation manner in the first aspect.

[0025] In a fourth aspect, an alternative implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run, it executes the steps in the first aspect or any possible implementation manner in the first aspect.

[0026] For the effect description of the above model rendering device, computer device, and computer-readable storage medium, refer to the description of the above model rendering method, which will not be elaborated here.

[0027] To make the above objects, features, and advantages of the present disclosure more obvious and understandable, the following specific embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. Description of the Drawings

[0028] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments will be briefly introduced below. The drawings herein are incorporated into the specification and form a part of this specification. These drawings show embodiments that conform to the present disclosure and are used together with the specification to explain the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0029] Figure 1The figure shows a flowchart of a model rendering method provided by an embodiment of the present disclosure;

[0030] Figure 2 The figure shows a schematic diagram of a three-dimensional model of a target human face provided by an embodiment of the present disclosure;

[0031] Figure 3 The figure shows a schematic diagram after rendering a three-dimensional model of a target human face provided by an embodiment of the present disclosure;

[0032] Figure 4 The figure shows a schematic diagram of a model rendering device provided by an embodiment of the present disclosure;

[0033] Figure 5 The figure shows a schematic diagram of a computer device provided by an embodiment of the present disclosure. Detailed implementation manners

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Generally, the components of the embodiments of the present disclosure described and illustrated herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed, but merely represents selected embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts fall within the scope of protection of the present disclosure.

[0035] Through research, it is found that in order to improve the authenticity of the rendered ultra-realistic characters, a highlight effect under light is usually added when rendering the face of a two-dimensional character. Currently, when adding a highlight effect to an ultra-realistic character, a highlight effect texture map is usually determined for the ultra-realistic character. The highlight effect texture map is manually drawn. By setting the pixel values of each pixel point in the highlight effect texture map, the ultra-realistic character can display the effect of skin reflected light under highlights. Generally, the highlight effect texture map is used to render an average highlight effect for the ultra-realistic character, that is, the highlight effect presented at each position on the face is the same. In fact, a real human face has more surface details, such as wrinkles, grease, etc., which will all produce different highlight effects under light. For example, in areas with more fine lines, the highlight effect under light becomes weaker and darker, while in areas with more grease, the highlight effect under light becomes stronger and brighter. Therefore, directly using the highlight effect texture map to render the face of an ultra-realistic character will make the performance of the highlight effect on the entire face relatively average and cannot process different details of the face, resulting in poor realism after rendering.

[0036] Based on the above research, the present disclosure provides a model rendering method. For the three-dimensional model of a target face, a first texture map for characterizing the skin details of the face and a second texture map for characterizing the distribution of the facial grease areas can be obtained. Since both the skin details and the distribution of the facial grease areas of the face affect the specular effect reflected by the face under light, the target specular information determined using the first texture map and the second texture map to reflect the facial grease effect can, after rendering the three-dimensional model, obtain a target rendered model that can have different specular performances in different facial areas, making the specular effect of the three-dimensional model after rendering closer to the reflection effect of a real face under light and enhancing the realism of the three-dimensional model of the face after rendering.

[0037] All the defects existing in the above solutions are the results obtained by the inventors through practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by the present disclosure below for the above problems should both be the contributions made by the inventors to the present disclosure during the process of the present disclosure.

[0038] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0039] To facilitate the understanding of this embodiment, first, a model rendering method disclosed in the embodiments of the present disclosure will be introduced in detail. The execution subject of the model rendering method provided in the embodiments of the present disclosure is generally a computer device with certain computing capabilities. Such a computer device includes, for example: a terminal device, a server, or other processing devices. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementation manners, the model rendering method can be implemented by a processor invoking computer-readable instructions stored in a memory.

[0040] The model rendering method provided by the embodiments of the present disclosure will be described below. The model rendering method provided by the embodiments of the present disclosure can be used to determine the target rendering model of a hyper-realistic character, and can specifically be applied to rendering the facial specular effect of a hyper-realistic character. The hyper-realistic character described here can specifically include human figures, game characters, etc. that simulate and approximate real human faces. Therefore, the model rendering method provided by the embodiments of the present disclosure can be specifically applied to different application fields such as game screen production or generation, animation and film production, etc. After determining the target rendering model using the model rendering method provided by the embodiments of the present disclosure, the determined target rendering model can be further used to render the hyper-realistic character, so as to display the specular effects of different facial regions through rendering, making the hyper-realistic character more realistic and reasonable.

[0041] See Figure 1 As shown, it is a flowchart of a model rendering method provided by the embodiments of the present disclosure. The method includes steps S101 to S103, where:

[0042] S101: Obtain a three-dimensional model of a target human face, a first texture map for characterizing the details of the human face skin, and a second texture map for characterizing the distribution of the human face grease area;

[0043] S102: Based on the first texture map and the second texture map, determine the target specular effect information for reflecting the human face grease effect;

[0044] S103: Render the three-dimensional model based on the target specular effect information to obtain a target rendering model.

[0045] The embodiments of the present disclosure provide a model rendering method. For the three-dimensional model of a target human face, a first texture map for characterizing the details of the human face skin and a second texture map for characterizing the distribution of the human face grease area can be obtained. Since both the details of the human face skin and the distribution of the human face grease area will affect the specular effect reflected by the human face under light, the target specular information determined using the first texture map and the second texture map for reflecting the human face grease effect can, after rendering the three-dimensional model, obtain a target rendering model that can have different specular performances in different facial regions, making the specular effect of the three-dimensional model after rendering closer to the reflection effect of a real human face on light and enhancing the realism of the three-dimensional model of the human face after rendering.

[0046] The above S101 to S103 will be described in detail below.

[0047] Regarding the above S101, first, the three-dimensional model of the target face will be described. The target face may specifically include the face of a hyper-realistic character. Since the hyper-realistic character is a virtual object and does not actually exist, the facial features such as the positions and sizes of the facial features of the hyper-realistic character can be determined by constructing a three-dimensional model corresponding to the face of the hyper-realistic character, and the facial image that the hyper-realistic character hopes to present in the real world can be simulated using the determined three-dimensional model. Exemplarily, refer to Figure 2 As shown, it is a schematic diagram of a three-dimensional model of a target face provided by an embodiment of the present disclosure. The three-dimensional model shown here is a virtual model constructed manually. In addition, different three-dimensional models can be determined for different target faces.

[0048] The three-dimensional model generally includes: a plurality of vertices located on the surface of the three-dimensional model, and patches (meshes) formed by the interconnection relationships between the vertices.

[0049] After determining the three-dimensional model of the target face, a first texture map for characterizing the details of the human face skin and a second texture map for characterizing the distribution of the oil areas on the human face can also be obtained, so as to supplement and reflect the facial details of the target face using the first texture map and the second texture map.

[0050] The following will detail the first texture map and the second texture map.

[0051] First, the first texture map will be described. The first texture map can characterize the details of the human face skin, and specifically can express the texture information of different areas on the human face skin. For example, the deeper and fewer wrinkles distributed in the oil areas, such as the nasolabial folds distributed around the nose wings, and can also include the shallower and partially dense wrinkles distributed in the non-oil areas, such as the fine lines distributed on the cheeks. In this way, using the first texture map can make the rendered three-dimensional model have more detailed texture effects in different areas of the face, and at the same time can have different display effects under light, making the obtained target rendered model more realistic.

[0052] In a specific implementation, the first texture map can be generated, for example, in the following manner: obtaining a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to characterize the texture information corresponding to the oil areas in the details of the human face skin, and the second texture normal map is used to characterize the texture information corresponding to the non-oil areas in the details of the human face skin; based on the current shooting pose of the target face, respectively adjusting the sharpness of the first texture normal map and the second texture normal map, and generating the first texture map based on the sharpness-adjusted first texture normal map and the second texture normal map.

[0053] Among them, the texture normal map includes multiple texels, which are used to characterize the texture features of the corresponding vertices in the three-dimensional model. In a possible case, the distribution of the oily area and the non-oily area on the human face skin can be determined first, and accordingly, the corresponding texture details at different positions on the real human face can be used to separately generate the first texture normal map expressing the texture information corresponding to the oily area and the second texture normal map expressing the texture information corresponding to the non-oily area.

[0054] Among them, since the first texture normal map characterizes the texture information corresponding to the oily area, and there are usually relatively sparse and deep-textured wrinkles in the oily area, such as nasolabial folds near the nose wings, while there are usually relatively dense and shallow-textured wrinkles in the non-oily area, such as fine lines on the cheeks. When observing a real human face, it can be known that when observing closer to the human face, it is easier to see the shallow-textured fine lines on the skin, and when observing farther away from the human face, it is easier to directly see the deep-textured wrinkles distributed on the skin. Therefore, when generating the first map using the first texture normal map and the second texture normal map, the two texture normal maps can be specifically adjusted with reference to the current shooting pose of the target human face to obtain the first map in the current shooting pose.

[0055] Specifically, through the current shooting pose, the distance from the target human face can be obtained. According to the above description of the principle, when the distance is large, the deep-textured wrinkles distributed on the human face can be more prominent. Therefore, the clarity of the first texture normal map expressing such textures can be adjusted, for example, by adjusting to make the wrinkles expressed in the first texture normal map more clearly shown; and since the shallow fine lines distributed on the human face are not easily seen when the distance is far, the clarity of the second texture normal map expressing such textures can also be adjusted in the opposite way, for example, by adjusting to make the fine lines expressed in the second texture normal map not clearly shown. In a possible case, when the distance exceeds a certain range, such as exceeding a distance of 5 meters, it can be considered that the fine lines on the human face cannot be seen at this distance, and the first texture normal map can also be directly used as the first map.

[0056] Contrary to the above-mentioned case of a large distance, for the case of a small distance, the first map can also be determined by separately adjusting the clarity of the first texture normal map and the second texture normal map. For example, adjust to make the wrinkles expressed in the first texture normal map not clearly shown, and adjust to make the fine lines expressed in the second texture normal map clearly shown. In a possible case, when the distance is less than a certain range, such as less than a distance of 5 centimeters, it can be considered that only the fine lines on the human face can be seen at this distance, and the second texture normal map can also be directly used as the second map.

[0057] In addition, using the current shooting pose, the shooting orientation of the target face can also be obtained. Using the shooting orientation, for example, the areas of the face that are focused on can also be determined in the current shooting pose. For example, the current shooting pose indicates shooting at the cheek area of the face or at the left eye. In this case, the purpose of selecting the current shooting pose, for example, includes highlighting a specific position of the face. Therefore, when adjusting the sharpness of the first texture normal map and the second texture normal map, the non - focused areas can be weakened to achieve the effect of focusing on the focused areas.

[0058] Then, the second map is described. The second map can represent the distribution of the facial oil areas. Specifically, the distribution of oil is different in different areas of the face. For example, more oil is distributed at the nose, around the lips, and on the forehead, while less oil is distributed on the cheeks and around the eyes. In the areas with more oil distribution, there will be a stronger specular highlight effect under light. Therefore, when generating the second map, the oil distribution in the area where each pixel point is located can be expressed through the pixel value of each pixel point.

[0059] Among them, the pixel values of each pixel point in the second map can be used to represent the oil distribution in different areas of the corresponding face in the 3D model.

[0060] In addition to the internal factor that the distribution of the facial oil layer causes differences in the specular highlight effect in different areas of the face, the specular highlight effect of the face is also specifically affected by the external factor of lighting. Specifically, according to the different lighting directions on the face, the specular highlight effects of different parts of the face are different. For example, when lighting from the left side of the face, the specular highlight effect on the left side of the face is stronger. Even though the right side of the face has an oil layer, it will not show a stronger specular highlight effect because it is not strongly illuminated.

[0061] In addition, since the finally presented face is also determined by the shooting perspective, and according to the principle of light reflection, for a certain - direction lighting, the light reflected by the oil layer can only be seen at the angle of light reflection. Therefore, when actually performing specular highlight rendering on the face, the shooting direction of the face can also be determined to enhance the authenticity of the specular highlight display of the rendered face.

[0062] Therefore, in a specific implementation, before determining the target specular highlight effect information used to reflect the facial oil effect based on the first map and the second map, the lighting direction of the target face and the shooting direction of the target face in the current shooting pose can also be obtained; based on the lighting direction and the shooting direction, the specular highlight range angle of the 3D model is determined; based on the specular highlight range angle and the normal directions of the vertices corresponding to the facial oil areas in the 3D model, the display light intensity of the vertices corresponding to the facial oil areas is determined.

[0063] Among them, when obtaining the illumination direction of the target face, since the three-dimensional model of the target face does not actually exist but is created in a virtual three-dimensional space, when determining the illumination direction, for example, the position of the virtual light source in the three-dimensional space can be determined to determine the illumination direction of the virtual light source on the target face. Specifically, the position information of the virtual light source and the three-dimensional model in the three-dimensional space can be determined respectively to determine the relative position relationship between the virtual light source and the three-dimensional model. In this way, the illumination direction of the three-dimensional model can be determined. The shooting direction can be determined according to the shooting parameters during real-time shooting, and details are not elaborated here.

[0064] In the case of determining the illumination direction and the shooting direction of the target face, the highlight range angle of the three-dimensional model can be determined based on the illumination direction and the shooting direction. In one possible case, the smaller the angle between the illumination direction and the shooting direction, the stronger the highlight effect that the highlight range angle indicates can be shown in this shooting direction. In another possible case, the smaller the angle between the illumination direction and the shooting direction, the weaker the highlight effect that the highlight range angle indicates can be shown in this shooting direction.

[0065] For the three-dimensional model, it can specifically include multiple vertices, and the corresponding normal directions can be determined for the multiple vertices respectively. In one possible case, the normal direction corresponding to the vertex can be the position where the reflected light intensity is the largest when the light shines on the face position corresponding to the vertex, that is, if there is light shining along the vertex normal direction, the highest intensity highlight is rendered correspondingly. Therefore, when determining the display light intensity of each vertex, it is also related to the normal direction of each vertex.

[0066] Specifically, based on the highlight range angle and the normal direction of each vertex, the display light intensity of each vertex corresponding to the facial grease area can be determined. In one possible case, the highlight range angle can be represented by the sum vector of the vector corresponding to the illumination direction and the vector corresponding to the shooting direction. When determining the display light intensity corresponding to a certain vertex, the sum vector corresponding to the highlight range angle and the normal direction of the vertex can be used for vector dot product operation, and the display light intensity can be determined based on the result of the dot product operation. Here, the result of the dot product operation can be used as the basic light intensity information corresponding to the vertex. Exemplarily, if the value of the basic light intensity information is larger, the correspondingly determined display light intensity is larger; if the value of the basic light intensity information is smaller, the correspondingly determined display light intensity is smaller.

[0067] In addition, the pixel values of each pixel point in the second texture map can also be used to represent the display light intensity threshold of the corresponding vertex in the three-dimensional model. Specifically, under illumination, the facial grease layer can reflect light to a certain extent to achieve a specular highlight effect, but it will not completely reflect the light, that is, the display light intensity will not exceed the light intensity of the illumination. Moreover, in regions with different distributions of the grease layer, the display light intensity also has different intensity variations. Based on this, the display light intensity threshold can represent the maximum display light intensity that can be shown at the corresponding vertex. In this way, the method of determining the display light intensity threshold of the vertices corresponding to different pixel values, that is, the distribution of the grease layer in different regions can be determined by the change of the display light intensity threshold.

[0068] Therefore, the second texture map can also make the rendered three-dimensional model exhibit a real reflection effect with light intensity attenuation when the grease layer reflects light by correspondingly determining the display light intensity threshold for different pixel points. In this way, when determining the display light intensity of each vertex, specifically, based on the display light intensity threshold corresponding to each vertex in the facial grease region, the specular highlight range angle, and the normal direction corresponding to each vertex in the three-dimensional model, the display light intensity of each vertex in the facial grease region can be determined.

[0069] Among them, specifically, after obtaining the basic light intensity information corresponding to each vertex in the three-dimensional model by performing a dot product operation on the specular highlight range angle and the normal direction corresponding to each vertex in the three-dimensional model, the basic light intensity information can be adjusted by using the display light intensity threshold corresponding to each vertex to obtain the display light intensity of each vertex in the facial grease region.

[0070] For the above S102, in the case of determining the first texture map and the second texture map according to the above S101, the target specular highlight effect information for reflecting the facial grease effect can be determined.

[0071] Among them, the first texture map can be used to perform texture rendering on the three-dimensional model of the target face. According to the second texture map and the third texture map, the specular highlight rendering can be performed on the region with grease distribution in the three-dimensional model. The display light intensity set during the specular highlight rendering can be obtained by the display light intensity determined for each vertex in the facial grease region.

[0072] Therefore, in specific implementation, the target specular highlight effect information for reflecting the facial grease effect can be determined based on the first texture map, the second texture map, and the display light intensity of each vertex corresponding to the facial grease region.

[0073] In another embodiment of the present disclosure, for a human face, in addition to the areas with an oil layer that exhibit high-light display for light, the skin in other positions can also reflect light accordingly to achieve a high-light effect. Here, it is considered that the areas different from the oil layer areas of the human face have a relatively uniform high-light effect under light. Specifically, in these non-oil layer areas, without considering the influence of texture, they have a similar high-light effect, which is referred to as the average high-light effect of the human face. Therefore, a third texture map representing the average effect of the human face can also be determined for the 3D model to supplement the basic light reflection effect of the human face on light except for special textures and the distribution of oil layer areas, thereby enhancing the authenticity of rendering the 3D model.

[0074] In a specific implementation, for example, a third texture map representing the average high-light effect of the human face can be obtained, and based on the first texture map, the second texture map, and the third texture map, the target high-light information can be determined. Specifically, for multiple texture maps, since they are all used to render the same 3D model, interpolation processing can be performed on multiple pixel points corresponding to a certain position in different texture maps to obtain an interpolated texture map, and then the pipeline can be used to render the 3D model to determine the target high-light information.

[0075] Exemplarily, see Figure 3 As shown, it is a schematic diagram of the rendering of a 3D model of a target human face provided by an embodiment of the present disclosure. Among them, Figure 3 Figure (a) is an image obtained by rendering the target human face only using the third texture map, showing an effect of high-light averaging across the entire face, with an expression similar to that of a plaster statue. Figure 3 Figure (b) is an image obtained by rendering the target human face only using the second texture map, only having the high-light effect of the oil layer, with an expression similar to that of a plastic texture. The image rendered by the target rendering model determined by the model rendering method in the embodiment of the present disclosure, compared with (a) and (b), shows a more realistic human face because the reflection of light by factors such as facial texture and oil layer distribution is considered through the first texture map, the second texture map, etc.

[0076] Those skilled in the art can understand that in the above method of the specific implementation manner, the writing order of each step does not mean a strict execution order that constitutes any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0077] Based on the same inventive concept, an embodiment of the present disclosure also provides a model rendering device corresponding to the model rendering method. Since the principle of solving problems by the device in the embodiment of the present disclosure is similar to that of the above model rendering method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0078] Reference Figure 4 As shown, it is a schematic diagram of a model rendering device provided by an embodiment of the present disclosure. The device includes: an acquisition module 41, a determination module 42, and a rendering module 43. Among them,

[0079] The acquisition module 41 is configured to acquire a three-dimensional model of a target face, a first texture map for characterizing the details of the face skin, and a second texture map for characterizing the distribution of the face oil area;

[0080] The determination module 42 is configured to determine target specular effect information for reflecting the face oil effect based on the first texture map and the second texture map;

[0081] The rendering module 43 is configured to render the three-dimensional model based on the target specular effect information to obtain a target rendered model.

[0082] In an optional implementation manner, the first texture map is generated in the following manner: acquire a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to characterize the texture information corresponding to the oil area in the details of the face skin, and the second texture normal map is used to characterize the texture information corresponding to the non-oil area in the details of the face skin; based on the current shooting pose of the target face, adjust the sharpness of the first texture normal map and the second texture normal map respectively, and generate the first texture map based on the sharpness-adjusted first texture normal map and second texture normal map.

[0083] In an optional implementation manner, before determining the target specular effect information for reflecting the face oil effect based on the first texture map and the second texture map, the determination module 42 is further configured to: acquire the illumination direction of the target face and the shooting direction of the target face in the current shooting pose; determine the specular range angle of the three-dimensional model based on the illumination direction and the shooting direction; determine the display light intensity of each vertex corresponding to the face oil area based on the specular range angle and the normal direction of each vertex corresponding to the face oil area in the three-dimensional model.

[0084] In an optional implementation manner, the pixel value of each pixel point in the second texture map is used to characterize the display light intensity threshold of the corresponding vertex in the three-dimensional model; when the determination module 42 determines the display light intensity of each vertex corresponding to the face oil area based on the specular range angle and the normal direction of each vertex corresponding to the face oil area in the three-dimensional model, it is configured to: determine the display light intensity of each vertex in the face oil area based on the display light intensity threshold corresponding to each vertex in the face oil area, the specular range angle, and the normal direction of each vertex corresponding to the three-dimensional model.

[0085] In an alternative embodiment, when determining the display light intensity of each vertex in the facial grease area based on the display light intensity thresholds corresponding to the vertices in the facial grease area, the highlight range angle, and the normal directions corresponding to the vertices in the three-dimensional model, the determining module 42 is configured to: perform a dot product operation on the highlight range angle and the normal directions corresponding to the vertices in the three-dimensional model respectively to obtain the basic light intensity information corresponding to each vertex in the three-dimensional model; and adjust the basic light intensity information by using the display light intensity thresholds corresponding to the vertices respectively to obtain the display light intensity of each vertex in the facial grease area.

[0086] In an alternative embodiment, when determining the target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map, the determining module 42 is configured to: determine the target highlight effect information for reflecting the facial grease effect based on the first texture map, the second texture map, and the display light intensity of each vertex corresponding to the facial grease area.

[0087] In an alternative embodiment, the rendering display device further includes a processing module 44, configured to: obtain a third texture map for characterizing the average highlight effect of the face; when determining the target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map, the determining module 42 is configured to: determine the target highlight information based on the first texture map, the second texture map, and the third texture map.

[0088] Descriptions of the processing procedures of the modules in the device and the interaction procedures between the modules may refer to the relevant descriptions in the above method embodiments and will not be elaborated here.

[0089] The embodiments of the present disclosure further provide a computer device, as Figure 5 shown, which is a schematic structural diagram of the computer device provided by the embodiments of the present disclosure, including:

[0090] a processor 10 and a memory 20; the memory 20 stores machine-readable instructions executable by the processor 10, and the processor 10 is configured to execute the machine-readable instructions stored in the memory 20. When the machine-readable instructions are executed by the processor 10, the processor 10 executes the following steps:

[0091] Obtain a three-dimensional model of a target face, a first texture map for characterizing the facial skin details, and a second texture map for characterizing the distribution of the facial grease area; determine the target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map; and render the three-dimensional model based on the target highlight effect information to obtain a target rendered model.

[0092] The above-mentioned memory 20 includes an internal memory 210 and an external memory 220; the internal memory 210 here is also called the main memory, which is used to temporarily store the operation data in the processor 10 and the data exchanged with the external memory 220 such as a hard disk, and the processor 10 exchanges data with the external memory 220 through the internal memory 210.

[0093] For the specific execution process of the above instructions, reference can be made to the steps of the model rendering method described in the embodiments of the present disclosure, which will not be elaborated here.

[0094] The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the model rendering method described in the above method embodiments. Among them, the storage medium may be a volatile or non-volatile computer-readable storage medium.

[0095] The embodiments of the present disclosure also provide a computer program product, which carries program codes. The instructions included in the program codes can be used to execute the steps of the model rendering method described in the above method embodiments. For details, reference can be made to the above method embodiments, which will not be elaborated here.

[0096] Among them, the above computer program product can be specifically implemented in a way of hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0097] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the foregoing method embodiments, which will not be elaborated here. In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in an electrical, mechanical or other forms.

[0098] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0099] In addition, in each embodiment of the present disclosure, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit.

[0100] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0101] Finally, it should be noted that the above-described embodiments are only specific implementation manners of the present disclosure, used to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or make equivalent replacements for some of the technical features; and these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A model rendering method, characterized in that, Including: Obtaining a three-dimensional model of a target face, a first texture map for characterizing the details of the face skin, and a second texture map for characterizing the distribution of the face grease area; Based on the first texture map and the second texture map, determining target specular effect information for reflecting the face grease effect; Rendering the three-dimensional model based on the target specular effect information to obtain a target rendered model; Generating the first texture map in the following manner: Obtaining a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to characterize the texture information corresponding to the grease area in the details of the face skin, and the second texture normal map is used to characterize the texture information corresponding to the non-grease area in the details of the face skin; Based on the current shooting pose of the target face, respectively adjusting the sharpness of the first texture normal map and the second texture normal map, and generating the first texture map based on the first texture normal map and the second texture normal map after sharpness adjustment.

2. The method according to claim 1, wherein Before determining the target specular effect information for reflecting the face grease effect based on the first texture map and the second texture map, it further includes: Obtaining the illumination direction of the target face and the shooting direction of the target face in the current shooting pose; Determining the specular range angle of the three-dimensional model based on the illumination direction and the shooting direction; Determining the display light intensity of each vertex corresponding to the face grease area based on the specular range angle and the normal direction of each vertex corresponding to the face grease area in the three-dimensional model; 3. The method according to claim 2, wherein The pixel value of each pixel point in the second texture map is used to characterize the display light intensity threshold of the corresponding vertex in the three-dimensional model; The determining the display light intensity of each vertex corresponding to the face grease area based on the specular range angle and the normal direction of each vertex corresponding to the face grease area in the three-dimensional model includes: Determining the display light intensity of each vertex in the face grease area based on the display light intensity threshold corresponding to each vertex in the face grease area, the specular range angle, and the normal direction of each vertex in the three-dimensional model respectively; 4. The method according to claim 3, wherein The determining the display light intensity of each vertex in the face grease area based on the display light intensity threshold corresponding to each vertex in the face grease area, the specular range angle, and the normal direction of each vertex in the three-dimensional model respectively includes: Performing a dot product operation on the specular range angle and the normal direction of each vertex in the three-dimensional model respectively to obtain the basic light intensity information corresponding to each vertex in the three-dimensional model; Adjusting the basic light intensity information by using the display light intensity threshold corresponding to each vertex respectively to obtain the display light intensity of each vertex in the face grease area.

5. The method according to any one of claims 1-4, characterized in that, The determining the target specular effect information for reflecting the face grease effect based on the first texture map and the second texture map includes: Determining the target specular effect information for reflecting the face grease effect based on the first texture map, the second texture map, and the display light intensity of each vertex corresponding to the face grease area.

6. The method according to any one of claims 1-4, characterized in that, It further includes: Obtaining a third texture map for characterizing the average specular effect of the face; Determining target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map includes: Determining the target highlight effect information based on the first texture map, the second texture map, and the third texture map.

7. A model rendering device, characterized in that, Including: An acquisition module for acquiring a three-dimensional model of a target face, a first texture map for characterizing facial skin details, and a second texture map for characterizing the distribution of facial grease regions; A determination module for determining target highlight effect information for reflecting the facial grease effect based on the first texture map and the second texture map; A rendering module for rendering the three-dimensional model based on the target highlight effect information to obtain a target rendered model; The first texture map is generated in the following manner: acquiring a first texture normal map and a second texture normal map; wherein, the first texture normal map is used to characterize the texture information corresponding to the grease region in the facial skin details, and the second texture normal map is used to characterize the texture information corresponding to the non-grease region in the facial skin details; based on the current shooting pose of the target face, adjusting the sharpness of the first texture normal map and the second texture normal map respectively, and generating the first texture map based on the first texture normal map and the second texture normal map after sharpness adjustment.

8. A computer device, characterized in that, Including: A processor and a memory, the memory stores machine-readable instructions executable by the processor, the processor is configured to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the processor executes the steps of the model rendering method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a computer device, the computer device executes the steps of the model rendering method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Program, information storage medium, and image creation system

    JP2007226575A