Virtual expression rendering method and device and electronic equipment

By sampling the preset emoticon map set and replacing the head model of the virtual object, exaggerated or stylized virtual expressions are realized in the game, solving the problem that the existing technology is difficult to express this type of expression, and improving the expressiveness and fun of the game.

CN119515665APending Publication Date: 2025-02-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311047382.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

It is difficult for the prior art to achieve exaggerated or stylized virtual expressions in games, especially in 2D stylized games. Traditional blendshape technology is difficult to show non-existent or difficult expressions such as sweating.

Method used

By responding to a specific emoticon rendering event, the preset emoticon map collection is sampled to obtain the target emoticon map, and the head 3D mesh model of the virtual object is replaced with the first head model containing the target emoticon map to achieve stylized emoticon rendering.

Benefits of technology

It realizes the rendering of exaggerated or stylized virtual expressions in the game, which can express expressions that are more present or difficult to achieve in reality, thereby improving the expressiveness and fun of the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515665A_ABST
    Figure CN119515665A_ABST
Patent Text Reader

Abstract

The invention provides a virtual expression rendering method and device and electronic equipment, and the method comprises the steps: carrying out the sampling of a preset expression map set in response to a specific expression rendering event, and obtaining a target expression map containing an eye state and / or a mouth state corresponding to a specific expression switching event; and replacing the head three-dimensional mesh model of the currently displayed virtual object with a first head model containing the target expression map, so that the displayed virtual object shows a target expression corresponding to the target expression map. According to the mode, the expression map set can be sampled to obtain the target expression map, and the head three-dimensional mesh model of the currently displayed virtual object is replaced by the first head model containing the target expression map, so that the virtual object can display the target expression corresponding to the target expression map; due to the fact that the expression map set can comprise the eye states and / or the mouth states corresponding to the different expressions, various stylized virtual expressions can be rendered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a virtual expression rendering method, device and electronic equipment. Background Art

[0002] In games, it is often necessary to make virtual characters make a variety of different expressions. The relevant technology usually uses the blendshape method, that is, when modeling, the artist manually or by motion capture to create a vertex posture of the character's expression and place it in the 3D model; in the game, as long as you manually switch to the corresponding blendshape, the mesh of the virtual character's face will apply this blendshape, thereby driving the virtual character to make the corresponding expression. This technology is sufficient for realistic game styles, but in some two-dimensional stylized games, sometimes you may expect some more exaggerated expressions, or even imitate the anime style, such as showing some emojis such as sweating on the face, etc. These expressions do not exist or are difficult to do in reality, and the relevant technology cannot achieve the corresponding effect. Summary of the invention

[0003] The purpose of the present invention is to provide a virtual expression rendering method, device and electronic device to render stylized virtual expressions.

[0004] The present invention provides a virtual expression rendering method, which comprises: in response to a specific expression rendering event for a virtual object, sampling a preset expression map set according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to the specific expression switching event; using a first head model containing the target expression map to replace a currently displayed virtual object's head three-dimensional mesh model, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also comprises a first head mesh model and a first face mesh model matching the first head mesh model.

[0005] The present invention provides a virtual expression rendering device, which includes: a sampling module, which is used to respond to a specific expression rendering event for a virtual object, sample a preset expression map set according to the specific expression rendering event, and obtain a target expression map containing eye states and / or mouth states corresponding to the specific expression switching event; a replacement module, which is used to replace a three-dimensional head mesh model of a currently displayed virtual object with a first head model containing the target expression map, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0006] An electronic device provided by the present invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement any one of the above-mentioned virtual expression rendering methods.

[0007] The present invention provides a machine-readable storage medium, characterized in that the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement any of the above-mentioned virtual expression rendering methods.

[0008] The present invention provides a virtual expression rendering method, device and electronic device. In response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to a specific expression switching event; a first head model containing the target expression map is used to replace the head three-dimensional mesh model of the currently displayed virtual object, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model that matches the first head mesh model. This method can sample the expression map set to obtain a target expression map, and by replacing the head three-dimensional mesh model of the currently displayed virtual object with the first head model containing the target expression map, the virtual object can display the target expression corresponding to the target expression map. Since the expression map set can include eye states and / or mouth states corresponding to different expressions, various stylized virtual expressions can be rendered. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0010] Figure 1 A flowchart of a virtual expression rendering method provided by an embodiment of the present invention;

[0011] Figure 2 A schematic diagram of an RGB channel image of an expression sticker set provided by an embodiment of the present invention;

[0012] Figure 3 A schematic diagram of an A channel image of an expression sticker set provided by an embodiment of the present invention;

[0013] Figure 4 A schematic diagram of an emoticon sticker set provided by an embodiment of the present invention;

[0014] Figure 5 A schematic diagram of an original head mesh model provided by an embodiment of the present invention;

[0015] Figure 6 A schematic diagram of an original face mesh model provided by an embodiment of the present invention;

[0016] Figure 7 A schematic diagram of a stylized expression provided by an embodiment of the present invention;

[0017] Figure 8 A schematic diagram of a stylized expression provided by an embodiment of the present invention;

[0018] Fig. 9 A schematic diagram of a stylized expression provided by an embodiment of the present invention;

[0019] Fig.10 A schematic diagram of the structure of a virtual expression rendering device provided by an embodiment of the present invention;

