CN111627105A - Face special effect splitting method, device, medium and equipment - Google Patents

Face special effect splitting method, device, medium and equipment Download PDF

Info

Publication number
CN111627105A
CN111627105A CN202010469201.1A CN202010469201A CN111627105A CN 111627105 A CN111627105 A CN 111627105A CN 202010469201 A CN202010469201 A CN 202010469201A CN 111627105 A CN111627105 A CN 111627105A
Authority
CN
China
Prior art keywords
split
vertex
face
data processing
slices
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010469201.1A
Other languages
Chinese (zh)
Other versions
CN111627105B (en
Inventor
何欣婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010469201.1A priority Critical patent/CN111627105B/en
Publication of CN111627105A publication Critical patent/CN111627105A/en
Application granted granted Critical
Publication of CN111627105B publication Critical patent/CN111627105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a face special effect splitting method, a device, a medium and equipment, belongs to the technical field of computers, and can enable a three-dimensional face reconstruction model used as a false mask to be capable of carrying out synchronous animation with a face in real time so as to realize synchronous migration with the real-time expression of the face. A face special effect splitting method comprises the following steps: splitting the three-dimensional face reconstruction model into a plurality of split slices; performing data processing on the plurality of split slices, the data processing comprising: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and moving the split piece after data processing to a corresponding face area in real time for animation processing.

Description

Face special effect splitting method, device, medium and equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and a device for splitting a face special effect.
Background
In the prior art, when a face model splitting special effect is performed, a false mask is usually placed on a face, and model splitting is performed based on the false mask. By the method, on one hand, the lasting is easy to be obviously seen at the edge of the face, and the background texture is exposed; on the other hand, the complex special effect paster with high comprehensiveness of 'false mask + expression migration + split' cannot be achieved.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a face special effect splitting method, including: splitting the three-dimensional face reconstruction model into a plurality of split slices; performing data processing on the plurality of split slices, the data processing comprising: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and moving the split piece after data processing to a corresponding face area in real time for animation processing.
In a second aspect, the present disclosure provides a face special effect splitting device, including: the splitting module is used for splitting the three-dimensional face reconstruction model into a plurality of split pieces; a data processing module, configured to perform data processing on the plurality of split slices, where the data processing includes: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and the animation processing module is used for moving the split piece after the data processing to the corresponding face area in real time for animation processing.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
According to the technical scheme, the three-dimensional face reconstruction model is firstly split into the split pieces, then the related data processing is carried out on the split pieces, and then the split pieces after the data processing are moved to the corresponding face area in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can carry out synchronous animation with the face in real time, further the real-time expression synchronous migration with the face is realized, and the problem of group crossing caused by too large face action in the existing scheme is solved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
In the drawings:
fig. 1 is a flowchart of a face special effect splitting method according to an embodiment of the present disclosure.
Figure 2 is a schematic diagram of face model splitting.
Fig. 3 is a schematic block diagram of a face special effect splitting apparatus according to an embodiment of the present disclosure.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a face special effect splitting method according to an embodiment of the present disclosure. As shown in fig. 1, the face effect splitting method includes the following steps S11 to S13.
In step S11, the three-dimensional face reconstruction model is split into a plurality of split slices.
The three-dimensional face reconstruction model is a three-dimensional face model constructed based on a face needing splitting special effect processing.
The splitting refers to a process of splitting the three-dimensional face reconstruction model into a plurality of split pieces in real time according to a grid topological structure based on the constructed three-dimensional face reconstruction model. The splitting can increase the number of vertexes of the three-dimensional face reconstruction model, but the number of textures, the number of normals and the number of indexes of the three-dimensional face reconstruction model cannot be changed.
In this step, the three-dimensional face reconstruction model may be split into a plurality of split slices by determining the shared vertices. With respect to shared vertices, detailed description will be made below.
In step S12, data processing is performed on the plurality of divided pieces. The data processing comprises the following steps: and setting the vertex with the same position information of the adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex. The texture coordinates are used to describe the mapping relationship between the texture image and the vertices.
For example, assuming that the three-dimensional face reconstruction model is split into a first split slice, a second split slice and a third split slice from left to right, thus the first and second split slices are adjacent split slices, the second and third split slices are adjacent split slices, and assuming that vertex V11 in the first split slice has the same position as vertex V21 in the second split slice, vertex V12 in the first split slice and vertex V22 in the second split slice have the same position, and vertex V23 in the second split slice and vertex V33 in the third split slice have the same position, the three pairs of vertices are each set as a shared vertex, also, the vertex V11 has the same position information, normal information, and texture coordinates as the vertex V21, the vertex V12 has the same position information, normal information, and texture coordinates as the vertex V22, and the vertex V23 has the same position information, normal information, and texture coordinates as the vertex V33.
An exemplary data processing method may be as follows. First, a three-dimensional model obj file is derived, which is obtained after the three-dimensional face reconstruction model is split in step S11, and which includes position information, texture coordinates, normal line information, and index information of each vertex of the three-dimensional face reconstruction model. And then, storing a file related to the vertex data in the obj file into an array, traversing each row of position information data of the array, marking the position information data (for example, marking the position information data as "same") if the position information data are the same, recording the vertex data of a vertex corresponding to the position information data, and setting the vertex as a shared vertex. Similarly, the file associated with the vertex data in the obj file may be stored in an array, and each row of vertex data in the array may be traversed, and if the vertex data is found to have a distance change in the z-direction, where the distance metric may be 10 or other values, the position data of different gradients may be marked as different sets of texture coordinates for determining which regions need to be split. Then, the data (including the position information, the normal information, and the texture coordinates) of the shared vertex are copied, so that the same pair of shared vertices has the same position information, normal information, and texture coordinates. In addition, the index of the shared vertex can be modified by rendering according to the index order and the vertex position, and the triangle can be rendered by rendering.
In step S13, the split piece after data processing is moved to the corresponding face area in real time to be animated.
For example, it is assumed that the first split, the second split, and the third split are obtained after the splitting is performed in step S11; and according to the migration of the facial expressions, the first split piece should be moved to the first face area, the second split piece should be moved to the second face area, and the third split piece should be moved to the third face area, so that the synchronous animation of the three-dimensional face reconstruction model and the face can be realized. Then, in step S13, the first split slice after data processing is moved to the first face area in real time for animation processing, the second split slice after data processing is moved to the second face area in real time for animation processing, and the third split slice after data processing is moved to the third face area in real time for animation processing.
When animation processing is carried out, the splitting area can be determined through the texture coordinates, and corresponding skeleton animation is bound to the splitting area, so that the animation splitting effect is realized. Those skilled in the art will appreciate that there are a variety of ways to achieve the animated fission effect, and the examples herein are by way of example only. In addition, the number of vertexes of the three-dimensional face reconstruction structure is required to be consistent with the number of textures and the number of normal lines.
In addition, a method according to an embodiment of the present disclosure may first initialize reset vertex, normal, texture coordinates to ensure that the shared vertex data is copied to the correct array location. Then, when the method according to the embodiment of the present disclosure operates, the vertex, normal, and texture data contents are updated in real time to implement a function of synchronizing the facial expressions at each frame.
According to the technical scheme, the three-dimensional face reconstruction model is firstly split into the split pieces, then the related data processing is carried out on the split pieces, and then the split pieces after the data processing are moved to the corresponding face area in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can carry out synchronous animation with the face in real time, further the real-time expression synchronous migration with the face is realized, and the problem of group crossing caused by too large face action in the existing scheme is solved.
In an embodiment, the moving the split slice after data processing to the corresponding face region in real time for animation processing in step S13 may include:
and step S13a, associating each split sheet after data processing with a corresponding bone and skinning. Wherein only one bone can be used for one split. When the split pieces are associated with the bones, the bones can be placed at the original point position of the world coordinate system, the weights do not need to be brushed, and only automatic skinning is needed, namely, only the animation pairs of the split pieces need to be guaranteed. The whole three-dimensional face reconstruction model is normal along with a skeleton displacement.
And step S13b, enabling each split piece to move to the corresponding face area along the associated skeleton in real time.
And step S13c, performing real-time animation processing on the split pieces in the corresponding human face areas.
Wherein step S13c may include: acquiring facial textures of corresponding face areas; and performing real-time animation processing on the split fragments in the corresponding human face regions based on the facial textures. Therefore, the face model can follow the face expression in real time.
The obtaining of the facial texture of the corresponding face region may include: converting the clipping space of the vertex shader three-dimensional model into a screen space; and capturing the facial texture of the corresponding face area in the screen space. For example, grabbing the facial texture of a corresponding face region in screen space is achieved by the following formula:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen UV represents the position of the three-dimensional object projected to the screen space; xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in a projection matrix; w represents the fourth-dimensional coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; a is a coefficient, which may be, for example, 0.5 or some other value; b is a constant, which may be, for example, 0.5 or some other value.
If the model is a three-dimensional face reconstruction model with skeleton animation, the screen positions are still _ mvp position, and the positions obtained by the skeleton position mvp are not used. Otherwise, the texture behind the three-dimensional face reconstruction model after the bone animation is executed is acquired, and the texture is not the current face position. If the skeleton animation information is added, the projected texture looks like transparent, because the screen texture projected by the z-axis of the three-dimensional model is acquired in real time during the movement process.
By adopting the technical scheme, the three-dimensional face reconstruction model used as the false mask can be synchronously animated with the face in real time, and further realize the synchronous transfer with the real-time expression of the face. And moreover, the problem of real-time texture mapping of the human face is solved, and the integrity and consistency of the facial texture can be ensured in the splitting process.
Figure 2 is a schematic diagram of face model splitting. As can be seen from fig. 2, by the face special effect splitting method according to the embodiment of the present disclosure, synchronous animation can be performed with a face in real time, so that synchronous migration with real-time expressions of the face is realized.
Fig. 3 is a schematic block diagram of a face special effect splitting apparatus according to an embodiment of the present disclosure. As shown in fig. 3, the face special effect splitting apparatus includes: a splitting module 31, configured to split the three-dimensional face reconstruction model into a plurality of split slices; a data processing module 32, configured to perform data processing on the plurality of split slices, where the data processing includes: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and the animation processing module 33 is configured to move the split slice after the data processing to a corresponding face area in real time to perform animation processing.
According to the technical scheme, the three-dimensional face reconstruction model is firstly split into the split pieces, then the related data processing is carried out on the split pieces, and then the split pieces after the data processing are moved to the corresponding face area in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can carry out synchronous animation with the face in real time, further the real-time expression synchronous migration with the face is realized, and the problem of group crossing caused by too large face action in the existing scheme is solved.
Optionally, the splitting module 31 splits the three-dimensional face reconstruction model into the plurality of split slices by determining the shared vertex.
Optionally, data processing module 32 modifies the index of the shared vertex by rendering according to the index order and vertex position.
Optionally, the animation processing module 33 is configured to: associating and skinning each split sheet after data processing with a corresponding bone; enabling each split piece to move to a corresponding face area along an associated skeleton in real time; and performing real-time animation processing on the split pieces in the corresponding face areas.
Optionally, the animation processing module 33 is configured to: acquiring the facial texture of the corresponding face area; and performing real-time animation processing on the split pieces in the corresponding face areas on the basis of the facial textures.
Optionally, the animation processing module 33 is configured to: converting the clipping space of the vertex shader three-dimensional model into a screen space; and capturing the facial texture of the corresponding face area in the screen space.
Optionally, the animation processing module 33 is configured to capture the facial texture of the corresponding face region in the screen space by the following formula:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen UV represents the position of the three-dimensional object projected to the screen space; xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in a projection matrix; w represents the fourth-dimensional coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; a is a coefficient, which may be, for example, 0.5 or some other value; b is a constant, which may be, for example, 0.5 or some other value.
Referring now to FIG. 4, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: splitting the three-dimensional face reconstruction model into a plurality of split slices; performing data processing on the plurality of split slices, the data processing comprising: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and moving the split piece after data processing to a corresponding face area in real time for animation processing.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of a module in some cases does not constitute a limitation on the module itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides, according to one or more embodiments of the present disclosure, a face special effect splitting method, including: splitting the three-dimensional face reconstruction model into a plurality of split slices; performing data processing on the plurality of split slices, the data processing comprising: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex; and moving the split piece after data processing to a corresponding face area in real time for animation processing.
Example 2 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: and splitting the three-dimensional face reconstruction model into the plurality of split pieces by determining the shared vertex.
Example 3 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: modifying the index of the shared vertex by rendering according to an index order and a vertex position.
Example 4 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: the real-time moving of the split piece after data processing to the corresponding human face area for animation processing comprises the following steps: associating and skinning each split sheet after data processing with a corresponding bone; enabling each split piece to move to a corresponding face area along an associated skeleton in real time; and performing real-time animation processing on the split pieces in the corresponding face areas.
Example 5 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: the real-time animation processing is carried out on the split pieces in the corresponding face areas, and comprises the following steps: acquiring the facial texture of the corresponding face area; and performing real-time animation processing on the split pieces in the corresponding face areas on the basis of the facial textures.
Example 6 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: the acquiring the facial texture of the corresponding face region includes: converting the clipping space of the vertex shader three-dimensional model into a screen space; and capturing the facial texture of the corresponding face area in the screen space.
Example 7 provides the method of example 1, further comprising, in accordance with one or more embodiments of the present disclosure: the capturing of the facial texture of the corresponding face region in the screen space is realized by the following formula: (iii) scr uv ═ scr pos
Wherein, screen UV represents the position of the three-dimensional object projected to the screen space; xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in a projection matrix; w represents the fourth-dimensional coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; a is a coefficient; b is a constant.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A face special effect splitting method is characterized by comprising the following steps:
splitting the three-dimensional face reconstruction model into a plurality of split slices;
performing data processing on the plurality of split slices, the data processing comprising: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex;
and moving the split piece after data processing to a corresponding face area in real time for animation processing.
2. The method of claim 1, wherein the splitting the three-dimensional face reconstruction model into a plurality of split slices comprises:
and splitting the three-dimensional face reconstruction model into the plurality of split pieces by determining the shared vertex.
3. The method of claim 1, wherein modifying the index of the shared vertex comprises:
modifying the index of the shared vertex by rendering according to an index order and a vertex position.
4. The method of claim 1, wherein moving the split piece after data processing to a corresponding face area in real time for animation processing comprises:
associating and skinning each split sheet after data processing with a corresponding bone;
enabling each split piece to move to a corresponding face area along an associated skeleton in real time;
and performing real-time animation processing on the split pieces in the corresponding face areas.
5. The method of claim 4, wherein the real-time animation of the split slices in the corresponding face regions comprises:
acquiring the facial texture of the corresponding face area;
and performing real-time animation processing on the split pieces in the corresponding face areas on the basis of the facial textures.
6. The method of claim 5, wherein the obtaining the facial texture of the corresponding face region comprises:
converting the clipping space of the vertex shader three-dimensional model into a screen space;
and capturing the facial texture of the corresponding face area in the screen space.
7. The method of claim 6, wherein the grabbing the facial texture of the corresponding face region in the screen space is achieved by the following formula:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen UV represents the position of the three-dimensional object projected to the screen space; xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in a projection matrix; w represents the fourth-dimensional coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; a is a coefficient; b is a constant.
8. A face effect splitting device, comprising:
the splitting module is used for splitting the three-dimensional face reconstruction model into a plurality of split pieces;
a data processing module, configured to perform data processing on the plurality of split slices, where the data processing includes: setting a vertex with the same position information of adjacent split slices in the plurality of split slices as a shared vertex, enabling the shared vertex to share the same position information, normal information and texture coordinates, and modifying the index of the shared vertex;
and the animation processing module is used for moving the split piece after the data processing to the corresponding face area in real time for animation processing.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 7.
CN202010469201.1A 2020-05-28 2020-05-28 Face special effect splitting method, device, medium and equipment Active CN111627105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010469201.1A CN111627105B (en) 2020-05-28 2020-05-28 Face special effect splitting method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010469201.1A CN111627105B (en) 2020-05-28 2020-05-28 Face special effect splitting method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN111627105A true CN111627105A (en) 2020-09-04
CN111627105B CN111627105B (en) 2023-04-28

Family

ID=72259403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010469201.1A Active CN111627105B (en) 2020-05-28 2020-05-28 Face special effect splitting method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN111627105B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5886702A (en) * 1996-10-16 1999-03-23 Real-Time Geometry Corporation System and method for computer modeling of 3D objects or surfaces by mesh constructions having optimal quality characteristics and dynamic resolution capabilities
US20120256915A1 (en) * 2010-06-30 2012-10-11 Jenkins Barry L System and method of procedural visibility for interactive and broadcast streaming of entertainment, advertising, and tactical 3d graphical information using a visibility event codec
US20150187135A1 (en) * 2013-12-31 2015-07-02 Nvidia Corporation Generating indirection maps for texture space effects
CN109410332A (en) * 2018-09-17 2019-03-01 广西大学 Three-dimensional space geometry dummy model level of detail method of cutting out based on point-line-surface
CN110807836A (en) * 2020-01-08 2020-02-18 腾讯科技(深圳)有限公司 Three-dimensional face model generation method, device, equipment and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5886702A (en) * 1996-10-16 1999-03-23 Real-Time Geometry Corporation System and method for computer modeling of 3D objects or surfaces by mesh constructions having optimal quality characteristics and dynamic resolution capabilities
US20020167518A1 (en) * 1996-10-16 2002-11-14 Alexander Migdal System and method for computer modeling of 3D objects or surfaces by mesh constructions having optimal quality characteristics and dynamic resolution capabilities
US20120256915A1 (en) * 2010-06-30 2012-10-11 Jenkins Barry L System and method of procedural visibility for interactive and broadcast streaming of entertainment, advertising, and tactical 3d graphical information using a visibility event codec
US20150187135A1 (en) * 2013-12-31 2015-07-02 Nvidia Corporation Generating indirection maps for texture space effects
CN109410332A (en) * 2018-09-17 2019-03-01 广西大学 Three-dimensional space geometry dummy model level of detail method of cutting out based on point-line-surface
CN110807836A (en) * 2020-01-08 2020-02-18 腾讯科技(深圳)有限公司 Three-dimensional face model generation method, device, equipment and medium

Also Published As

Publication number Publication date
CN111627105B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
CN110058685B (en) Virtual object display method and device, electronic equipment and computer-readable storage medium
CN106846497B (en) Method and device for presenting three-dimensional map applied to terminal
JP2024505995A (en) Special effects exhibition methods, devices, equipment and media
CN109754464B (en) Method and apparatus for generating information
CN110825286B (en) Image processing method and device and electronic equipment
CN112785676B (en) Image rendering method, device, equipment and storage medium
CN112237739A (en) Game role rendering method and device, electronic equipment and computer readable medium
CN111127603B (en) Animation generation method and device, electronic equipment and computer readable storage medium
CN112734910A (en) Real-time human face three-dimensional image reconstruction method and device based on RGB single image and electronic equipment
CN115908679A (en) Texture mapping method, device, equipment and storage medium
CN115775310A (en) Data processing method and device, electronic equipment and storage medium
CN109816791B (en) Method and apparatus for generating information
CN111627105B (en) Face special effect splitting method, device, medium and equipment
CN111199569A (en) Data processing method and device, electronic equipment and computer readable medium
CN114049403A (en) Multi-angle three-dimensional face reconstruction method and device and storage medium
CN116527993A (en) Video processing method, apparatus, electronic device, storage medium and program product
CN110119721B (en) Method and apparatus for processing information
CN111338827B (en) Method and device for pasting form data and electronic equipment
CN111275799B (en) Animation generation method and device and electronic equipment
CN113506356A (en) Drawing method and device of area map, readable medium and electronic equipment
CN115222854A (en) Virtual image collision processing method and device, electronic equipment and storage medium
CN111627106A (en) Face model reconstruction method, device, medium and equipment
CN112446936A (en) Image processing method and device
CN112883757B (en) Method for generating tracking attitude result
CN112395826B (en) Text special effect processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant