CN111627105B - Face special effect splitting method, device, medium and equipment - Google Patents
Face special effect splitting method, device, medium and equipment Download PDFInfo
- Publication number
- CN111627105B CN111627105B CN202010469201.1A CN202010469201A CN111627105B CN 111627105 B CN111627105 B CN 111627105B CN 202010469201 A CN202010469201 A CN 202010469201A CN 111627105 B CN111627105 B CN 111627105B
- Authority
- CN
- China
- Prior art keywords
- split
- face
- data processing
- shared
- vertexes
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [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 disclosure relates to a face special effect splitting method, a device, a medium and equipment, which belong to the technical field of computers, and can enable a three-dimensional face reconstruction model used as a false mask to synchronously 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 pieces; performing data processing on the plurality of split pieces, wherein the data processing comprises: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and moving the split pieces after data processing to corresponding face areas in real time to perform animation processing.
Description
Technical Field
The disclosure relates to the technical field of computers, in particular to a face special effect splitting method, a device, a medium and equipment.
Background
In the prior art, when a special effect of splitting a face model is carried out, a false mask is usually placed on the face, and model splitting is carried out based on the false mask. In this way, on one hand, the wearing part is easy to be seen at the edge of the face, and the background texture is exposed; on the other hand, the complex special effect sticker with high comprehensiveness, namely false mask, expression migration and splitting, 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 pieces; performing data processing on the plurality of split pieces, wherein the data processing comprises: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and moving the split pieces after data processing to corresponding face areas in real time to perform animation processing.
In a second aspect, the present disclosure provides a face effect splitting apparatus, including: the splitting module is used for splitting the three-dimensional face reconstruction model into a plurality of splitting pieces; the data processing module is used for performing data processing on the plurality of split pieces, and the data processing comprises the following steps: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and the animation processing module is used for moving the split pieces subjected to the data processing to the corresponding face areas in real time to perform 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 device 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 said computer program in said storage means to carry out the steps of the method of the first aspect of the disclosure.
According to the technical scheme, the three-dimensional face reconstruction model is split into the split pieces, the data processing is carried out on the split pieces, and the split pieces after the data processing are moved to the corresponding face areas in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can be synchronously animated with the face in real time, further, the synchronous migration of the real-time expression of the face is realized, and the problem of lasting due to the fact that the face action is too large in the existing scheme is solved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
In the drawings:
fig. 1 is a flow chart of a face effect splitting method according to one embodiment of the present disclosure.
Fig. 2 is a schematic diagram of face model splitting.
Fig. 3 is a schematic block diagram of a face effect splitting apparatus according to one embodiment of the present disclosure.
Fig. 4 is a schematic structural view 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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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. Furthermore, 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Fig. 1 is a flow chart of a face effect splitting method according to one embodiment of the present disclosure. As shown in fig. 1, the face special 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 pieces.
The three-dimensional face reconstruction model is a three-dimensional face model constructed based on a face requiring splitting special effect processing.
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. Splitting increases the number of vertices of the three-dimensional face reconstruction model, but the number of textures, normals, and indices of the three-dimensional face reconstruction model do not change.
In this step, the three-dimensional face reconstruction model may be split into a plurality of split pieces by determining the shared vertices. Regarding the shared vertices, detailed description will be made below.
In step S12, data processing is performed on the plurality of split pieces. The data processing comprises the following steps: and setting vertexes with the same position information of adjacent splints in the plurality of splints as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes. The texture coordinates are used to describe the mapping relationship of the texture image and the vertices.
For example, assuming that the three-dimensional face reconstruction model is split into a first split, a second split, and a third split from left to right, the first split and the second split are adjacent splits, the second split and the third split are adjacent splits, and assuming that a vertex V11 in the first split has the same position as a vertex V21 in the second split, a vertex V12 in the first split has the same position as a vertex V22 in the second split, a vertex V23 in the second split has the same position as a vertex V33 in the third split, the three pairs of vertices are each set to share a vertex, and the vertices V11 and V21 have the same position information, normal information, and texture coordinates, the vertices V12 and V22 have the same position information, normal information, and texture coordinates, and the vertices V23 and V33 have the same position information, normal information, and texture coordinates, respectively.
An exemplary manner of data processing may be as follows. First, a three-dimensional model obj file is derived, which is a file obtained after splitting the three-dimensional face reconstruction model in step S11, and in which positional information, texture coordinates, normal line information, and index information of each vertex of the three-dimensional face reconstruction model are included. Then, the file related to the vertex data in the obj file is stored in an array, each row of position information data of the array is traversed, if the position information data are found to be the same, the position information data are marked (for example, marked as "same") and vertex data of the vertex corresponding to the position information data are recorded, and the vertex is set as a shared vertex. Similarly, the file associated with the vertex data in the obj file may be stored in an array, each row of vertex data of the array is traversed, and if a distance change in the z-direction is found in the vertex data, where the distance measure may be 10 or other values, the position data of different gradients are marked as different sets of texture coordinates for determining which regions need to be split. Then, the data (including position information, normal line information and texture coordinates) of the shared vertex is duplicated, so that the same pair of shared vertices has the same position information, normal line information and texture coordinates. In addition, the index of the shared vertex can be modified by rendering according to the index order and vertex position, and the triangle can be rendered at the time of rendering.
In step S13, the split pieces after the data processing are moved to the corresponding face areas in real time to perform animation processing.
For example, it is assumed that the first split piece, the second split piece, and the third split piece are obtained after splitting in step S11; and according to the migration of the facial expression, the first split piece should be moved to the first facial area, the second split piece should be moved to the second facial area, and the third split piece should be moved to the third facial area, so that the synchronous animation of the three-dimensional facial reconstruction model and the face can be realized. In step S13, the first split piece after data processing is moved to the first face area in real time for performing animation processing, the second split piece after data processing is moved to the second face area in real time for performing animation processing, and the third split piece after data processing is moved to the third face area in real time for performing animation processing.
When the animation processing is carried out, the splitting area can be determined through the texture coordinates, and the 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 the manner in which the animation splitting effect is achieved is a wide variety and the examples herein are by way of example only. In addition, it is necessary to ensure that the number of vertices in the three-dimensional face reconstruction is consistent with the number of textures and the number of normals.
Additionally, methods according to embodiments of the present disclosure may first initialize reset vertices, normals, texture coordinates to ensure that shared vertex data is copied to the correct array location. Then, when the method according to the embodiment of the present disclosure is running, the vertex, normal, texture data content is updated in real time to realize the function of synchronizing the facial expression at each frame.
According to the technical scheme, the three-dimensional face reconstruction model is split into the split pieces, the data processing is carried out on the split pieces, and the split pieces after the data processing are moved to the corresponding face areas in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can be synchronously animated with the face in real time, further, the synchronous migration of the real-time expression of the face is realized, and the problem of lasting due to the fact that the face action is too large in the existing scheme is solved.
In one embodiment, the moving the split piece after the data processing in step S13 to the corresponding face area in real time for performing animation processing may include:
step S13a, associating each split piece after data processing with a corresponding bone and performing skinning. Wherein only one bone may be used for one split. When the split pieces are associated with bones, the bones can be placed at the original point of the world coordinate system, the weight is not required to be brushed, and only the automatic skin is required, namely, only the animation pairs of the split pieces are required to be ensured. The three-dimensional face reconstruction model is wholly followed by a skeletal displacement which belongs to normal.
Step S13b, enabling each split piece to move to a corresponding face area in real time along with the associated skeleton.
And step S13c, performing real-time animation processing on the fragments in the corresponding face areas.
Wherein step S13c may include: acquiring facial textures of a corresponding face area; and carrying out real-time animation processing on the segmentation in the corresponding face area based on the facial texture. Thus, the human face model can follow the human face expression in real time.
The obtaining the facial texture of the corresponding face area may include: converting the vertex shader three-dimensional model clipping space to screen space; and capturing the facial texture of the corresponding face area in the screen space. For example, grabbing the facial texture of the corresponding face region in screen space is accomplished by the following formula:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen uv represents the position of the three-dimensional object projected into screen space; the screenpos.xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; the screenpos.w represents 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 other value; b is a constant and may be, for example, 0.5 or other values.
If the model is a three-dimensional face reconstruction model with skeleton animation, the screenPos is still in the position of_mvp, and the position obtained by the 'skeleton position mvp' is not used. Otherwise, the texture behind the three-dimensional face reconstruction model after the skeleton animation is executed is acquired, and the texture is not the current face position. If skeletal 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 motion 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, so that the real-time expression synchronous migration of the face is realized. And the problem of real-time mapping of the human face is solved, and the integrity and consistency of the facial texture can be ensured in the splitting process.
Fig. 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 as to realize synchronous migration with a real-time expression of the face.
Fig. 3 is a schematic block diagram of a face effect splitting apparatus according to one embodiment of the present disclosure. As shown in fig. 3, the face special effect splitting device includes: a splitting module 31, configured to split the three-dimensional face reconstruction model into a plurality of split pieces; a data processing module 32, configured to perform data processing on the plurality of split slices, where the data processing includes: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and the animation processing module 33 is used for moving the split pieces after the data processing to the corresponding face areas in real time to perform animation processing.
According to the technical scheme, the three-dimensional face reconstruction model is split into the split pieces, the data processing is carried out on the split pieces, and the split pieces after the data processing are moved to the corresponding face areas in real time to carry out animation processing, so that the three-dimensional face reconstruction model used as a false mask can be synchronously animated with the face in real time, further, the synchronous migration of the real-time expression of the face is realized, and the problem of lasting due to the fact that the face action is too large in the existing scheme is solved.
Optionally, the splitting module 31 splits the three-dimensional face reconstruction model into the plurality of split pieces by determining the shared vertices.
Optionally, data processing module 32 modifies the index of the shared vertex by rendering according to the index order and vertex positions.
Optionally, the animation processing module 33 is configured to: associating each split piece after data processing with a corresponding bone and performing skinning; moving each split piece to a corresponding face area in real time along with the associated bone; and carrying out 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 based on the facial texture, carrying out real-time animation processing on the split pieces in the corresponding face areas.
Optionally, the animation processing module 33 is configured to: converting the vertex shader three-dimensional model clipping space to 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 implement capturing the facial texture of the corresponding face region in the screen space according to the following formula:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen uv represents the position of the three-dimensional object projected into screen space; the screenpos.xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; the screenpos.w represents 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 other value; b is a constant and may be, for example, 0.5 or other values.
Referring now to fig. 4, a schematic diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to 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 required 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 through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, magnetic 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 shows an electronic device 600 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication means 609, or from storage means 608, or from ROM 602. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 601.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, 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 communication 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 networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated 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 pieces; performing data processing on the plurality of split pieces, wherein the data processing comprises: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and moving the split pieces after data processing to corresponding face areas in real time to perform animation processing.
Computer program code for carrying out operations of the present disclosure may be written in 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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.
In accordance with one or more embodiments of the present disclosure, example 1 provides a face effect splitting method, comprising: splitting the three-dimensional face reconstruction model into a plurality of split pieces; performing data processing on the plurality of split pieces, wherein the data processing comprises: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes; and moving the split pieces after data processing to corresponding face areas in real time for animation processing and determination.
In accordance with one or more embodiments of the present disclosure, example 2 provides the method of example 1, further comprising: and splitting the three-dimensional face reconstruction model into the plurality of split pieces by determining the shared vertex.
In accordance with one or more embodiments of the present disclosure, example 3 provides the method of example 1, further comprising: the index of the shared vertex is modified by rendering according to the index order and vertex position.
In accordance with one or more embodiments of the present disclosure, example 4 provides the method of example 1, further comprising: the step of moving the split pieces after data processing to the corresponding face areas in real time for animation processing comprises the following steps: associating each split piece after data processing with a corresponding bone and performing skinning; moving each split piece to a corresponding face area in real time along with the associated bone; and carrying out real-time animation processing on the split pieces in the corresponding face areas.
Example 5 provides the method of example 1, further comprising: and performing real-time animation processing on the split pieces in the corresponding face areas, wherein the real-time animation processing comprises the following steps: acquiring the facial texture of the corresponding face area; and based on the facial texture, carrying out real-time animation processing on the split pieces in the corresponding face areas.
Example 6 provides the method of example 1, further comprising: the obtaining the facial texture of the corresponding face area includes: converting the vertex shader three-dimensional model clipping space to 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: the capturing of the facial texture of the corresponding face region in the screen space is achieved by the following formula: screen uv = screen pos.xy/screen pos.w. a+b
Wherein, screen uv represents the position of the three-dimensional object projected into screen space; the screenpos.xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; the screenpos.w represents 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 of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although 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. In 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 limiting the scope of the present 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 example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Claims (10)
1. The face special effect splitting method is characterized by comprising the following steps of:
splitting the three-dimensional face reconstruction model into a plurality of split pieces;
performing data processing on the plurality of split pieces, wherein the data processing comprises: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes;
and moving the split pieces after data processing to corresponding face areas in real time to perform animation processing.
2. The method of claim 1, wherein splitting the three-dimensional face reconstruction model into a plurality of split pieces 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 the modifying the index of the shared vertex comprises:
the index of the shared vertex is modified by rendering according to the index order and vertex position.
4. The method of claim 1, wherein moving the split pieces after the data processing to the corresponding face areas in real time for animation processing comprises:
associating each split piece after data processing with a corresponding bone and performing skinning;
moving each split piece to a corresponding face area in real time along with the associated bone;
and carrying out real-time animation processing on the split pieces in the corresponding face areas.
5. The method of claim 4, wherein said real-time animation of said split pieces at said corresponding face regions comprises:
acquiring the facial texture of the corresponding face area;
and based on the facial texture, carrying out real-time animation processing on the split pieces in the corresponding face areas.
6. The method of claim 5, wherein the acquiring the facial texture of the corresponding face region comprises:
converting the vertex shader three-dimensional model clipping space to screen space;
and capturing the facial texture of the corresponding face area in the screen space.
7. The method of claim 6, wherein the capturing of the facial texture of the corresponding face region in the screen space is accomplished by the following equation:
screenUV=screenPos.xy/screenPos.w*a+b
wherein, screen uv represents the position of the three-dimensional object projected into screen space; the screenpos.xy represents the x and y coordinates of each vertex of the three-dimensional face reconstruction model in the projection matrix; the screenpos.w represents 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. The utility model provides a human face special effect division device which characterized in that includes:
the splitting module is used for splitting the three-dimensional face reconstruction model into a plurality of splitting pieces;
the data processing module is used for performing data processing on the plurality of split pieces, and the data processing comprises the following steps: setting vertexes with same position information of adjacent split sheets in the plurality of split sheets as shared vertexes, enabling the shared vertexes to share the same position information, normal line information and texture coordinates, and modifying indexes of the shared vertexes;
and the animation processing module is used for moving the split pieces subjected to the data processing to the corresponding face areas in real time to perform animation processing.
9. A computer readable medium on which a computer program is stored, characterized in that the program, when being executed by a processing device, carries out the steps of the method according to any one of claims 1-7.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-7.
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 CN111627105A (en) | 2020-09-04 |
| CN111627105B true 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 (3)
| 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 |
| 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 |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9171396B2 (en) * | 2010-06-30 | 2015-10-27 | Primal Space Systems Inc. | System and method of procedural visibility for interactive and broadcast streaming of entertainment, advertising, and tactical 3D graphical information using a visibility event codec |
| US9396585B2 (en) * | 2013-12-31 | 2016-07-19 | Nvidia Corporation | Generating indirection maps for texture space effects |
-
2020
- 2020-05-28 CN CN202010469201.1A patent/CN111627105B/en active Active
Patent Citations (3)
| 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 |
| 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 |
|---|---|
| CN111627105A (en) | 2020-09-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7604669B2 (en) | Special effects display method, device, equipment and medium | |
| CN106846497B (en) | Method and device for presenting three-dimensional map applied to terminal | |
| CN109754464B (en) | Method and apparatus for generating information | |
| US20220241689A1 (en) | Game Character Rendering Method And Apparatus, Electronic Device, And Computer-Readable Medium | |
| CN114842120B (en) | Image rendering processing method, device, equipment and medium | |
| CN110378947B (en) | 3D model reconstruction method and device and electronic equipment | |
| US20250166213A1 (en) | Image display method and apparatus, electronic device, and storage medium | |
| CN112734910A (en) | Real-time human face three-dimensional image reconstruction method and device based on RGB single image and electronic equipment | |
| CN111754303A (en) | Method and apparatus for virtual changing of clothing, device and medium | |
| CN111833459A (en) | An image processing method, device, electronic device and storage medium | |
| CN111127603B (en) | Animation generation method and device, electronic equipment and computer readable storage medium | |
| CN114049403B (en) | Multi-angle three-dimensional face reconstruction method, device and storage medium | |
| CN110363860B (en) | 3D model reconstruction method and device and electronic equipment | |
| WO2023202023A1 (en) | Batch rendering method, apparatus, device and storage medium | |
| CN112785676B (en) | Image rendering method, device, equipment and storage medium | |
| CN110390717B (en) | 3D model reconstruction method and device and electronic equipment | |
| CN116228956A (en) | A shadow rendering method, device, equipment and medium | |
| CN111627105B (en) | Face special effect splitting method, device, medium and equipment | |
| CN110378948B (en) | 3D model reconstruction method and device and electronic equipment | |
| US20240428507A1 (en) | Mesh model processing method, electronic device and medium | |
| CN111275799B (en) | Animation generation method and device and electronic equipment | |
| US12548261B2 (en) | Information processing method and device | |
| US20240096023A1 (en) | Information processing method and device | |
| US20240269553A1 (en) | Method, apparatus, electronic device and storage medium for extending reality display | |
| CN118118737B (en) | Video generation method, device, electronic device, storage medium and program product |
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 |