[0020] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] At present, it is often necessary to let virtual characters make various different expressions in games. According to the game style, for more realistic virtual characters, we need the expressions of the characters to be realistic enough; but for some two-dimensional games, sometimes some more exaggerated expressions may be expected, and these expressions do not exist or are difficult to achieve in reality, and the use of traditional methods may not achieve the corresponding effect. Related technologies usually use the blendshape method to make the expressions of virtual characters, but it is difficult to achieve more exaggerated stylized expressions using this method. Based on this, the embodiments of the present invention provide a virtual expression rendering method, device and electronic device, which can be applied to applications that need to generate stylized expressions.

[0023] The virtual expression rendering method in one embodiment of the present disclosure can be run on a local terminal device or a server. When the virtual expression rendering method 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.

[0024] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. 虚拟 The storage and operation of the expression rendering method are completed on the cloud game server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the cloud game server in the cloud is responsible for information processing. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0025] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0026] In a possible implementation, an embodiment of the present disclosure provides a virtual expression rendering method, which provides a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.

[0027] To facilitate understanding of this embodiment, a virtual expression rendering method disclosed in an embodiment of the present invention is first introduced. Figure 1 As shown, the method comprises the following steps:

[0028] Step S102, in response to a specific expression rendering event for a virtual object, sampling a preset expression map set according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to the specific expression switching event.

[0029] The above-mentioned virtual objects can be virtual characters such as virtual people and virtual animals in the game that can make different expressions. The virtual objects are usually three-dimensional models; the above-mentioned specific expression rendering events can be understood as when the game plot progresses to a certain extent and needs to display specific expressions, such as stylized expressions such as sweating emoticons, the specific expression rendering event occurs; the above-mentioned expression map collection is usually pre-configured with a variety of states of different facial parts related to stylized expressions, for example, including a variety of different eye states, a variety of different mouth states, etc. These expression states usually do not exist or are difficult to achieve in reality; in actual implementation, when the game When the plot is advanced to a certain extent and a specific expression rendering event occurs, it means that the virtual object needs to display a stylized expression at this time. For example, the eye state in the stylized expression that needs to be displayed is a circle shape, and the stylized mouth state that needs to be displayed is a triangle-like shape, etc. At this time, the preset expression map set can be sampled, and the corresponding eye state and / or mouth state can be sampled from the expression map set to obtain a target expression map containing the eye state and / or mouth state, wherein the relative position of the eye state and / or mouth state in the target expression map matches the relative position of the actual eyes and / or mouth in the virtual object.

[0030] Step S104, using a first head model including a target expression map to replace the three-dimensional head mesh model of the currently displayed virtual object, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0031] The first head model includes a first head mesh model and a first face mesh model, wherein the first head mesh model is usually a three-dimensional model whose surface does not contain head texture, and can also be understood as a three-dimensional model that omits many model details; the first face mesh model is usually a curved surface of a transparent material, and can also be understood as a patch, and the first face mesh model can just fit with the first head mesh model; the three-dimensional head mesh model can be understood as the actual three-dimensional model of the virtual object, and the three-dimensional model contains model details such as head texture; the first head model matches the shape and size of the three-dimensional head mesh model, and the first head mesh model and the first face mesh model are matched. The model usually needs to include the same bone information as the three-dimensional mesh model of the head. In actual implementation, the obtained target expression map can be assigned to the first head model so that the first head model includes the target expression map, and the first head model including the target expression map is used to replace the three-dimensional mesh model of the head of the currently displayed virtual object. For example, the replacement can be achieved by corresponding coordinate positions. For details, the replacement process can be implemented with reference to related technologies, which will not be repeated here. Since the target expression map includes the eye state and / or mouth state corresponding to the specific expression switching event, the eye state and / or mouth state can express the target expression that needs to be expressed by the specific expression switching event, thereby making the virtual object express the target expression.

[0032] The above virtual expression rendering method, in response to a specific expression rendering event for a virtual object, samples a preset expression map set according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to a specific expression switching event; uses a first head model containing a target expression map to replace the head three-dimensional mesh model of the currently displayed virtual object, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model that matches the first head mesh model. This method can sample the expression map set to obtain a target expression map, and by replacing the head three-dimensional mesh model of the currently displayed virtual object with the first head model containing the target expression map, the virtual object can display the target expression corresponding to the target expression map. Since the expression map set can include eye states and / or mouth states corresponding to different expressions, various stylized virtual expressions can be rendered.

[0033] The embodiment of the present invention also provides another virtual expression rendering method, which is implemented on the basis of the method of the above embodiment. In this method, considering that the facial parts related to expressions are mainly eyes and mouth, the expression map set also includes an eye map set and a mouth map set; wherein the eye map set usually includes a variety of different eye states, and the mouth map set usually includes a variety of different mouth states; the expression map set can be obtained by hand-drawing, which is more convenient to express various exaggerated expressions, such as emoticons, exaggerated laughter, and relatively two-dimensional stylized expressions; the entire map of the eye map set is an RGBA image (R: Red, red; G: Green, green; B: Blue, blue; A: Alpha, indicating transparency), such as Figure 2 A schematic diagram of an RGB channel image of an expression sticker set shown in FIG. Figure 3 A schematic diagram of an A channel image of an expression map set shown in FIG. Figure 2 and Figure 3 Corresponding to the same set of emoticon stickers, from Figure 2 and Figure 3 The stylized facial expressions of characters are divided into two parts, namely eyes and mouth. The upper part of the expression map set is the eyes, and the lower part is the mouth. The expression map set includes seven eye states and seven mouth states. By packing all expression states into the same map, the number of shader sampling can be reduced and the running efficiency can be improved.

