Face rendering method and device of virtual character, equipment and medium
By adjusting and combining the rendering parameters of the preset facial red halo map and generating and applying the target facial red halo map, the problem of insufficient facial rendering effects in the existing technology is solved, and a richer and more general rendering effects are achieved.
Patent Information
- Application Number
- CN202411606041.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, the facial rendering effect is not rich enough and there is a lack of general rendering technology suitable for any character.
By responding to the rendering instructions for the target virtual character, determine the area to be rendered in the face area, adjust the rendering parameters of the two preset facial red halo maps, merge and generate the target facial red halo map, and apply it to the area to be rendered to achieve rich facial red halo effects.
It achieves richer redness rendering effects, expands the applicability and versatility of facial redness maps, and improves the rendering effect of virtual characters.
Smart Images

Figure CN119559313A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a method, device, equipment and medium for rendering the face of a virtual character. Background Art
[0002] With the rapid development of entertainment products, people have higher and higher requirements for special effects of products. In two-dimensional games and movies, facial rendering effects are an indispensable part of the emotions conveyed by two-dimensional characters. Whether it is happiness, anger, sadness, excitement and other emotions, different rendering effects can be combined with the character's expression, which will make the overall effect even better.
[0003] In the prior art, the rendering effect of facial rendering technology is not rich enough, and there is currently no rendering technology that can be universally applied to any character. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a service operation method, device, equipment, and storage medium for an application platform to solve the problems of insufficient rendering effects and weak versatility.
[0005] In a first aspect, an embodiment of the present application provides a method for rendering a virtual character's face, the method comprising:
[0006] In response to a rendering instruction for a target virtual character, determining a to-be-rendered area in a facial area of the target virtual character;
[0007] Adjust rendering parameters of two preset facial blush maps;
[0008] Merging the two adjusted facial blush maps to generate a target facial blush map;
[0009] The target facial blush map is used to render the to-be-rendered area of the target virtual character, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
[0010] In a second aspect, an embodiment of the present application provides a facial rendering device for a virtual character, the device comprising:
[0011] A determination module, configured to determine, in response to a rendering instruction for a target virtual character, a to-be-rendered area in a facial area of the target virtual character;
[0012] An adjustment module, used to adjust the rendering parameters of two preset facial blush maps;
[0013] A generation module, used for merging the two adjusted facial blush maps to generate a target facial blush map;
[0014] A rendering module is used to render the to-be-rendered area of the target virtual character using the target facial blush map, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the facial rendering method of a virtual character as described in any one of the first aspects.
[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for facial rendering of a virtual character as described in any one of the first aspects are executed.
[0017] Compared with the prior art, this application has the following beneficial effects:
[0018] The present application provides a method, device, equipment, and medium for rendering the face of a virtual character. The method determines the area to be rendered in the face area of the target virtual character in response to a rendering instruction for the target virtual character; adjusts the rendering parameters of two preset facial blush maps; merges the adjusted two facial blush maps to generate a target facial blush map; and uses the target facial blush map to render the area to be rendered of the target virtual character, so that the rendered area presents the facial blush effect corresponding to the target facial blush map. Thus, a facial blush map with rich blush effects is designed by two preset facial blush maps, so that the blush rendering effect is richer, and the applicability and versatility of the facial blush map are expanded, and the rendering effect of the virtual character is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a method for rendering the face of a virtual character provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a flow chart of another virtual character facial rendering method provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of a flow chart of another method for adjusting facial rendering of a virtual character provided in an embodiment of the present application;
[0023] Figure 4 A schematic diagram of a flow chart of a method for pre-generating a preset facial blush map provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of a flow chart of a method for pre-generating a preset blush detail map provided in an embodiment of the present application;
[0025] Figure 6 A schematic flow chart of a method for determining a target virtual character's to-be-rendered area provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of a facial rendering device for a virtual character provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0028] Icons: 701 - determination module, 702 - adjustment module, 703 - generation module, 704 - rendering module, 801 - processor, 802 - storage medium, 803 - bus. DETAILED DESCRIPTION
[0029] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0030] In one embodiment of the present application, a method for rendering the face of a virtual character can be run on a local terminal device or a server. When a method for rendering the face of a virtual character is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0031] In a possible implementation, an embodiment of the present invention provides a method for facial rendering of a virtual character, providing a user interface through a terminal device, wherein the terminal device may be the local terminal device mentioned above, or may be a client device in the cloud interaction system mentioned above.
[0032] A method for rendering the face of a virtual character provided in an embodiment of the present application is implemented using UE (Unreal Engine).
[0033] Figure 1 This is a flow chart of a method for rendering the face of a virtual character provided in an embodiment of the present application. Figure 1 As shown, the method includes:
[0034] S101 . In response to a rendering instruction for a target virtual character, determine a to-be-rendered area in a facial area of the target virtual character.
[0035] When performing facial rendering on a virtual character, the developer issues a rendering instruction for the target virtual character and determines the area to be rendered in the facial area of the target virtual character.
[0036] For example, if the rendering effect is a blush effect, the area to be rendered is a cheek area of the facial area.
[0037] S102, adjusting rendering parameters of two preset facial blush maps.
[0038] Before the facial rendering process, two preset facial blush maps are prepared in advance. The two preset facial blush maps are exactly the same map. During the facial rendering process, the two preset facial blush maps can set the same rendering parameters or different rendering parameters.
[0039] Furthermore, before adjusting the rendering parameters of the two preset facial blush maps, first select the two preset facial blush maps, and embed the material function of the facial blush maps into the facial material instance of the target virtual character. In this way, the rendering parameters of the facial blush maps can be displayed in the facial material instance, and the rendering parameters of the two preset facial blush maps can be adjusted.
[0040] S103: Merge the two adjusted facial blush maps to generate a target facial blush map.
[0041] The two adjusted facial blush maps can present different / same blush effects. By merging the two adjusted facial blush maps, the two different / same blush effects can be superimposed to present a richer blush effect. The blush effect of the target facial blush map can be more selective. This rich blush effect cannot be presented by a single blush map.
[0042] For example, the black and white areas of the facial blush map are separated by a Lerp node, and the two facial blush maps are merged together again by the algorithm of the Lerp node.
[0043] S104, using the target facial blush map to render the to-be-rendered area of the target virtual character, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
[0044] The blush effect of the target facial blush map is richer. The rich target facial blush map is rendered to the to-be-rendered area of the target virtual character. The rendering area can present the facial blush effect corresponding to the target facial blush map, thereby making the rendering effect of the target virtual character richer.
[0045] Therefore, by designing a facial blush map with rich blush effects, the blush rendering effect is made richer, and the applicability and versatility of the facial blush map are expanded, thereby improving the rendering effect of the virtual character.
[0046] In summary, in the implementation of this city, in response to the rendering instruction for the target virtual character, the area to be rendered in the facial area of the target virtual character is determined; the rendering parameters of the two preset facial blush maps are adjusted; the two adjusted facial blush maps are merged to generate a target facial blush map; the target facial blush map is used to render the area to be rendered of the target virtual character, so that the rendered area presents the facial blush effect corresponding to the target facial blush map. Thus, a facial blush map with rich blush effects is designed through two preset facial blush maps, which makes the blush rendering effect richer, expands the applicability and versatility of the facial blush map, and improves the rendering effect of the virtual character.
[0047] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, adjusting the rendering parameters of two preset facial blush maps in S102 includes:
[0048] According to the first adjustment operation on the preset facial blush map, the display configuration information of the blush object in the preset facial blush map is adjusted; and / or,
[0049] According to the second adjustment operation on the preset facial blush map, the mapping configuration information of the blush object in the preset facial blush map is adjusted.
[0050] When a preset facial blush map is obtained, the preset facial blush map contains display configuration information of the blush object. By adjusting the display configuration information, the display information of the blush is enriched.
[0051] By adjusting the mapping configuration information, the blush effect of the preset facial blush map is made more accurate. For example, the mapping configuration information is UV mapping information. The UV coordinate system is two-dimensional, with the horizontal direction called U and the vertical direction called V. Through the UV coordinate system, any pixel on the image can be located. In 3D modeling, the UV coordinates define the position information of each point on the image. These points are interconnected with the 3D model to determine the position of the surface texture map.
[0052] In summary, in the implementation of this city, according to the first adjustment operation on the preset facial blush map, the display configuration information of the blush object in the preset facial blush map is adjusted; and / or, according to the second adjustment operation on the preset facial blush map, the mapping configuration information of the blush object in the preset facial blush map is adjusted. Thus, a rich blush effect is accurately displayed.
[0053] Based on the above embodiment, in another embodiment of the present application, the display configuration information of the blush object includes at least one of: a mask image of the blush object, a mask strength parameter of the mask image, and a color parameter of the blush object.
[0054] For example, the mask image of the blush object is a Mask map, the mask image represents the shape of the blush, the mask intensity parameter represents the intensity of the blush, and the color parameter of the blush object represents the color of the blush.
[0055] The mapping configuration information of the blush object includes at least one of the following information: the position information of the blush object, the scaling information of the blush object, and the rotation information of the blush object.
[0056] For example, the position information and scale information of the blush object are organized together through the Float4 node, and the rotation information of the blush object is connected in series and applied to the facial UV, so as to accurately render the blush object to the area to be rendered.
[0057] In summary, in the implementation of this city, the display configuration information of the blush object includes at least one of the following information: the mask map of the blush object, the mask strength parameter of the mask map, and the color parameter of the blush object; the mapping configuration information of the blush object includes at least one of the following information: the position information of the blush object, the scaling information of the blush object, and the rotation information of the blush object. Thus, the rich blush effect can be accurately rendered to the area to be rendered.
[0058] In the above Figure 1 On the basis of the corresponding embodiment, the embodiment of the present application also provides another method for rendering the face of a virtual character. Figure 2 A flowchart of another method for rendering the face of a virtual character provided in an embodiment of the present application. Figure 2As shown, before using the target facial blush map to render the to-be-rendered area of the target virtual character in S104, the method further includes:
[0059] S201, obtaining a preset blush detail map.
[0060] In order to make the facial blush richer, you can add a preset blush detail map on the basis of the blush.
[0061] For example, the preset blush detail map may be a red line map. By adding the red line map, the blush has red lines, and the blush effect will be more realistic and rich.
[0062] In S104, the target facial blush map is used to render the to-be-rendered area of the target virtual character, including:
[0063] S202: Merge the preset blush detail map and the target facial blush map to generate a target facial map.
[0064] For example, in order to avoid deformation of the blush detail map caused by the target facial animation, a patch model is provided in this embodiment, and the preset blush detail map is equipped on the target face on the blueprint using the patch model.
[0065] The target face map with the added preset blush detail map has a richer blush effect.
[0066] S203: Rendering the target virtual character's to-be-rendered area using the target facial map, so that the rendered area presents a facial rendering effect corresponding to the target facial map.
[0067] The facial rendering effects include: a facial blush effect corresponding to a target facial blush map, and a facial blush detail effect corresponding to a preset blush detail map.
[0068] The target facial map with the preset blush detail map added is rendered to the to-be-rendered area of the target virtual character. The rendered area can present the facial blush effect corresponding to the target facial blush map, thereby making the rendering effect of the target virtual character richer.
[0069] Therefore, the facial blush map includes blush details, making the blush rendering effect richer, and also expanding the applicability and versatility of the facial blush map, thereby improving the rendering effect of the virtual character.
[0070] In summary, in the implementation of this city, a preset blush detail map is obtained; the preset blush detail map and the target facial blush map are merged to generate a target facial map; the target facial map is used to render the target virtual character's to-be-rendered area, so that the rendered area presents the facial rendering effect corresponding to the target facial map, and the facial rendering effect includes: the facial blush effect corresponding to the target facial blush map, and the facial blush detail effect corresponding to the preset blush detail map. Thus, the facial blush map contains blush details, making the blush rendering effect richer, and also expanding the applicability and versatility of the facial blush map, and improving the rendering effect of the virtual character.
[0071] In the above Figure 2 On the basis of the corresponding embodiment, the embodiment of the present application also provides another method for adjusting facial rendering of a virtual character. Figure 3 A flowchart of another method for adjusting the facial rendering of a virtual character provided in an embodiment of the present application. Figure 3 As shown, before merging the preset blush detail map and the target facial blush map to generate the target facial map in S202, the method further includes:
[0072] S301. According to a third adjustment operation on a preset blush detail map, adjusting mapping configuration information of a blush detail object in a preset blush detail map.
[0073] By adjusting the mapping configuration information, the blush detail effect of the preset blush detail map is made more accurate.
[0074] And / or, S302, according to a fourth adjustment operation on the preset blush detail map, adjusting the display configuration information of the blush detail object in the preset blush detail map.
[0075] When a preset blush detail map is obtained, the preset blush detail map contains display configuration information of the blush detail. By adjusting the display configuration information, the display information of the blush detail is made richer.
[0076] In S202, the preset blush detail map and the target facial blush map are merged to generate the target facial map, including:
[0077] S303: Merge the adjusted blush detail map and the target facial blush map to generate a target facial map.
[0078] The adjusted blush detail map is more in line with the development needs of developers. The target facial map with the adjusted blush detail map added is rendered to the to-be-rendered area of the target virtual character. The rendering area can present the facial blush effect corresponding to the target facial blush map, thereby making the rendering effect of the target virtual character richer.
[0079] In this embodiment, there is no order between step S301 and step S302, and the steps in this embodiment are only examples.
[0080] In summary, in the implementation of this city, according to the third adjustment operation on the preset blush detail map, the mapping configuration information of the blush detail object in the preset blush detail map is adjusted; and / or, according to the fourth adjustment operation on the preset blush detail map, the display configuration information of the blush detail object in the preset blush detail map is adjusted; the adjusted blush detail map and the target facial blush map are merged to generate the target facial map. Therefore, the facial blush map contains blush details, making the blush rendering effect richer.
[0081] In the above Figure 3 On the basis of the corresponding embodiment, in another embodiment of the present application, the mapping configuration information of the blush detail object includes at least one of: position information of the blush detail object, scaling information of the blush detail object, and rotation information of the blush detail object.
[0082] For example, the position information and scale information of the blush detail object are organized together through the Float4 node, and the rotation information of the blush detail object is connected in series and applied to the facial UV, so as to accurately render the blush detail object to the area to be rendered.
[0083] The display configuration information of the blush detail object includes at least one of: a mask image of the blush detail object, a mask strength parameter of the mask image, and a color parameter of the blush detail object.
[0084] For example, the mask map of the blush object is a Mask map. The mask map represents the shape of the blush, the mask intensity parameter represents the intensity of the blush, and the color parameter of the blush object represents the color of the blush. The mask module of the Mask map is connected to the DitherTemporalAA node to make the blush detail object achieve a semi-transparent effect, making the blush more vivid and more in line with the real blush effect.
[0085] In summary, in the implementation of this city, the mapping configuration information of the blush detail object includes at least one of the following information: the location information of the blush detail object, the scaling information of the blush detail object, and the rotation information of the blush detail object; the display configuration information of the blush detail object includes at least one of the following information: the mask map of the blush detail object, the mask strength parameter of the mask map, and the color parameter of the blush detail object. Thus, the blush is more vivid and more in line with the real blush effect.
[0086] In the above Figure 1On the basis of the corresponding embodiment, the embodiment of the present application also provides a method for pre-generating a preset facial blush map. Figure 4 A flowchart of a method for pre-generating a preset facial blush map provided in an embodiment of the present application is shown below. Figure 4 As shown, before adjusting the rendering parameters of the two preset facial blush maps in S102, the method further includes:
[0087] S401, obtaining and adjusting configuration parameters of a preset facial basic color map.
[0088] After obtaining the preset facial basic color map, the configuration parameters of the preset facial basic color map are adjusted according to the blush design requirements, so that a variety of facial basic color maps can be achieved to facilitate the generation of facial blush maps.
[0089] S402: Generate a preset facial blush map according to the adjusted facial basic color map, the mask map of the preset blush object, and the display configuration parameters of the preset blush object.
[0090] According to the blush design requirements, a variety of different facial blush maps can be generated in a diversified manner. Pre-generate preset facial blush maps so that they can be used directly during facial rendering to improve facial rendering efficiency.
[0091] In summary, in the implementation of this city, the configuration parameters of the preset facial basic color map are obtained and adjusted; the preset facial blush map is generated according to the adjusted facial basic color map, the mask map of the preset blush object, and the display configuration parameters of the preset blush object. Thus, the preset facial blush map is generated in advance so that it can be directly used when performing facial rendering, thereby improving the efficiency of facial rendering.
[0092] In the above Figure 2 On the basis of the corresponding embodiment, the embodiment of the present application also provides a method for pre-generating a preset blush detail map. Figure 5 A schematic diagram of a flow chart of a method for pre-generating a preset blush detail map provided in an embodiment of the present application. Figure 5 As shown, before obtaining the preset blush detail map in S201, the following steps are included:
[0093] S501, obtaining and adjusting configuration parameters of a preset facial basic color map.
[0094] After obtaining the preset facial basic color map, the configuration parameters of the preset facial basic color map are adjusted according to the blush detail design requirements, so as to realize diversified facial basic color maps, so as to generate the blush detail map.
[0095] S502: Generate a preset blush detail map according to the adjusted facial basic color map, the mask map of the preset blush detail object, and the display configuration parameters of the preset blush detail object.
[0096] According to the requirements of blush detail design, a variety of different blush detail maps can be generated in a diversified manner. Pre-generate a preset face blush detail map so that it can be directly used when rendering the face, thereby improving the efficiency of facial rendering.
[0097] In summary, in the implementation of this city, the configuration parameters of the preset facial basic color map are obtained and adjusted; the preset blush detail map is generated according to the adjusted facial basic color map, the mask map of the preset blush detail object, and the display configuration parameters of the preset blush detail object. Thus, the preset facial blush detail map is generated in advance so that it can be directly used when performing facial rendering, thereby improving the efficiency of facial rendering.
[0098] In the above Figure 1 On the basis of the corresponding embodiments, the embodiments of the present application further provide a method for determining the area to be rendered of the target virtual character. Figure 6 A flow chart of a method for determining a target virtual character's to-be-rendered area provided in an embodiment of the present application. Figure 6 As shown, the step of determining the area to be rendered in the facial area of the target virtual character in S101 includes:
[0099] S601: Obtain a preset facial mask image.
[0100] S602: According to the target key points of the facial region, a preset facial mask image is associated with the target key points of the facial region to obtain a region to be rendered.
[0101] For example, when performing facial rendering, target key points are calibrated in the head bone part, and the parent item in the patch model corresponding to the preset facial mask image selects the target key points, so that the area to be rendered consisting of the target key points and the preset facial mask image can be obtained.
[0102] In summary, in the implementation of this city, a preset facial mask image is obtained; according to the target key points of the facial area, the preset facial mask image is associated with the target key points of the facial area to obtain the area to be rendered. Thus, the area to be rendered is accurately determined.
[0103] In the above Figure 1 On the basis of the corresponding embodiment, in another embodiment of the present application, the method further includes:
[0104] Save the target facial blush map to the preset facial map library.
[0105] For example, the target facial blush map used in each rendering can be used in subsequent renderings. Therefore, the target facial blush map, the adjusted blush detail map, and the target facial map containing the blush detail map are stored in the preset facial map library for the next rendering to improve rendering efficiency.
[0106] In summary, in the implementation of this city, the target facial blush map is stored in the preset facial map library, so as to facilitate the rendering next time and improve the rendering efficiency.
[0107] The following describes a facial rendering device, equipment, storage medium, and program for a virtual character provided by the present application. The specific implementation process and technical effects are described above and will not be repeated below.
[0108] Figure 7 A schematic diagram of a facial rendering device for a virtual character provided in an embodiment of the present application, such as Figure 7 As shown, the device comprises:
[0109] The determination module 701 is used to determine the to-be-rendered area in the facial area of the target virtual character in response to a rendering instruction for the target virtual character.
[0110] The adjustment module 702 is used to adjust the rendering parameters of two preset facial blush maps.
[0111] The generating module 703 is used to merge the two adjusted facial blush maps to generate a target facial blush map.
[0112] The rendering module 704 is used to render the to-be-rendered area of the target virtual character using the target facial blush map, so that the rendered area presents the facial blush effect corresponding to the target facial blush map.
[0113] Further, the adjustment module 702 is specifically used to adjust the display configuration information of the blush object in the preset facial blush map according to a first adjustment operation on the preset facial blush map; and / or, according to a second adjustment operation on the preset facial blush map, adjust the mapping configuration information of the blush object in the preset facial blush map.
[0114] Furthermore, the adjustment module 702 is specifically used for display configuration information of the blush object, including at least one of the following information: a mask image of the blush object, a mask strength parameter of the mask image, and a color parameter of the blush object; and the mapping configuration information of the blush object includes at least one of the following information: position information of the blush object, scaling information of the blush object, and rotation information of the blush object.
[0115] Furthermore, the rendering module 704 is also used to obtain a preset blush detail map; merge the preset blush detail map and the target facial blush map to generate a target facial map; and use the target facial map to render the to-be-rendered area of the target virtual character so that the rendered area presents a facial rendering effect corresponding to the target facial map, the facial rendering effect including: a facial blush effect corresponding to the target facial blush map, and a facial blush detail effect corresponding to the preset blush detail map.
[0116] Furthermore, the adjustment module 702 is also used to adjust the mapping configuration information of the blush detail object in the preset blush detail map according to the third adjustment operation on the preset blush detail map; and / or, according to the fourth adjustment operation on the preset blush detail map, adjust the display configuration information of the blush detail object in the preset blush detail map; merge the adjusted blush detail map and the target facial blush map to generate the target facial map.
[0117] Furthermore, the adjustment module 702 is also used for mapping configuration information of the blush detail object, including at least one of the following information: position information of the blush detail object, scaling information of the blush detail object, and rotation information of the blush detail object; and display configuration information of the blush detail object, including at least one of the following information: a mask image of the blush detail object, a mask strength parameter of the mask image, and a color parameter of the blush detail object.
[0118] Furthermore, the adjustment module 702 is also used to obtain and adjust the configuration parameters of the preset facial basic color map; generate the preset facial blush map according to the adjusted facial basic color map, the mask map of the preset blush object and the display configuration parameters of the preset blush object.
[0119] Furthermore, the adjustment module 702 is also used to obtain and adjust the configuration parameters of the preset facial basic color map; generate the preset blush detail map according to the adjusted facial basic color map, the mask map of the preset blush detail object and the display configuration parameters of the preset blush detail object.
[0120] Furthermore, the determination module 701 is specifically used to obtain a preset facial mask image; according to the target key points of the facial area, the preset facial mask image is associated with the target key points of the facial area to obtain the area to be rendered.
[0121] Furthermore, the generating module 703 is further configured to store the target facial blush map in a preset facial map library.
[0122] In the above manner, in response to a rendering instruction for a target virtual character, a to-be-rendered area in the facial area of the target virtual character is determined; rendering parameters of two preset facial blush maps are adjusted; the two adjusted facial blush maps are merged to generate a target facial blush map; and the to-be-rendered area of the target virtual character is rendered using the target facial blush map, so that the rendered area presents a facial blush effect corresponding to the target facial blush map. Thus, by designing a facial blush map with rich blush effects, the blush rendering effect is made richer, the applicability and versatility of the facial blush map are expanded, and the rendering effect of the virtual character is improved.
[0123] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present application includes: a processor 801, a storage medium 802 and a bus 803, the storage medium 802 stores machine-readable instructions executable by the processor 801, the processor 801 communicates with the storage medium 802 via the bus 803, and the processor 801 executes the machine-readable instructions to execute the above method.
[0124] In response to a rendering instruction for a target virtual character, a to-be-rendered area in a facial area of the target virtual character is determined.
[0125] Adjust the rendering parameters of two preset facial flush maps.
[0126] The two adjusted facial blush maps are merged to generate a target facial blush map.
[0127] The target facial blush map is used to render the to-be-rendered area of the target virtual character, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
[0128] Optionally, adjust the rendering parameters of the two preset facial blush maps, including:
[0129] According to the first adjustment operation on the preset facial blush map, the display configuration information of the blush object in the preset facial blush map is adjusted; and / or,
[0130] According to the second adjustment operation on the preset facial blush map, the mapping configuration information of the blush object in the preset facial blush map is adjusted.
[0131] Optionally, the display configuration information of the blush object includes at least one of: a mask image of the blush object, a mask strength parameter of the mask image, and a color parameter of the blush object;
[0132] The mapping configuration information of the blush object includes at least one of the following information: the position information of the blush object, the scaling information of the blush object, and the rotation information of the blush object.
[0133] Optionally, before rendering the target virtual character's to-be-rendered area using the target facial blush map, the method further includes:
[0134] Get the preset blush detail map;
[0135] The target facial blush map is used to render the target virtual character's to-be-rendered area, including:
[0136] Merge the preset blush detail map and the target facial blush map to generate a target facial map;
[0137] The target facial map is used to render the area to be rendered of the target virtual character so that the rendered area presents the facial rendering effect corresponding to the target facial map, and the facial rendering effect includes: the facial blush effect corresponding to the target facial blush map, and the facial blush detail effect corresponding to the preset blush detail map.
[0138] Optionally, before merging the preset blush detail map and the target facial blush map to generate the target facial map, the method further includes:
[0139] According to a third adjustment operation on the preset blush detail map, adjusting the mapping configuration information of the blush detail object in the preset blush detail map; and / or,
[0140] According to a fourth adjustment operation on the preset blush detail map, display configuration information of the blush detail object in the preset blush detail map is adjusted;
[0141] Merge the preset blush detail map and the target facial blush map to generate a target facial map, including:
[0142] The adjusted blush detail map and the target facial blush map are merged to generate a target facial map.
[0143] Optionally, the mapping configuration information of the blush detail object includes at least: at least one of the following information: position information of the blush detail object, scaling information of the blush detail object, and rotation information of the blush detail object;
[0144] The display configuration information of the blush detail object includes at least one of: a mask image of the blush detail object, a mask strength parameter of the mask image, and a color parameter of the blush detail object.
[0145] Optionally, before merging the two adjusted facial blush maps to generate a target facial blush map, the method further includes:
[0146] Get and adjust the configuration parameters of the preset facial base color map;
[0147] A preset facial blush map is generated according to the adjusted facial basic color map, the mask map of the preset blush object, and the display configuration parameters of the preset blush object.
[0148] Optionally, before obtaining the preset blush detail map, the following steps are included:
[0149] Get and adjust the configuration parameters of the preset facial base color map;
[0150] A preset blush detail map is generated according to the adjusted facial basic color map, the mask map of the preset blush detail object, and the display configuration parameters of the preset blush detail object.
[0151] Optionally, determining the area to be rendered in the facial area of the target virtual character includes:
[0152] Get the preset facial mask image;
[0153] According to the target key points of the facial area, the preset facial mask image is associated with the target key points of the facial area to obtain the area to be rendered.
[0154] Optionally, the method further comprises:
[0155] Save the target facial blush map to the preset facial map library.
[0156] In the above manner, in response to a rendering instruction for a target virtual character, a to-be-rendered area in the facial area of the target virtual character is determined; rendering parameters of two preset facial blush maps are adjusted; the two adjusted facial blush maps are merged to generate a target facial blush map; and the to-be-rendered area of the target virtual character is rendered using the target facial blush map, so that the rendered area presents a facial blush effect corresponding to the target facial blush map. Thus, by designing a facial blush map with rich blush effects, the blush rendering effect is made richer, the applicability and versatility of the facial blush map are expanded, and the rendering effect of the virtual character is improved.
[0157] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method embodiment is executed.
[0158] In response to a rendering instruction for a target virtual character, determining a to-be-rendered area in a facial area of the target virtual character;
[0159] Adjust rendering parameters of two preset facial blush maps;
[0160] Merging the two adjusted facial blush maps to generate a target facial blush map;
[0161] The target facial blush map is used to render the to-be-rendered area of the target virtual character, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
[0162] Optionally, adjust the rendering parameters of the two preset facial blush maps, including:
[0163] According to the first adjustment operation on the preset facial blush map, the display configuration information of the blush object in the preset facial blush map is adjusted; and / or,
[0164] According to the second adjustment operation on the preset facial blush map, the mapping configuration information of the blush object in the preset facial blush map is adjusted.
[0165] Optionally, the display configuration information of the blush object includes at least one of: a mask image of the blush object, a mask strength parameter of the mask image, and a color parameter of the blush object;
[0166] The mapping configuration information of the blush object includes at least one of the following information: the position information of the blush object, the scaling information of the blush object, and the rotation information of the blush object.
[0167] Optionally, before rendering the target virtual character's to-be-rendered area using the target facial blush map, the method further includes:
[0168] Get the preset blush detail map;
[0169] The target facial blush map is used to render the target virtual character's to-be-rendered area, including:
[0170] Merge the preset blush detail map and the target facial blush map to generate a target facial map;
[0171] The target facial map is used to render the area to be rendered of the target virtual character so that the rendered area presents the facial rendering effect corresponding to the target facial map, and the facial rendering effect includes: the facial blush effect corresponding to the target facial blush map, and the facial blush detail effect corresponding to the preset blush detail map.
[0172] Optionally, before merging the preset blush detail map and the target facial blush map to generate the target facial map, the method further includes:
[0173] According to a third adjustment operation on the preset blush detail map, adjusting the mapping configuration information of the blush detail object in the preset blush detail map; and / or,
[0174] According to a fourth adjustment operation on the preset blush detail map, display configuration information of the blush detail object in the preset blush detail map is adjusted;
[0175] Merge the preset blush detail map and the target facial blush map to generate a target facial map, including:
[0176] The adjusted blush detail map and the target facial blush map are merged to generate a target facial map.
[0177] Optionally, the mapping configuration information of the blush detail object includes at least: at least one of the following information: position information of the blush detail object, scaling information of the blush detail object, and rotation information of the blush detail object;
[0178] The display configuration information of the blush detail object includes at least one of: a mask image of the blush detail object, a mask strength parameter of the mask image, and a color parameter of the blush detail object.
[0179] Optionally, before merging the two adjusted facial blush maps to generate a target facial blush map, the method further includes:
[0180] Get and adjust the configuration parameters of the preset facial base color map;
[0181] A preset facial blush map is generated according to the adjusted facial basic color map, the mask map of the preset blush object, and the display configuration parameters of the preset blush object.
[0182] Optionally, before obtaining the preset blush detail map, the following steps are included:
[0183] Get and adjust the configuration parameters of the preset facial base color map;
[0184] A preset blush detail map is generated according to the adjusted facial basic color map, the mask map of the preset blush detail object, and the display configuration parameters of the preset blush detail object.
[0185] Optionally, determining the area to be rendered in the facial area of the target virtual character includes:
[0186] Get the preset facial mask image;
[0187] According to the target key points of the facial area, the preset facial mask image is associated with the target key points of the facial area to obtain the area to be rendered.
[0188] Optionally, the method further comprises:
[0189] Save the target facial blush map to the preset facial map library.
[0190] In the above manner, in response to a rendering instruction for a target virtual character, a to-be-rendered area in the facial area of the target virtual character is determined; rendering parameters of two preset facial blush maps are adjusted; the two adjusted facial blush maps are merged to generate a target facial blush map; and the to-be-rendered area of the target virtual character is rendered using the target facial blush map, so that the rendered area presents a facial blush effect corresponding to the target facial blush map. Thus, by designing a facial blush map with rich blush effects, the blush rendering effect is made richer, the applicability and versatility of the facial blush map are expanded, and the rendering effect of the virtual character is improved.
[0191] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0192] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0193] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0194] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0195] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0196] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0197] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for rendering a virtual character's face, characterized in that: The method comprises: In response to a rendering instruction for a target virtual character, determining a to-be-rendered area in a facial area of the target virtual character; Adjust the rendering parameters of two preset facial blush maps; Merging the two adjusted facial blush maps to generate a target facial blush map; The target facial blush map is used to render the to-be-rendered area of the target virtual character, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
2. The method according to claim 1, characterized in that The adjusting of rendering parameters of two preset facial blush maps includes: According to the first adjustment operation on the preset facial blush map, the display configuration information of the blush object in the preset facial blush map is adjusted; and / or, According to a second adjustment operation on the preset facial blush map, mapping configuration information of the blush object in the preset facial blush map is adjusted.
3. The method according to claim 2, characterized in that The display configuration information of the blush object includes at least one of: a mask image of the blush object, a mask strength parameter of the mask image, and a color parameter of the blush object; The mapping configuration information of the blush object includes at least one of the following information: position information of the blush object, scaling information of the blush object, and rotation information of the blush object.
4. The method according to claim 1, characterized in that Before rendering the to-be-rendered area of the target virtual character using the target facial blush map, the method further includes: Get the preset blush detail map; The step of using the target facial blush map to render the to-be-rendered area of the target virtual character comprises: Merging the preset blush detail map and the target facial blush map to generate a target facial map; The target facial map is used to render the area to be rendered of the target virtual character, so that the rendering area presents a facial rendering effect corresponding to the target facial map, and the facial rendering effect includes: a facial blush effect corresponding to the target facial blush map, and a facial blush detail effect corresponding to the preset blush detail map.
5. The method according to claim 4, characterized in that Before merging the preset blush detail map and the target facial blush map to generate the target facial map, the method further includes: According to a third adjustment operation on the preset blush detail map, adjusting mapping configuration information of the blush detail object in the preset blush detail map; and / or, According to a fourth adjustment operation on the preset blush detail map, adjusting display configuration information of the blush detail object in the preset blush detail map; The step of merging the preset blush detail map and the target facial blush map to generate a target facial map includes: The adjusted blush detail map and the target facial blush map are merged to generate the target facial map.
6. The method according to claim 5, characterized in that The mapping configuration information of the blush detail object includes at least: at least one of the following information: the position information of the blush detail object, the scaling information of the blush detail object, and the rotation information of the blush detail object; The display configuration information of the blush detail object includes at least one of: a mask image of the blush detail object, a mask strength parameter of the mask image, and a color parameter of the blush detail object.
7. The method according to claim 1, characterized in that Before adjusting the rendering parameters of the two preset facial blush maps, the method further includes: Get and adjust the configuration parameters of the preset facial base color map; The preset facial blush map is generated according to the adjusted facial basic color map, the mask map of the preset blush object and the display configuration parameters of the preset blush object.
8. The method according to claim 4, characterized in that Before obtaining the preset blush detail map, the method includes: Get and adjust the configuration parameters of the preset facial base color map; The preset blush detail map is generated according to the adjusted facial basic color map, the mask map of the preset blush detail object and the display configuration parameters of the preset blush detail object.
9. The method according to claim 1, characterized in that: The step of determining the area to be rendered in the facial area of the target virtual character comprises: Get the preset facial mask image; According to the target key points of the facial area, the preset facial mask image is associated with the target key points of the facial area to obtain the area to be rendered.
10. The method according to claim 1, characterized in that The method further comprises: The target facial blush map is stored in a preset facial map library.
11. A facial rendering device for a virtual character, characterized in that: The device comprises: A determination module, configured to determine, in response to a rendering instruction for a target virtual character, a to-be-rendered area in a facial area of the target virtual character; An adjustment module, used to adjust the rendering parameters of two preset facial blush maps; A generation module, used for merging the two adjusted facial blush maps to generate a target facial blush map; A rendering module is used to render the to-be-rendered area of the target virtual character using the target facial blush map, so that the rendered area presents a facial blush effect corresponding to the target facial blush map.
12. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the facial rendering method of a virtual character as described in any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for rendering the face of a virtual character as claimed in any one of claims 1 to 10 are executed.