Search

CN-117058281-B - Virtual expression generation method and device, storage medium and electronic equipment

CN117058281BCN 117058281 BCN117058281 BCN 117058281BCN-117058281-B

Abstract

The application discloses a virtual expression generation method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining a first mapping set and a second mapping set, wherein the first mapping set comprises a pre-configured mapping used for representing a virtual eye socket of a target virtual object, the second mapping set comprises a pre-configured mapping used for representing a virtual eye ball of the target virtual object, obtaining a first eye socket mapping in the first mapping set, obtaining a first eye ball mapping in the second mapping set, and obtaining first display parameters, wherein the first display parameters are display parameters used for displaying the virtual eye ball represented by the first eye ball mapping in the virtual eye socket represented by the first eye socket mapping, and combining the first eye socket mapping and the first eye ball mapping into a first virtual expression of the target virtual object according to the first display parameters. The application solves the technical problem of higher generation cost of the virtual expression in the related technology.

Inventors

  • XUE FEI

Assignees

  • 腾讯数码(深圳)有限公司

Dates

Publication Date
20260512
Application Date
20220505

Claims (15)

  1. 1. The method for generating the virtual expression is characterized by comprising the following steps: Obtaining a first mapping set and a second mapping set, wherein the first mapping set comprises a pre-configured mapping for representing a virtual eye socket of a target virtual object, and the second mapping set comprises a pre-configured mapping for representing a virtual eyeball of the target virtual object; acquiring a first eye socket map in the first map set, acquiring a first eye ball map in the second map set, and acquiring a first display parameter, wherein the first display parameter is used for displaying the display parameter of the virtual eyeball represented by the first eye ball map in the virtual eye socket represented by the first eye socket map, the function map corresponding to the first eye socket map is used as the first display parameter, the function map comprises three channels RGB, an R channel records the eye socket range of the first eye socket map, a G channel records the eye shadow range of the first eye socket map, and a B channel records the highlight flash point range corresponding to the first eye socket map; And according to the first display parameters, synthesizing the first orbit map and the first eye map into a first virtual expression of the target virtual object.
  2. 2. The method of claim 1, wherein the step of determining the position of the substrate comprises, The method further comprises the step of acquiring a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by synthesizing a second eye socket map in the first map set and a second eyeball map in the second map set; the obtaining a first eye socket map in the first map set, and the obtaining a first eye ball map in the second map set, includes taking the second eye socket map as the first eye socket map and obtaining the first eye ball map selected in the second map set when the target switching request is used for requesting to switch the virtual eyeball in the current virtual expression, wherein the first eye ball map is different from the second eye ball map.
  3. 3. The method of claim 1, wherein the step of determining the position of the substrate comprises, The method further comprises the step of acquiring a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by synthesizing a second eye socket map in the first map set and a second eyeball map in the second map set; The obtaining a first eye socket map in the first map set, and the obtaining a first eye ball map in the second map set, includes obtaining the first eye socket map selected in the first map set and taking the second eye ball map as the first eye ball map when the target switching request is used for requesting to switch the virtual eye socket in the current virtual expression, wherein the first eye socket map is different from the second eye socket map.
  4. 4. The method of claim 1, wherein the step of determining the position of the substrate comprises, The method further comprises the step of acquiring a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by synthesizing a second eye socket map in the first map set and a second eyeball map in the second map set; The obtaining a first eye socket map in the first map set and the obtaining a first eye ball map in the second map set include obtaining the first eye socket map selected in the first map set and the first eye ball map selected in the second map set when the target switching request is used for requesting to switch the virtual eye socket and the virtual eyeball in the current virtual expression, wherein the first eye socket map is different from the second eye socket map, and the first eye ball map is different from the second eye ball map.
  5. 5. The method of claim 1, wherein the step of determining the position of the substrate comprises, The method further comprises obtaining a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by combining a second eye socket map in the first map set and a second eyeball map in the second map set according to a second display parameter, wherein the second display parameter is a display parameter for displaying the virtual eyeball represented by the second eyeball map in the virtual eye socket represented by the second eye socket map; The acquiring the first eye socket map in the first map set, the first eye ball map in the second map set and the first display parameter comprise taking the second eye socket map as the first eye socket map, taking the second eye ball map as the first eye ball map and the first display parameter when the target switching request is used for requesting to switch the display parameter of the virtual eyeball in the current virtual expression, wherein the first display parameter is different from the second display parameter.
  6. 6. The method of claim 1, wherein the synthesizing the first orbital map and the first eye ball map into a first virtual expression of the target virtual object according to the first display parameter comprises: When the first display parameter comprises an eyebox range of a virtual eyebox represented by the first eyebox map, adding a virtual eyeball represented by the first eyebox map into the eyebox range to obtain a first expression map to be used; and generating the first virtual expression according to the first expression map.
  7. 7. The method of claim 6, wherein the generating the first virtual expression from the first expression map comprises one of: when the first display parameter further comprises the eye shadow range of the virtual eye socket represented by the first eye socket map, adding the eye shadow of the virtual eyeball represented by the first eye socket map into the eye shadow range in the first expression map to obtain a second expression map; Under the condition that the first display parameters further comprise the flickering position coordinates of the virtual eyeball represented by the first eye map, adding the flickering point of the virtual eyeball represented by the first eye map to the flickering position coordinates in the first expression map to obtain a third expression map; And under the condition that the first display parameters further comprise the eye shadow range of the virtual eye socket represented by the first eye socket map and the flickering position coordinates of the virtual eyeball represented by the first eye ball map, adding the eye shadow of the virtual eyeball represented by the first eye ball map into the eye shadow range in the first expression map, adding the flickering point of the virtual eyeball represented by the first eye ball map into the flickering position coordinates to obtain a fourth expression map, and generating the first virtual expression according to the fourth expression map.
  8. 8. The method of claim 6, wherein after generating the first virtual expression from the first expression map, the method further comprises: under the condition that a color updating instruction is acquired, modifying the color of the virtual eyeball represented by the first eye map according to the color updating instruction so as to update the first virtual expression; Under the condition that a scaling update instruction is acquired, scaling the virtual eyeball represented by the first eye map according to the scaling update instruction so as to update the first virtual expression; And under the condition that a position updating instruction is acquired, modifying the display position of the virtual eyeball in the virtual orbit according to the position updating instruction so as to update the first virtual expression.
  9. 9. The method of any one of claims 1 to 8, wherein the obtaining a first set of maps and a second set of maps comprises: Classifying each map of the virtual expression to be synthesized to obtain a plurality of map sets representing different expression types, wherein the plurality of map sets are stored in a database according to the different expression types; And responding to the expression type selection operation, respectively acquiring the first mapping set and the second mapping set from the plurality of mapping sets.
  10. 10. The method of claim 9, wherein the step of determining the position of the substrate comprises, The method for obtaining the first eye socket map in the first map set comprises the steps of responding to the expression type selection operation, determining a first loading path of the first eye socket map, and determining the first eye socket map from the first map set according to the first loading path; The method for obtaining the first eye map in the second map set comprises the steps of responding to the expression type selection operation, determining a second loading path of the first eye map, and determining the first eye map from the second map set according to the second loading path.
  11. 11. The method according to any one of claims 1 to 8, further comprising: Obtaining an object type of a virtual object of a virtual expression to be configured; when the object type indicates that the virtual object of the virtual expression to be configured is controlled by a target account, configuring the first virtual expression to the virtual object of the virtual expression to be configured; and configuring the preset virtual expression to the virtual object of the virtual expression to be configured under the condition that the object type indicates that the virtual object of the virtual expression to be configured is controlled by a server.
  12. 12. A virtual expression generating apparatus, comprising: a first obtaining module, configured to obtain a first mapping set and a second mapping set, where the first mapping set includes a pre-configured mapping for representing a virtual eye socket of a target virtual object, and the second mapping set includes a pre-configured mapping for representing a virtual eyeball of the target virtual object; The second obtaining module is configured to obtain a first eye socket map in the first map set, obtain a first eye ball map in the second map set, and obtain a first display parameter, where the first display parameter is used to display, in the virtual eye socket represented by the first eye socket map, a display parameter of the virtual eyeball represented by the first eye ball map, and use a function map corresponding to the first eye socket map as a first display parameter, where the function map includes three channels RGB, an R channel records an eye socket range of the first eye socket map, a G channel records an eye shadow range of the first eye socket map, and a B channel records a highlight blinking point range corresponding to the first eye socket map; And the synthesizing module is used for synthesizing the first orbit mapping and the first eye ball mapping into a first virtual expression of the target virtual object according to the first display parameter.
  13. 13. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program is executable by a terminal device or a computer to perform the method of any one of claims 1 to 11.
  14. 14. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method of any one of claims 1 to 11.
  15. 15. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 11 by means of the computer program.