[0034] Each emoticon sticker in the emoticon sticker set has the same size. In actual implementation, the arrangement of each emoticon sticker in the emoticon sticker set is usually pre-set, for example, Figure 4 The schematic diagram of an expression sticker set shown in the figure, taking the expression sticker set including multiple eye states and multiple mouth states as an example, the entire expression sticker set is pre-divided into multiple tiles of 5*6, that is, the entire expression sticker is divided into tiles of 5 columns and 6 rows, and each tile has the same size; each tile in the first three rows can be configured with an eye state, and each tile in the last three rows can be configured with a mouth state; the method comprises the following steps:

[0035] Step 1: In response to a specific expression rendering event for a virtual object, extract specific expression position information from the specific expression rendering event, wherein the specific expression position information includes: a target eye position identifier and / or a target mouth position identifier.

[0036] The above-mentioned target eye position identifier can be the relative position of the Tile tile corresponding to the eye state in the stylized expression that needs to be displayed in the expression map set; the above-mentioned target mouth position identifier can be the relative position of the Tile tile corresponding to the mouth state in the stylized expression that needs to be displayed in the expression map set; for example, starting from the tile in the first row and the first column of the entire expression map set, numbering starts from 0, EyesIndex is 2, corresponding to the eye state of the third tile in the first row; MouseIndex is 17, corresponding to the mouth state of the third tile in the fourth row. In actual implementation, when a specific expression rendering event occurs, the specific expression rendering event usually carries the target eye position identifier of the eye state that needs to be displayed and / or the target mouth position identifier of the mouth state that needs to be displayed, and the target eye position identifier and / or the target mouth position identifier can be extracted from the specific expression rendering event.

[0037] Step 2: Determine the texture coordinates corresponding to the specific expression position information based on the specific expression position information and the current texture coordinates.

[0038] The above-mentioned current texture coordinates can be understood as the texture coordinates used in the current 3D virtual model state, which can be expressed as UV, usually U represents the distribution on the horizontal coordinate, and V represents the distribution on the vertical coordinate; in actual implementation, in order to obtain a target expression map containing the eye state and / or mouth state corresponding to a specific expression switching event, the current texture coordinates need to be remapped. The texture coordinates corresponding to the specific expression position information can be obtained by processing through related functions (such as CalcuatelUV function) according to the specific expression position information and the current texture coordinates. According to the newly determined texture coordinates, it can be mapped to the blocks corresponding to the eye state and / or mouth state that need to be used.

[0039] The second step can be implemented by following steps A to D:

[0040] Step A, obtaining first size information of the emoticon sticker set.

[0041] The first size information may include width information and height information, wherein the width information may be understood as the number of columns of the tiles obtained by dividing the expression sticker set, and the height information may be understood as the number of rows of the tiles obtained by dividing the expression sticker set, such as Figure 4 In the example, width=5, height=6.

[0042] Step B: determining sub-size information of each expression sticker in the expression sticker set according to the first size information.

[0043] The above sub-size information usually includes sub-width information and sub-height information; since the size of each expression map in the expression map set is the same, the second size information of the tile corresponding to each expression map can be calculated based on the first size information, and the second size information can be normalized to obtain the sub-size information of each expression map; for example, the width of the expression map set is 5, height is 6, and the sub-size information is represented by tileCount, then the sub-size information of each expression map is tileCount=(1.0 / 5,1.0 / 6). In actual implementation, before calculating tileCount, it is usually necessary to first use the fmod function to take a modulus of Width*Height for the Tile tile, in order to prevent the Tile value from being greater than Width*Height. The fmod function is used for modulo operations on numbers and returns the remainder when one number is divided by another number. The result can be positive, negative, or zero. The general form of the fmod function is: double fmod(double x, doubley), where x and y represent the dividend and divisor, respectively. The remainder is calculated by subtracting an integer multiple of the divisor from the dividend.

[0044] Step C, obtaining coordinate information of the expression map subset corresponding to the specific expression position information.

[0045] The above-mentioned expression map subset may include the expression map corresponding to the target eye position identifier, and / or the expression map corresponding to the target mouth position identifier; accordingly, the above-mentioned coordinate information may include the first coordinate of the expression map corresponding to the target eye position identifier, and / or the second coordinate of the expression map corresponding to the target mouth position identifier; for example, still taking the width=5 and height=6 of the expression map set as an example, taking the lower left corner of the expression map set as the coordinate origin, if Tile is 17, TileY is 2 and TileX is 2; if Tile is 2, TileY is 5 and TileX is 2, and the coordinates of the obtained expression map subset correspond to the coordinates of the lower left corner of each Tile block.

[0046] Step D: determining the texture coordinates corresponding to the specific expression position information according to the current texture coordinates, coordinate information and sub-size information.

[0047] In actual implementation, the current texture coordinates can be mapped to the texture coordinates corresponding to the specific expression position information through the formula: (uv+float2(tileX,tileY))*tileCount; where uv represents the current texture coordinates, tileX and tileY represent the coordinate information of the expression map subset corresponding to the specific expression position information; tileCount represents the sub-size information. For example, if the specific expression position information includes both the target eye position identifier and the target mouth position identifier, and the target eye position identifier and the target mouth position identifier correspond to different tiles, then the coordinate information of the tile corresponding to the target eye position identifier and the coordinate information of the tile corresponding to the target mouth position identifier are different, that is, (tileX,tileY) are different. Therefore, the current texture coordinates need to be mapped twice to obtain the texture coordinates corresponding to the target eye position identifier and the texture coordinates corresponding to the target mouth position identifier. The CalculateUV function can be used to determine the new texture coordinates to map to the tile corresponding to the specific expression position information. For example, the current texture coordinates correspond to the entire tile of the expression map set, (0, 0) corresponds to the lower left corner, (1, 1) corresponds to the upper right corner, and for Figure 4 For the tile numbered 2 in the image, the new UV (0, 0) corresponds to the lower left corner of the tile numbered 2, and (1, 1) corresponds to the upper right corner of the tile numbered 2. For the tile numbered 17, the same method is used for remapping. The relative position of each expression state has been configured in the corresponding tile, and can be directly overlapped. For example, the new expression can be obtained by overlapping numbers 2 and 17. It can also be understood that the relative position of each eye state in the corresponding tile matches the relative position of the eye part in the 3D mesh model of the head of the virtual object; the relative position of each mouth state in the corresponding tile matches the relative position of the mouth part in the 3D mesh model of the head of the virtual object.

