Skin micro-surface deformation treatment method and device and storage medium
By pre-calculating and real-time calculation of the transformation matrix T, combined with SVD decomposition and one-dimensional Gaussian convolution processing, the problem that traditional skin rendering methods are difficult to express the microscopic details of the skin is solved, and efficient and fast skin micro-surface rendering is achieved.
Patent Information
- Application Number
- CN202411681433.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-18
AI Technical Summary
Traditional skin rendering methods are difficult to accurately represent the microscopic details of the skin, such as textures, wrinkles and subtle concave and bump changes, and high-quality rendering requires a lot of computing resources.
By precalculating the matrix Q*R' in a neutral posture, the generalized inverse matrix and matrix R' of the matrix Q' of the current frame are calculated in real time, and the transformation matrix T is then calculated, and SVD decomposition is performed to obtain the tensile extrusion ratio and direction. Combined with the one-dimensional Gaussian convolution processing step, the skin microsurface deformation treatment is realized.
It significantly improves computing efficiency and rendering speed, reduces performance bottlenecks caused by vertex data transmission and calculation, and is suitable for rendering of complex scenes, especially when skin microstructures need to be carefully handled.
Smart Images

Figure CN119648882A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to image processing technology, and in particular to a skin micro-surface deformation processing method, device and storage medium. Background Art
[0002] In computer graphics (CG) and film and television production, skin rendering often faces challenges. Traditional methods may only generate relatively smooth skin surfaces, but cannot accurately express the microscopic details of the skin, such as texture, wrinkles, and subtle bump changes. To overcome these problems, researchers have proposed a method that combines displacement mapping and convolution operations to more accurately simulate the microscopic deformation of the skin, making the skin look more realistic. However, in CG production, rendering high-quality skin usually requires a lot of computing resources. Summary of the invention
[0003] In view of the deficiencies in the prior art, the present invention discloses a skin micro-surface deformation processing method, device and storage medium.
[0004] The technical solution adopted by the present invention is as follows:
[0005] A method for processing skin micro-surface deformation, comprising the following steps:
[0006] Pre-calculate the matrix Q*R′ in the neutral pose; the matrix Q is the transformation matrix from the world 3D space to the UV space; the matrix R is the transformation matrix from the world 3D space to the tangent space;
[0007] Calculate the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R', and then calculate matrix T; specifically: matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation; since the UV space remains unchanged, we have:
[0008] R′*(Q′) -1 *E=T*R*Q -1 *E
[0009] Where E is the triangle edge in UV space; since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get:
[0010] T=R′*(Q′) -1 *(Q*R′)
[0011] The matrix T is decomposed by SVD to obtain the stretching and extrusion ratio and direction, and the deformation processing result is obtained.
[0012] A further technical solution is that the processing method further includes a convolution shader processing step, specifically:
[0013] Perform one-dimensional Gaussian convolution on the image obtained by deformation processing along the main direction;
[0014] The main direction is rotated 90° to obtain the secondary direction;
[0015] Along the secondary direction, perform one-dimensional Gaussian convolution on the image obtained by one-dimensional Gaussian convolution in the main direction;
[0016] Get the convolution result.
[0017] Its further technical solution specifically includes:
[0018] Calculate the one-dimensional Gaussian kernel G x (x) and G y (y); the two-dimensional Gaussian kernel expression is:
[0019] G(x, y) = (1 / 2πσ 2 )*exp(-(x 2 +y 2 ) / 2σ 2 )
[0020] Where x and y are the coordinates of the kernel matrix, and σ is the standard deviation of the Gaussian function;
[0021] G(x, y) = G x (x)*G y (y)
[0022] in,
[0023] Apply a one-dimensional Gaussian kernel G to each row of the image obtained by the deformation process x (x), perform convolution in the direction to obtain the image after convolution in the row direction.
[0024] Apply a one-dimensional Gaussian kernel G to each column of the image obtained by the row-wise one-dimensional Gaussian convolution y (y), perform convolution in the column direction and finally obtain the final smoothed image.
[0025] A further technical solution is to calculate the generalized inverse matrix (Q′) of the matrix Q′ of the current frame according to the real-time data: -1 The calculation method is:
[0026]
[0027] Where P is a surface defined by parameters u and v, and the matrix (Q′) -1 It is the transformation matrix from UV space to three-dimensional space.
[0028] A further technical solution is that the calculation method of the matrix R′ of the current frame according to the real-time data is obtained by constructing a TBN matrix, specifically:
[0029]
[0030]
[0031] B=T×N
[0032] Among them, normalize is the normalization operation.
[0033] A device for implementing the skin micro-surface deformation processing method as described in any one of the above items, characterized by comprising:
[0034] Pre-calculation module, used to pre-calculate the matrix Q*R in the neutral posture T ; Matrix Q is the conversion matrix from world 3D space to UV space; Matrix R is the conversion matrix from world 3D space to tangent space;
[0035] Real-time calculation module, calculates the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R', and then calculate matrix T; specifically: matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation; since the UV space remains unchanged, we have:
[0036] R′*(Q′) -1 *E=T*R*Q -1 *E
[0037] Where E is the triangle edge in UV space; since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get:
[0038] T=R′*(Q′) -1 *(Q*R T )
[0039] The SVD decomposition module is used to perform SVD decomposition on the matrix T to obtain the stretching and squeezing ratio and direction, and obtain the deformation processing result.
[0040] A further technical solution is that the device further includes a convolution shader processing module, specifically:
[0041] The main direction one-dimensional Gaussian convolution module is used to perform one-dimensional Gaussian convolution on the image obtained by the deformation processing along the main direction;
[0042] The one-dimensional Gaussian convolution module in the secondary direction rotates the main direction by 90° to obtain the secondary direction, and then performs one-dimensional Gaussian convolution on the image obtained by the one-dimensional Gaussian convolution in the main direction along the secondary direction.
[0043] A skin micro-surface deformation processing device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the skin micro-surface deformation processing method as described in any one of the above items when executing the computer program.
[0044] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the skin micro-surface deformation processing method as described in any one of the above
[0045] The beneficial effects of the present invention are as follows:
[0046] By using the skin micro-surface deformation processing method in the embodiment of the present invention, the computational efficiency and rendering speed can be significantly improved when rendering the skin micro-structure. Especially in high polygon models, the embodiment of the present invention can significantly reduce the performance bottleneck caused by the transmission and calculation of a large amount of vertex data. Compared with the method in the prior art, the optimized algorithm is more suitable for rendering complex scenes, especially those that require detailed processing of the skin micro-structure.
[0047] In the embodiment of the present invention, since the matrix T is not calculated during the preprocessing process, data transmission can be reduced, and the resources that may be consumed by the operation can be reduced, and almost no significant impact on the rendering time is produced. Since more calculations are transferred to the shader rendering stage, the embodiment of the present invention is more flexible when facing models that need to be frequently deformed. This flexibility is also reflected in the processing of dynamic scenes, so that the rendering quality is not affected in high dynamic scenes.
[0048] The optimization scheme of the embodiment of the present invention not only retains the core advantages of the original algorithm, but also further improves the efficiency of offline rendering by improving the calculation process and resource management. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Schematic diagram of the process of the skin micro-surface deformation processing method in an embodiment of the present invention.
[0050] Figure 2 Schematic diagram of another embodiment of the skin micro-surface deformation processing method in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The specific implementation of the present invention is described below in conjunction with the accompanying drawings.
[0052] The embodiment of the present invention discloses a method for processing skin micro-surface deformation. Figure 1 FIG. 2 is a flow chart of a method for processing skin micro-surface deformation according to an embodiment of the present invention. Figure 1 As shown, the following steps are included:
[0053] Precompute the matrix Q*R′ in the neutral pose. Matrix Q is the transformation matrix from world 3D space to UV space. Matrix R is the transformation matrix from world 3D space to tangent space. Compared with matrix Q, matrix R only has rotation information, which can be calculated using the "closest rotation matrix" of matrix Q. Neutral pose refers to the original state of the polygonal mesh without deformation. The deformed polygonal mesh must refer to the neutral pose to obtain relative stretching, squeezing and direction.
[0054] Calculate the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R'. Then, combined with the pre-calculated data, the real-time matrix T is calculated. Matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation. Since the UV space remains unchanged, we have:
[0055] R′*(Q′) -1 *E=T*R*Q -1 *E
[0056] Where E is the triangular face edge in UV space. Specifically, since the UV space remains unchanged, that is, the UV space coordinates corresponding to the polygon mesh vertices remain constant, the triangular face edge E remains unchanged before and after deformation. Therefore, the triangular face edge in the neutral posture UV space is first converted to the triangular face edge in the world three-dimensional space through the generalized inverse matrix of the matrix Q, and then converted to the triangular face edge in the tangent space through the matrix R, that is, R*Q -1 *E.
[0057] Similarly, the edge of the deformed tangent space triangle is R′*(Q′) -1 *E. The two are transformed by matrix T, so the above equation can be obtained.
[0058] Since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get by derivation:
[0059] T=R′*(Q′) -1 *(Q*R′)
[0060] According to the above formula, we only need to calculate the real-time matrix (Q′) in the shader. -1 And matrix R′, we can get matrix T.
[0061] The matrix T is subjected to SVD decomposition (singular value decomposition) to obtain the stretching and squeezing ratio and direction, and the deformation processing result is obtained.
[0062] SVD decomposition of matrix T means decomposing it into the product of three matrices:
[0063] T=U*∑*V′
[0064] Among them: U is an m×m orthogonal matrix, whose column vectors are the eigenvectors of the matrix T*T′. Σ is an m×n diagonal matrix, and the elements on the diagonal are the singular values of the matrix T. These singular values are non-negative and arranged in descending order. V′ is the transpose of an n×n orthogonal matrix, and its column vectors are the eigenvectors of the matrix T′*T. Among them, the matrix U and the matrix V′ realize the rotation or reflection of the space, changing the direction of the space but not the size of the shape, and are used to analyze the directional changes of the model. The elements on the diagonal of the diagonal matrix Σ (singular values) describe the degree of stretching or squeezing of the matrix T in different directions. The size of the singular value indicates the scaling factor in the corresponding direction. Using SVD, a complex transformation matrix can be decomposed into a combination of rotation, stretching, and rotation. This helps to understand and adjust the position, direction, and scale of the model in space.
[0065] Among them, the matrix (Q′) -1 , that is, the transformation matrix from UV space to three-dimensional space, can be obtained by taking the partial derivatives of the three-dimensional point coordinates P(u,v) with respect to the coordinates u and v in UV space:
[0066]
[0067] Among them, P(u,v)=(x(u,v),y(u,v),z(u,v)), x, y, z are the coordinates of three-dimensional space.
[0068] The matrix R′ is preferably calculated using a TBN matrix (tangent-bitangent-normal matrix) instead of the SVD or QR decomposition method in the prior art. The TBN matrix can also be easily obtained through parameters in the renderer.
[0069]
[0070]
[0071] B=T×N
[0072] Among them, normalize is the normalization operation.
[0073] R = [T, N, B]
[0074] Preferably, the subdivision properties of the Arnold renderer can be used so that the calculated and Smoother. and It is the derivative from UV space to world space. By smoothing them, the matrix T calculated later can also be smoother, thus ensuring the natural and coherent deformation of the microstructure. This improvement is particularly important for high-detail skin surface models, avoiding artifacts or discontinuities caused by rough matrix T calculations.
[0075] Furthermore, the processing method also includes a convolution shader processing step, Figure 2 FIG. 2 is a flow chart of another embodiment of the method for processing skin micro-surface deformation in an embodiment of the present invention. Figure 2 As shown, specifically:
[0076] Perform one-dimensional Gaussian convolution on the image obtained by deformation processing along the main direction;
[0077] The main direction is rotated 90° to obtain the secondary direction;
[0078] Along the secondary direction, perform one-dimensional Gaussian convolution on the image obtained by one-dimensional Gaussian convolution in the main direction;
[0079] Get the convolution result.
[0080] That is, in this embodiment, in order to further optimize the efficiency of the convolution operation, the Gaussian convolution kernel is calculated only once when the convolution node is initialized. This processing method is superior to the processing method using a two-dimensional Gaussian convolution kernel in the prior art. During runtime, this convolution kernel is retained as a constant and no longer repeatedly calculated. This measure not only reduces the computational overhead, but also ensures the stability and consistency of the convolution process, thereby improving the computational efficiency during the rendering process.
[0081] Gaussian convolution is an operation commonly used in image processing, mainly used for image smoothing, denoising and feature extraction. The core idea of Gaussian convolution is to use Gaussian function to perform weighted averaging on the image, so that the noise and small details in the image are smoothed out, thus obtaining a smoother image.
[0082] The basic step of the Gaussian convolution operation is to convolve the image with a Gaussian kernel. The Gaussian kernel is a matrix based on the Gaussian function, which is usually distributed in a form where the center value is the largest and the farther away from the center, the smaller the value. The mathematical expression of the two-dimensional Gaussian convolution kernel is:
[0083] G(x, y) = (1 / 2πσ 2 )*exp(-(x 2 +y 2 ) / 2σ 2 )
[0084] Among them, x and y are the coordinates of the convolution kernel matrix, and σ is the standard deviation of the Gaussian function, which controls the width of the kernel. The convolution operation is to multiply each pixel in the image by the weight of the corresponding position of the convolution kernel matrix and sum them to calculate the new pixel value. When performing two-dimensional Gaussian convolution directly, the amount of calculation is large, because for each pixel point, it is necessary to perform a product and sum operation with the entire two-dimensional kernel matrix, which is computationally expensive for large-size images. In order to reduce the computational complexity, this embodiment uses the separation property of the Gaussian function to decompose the two-dimensional Gaussian convolution operation into two one-dimensional convolution operations. The Gaussian function is separable, that is, it can be expressed as the product of two independent one-dimensional Gaussian functions:
[0085] G(x, y) = G x (x)*G y (y)
[0086] in,
[0087] According to this property, the two-dimensional Gaussian convolution can be decomposed into a one-dimensional Gaussian convolution in one direction of the image, followed by another one-dimensional Gaussian convolution in the other direction. 2 ) is reduced to O(n), which greatly reduces the amount of calculation.
[0088] Specific:
[0089] Calculate the one-dimensional Gaussian kernel: According to the pre-set σ, calculate the one-dimensional Gaussian kernel G x (x) and G y (y). Generally speaking, the length of the kernel can be 6σ+1. The row direction is set as the main direction and the column direction is set as the secondary direction.
[0090] Apply a one-dimensional Gaussian kernel G to each row of the image obtained by the deformation process x (x), perform convolution in the direction to obtain the image after convolution in the row direction.
[0091] The row direction is rotated 90° to obtain the column direction. Apply a one-dimensional Gaussian kernel G to each column of the image obtained by the one-dimensional Gaussian convolution in the row direction y (y), perform convolution in the column direction and finally obtain the final smoothed image.
[0092] Decomposing the two-dimensional Gaussian convolution operation into two one-dimensional convolution operations not only retains the Gaussian smoothing effect, but also significantly reduces the computational complexity. This is a common method in actual image processing. In implementation, this decomposition method can not only improve processing efficiency, but also help to better understand the nature of the convolution operation.
[0093] The embodiments of the present invention improve rendering efficiency and reduce computational burden while maintaining high-quality visual effects by optimizing the convolution process of the displacement map.
[0094] The method for processing skin micro-surface deformation in the embodiment of the present invention significantly improves the computational efficiency and rendering speed when rendering skin microstructures. Especially in high polygon models, the embodiment of the present invention can significantly reduce the performance bottleneck caused by the transmission and calculation of a large amount of vertex data. Compared with the method in the prior art, the optimized algorithm is more suitable for rendering complex scenes, especially those that require detailed processing of skin microstructures.
[0095] In this embodiment, the matrix T is responsible for describing the transformation of the vertices in the tangent space, while the matrix Q*R′ reflects the influence of this transformation on the skin microstructure.
[0096] Some current methods also use matrix T and the column vector modulus of matrix Q*R′ to deform the skin microstructure. However, in the specific implementation, the matrix T of each vertex needs to be calculated before rendering and passed to the shader. This method will produce a significant computational bottleneck on high-polygon models, especially when the T matrix needs to be calculated separately for each vertex or face, which may cause freezes or delays in the rendering process.
[0097] The embodiment of the present invention is different from the above method. In the preprocessing process, the matrix T is not calculated, which can reduce data transmission. If the matrix T is to be calculated for preprocessing, the calculation needs to be performed in the production stage. When the mesh is large, this means that a lot of data needs to be recorded (each face / vertex is a 2x2 matrix), and the calculation may require a high resource consumption, resulting in more jams during production or export. If these CPU-intensive calculations are placed in the rendering stage, there is no need to store and transmit these large amounts of data, and the calculation can be completed directly on a rendering machine / rendering farm machine with high CPU performance, with almost no significant impact on the rendering time.
[0098] Therefore, since more calculations are transferred to the shader rendering stage, the embodiments of the present invention are more flexible when facing models that need to be frequently deformed. This flexibility is also reflected in the processing of dynamic scenes, so that the rendering quality is not affected in high dynamic scenes.
[0099] The optimization scheme of the embodiment of the present invention not only retains the core advantages of the original algorithm, but also further improves the efficiency of offline rendering by improving the calculation process and resource management. These improvements make our scheme more promising for application in the Arnold renderer, especially in fields such as movies and games that have extremely high requirements for rendering quality, and will be able to play a greater role.
[0100] The embodiment of the present invention also discloses a device for executing the above-mentioned skin micro-surface deformation processing method, comprising:
[0101] Pre-calculation module, used to pre-calculate the matrix Q*R′ in the neutral posture; the matrix Q is the conversion matrix from the world 3D space to the UV space; the matrix R is the conversion matrix from the world 3D space to the tangent space;
[0102] Real-time calculation module, calculates the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R', and then calculate matrix T; specifically: matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation; since the UV space remains unchanged, we have:
[0103] R′*(Q′) -1 *E=T*R*Q -1 *E
[0104] Where E is the triangle edge in UV space; since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get:
[0105] T=R′*(Q′) -1 *(Q*R′)
[0106] The SVD decomposition module is used to perform SVD decomposition on the matrix T to obtain the stretching and squeezing ratio and direction, and obtain the deformation processing result.
[0107] Furthermore, the device also includes a convolution shader processing module, specifically:
[0108] The main direction one-dimensional Gaussian convolution module is used to perform one-dimensional Gaussian convolution on the image obtained by the deformation processing along the main direction;
[0109] The one-dimensional Gaussian convolution module in the secondary direction rotates the main direction by 90° to obtain the secondary direction, and then performs one-dimensional Gaussian convolution on the image obtained by the one-dimensional Gaussian convolution in the main direction along the secondary direction.
[0110] The embodiment of the present invention also discloses a skin micro-surface deformation processing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the skin micro-surface deformation processing method described above are implemented. Figure 1 or Figure 2 The steps shown, or the processor executes the computer program to implement the functions of each module in the above-mentioned device embodiments.
[0111] Exemplarily, the computer program can be divided into one or more modules, which are stored in a memory and executed by a processor to complete an embodiment of the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the skin micro-surface deformation processing device. For example, the computer program can be divided into the pre-calculation module, real-time calculation module, and SVD decomposition module mentioned in the embodiment to perform their respective corresponding functions.
[0112] Furthermore, an embodiment of the present invention also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the skin micro-surface deformation processing method as described above are implemented.
[0113] If the module integrated in the skin micro-surface deformation processing device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the method in the above-mentioned embodiment when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Computer-readable media may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), etc.
[0114] The above description is an explanation of the present invention, not a limitation of the present invention. The scope of the present invention is defined in the claims. The present invention may be modified in any form without violating the basic structure of the present invention.
Claims
1. A method for processing skin micro-surface deformation, characterized in that: The following steps are involved: Precompute the matrix Q*R′ in the neutral posture; Matrix Q is the conversion matrix from world 3D space to UV space; Matrix R is the conversion matrix from world 3D space to tangent space; Calculate the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R', and then calculate matrix T; specifically: matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation; since the UV space remains unchanged, we have: R′*(Q′) -1 *E=T*R*Q -1 *E; Where E is the triangle edge in UV space; since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get: T=R′*(Q′) -1 *(Q*R′); The matrix T is decomposed by SVD to obtain the stretching and extrusion ratio and direction, and the deformation processing result is obtained.
2. The method for processing skin micro-surface deformation according to claim 1, characterized in that: The processing method further includes a convolution shader processing step, specifically: Perform one-dimensional Gaussian convolution on the image obtained by deformation processing along the main direction; The main direction is rotated 90° to obtain the secondary direction; Along the secondary direction, perform one-dimensional Gaussian convolution on the image obtained by one-dimensional Gaussian convolution in the main direction; Get the convolution result.
3. The method for processing skin micro-surface deformation according to claim 2, characterized in that: The convolution shader processing steps specifically include: Calculate the one-dimensional Gaussian kernel G x (x) and G y (y); the two-dimensional Gaussian kernel expression is: G(x,y)=(1 / 2πσ 2 )*exp(-(x 2 +y 2 ) / 2σ 2 ); Where x and y are the coordinates of the kernel matrix, and σ is the standard deviation of the Gaussian function; G(x,y)=G x (x)*G y (y); in, Apply a one-dimensional Gaussian kernel G to each row of the image obtained by the deformation process x (x), perform convolution in the direction to obtain the image after convolution in the row direction; Apply a one-dimensional Gaussian kernel G to each column of the image obtained by the row-wise one-dimensional Gaussian convolution y (y), perform convolution in the column direction and finally obtain the final smoothed image.
4. The method for treating skin micro-surface deformation according to claim 1, characterized in that: Calculate the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 The calculation method is: Where P is a surface defined by parameters u and v, and the matrix (Q′) -1 It is the transformation matrix from UV space to three-dimensional space.
5. The method for treating skin micro-surface deformation according to claim 1, characterized in that: The calculation method of calculating the matrix R′ of the current frame based on real-time data is obtained by constructing the TBN matrix, specifically: B = T × N; Among them, normalize is the normalization operation.
6. A device for implementing the skin micro-surface deformation processing method according to any one of claims 1 to 5, characterized in that: include: Pre-calculation module, used to pre-calculate the matrix Q*R in the neutral posture T ; Matrix Q is the conversion matrix from world 3D space to UV space; Matrix R is the conversion matrix from world 3D space to tangent space; Real-time calculation module, calculates the generalized inverse matrix (Q′) of the matrix Q′ of the current frame based on real-time data -1 And matrix R', and then calculate matrix R; specifically: matrix T is the transformation matrix from the tangent space triangle edge in the neutral posture to the tangent space triangle edge after deformation; since the UV space remains unchanged, we have: R′*(Q′) -1 *E=T*R*Q -1 *E Where E is the triangle edge in UV space; since the matrix R is an orthogonal matrix, its inverse matrix is equal to the transposed matrix, so we can get: T=R′*(Q′) -1 *(Q*R T ) The SVD decomposition module is used to perform SVD decomposition on the matrix T to obtain the stretching and squeezing ratio and direction, and obtain the deformation processing result.
7. The device according to claim 6, characterized in that The device also includes a convolution shader processing module, specifically: The main direction one-dimensional Gaussian convolution module is used to perform one-dimensional Gaussian convolution on the image obtained by the deformation processing along the main direction; The one-dimensional Gaussian convolution module in the secondary direction rotates the main direction by 90° to obtain the secondary direction, and then performs one-dimensional Gaussian convolution on the image obtained by the one-dimensional Gaussian convolution in the main direction along the secondary direction.
8. A skin micro-surface deformation processing device, characterized in that: The processing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the skin micro-surface deformation processing method as described in any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the skin micro-surface deformation processing method according to any one of claims 1 to 5 are implemented.