Description

Virtual expression generation method and device, storage medium and electronic equipment Technical Field The present application relates to the field of computers, and in particular, to a method and apparatus for generating a virtual expression, a storage medium, and an electronic device. Background At present, in the process of manufacturing a large number of virtual expressions, the art staff usually draws in advance, and the eye grids are modified through skeleton deformation to realize the manufacture of different virtual expressions, or different effects are realized through drawing different complete virtual expression maps. If a skeleton deformation scheme is used, a higher surface number and more skeleton control nodes are needed to obtain an expected effect, the requirement on rendering performance is higher, a virtual expression map is needed to be added for each virtual expression by drawing different complete virtual expression maps, if the requirements such as pupil color change and the like exist, the number of the expression maps is multiplied, so that the art cost is too high, and resources are wasted. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the application provides a virtual expression generating method and device, a storage medium and electronic equipment, which are used for at least solving the technical problem of higher virtual expression generating cost in the related technology. According to one aspect of the embodiment of the application, a virtual expression generating method is provided, which comprises the steps of obtaining a first mapping set and a second mapping set, wherein the first mapping set comprises a pre-configured mapping for representing a virtual eye socket of a target virtual object, the second mapping set comprises a pre-configured mapping for representing a virtual eyeball of the target virtual object, obtaining a first eye socket mapping in the first mapping set, obtaining a first eye ball mapping in the second mapping set, and obtaining a first display parameter, wherein the first display parameter is a display parameter for displaying the virtual eyeball represented by the first eye socket mapping in the virtual eye socket represented by the first eye socket mapping, and combining the first eye socket mapping and the first eye ball mapping into the first virtual expression of the target virtual object according to the first display parameter. According to another aspect of the embodiment of the application, a generating device of a virtual expression is further provided, which comprises a first obtaining module, a second obtaining module and a synthesizing module, wherein the first obtaining module is used for obtaining a first mapping set and a second mapping set, the first mapping set comprises a pre-configured mapping for representing a virtual eye of a target virtual object, the second mapping set comprises a pre-configured mapping for representing a virtual eye of the target virtual object, the second obtaining module is used for obtaining a first eye mapping in the first mapping set, obtaining a first eye mapping in the second mapping set, and obtaining a first display parameter, wherein the first display parameter is a display parameter for displaying the virtual eye represented by the first eye mapping in the virtual eye represented by the first eye mapping, and the synthesizing module is used for synthesizing the first eye mapping and the first eye mapping into the first virtual eye of the target virtual object according to the first display parameter. Optionally, the device is further used for acquiring a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by combining a second eye socket map in the first map set and a second eye map in the second map set, and acquiring a first eye map in the second map set by acquiring the first eye map in the first map set, wherein the second eye map is used as the first eye map when the target switching request is used for requesting to switch the virtual eye in the current virtual expression, and acquiring the first eye map selected in the second map set, and the first eye map is different from the second eye map. Optionally, the device is further configured to obtain a target switching request when the current virtual expression of the target virtual object is a virtual expression obtained by combining a second eye socket map in the first map set and a second eye socket map in the second map set, and obtain a first eye socket map in the second map set by obtaining a first eye socket map in the second map set, where the target switching request is used to request switching of the virtual eye socket in the current virtual expression, obtain the first eye socket map selected in the first map set, and use the second eye socket map as the first eye socket map, wher