[0048] Step three, sampling the expression map subset corresponding to the specific expression position information according to the texture coordinates, and obtaining a sampling result corresponding to the specific expression position information.

[0049] In actual implementation, each expression map in the expression map set is an image with an alpha channel. Therefore, the above sampling results include the color map outCoulor and the transparency map outAlpha corresponding to each expression state in the expression map subset, that is, the RGB channel image and the Alpha channel image. If the specific expression position information includes the target eye position identifier and the target mouth position identifier, the sampling results include the first color map and the first transparency map corresponding to the eye state in the expression map subset, and the second color map and the second transparency map corresponding to the mouth state; the first color map and the first transparency map are respectively the RGB channel image and the Alpha channel image of the block corresponding to the target eye position identifier; the second color map and the second transparency map are respectively the RGB channel image and the Alpha channel image of the block corresponding to the target mouth position identifier; the first color map and the second color map are usually color maps; the first transparency map and the second transparency map are usually black and white maps. You can predefine two values, faceAlpha and faceColor. If the faceAlpha corresponding to a pixel is 1, it means that the pixel is part of the eye. You can predefine two values, mouseAlpha and mouseColor. If the mouseAlpha corresponding to a pixel is 1, it means that the pixel is part of the mouth.

[0050] The GetCrazyFaceColorAndAlpha function can be used to implement the above sampling process. The overall process of the GetCrazyFaceColorAndAlpha function is as follows: first, obtain the width width and height height of the entire map corresponding to the expression map set; then, according to the current uv and the index of the face state and / or mouth state in the expression map set specified by the user (corresponding to the above specific expression position information), calculate finaleUV. Finally, sample the expression map of the corresponding block according to finaleUV to obtain outColor and outAlpha.

[0051] Step 4: Determine the target expression map based on the sampling results.

[0052] This step 4 can be achieved by following steps E and I:

[0053] Step E: determining a first correspondence between each pixel of the first color map, the second color map, the first transparency map, the second transparency map, and the background map corresponding to the background scene in the same screen coordinate system.

[0054] The above-mentioned screen coordinate system is a two-dimensional coordinate system established on the screen, with pixels as units, the lower left corner of the screen is (0, 0), and the upper right corner is (screen width, screen height); the above-mentioned background map can be a color map or a grayscale map, etc., which is specifically related to the actual application scenario. In actual implementation, each map in the sampling result can accurately correspond each point on the map to the surface of the first facial mesh model through the corresponding texture coordinates. In the same screen coordinate system, the correspondence between the pixel points of each map in the sampling result and the pixel points of the background map can be determined first. For example, for each second pixel point in the first color map, the pixel point with the same screen coordinate as the second pixel point is selected from the second color map, the first transparency map, the second transparency map and the background map, respectively, so that the first correspondence between the pixel points of the above-mentioned maps can be determined.

[0055] Step F, for each group of pixel points in the first corresponding relationship, interpolate the pixel value of the second pixel point in the first color map in the group and the pixel value of the third pixel point in the second color map according to the pixel value of the first pixel point in the second transparency map in the group to obtain a first interpolated pixel value.

[0056] In actual implementation, the lerp function can be used to perform the above interpolation calculation. The lerp function is usually expressed as lerp(a,b,t)=(1-t)*a+t*b, where a and b are two interpolated values, and t is an interpolation factor between 0 and 1, which represents the ratio between a and b. For this embodiment, the lerp function can be specifically expressed as lerp(faceColor,mouseColor,mouseAlpha); where faceColor represents the pixel value of the second pixel in the first color map; mouseColor represents the pixel value of the third pixel in the second color map, and mouseAlpha represents the pixel value of the first pixel in the second transparency map. That is, in this embodiment, the value of mouseAlpha is directly used to perform lerp on faceColor and mouseColor. If mouseAlpha is 1, the current first interpolated pixel value adopts the mouseColor color. If mouseAlpha is 0, the current first interpolated pixel value adopts the faceColor color.

[0057] Step G: determining a target interpolation factor according to the pixel value of the fourth pixel in the first transparency map and the pixel value of the first pixel in the second transparency map.

[0058] In actual implementation, for each group of pixel points in the first corresponding relationship, the largest value among the pixel value of the third pixel point and the pixel value of the fourth pixel point can be used as the target interpolation factor. The target interpolation factor determines the mixing method of the current first interpolation pixel value and the corresponding pixel value in the background map.

[0059] Step H: performing interpolation calculation on the first interpolation pixel value and the pixel value of the fifth pixel point of the background map according to the target interpolation factor to obtain a second interpolation pixel value.

[0060] In actual implementation, the first interpolated pixel value and the pixel value of the fifth pixel of the background map can be blended according to the above target interpolation factor to obtain the second interpolated pixel value. Specifically, if the target interpolation factor is 1, the color of the current first interpolated pixel value will cover the color of the corresponding pixel in the backBuffer (i.e., the background map), that is, the output second interpolated pixel value is the current first interpolated pixel value; if the Alpha value is 0, the color of the current first interpolated pixel value will be discarded, that is, the color of the corresponding pixel in the original backBuffer is still displayed, that is, the output second interpolated pixel value is the pixel value of the current fifth pixel. Here, the target interpolation factor is used as opacity.

[0061] Step I: determining a target expression map according to each second interpolated pixel value.

[0062] This step I can be achieved by following steps a to e:

[0063] Step a, determining a third expression map according to each second interpolated pixel value.

[0064] Step b, obtaining a preset fog effect map.

[0065] Step c: determining a second correspondence between expression pixels of the third expression map and fog effect pixels of the fog effect map in the same screen coordinate system.

[0066] Fog effect is a commonly used effect in games, which produces fog effects of different depths depending on the distance. After determining the third expression map according to each second interpolated pixel value, an additional fog effect can be added to the third expression map. Specifically, the preset fog effect map can be obtained first to determine the second correspondence between the expression pixels of the third expression map and the fog effect pixels of the fog effect map. For example, for each expression pixel of the third expression map, a fog effect pixel with the same screen coordinates as the expression pixel is selected from the fog effect map, so that the second correspondence between the expression pixels of the third expression map and the fog effect pixels of the fog effect map can be determined.

[0067] Step d: for each pair of expression pixels and fog effect pixels in the second corresponding relationship, calculate the average value between the pixel value of the expression pixel and the pixel value of the fog effect pixel to obtain the average pixel value.

[0068] In actual implementation, the MixFog function can be used to mix each pair of expression pixels and fog effect pixels. For example, the mixing process can be to calculate the average value between the pixel values ​​of each pair of expression pixels and the pixel values ​​of the fog effect pixels to obtain multiple average pixel values.

[0069] Step e: determining the target expression map according to each average pixel value.

[0070] Step 5: Obtain an original head model; wherein the original head model includes: an original head mesh model and an original face mesh model.

[0071] The above-mentioned original head mesh model is usually a pre-built three-dimensional model whose surface does not contain head texture. It is a three-dimensional model that omits many model details and does not contain bone information. The above-mentioned original face mesh model is usually a curved surface of a transparent material, which can also be understood as a patch, and the first face mesh model can just fit with the first head mesh model, and does not contain bone information. In actual implementation, the original head model can be constructed in advance according to the shape and size of the head three-dimensional mesh model, so that the original head model matches the shape and size of the head three-dimensional mesh model.

[0072] See also Figure 5 A schematic diagram of an original head mesh model is shown in Figure 6 The following is a schematic diagram of an original face mesh model. When making these two meshes, it is necessary to ensure that they fit together when their coordinates are consistent. Note that the face mesh uses a transparent material, and the original face mesh model can display a default expression state by default.

[0073] Step 6: Replace the 3D mesh model of the head of the currently displayed virtual object with the original head model.

[0074] In the game, stylized expressions of characters will only be shown in special scenes, such as when the player triggers the plot. Therefore, under normal conditions, the character model remains the same, that is, the character is represented by a 3D model. When stylized expressions of characters are required, the head Mesh of the character model can be hidden. When making character models, the body and head of the character are generally modeled separately, that is, divided into Sub Mesh. You only need to hide the Sub Mesh of the head of the character model in the game. Attach the stylized original head mesh model and the original face mesh model to the character model, and adjust the position so that the original head mesh model and the original face mesh model fit the character model.

[0075] Step 7, according to the skeleton information of the three-dimensional head mesh model, the original head model is assigned corresponding skeletons to obtain a second head model;

[0076] Since character models generally have skeletal animation, the original head mesh model and the original face mesh model here also need to be made into skeletons, and they must be consistent with the skeletons of the head 3D mesh model. In this way, when the character model plays the animation, the engine can automatically drive the original head mesh model and the original face mesh model to move together; for example, starting from the first bone in the bone name set corresponding to the virtual object, the bone name is compared with the bone name of the original head 3D mesh model. If they are consistent, it means that the bone name needs to be assigned to the original head model. The specific process of assigning bones can refer to the relevant technology, which will not be repeated here.

[0077] Step eight, assigning the target expression map to the second head model to obtain a first head model including the target expression map.

[0078] Step nine, using a first head model containing a target expression map to replace the three-dimensional head mesh model of the currently displayed virtual object, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0079] In actual application, after completing the material setting through the above process, you can pass the corresponding expression index (corresponding to the above specific expression position information) in the code to control the final expression, see Figure 7 A schematic diagram of a stylized expression is shown in FIG. Figure 8 A schematic diagram of a stylized expression is shown in FIG. Fig. 9A schematic diagram of a stylized expression is shown in FIG. Different expression indexes correspond to different expression states, so that a series of stylized expressions can be obtained. Figure 7 , Figure 8 and Fig. 9 It can be seen that except for the expression, the rest of the character model is still a 3D model.

[0080] The above virtual expression rendering method provides a solution for rendering stylized facial expressions on a 3D model, by replacing the three-dimensional mesh model of the head of the currently displayed virtual object with a first head model. Since the first facial mesh model in the first head model is a relatively simple patch, a stylized material is given to the patch to achieve a stylized facial expression solution. Various material parameters of the first facial mesh model can be controlled by the expression controller corresponding to the virtual object to achieve different types of expressions.

[0081] The embodiment of the present invention provides a virtual expression rendering device, such as Fig.10 As shown, the device includes: a sampling module 100, which is used to respond to a specific expression rendering event for a virtual object, sample a preset expression map set according to the specific expression rendering event, and obtain a target expression map containing eye states and / or mouth states corresponding to the specific expression switching event; a replacement module 101, which is used to replace the head three-dimensional mesh model of the currently displayed virtual object with a first head model containing the target expression map, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0082] The above-mentioned virtual expression rendering device, in response to a specific expression rendering event for a virtual object, samples a preset expression map set according to the specific expression rendering event, and obtains a target expression map containing eye states and / or mouth states corresponding to a specific expression switching event; uses a first head model containing a target expression map to replace the head three-dimensional mesh model of the currently displayed virtual object, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model. The device can sample the expression map set to obtain a target expression map, and by replacing the head three-dimensional mesh model of the currently displayed virtual object with the first head model containing the target expression map, the virtual object can display the target expression corresponding to the target expression map. Since the expression map set can include eye states and / or mouth states corresponding to different expressions, various stylized virtual expressions can be rendered.

[0083] In an optional embodiment, the expression map set also includes an eye map set and a mouth map set; the sampling module 100 is also used to: extract specific expression position information from a specific expression rendering event, wherein the specific expression position information includes: a target eye position identifier and / or a target mouth position identifier; determine the texture coordinates corresponding to the specific expression position information based on the specific expression position information and the current texture coordinates; sample the expression map subset corresponding to the specific expression position information based on the texture coordinates to obtain a sampling result corresponding to the specific expression position information; and determine the target expression map based on the sampling result.

[0084] In an optional embodiment, each expression map in the expression map set has the same size; the sampling module 100 is also used to: obtain first size information of the expression map set; determine sub-size information of each expression map in the expression map set based on the first size information; obtain coordinate information of the expression map subset corresponding to specific expression position information; determine the texture coordinates corresponding to the specific expression position information based on the current texture coordinates, coordinate information and sub-size information.

[0085] In an optional implementation, the sampling result includes a first color map and a first transparency map corresponding to the eye state in the expression map subset, and a second color map and a second transparency map corresponding to the mouth state.

[0086] In an optional embodiment, the sampling module 100 is also used to: determine a first correspondence between each pixel point of the first color map, the second color map, the first transparency map, the second transparency map, and the background map corresponding to the background scene in the same screen coordinate system; for each group of pixel points in the first correspondence, interpolate the pixel value of the second pixel point in the first color map in the group and the pixel value of the third pixel point in the second color map according to the pixel value of the first pixel point in the second transparency map in the group to obtain a first interpolated pixel value; determine a target interpolation factor according to the pixel value of the fourth pixel point in the first transparency map and the pixel value of the first pixel point in the second transparency map; interpolate the first interpolated pixel value and the pixel value of the fifth pixel point of the background map according to the target interpolation factor to obtain a second interpolated pixel value; determine a target expression map according to each second interpolated pixel value.

[0087] In an optional embodiment, the sampling module 100 is also used to: determine a third expression map based on each second interpolation pixel value; obtain a preset fog effect map; determine a second correspondence between expression pixels of the third expression map and fog effect pixels of the fog effect map in the same screen coordinate system; for each pair of expression pixels and fog effect pixels in the second correspondence, calculate the average value between the pixel value of the expression pixel and the pixel value of the fog effect pixel to obtain an average pixel value; and determine the target expression map based on each average pixel value.

[0088] In an optional embodiment, the device is also used to: obtain an original head model; wherein the original head model includes: an original head mesh model and an original face mesh model; replace the three-dimensional head mesh model of the virtual object currently displayed with the original head model; assign corresponding bones to the original head model according to the bone information of the three-dimensional head mesh model to obtain a second head model; assign the target expression map to the second head model to obtain a first head model containing the target expression map.

[0089] The virtual expression rendering device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned virtual expression rendering method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the virtual expression rendering device, reference may be made to the corresponding contents in the aforementioned virtual expression rendering method embodiment.

[0090] The embodiment of the present invention further provides an electronic device, see Fig.11 As shown, the electronic device includes a processor 130 and a memory 131, wherein the memory 131 stores machine executable instructions that can be executed by the processor 130, and the processor 130 executes the machine executable instructions to implement the above-mentioned virtual expression rendering method.

[0091] Further, Fig.11 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0092] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0093] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, register, or other mature storage media in the art. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131, and completes the steps of the method of the above embodiment in combination with its hardware, specifically performing the following steps:

[0094] In response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map including an eye state and / or a mouth state corresponding to the specific expression switching event;

[0095] A first head model including a target expression map is used to replace the three-dimensional head mesh model of the currently displayed virtual object, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0096] Its specific implementation examples and specific working processes can all refer to the corresponding processes in the above method embodiments, and will not be repeated here.

[0097] In an optional embodiment, the expression map set also includes an eye map set and a mouth map set; when the processor executes sampling of the preset expression map set according to the specific expression rendering event to obtain the target expression map containing the eye state and / or mouth state corresponding to the specific expression switching event, it is specifically used to: extract specific expression position information from the specific expression rendering event, wherein the specific expression position information includes: a target eye position identifier and / or a target mouth position identifier; determine the texture coordinates corresponding to the specific expression position information according to the specific expression position information and the current texture coordinates; sample the expression map subset corresponding to the specific expression position information according to the texture coordinates to obtain a sampling result containing the specific expression position information; determine the target expression map according to the sampling result.

[0098] In an optional embodiment, each expression map in the expression map set has the same size; when the processor determines the texture coordinates corresponding to the specific expression position information based on the specific expression position information and the current texture coordinates, it is specifically used to: obtain the first size information of the expression map set; determine the sub-size information of each expression map in the expression map set based on the first size information; obtain the coordinate information of the expression map subset corresponding to the specific expression position information; and determine the texture coordinates corresponding to the specific expression position information based on the current texture coordinates, the coordinate information and the sub-size information.

[0099] In an optional implementation, the sampling result includes a first color map and a first transparency map corresponding to the eye state in the expression map subset, and a second color map and a second transparency map corresponding to the mouth state.

[0100] In an optional embodiment, when the processor determines the target expression map based on the sampling results, it is specifically used to: determine the first correspondence between the first color map, the second color map, the first transparency map, the second transparency map and the pixel points of the background map corresponding to the background scene in the same screen coordinate system; for each group of pixels in the first correspondence, interpolate the pixel value of the second pixel point in the first color map in the group and the pixel value of the third pixel point in the second color map according to the pixel value of the first pixel point of the second transparency map in the group to obtain a first interpolated pixel value; determine the target interpolation factor according to the pixel value of the fourth pixel point in the first transparency map and the pixel value of the first pixel point of the second transparency map; interpolate the first interpolated pixel value and the pixel value of the fifth pixel point of the background map according to the target interpolation factor to obtain a second interpolated pixel value; determine the target expression map according to each second interpolated pixel value.

[0101] In an optional embodiment, when the processor determines the target expression map according to each second interpolation pixel value, it is specifically used to: determine the third expression map according to each second interpolation pixel value; obtain a preset fog effect map; determine the second correspondence between the expression pixel points of the third expression map and the fog effect pixel points of the fog effect map in the same screen coordinate system; for each pair of expression pixel points and fog effect pixel points in the second correspondence, calculate the average value between the pixel value of the expression pixel point and the pixel value of the fog effect pixel point to obtain the average pixel value; determine the target expression map according to each average pixel value.

[0102] In an optional embodiment, before executing the replacement of the currently displayed virtual object's head 3D mesh model with the first head model containing the target expression map, the processor is also used to: obtain an original head model; wherein the original head model includes: an original head mesh model and an original face mesh model; replace the currently displayed virtual object's head 3D mesh model with the original head model; assign corresponding bones to the original head model according to the bone information of the head 3D mesh model to obtain a second head model; assign the target expression map to the second head model to obtain the first head model containing the target expression map.

[0103] Through the above method, in response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to a specific expression switching event; a first head model containing a target expression map is used to replace the head three-dimensional mesh model of the currently displayed virtual object, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model that matches the first head mesh model. This method can sample the expression map set to obtain a target expression map, and by replacing the head three-dimensional mesh model of the currently displayed virtual object with the first head model containing the target expression map, the virtual object can display the target expression corresponding to the target expression map. Since the expression map set can include eye states and / or mouth states corresponding to different expressions, various stylized virtual expressions can be rendered.

[0104] An embodiment of the present invention further provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to perform the following steps:

[0105] In response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map including an eye state and / or a mouth state corresponding to the specific expression switching event;

[0106] A first head model including a target expression map is used to replace the three-dimensional head mesh model of the currently displayed virtual object, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

[0107] Its specific implementation examples and specific working processes can all refer to the corresponding processes in the above method embodiments, and will not be repeated here.

[0108] In an optional embodiment, the expression map set also includes an eye map set and a mouth map set; when the processor executes sampling of the preset expression map set according to the specific expression rendering event to obtain the target expression map containing the eye state and / or mouth state corresponding to the specific expression switching event, it is specifically used to: extract specific expression position information from the specific expression rendering event, wherein the specific expression position information includes: a target eye position identifier and / or a target mouth position identifier; determine the texture coordinates corresponding to the specific expression position information according to the specific expression position information and the current texture coordinates; sample the expression map subset corresponding to the specific expression position information according to the texture coordinates to obtain a sampling result containing the specific expression position information; determine the target expression map according to the sampling result.

[0109] In an optional embodiment, each expression map in the expression map set has the same size; when the processor determines the texture coordinates corresponding to the specific expression position information based on the specific expression position information and the current texture coordinates, it is specifically used to: obtain the first size information of the expression map set; determine the sub-size information of each expression map in the expression map set based on the first size information; obtain the coordinate information of the expression map subset corresponding to the specific expression position information; and determine the texture coordinates corresponding to the specific expression position information based on the current texture coordinates, the coordinate information and the sub-size information.

[0110] In an optional implementation, the sampling result includes a first color map and a first transparency map corresponding to the eye state in the expression map subset, and a second color map and a second transparency map corresponding to the mouth state.

[0111] In an optional embodiment, when the processor determines the target expression map based on the sampling results, it is specifically used to: determine the first correspondence between the first color map, the second color map, the first transparency map, the second transparency map and the pixel points of the background map corresponding to the background scene in the same screen coordinate system; for each group of pixels in the first correspondence, interpolate the pixel value of the second pixel point in the first color map in the group and the pixel value of the third pixel point in the second color map according to the pixel value of the first pixel point of the second transparency map in the group to obtain a first interpolated pixel value; determine the target interpolation factor according to the pixel value of the fourth pixel point in the first transparency map and the pixel value of the first pixel point of the second transparency map; interpolate the first interpolated pixel value and the pixel value of the fifth pixel point of the background map according to the target interpolation factor to obtain a second interpolated pixel value; determine the target expression map according to each second interpolated pixel value.

[0112] In an optional embodiment, when the processor determines the target expression map according to each second interpolation pixel value, it is specifically used to: determine the third expression map according to each second interpolation pixel value; obtain a preset fog effect map; determine the second correspondence between the expression pixel points of the third expression map and the fog effect pixel points of the fog effect map in the same screen coordinate system; for each pair of expression pixel points and fog effect pixel points in the second correspondence, calculate the average value between the pixel value of the expression pixel point and the pixel value of the fog effect pixel point to obtain the average pixel value; determine the target expression map according to each average pixel value.

[0113] In an optional embodiment, before executing the replacement of the currently displayed virtual object's head 3D mesh model with the first head model containing the target expression map, the processor is also used to: obtain an original head model; wherein the original head model includes: an original head mesh model and an original face mesh model; replace the currently displayed virtual object's head 3D mesh model with the original head model; assign corresponding bones to the original head model according to the bone information of the head 3D mesh model to obtain a second head model; assign the target expression map to the second head model to obtain the first head model containing the target expression map.

[0114] Through the above method, in response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map containing eye states and / or mouth states corresponding to a specific expression switching event; a first head model containing a target expression map is used to replace the head three-dimensional mesh model of the currently displayed virtual object, so that the displayed virtual object shows a target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model that matches the first head mesh model. This method can sample the expression map set to obtain a target expression map, and by replacing the head three-dimensional mesh model of the currently displayed virtual object with the first head model containing the target expression map, the virtual object can display the target expression corresponding to the target expression map. Since the expression map set can include eye states and / or mouth states corresponding to different expressions, various stylized virtual expressions can be rendered.

[0115] The computer program product of the virtual expression rendering method, device and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0116] 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 invention, 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. The computer software product is stored in a storage medium, including 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 invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A virtual expression rendering method, characterized in that: The method comprises: In response to a specific expression rendering event for a virtual object, a preset expression map set is sampled according to the specific expression rendering event to obtain a target expression map including an eye state and / or a mouth state corresponding to the specific expression switching event; A first head model including the target expression map is used to replace the three-dimensional head mesh model of the currently displayed virtual object, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

2. The method according to claim 1, characterized in that The expression map set also includes an eye map set and a mouth map set; sampling the preset expression map set according to the specific expression rendering event to obtain a target expression map containing the eye state and / or mouth state corresponding to the specific expression switching event includes: Extracting specific expression position information from the specific expression rendering event, wherein the specific expression position information includes: a target eye position identifier and / or a target mouth position identifier; Determining the texture coordinates corresponding to the specific expression position information according to the specific expression position information and the current texture coordinates; Sampling the expression map subset corresponding to the specific expression position information according to the texture coordinates to obtain a sampling result corresponding to the specific expression position information; A target expression map is determined according to the sampling result.

3. The method according to claim 2, characterized in that The size of each expression sticker in the expression sticker set is the same; The step of determining the texture coordinates corresponding to the specific expression position information according to the specific expression position information and the current texture coordinates comprises: Obtaining first size information of the emoticon sticker set; Determining sub-size information of each expression sticker in the expression sticker set according to the first size information; Obtaining coordinate information of an expression map subset corresponding to the specific expression position information; The texture coordinates corresponding to the specific expression position information are determined according to the current texture coordinates, the coordinate information and the sub-size information.

4. The method according to claim 3, characterized in that: The sampling result includes a first color map and a first transparency map corresponding to the eye state in the expression map subset, and a second color map and a second transparency map corresponding to the mouth state.

5. The method according to claim 4, characterized in that The step of determining the target expression map according to the sampling result comprises: In the same screen coordinate system, determining a first correspondence between each pixel point of the first color map, the second color map, the first transparency map, the second transparency map, and a background map corresponding to the background scene; For each group of pixels in the first corresponding relationship, interpolate the pixel value of the second pixel in the first color map and the pixel value of the third pixel in the second color map according to the pixel value of the first pixel in the second transparency map in the group to obtain a first interpolated pixel value; Determining a target interpolation factor according to a pixel value of a fourth pixel in the first transparency map and a pixel value of a first pixel in the second transparency map; According to the target interpolation factor, interpolate the first interpolation pixel value and the pixel value of the fifth pixel point of the background map to obtain a second interpolation pixel value; The target expression map is determined according to each of the second interpolated pixel values.

6. The method according to claim 5, characterized in that The step of determining the target expression map according to each of the second interpolation pixel values ​​comprises: Determine a third expression map according to each of the second interpolated pixel values; Get the preset fog effect map; In the same screen coordinate system, determining a second correspondence between expression pixels of the third expression map and fog effect pixels of the fog effect map; For each pair of expression pixel points and fog effect pixel points in the second corresponding relationship, calculating an average value between a pixel value of the expression pixel point and a pixel value of the fog effect pixel point to obtain an average pixel value; According to each average pixel value, the target expression map is determined.

7. The method according to claim 1, characterized in that Before the step of replacing the currently displayed three-dimensional mesh model of the head of the virtual object with the first head model including the target expression map, the method further comprises: Acquire an original head model; wherein the original head model includes: an original head mesh model and an original face mesh model; Replace the currently displayed three-dimensional mesh model of the head of the virtual object with the original head model; According to the skeleton information of the three-dimensional head mesh model, the original head model is assigned corresponding skeletons to obtain a second head model; The target expression map is assigned to the second head model to obtain a first head model including the target expression map.

8. A virtual expression rendering device, characterized in that: The device comprises: A sampling module, for responding to a specific expression rendering event for a virtual object, sampling a preset expression map set according to the specific expression rendering event, and obtaining a target expression map including an eye state and / or a mouth state corresponding to the specific expression switching event; A replacement module is used to replace the three-dimensional head mesh model of the currently displayed virtual object with a first head model containing the target expression map, so that the displayed virtual object shows the target expression corresponding to the target expression map; wherein the first head model also includes a first head mesh model and a first face mesh model matching the first head mesh model.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the virtual expression rendering method according to any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the virtual expression rendering method described in any one of claims 1-7.