Data processing method and apparatus, device, and medium

By merging polygons and searching for collinear vertex paths in the three-dimensional mesh model of the virtual object, smoothing the initial skin weights solves the problem of poor skinning effects on virtual objects and achieves a smoother skinning effect.

WO2024250821A9PCT designated stage expired Publication Date: 2025-01-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/086296
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-08
Filing Date
2024-04-07
Publication Date
2025-01-23

AI Technical Summary

Technical Problem

In the prior art, the skinning effect of virtual objects is poor, resulting in the virtual objects being prone to problems such as molding, deformity or twisted wiring when moving.

Method used

By obtaining the three-dimensional mesh model of the virtual object and its initial skin weight, the first shape polygon pairs in the three-dimensional mesh model are merged to generate a candidate mesh model. Then, based on the half-edge structure data of the candidate mesh model, the collinear vertex paths are searched, and the initial skin weights of the model vertices contained in them are smoothed to obtain the skin update weights. Finally, the virtual object is skinned based on these updated weights.

Benefits of technology

This method can repair the unprozen -skinned skin weight in the three -dimensional grid model, enhance the skin and smoothness of the skin of the model vertex, thereby improving the skin treatment effect of the virtual object, and reducing the deformed and wiring problems during exercise.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024086296_23012025_PF_FP_ABST
    Figure CN2024086296_23012025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a data processing method and apparatus, a device, and a medium. The method comprises: obtaining a 3D mesh model corresponding to a virtual object and an initial skin weight corresponding to a model vertex; merging a pair of polygons of a first shape in the 3D mesh model into a polygon of a second shape to obtain a candidate mesh model; obtaining half-edge structure data corresponding to the candidate mesh model, and traversing half edges in the half-edge structure data to obtain a collinear vertex path in the 3D mesh model; on the basis of the path direction of the collinear vertex path in the half-edge structure data, smoothing the initial skin weight corresponding to a model vertex in the collinear vertex path to obtain a skin update weight corresponding to the model vertex; and performing skin processing on the virtual object on the basis of the skin update weight corresponding to the model vertex in the 3D mesh model. According to the embodiments of the present application, the skin processing effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device, equipment and medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 8, 2023, with application number 2023106727201 and application name “Data processing method, device, equipment and medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of Internet technology, and in particular to skinning technology. Background Art

[0003] Skeletal skinning is a technology used to bind vertices on a 3D mesh model to skeletal joints. Because vertices on a 3D mesh are often controlled to varying degrees by multiple joints, skeletal skinning is required to assign skin weights to the vertices on the 3D mesh. These skin weights determine the extent to which the actions of different joints affect the movement of the vertices on the 3D mesh.

[0004] In the current field of virtual object creation, artists and technicians must manually assign skin weights to each vertex on a 3D mesh model based on their own experience. These vertex skin weights determine the motion of the 3D virtual object. Given the increasing diversity of virtual objects involved in virtual object creation, manually assigned skin weights based on experience can have significant errors, resulting in problems such as clothing clipping through the model, deformities, or twisted wiring during virtual object movement. This results in poor skinning of virtual objects.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a data processing method, apparatus, device, and medium, which can improve the skinning effect of virtual objects.

[0007] In one aspect, an embodiment of the present application provides a data processing method, which is executed by a computer device and includes:

[0008] Obtaining a three-dimensional mesh model corresponding to the virtual object, and obtaining initial skin weights corresponding to model vertices in the three-dimensional mesh model;

[0009] Merging a first-shape polygon pair in the three-dimensional mesh model into a second-shape polygon to obtain a candidate mesh model; two first-shape polygons included in the first-shape polygon pair have a shared edge in the three-dimensional mesh model, and the shared edge is removed during the merging process;

[0010] Obtaining half-edge structure data corresponding to the candidate mesh model, traversing the half-edges in the half-edge structure data, and obtaining collinear vertex paths in the three-dimensional mesh model;

[0011] According to the path direction of the collinear vertex path in the half-edge structure data, the initial skin weights corresponding to the model vertices contained in the collinear vertex path are smoothed to obtain the skin update weights corresponding to the model vertices;

[0012] The virtual object is skinned according to the skin update weights corresponding to the model vertices in the three-dimensional mesh model.

[0013] In one aspect, an embodiment of the present application provides a data processing device, including:

[0014] A model acquisition unit, configured to acquire a three-dimensional mesh model corresponding to the virtual object and to acquire initial skin weights corresponding to model vertices in the three-dimensional mesh model;

[0015] a polygon merging unit, configured to merge a first-shape polygon pair in the three-dimensional mesh model into a second-shape polygon to obtain a candidate mesh model; two first-shape polygons included in the first-shape polygon pair have a shared edge in the three-dimensional mesh model, and the shared edge is removed during the merging process;

[0016] A collinear vertex acquisition unit is used to obtain half-edge structure data corresponding to the candidate mesh model, traverse the half-edges in the half-edge structure data, and obtain a collinear vertex path in the three-dimensional mesh model;

[0017] A weight smoothing processing unit is used to smooth the initial skin weights corresponding to the model vertices contained in the collinear vertex path according to the path direction of the collinear vertex path in the half-edge structure data, so as to obtain the skin update weights corresponding to the model vertices;

[0018] The skinning processing unit is used to perform skinning processing on the virtual object according to the skinning update weights corresponding to the model vertices in the three-dimensional mesh model.

[0019] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.

[0020] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor, so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.

[0021] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.

[0022] In an embodiment of the present application, a three-dimensional mesh model corresponding to a virtual object and initial skin weights corresponding to model vertices in the three-dimensional mesh model are obtained, and a first shape polygon pair in the three-dimensional mesh model is merged into a second shape polygon to obtain a candidate mesh model; based on the half-edge structure data corresponding to the candidate mesh model, a collinear vertex path is searched on the merged second shape polygon, and the initial skin weights corresponding to the model vertices in the collinear vertex path are smoothed according to the direction of the collinear vertex path to obtain skin update weights corresponding to the model vertices, thereby repairing the uneven skin weights in the three-dimensional mesh model and improving the smoothness of the skin weights of the model vertices; skinning the virtual object based on the skin update weights corresponding to the model vertices can improve the skinning effect of the virtual object. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0024] FIG2 is a schematic diagram of searching for collinear vertex paths in a three-dimensional mesh model provided by an embodiment of the present application;

[0025] FIG3 is a flow chart of a data processing method according to an embodiment of the present application;

[0026] FIG4 is a schematic diagram of the structure of a candidate grid model provided in an embodiment of the present application;

[0027] FIG5 is a schematic diagram of half-edge structure data provided in an embodiment of the present application;

[0028] FIG6 is a schematic diagram of a skin weight smoothing result corresponding to a collinear vertex path provided by an embodiment of the present application;

[0029] FIG7 is a schematic diagram of a skinning process provided by an embodiment of the present application;

[0030] FIG8 is a second flow chart of a data processing method provided in an embodiment of the present application;

[0031] FIG9 is a schematic diagram showing calculation of a first shape evaluation coefficient corresponding to a different first shape polygon provided in an embodiment of the present application;

[0032] FIG10 is a schematic diagram of calculating a second shape evaluation coefficient corresponding to a candidate polygon provided in an embodiment of the present application;

[0033] FIG11 is a schematic diagram of a second shape evaluation coefficient corresponding to a different candidate polygon provided in an embodiment of the present application;

[0034] FIG12 is a schematic diagram of merging polygon pairs of a first shape in a three-dimensional mesh model provided by an embodiment of the present application;

[0035] FIG13 is a schematic diagram of the effect of skinning processing based on skinning update weights provided by an embodiment of the present application;

[0036] FIG14 is a schematic diagram of a scene for repairing skin weights of a three-dimensional mesh model provided by an embodiment of the present application;

[0037] FIG15 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0038] FIG16 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0040] To facilitate understanding of the subsequent content, the relevant technologies involved in the embodiments of this application are introduced below.

[0041] Three-dimensional mesh model (abbreviated as 3D model): A three-dimensional mesh is a form of discrete representation of a three-dimensional model in the form of a combination of polygons. The three-dimensional mesh data may include vertices, edges, and faces. In the field of games and three-dimensional modeling, an object can be approximated by a mesh (such as a triangular mesh or a quadrilateral mesh, etc., where triangles are the most basic primitives in a three-dimensional model). The process of using a mesh to build an object can be called 3D modeling. It is understandable that a three-dimensional model is usually hollow and is basically just a closed surface. From a storage perspective, a mesh body is composed of a series of vertices and has neither "faces" nor "bodies." Since a plane can be determined by three vertices and a solid can be determined by closed faces, no additional storage information is required, thereby achieving maximum compression. In summary, a three-dimensional mesh model can be considered as a three-dimensional model composed of several polygons (for example, triangles). It is only necessary to store the vertex data in the three-dimensional mesh model.

[0042] Routing: The lines that form the edges of polygons in a 3D mesh model are called routing. The quality of routing can directly affect the effect of the 3D mesh model.

[0043] Skinning: Skinning is a 3D animation term that can also be used in 3D games. It is a production technology for 3D animation. Based on the model created in the 3D modeling software, the bones are bound to the model. The bones and the model are independent of each other. In order for the bones to drive the model to produce reasonable movements, the model needs to be bound to the bones. This technology is called skinning. The skinning process will eventually output a matrix (i.e., skinning weight, which is used to characterize the influence weight of each bone joint on the model vertices in the 3D mesh model). The size of the matrix is ​​determined by the number of vertices in the model and the number of bone joints corresponding to the model; for each vertex in the model, the sum of the skin weights on all bone joints is 1.

[0044] Half-edge structure: A half-edge structure is a grid representation method that uses grid edges as the underlying data structure. In a half-edge structure, each grid edge can be considered to be divided into two half-edges with opposite directions. This half-edge structure allows for fast querying of adjacent edges.

[0045] Convolution: Convolution can be considered as the output at a certain moment is the result of the joint action (superposition) of multiple inputs. If the function participating in the convolution is regarded as an indicator function of the interval, convolution can also be considered as a generalization of the "sliding average".

[0046] Please refer to Figure 1, which is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application. The data processing system may include a terminal device 10a and a server 10b. The terminal device 10a and the server 10b may be connected via a network. The network may be a wide area network, a local area network, or a combination of a wide area network and a local area network. Data transmission between the terminal device 10a and the server 10b is achieved using wired or wireless means. It should be noted that the number of terminal devices and servers in the data processing system shown in Figure 1 can be one or more, and there is no limit on the number of terminal devices and servers in the data processing system.

[0047] As shown in FIG1 , a terminal device 10a in a data processing system can respond to a skin weight smoothing instruction for a virtual object, generate a skin weight smoothing processing request corresponding to the virtual object, and then send the skin weight smoothing processing request corresponding to the virtual object to a server 10b. The virtual object can be a non-real object created using three-dimensional software; in a game production scenario, the virtual object can include, but is not limited to, game characters (e.g., player characters, non-player characters, props, etc.), game character decorations (e.g., clothing), etc.; in a video production scenario, the virtual object can include, but is not limited to, a virtual anchor (or broadcasting object), a virtual anchor's decorations, etc. The embodiment of the present application does not limit the type of virtual object.

[0048] The server 10b can receive a skin weight smoothing request for a virtual object sent by the terminal device 10a, obtain the three-dimensional mesh model corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model, merge the adjacent first shape polygons in the three-dimensional mesh model to form a second shape polygon; based on the half-edge structure data, collinear vertices can be searched on these second shape polygons to obtain the main wiring path that best expresses the main structure of the model in the original wiring of the three-dimensional mesh model (for example, a collinear vertex path composed of the searched collinear vertices), and then the initial skin weights corresponding to the model vertices in the collinear vertex path can be smoothed to achieve automatic repair of the unsmooth skin weights and obtain the repaired skin weights (which can be called skin update weights); the virtual object is skinned based on the skin update weights to obtain the skin result corresponding to the virtual object. Among them, the collinear vertices involved in the embodiment of the present application can refer to model vertices on the same smooth line in the three-dimensional mesh model.

[0049] The terminal device 10a may also receive the skinning result for the virtual object returned by the server 10b, and based on the received skinning result, may render a corresponding virtual object form, and display the virtual object form on the terminal device 10a. The virtual object form may refer to a virtual object with various posture types, or may refer to an animation of the virtual object, etc.

[0050] It is understandable that the data processing method provided in the embodiment of the present application (specifically, a skin weight smoothing processing method) can be executed by various computer devices. For example, it can be executed independently by a terminal device, or it can be executed independently by a server, or it can be executed collaboratively by a terminal device and a server. Specifically, the data processing method provided in the embodiment of the present application can be executed independently by the terminal device 10a; or, the terminal device 10a can send a skin weight smoothing processing request for a virtual object to the server 10b, and the server 10b executes the data processing method provided in the embodiment of the present application according to the received skin weight smoothing processing request. The data processing method provided in the embodiment of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, smart driving, etc.

[0051] Among them, the server (for example, server 10b) used to execute the data processing method provided in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. This application does not limit the type of server. The terminal device (for example, terminal device 10a) used to execute the data processing method provided in the embodiment of the present application can include but is not limited to: smart phones, tablet computers, laptops, PDAs, mobile internet devices (mobile internet devices, MIDs), wearable devices (such as smart watches, smart bracelets, etc.), intelligent voice interaction devices (such as smart speakers), smart home appliances (such as smart TVs, etc.), vehicle-mounted devices, aircraft and other electronic devices. This application does not limit the type of terminal device.

[0052] In one or more embodiments, the terminal device or server can implement the data processing method provided by the embodiment of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; or it can be a local (Native) application (APP, Application), that is, a program that needs to be installed in the operating system to run; or it can be a subroutine (or it can be called a small program), that is, a program that can be run only by downloading it to a browser environment; or it can also be a subroutine that can be embedded in any application. In short, the above-mentioned computer program can be any form of application, module or plug-in; for example, the computer program can be any automatic skinning tool, or it can be any tool for manual skinning post-processing, etc.

[0053] In one or more embodiments, the data processing system shown in FIG1 may include multiple servers, which may form a blockchain system, and each server may be a blockchain node in the blockchain system. Information connections may exist between any blockchain nodes in the blockchain system, and information may be transmitted between blockchain nodes via the aforementioned information connections. The relevant data involved in the data processing method provided in the embodiments of the present application (e.g., a three-dimensional mesh model corresponding to a virtual object, initial skin weights, collinear vertex paths, skin update weights, etc.) may be stored in the blockchain.

[0054] Please refer to FIG2 , which is a schematic diagram of searching for collinear vertex paths in a three-dimensional mesh model provided by an embodiment of the present application. This embodiment of the present application uses server 10b in the data processing system shown in FIG1 as an example to describe the search process for collinear vertex paths in a three-dimensional mesh model. In game production scenarios or three-dimensional model production scenarios, the skinning weights assigned to the model vertices in the three-dimensional mesh model are prone to jumps. That is, the skinning weights of the individual model vertices are not smooth, causing the virtual object to become deformed or have tortuous wiring when in motion, thereby affecting the final display effect of the virtual object. In actual application scenarios, if there are jumping skin weights in the model vertices in the three-dimensional mesh model corresponding to the virtual object, a skin weight smoothing instruction for the virtual object can be initiated through the skinning tool installed in the terminal device 10a. After the terminal device 10a receives the skin weight smoothing instruction for the virtual object, it can generate a skin weight smoothing processing request corresponding to the virtual object and send the skin weight smoothing processing request to the server 10b. Accordingly, after receiving the skin weight smoothing processing request, the server 10b can obtain the three-dimensional mesh model 20a corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model 20a.

[0055] Among them, the virtual object can be a game character in a game production scene, or any character in a three-dimensional production scene. The three-dimensional mesh model 20a corresponding to the virtual object can be a three-dimensional model approximated by a triangular mesh, that is, the three-dimensional mesh model 20a can include several triangular meshes. It can be understood that the model vertices in the three-dimensional mesh model 20a obtained by the server 10b have been configured with initial skin weights. The initial skin weights can be skin weights manually configured by art technicians based on their own experience and knowledge, or skin weights automatically configured for each model vertex using current skinning tools. This application does not limit the configuration method of the initial skin weights. Each vertex of the triangular mesh contained in the three-dimensional mesh model 20a can be called a model vertex of the three-dimensional mesh model 20a.

[0056] In order to better smooth the initial skin weight corresponding to each model vertex in the three-dimensional mesh model 20a, collinear model vertices (which may include collinear longitude and collinear latitude) may be detected in the three-dimensional mesh model 20a. It is understandable that if collinear vertices are directly searched on the three-dimensional mesh model 20a, it is easy to obtain curves or oblique lines. Therefore, in an embodiment of the present application, the server 10b may merge adjacent triangle pairs in the three-dimensional mesh model 20a into quadrilaterals, retain the four sides of the quadrilateral, delete the diagonal lines of the quadrilateral, that is, delete the edges shared by the two triangles that have been merged into the quadrilateral, thereby obtaining a candidate mesh model 20b. In other words, the candidate mesh model 20b can be considered as the result of merging adjacent triangle pairs in the three-dimensional mesh model 20a. The candidate mesh model 20b may include a number of quadrilaterals formed by merging adjacent triangle pairs in the three-dimensional mesh model 20a.

[0057] It should be noted that candidate mesh model 20b may also contain a small number of triangular meshes. For example, if some adjacent triangle pairs in 3D mesh model 20a cannot be merged into quadrilaterals (e.g., if merged, they may form a triangular pyramid), these triangular meshes need to be retained in candidate mesh model 20b. In other words, the edges shared between the two triangles in these adjacent triangle pairs do not meet the removal criteria. As shown in Figure 2, the dashed lines in candidate mesh model 20b represent edges in 3D mesh model 20a that do not meet the removal criteria. The bold solid lines in candidate mesh model 20b (such as line 20d) represent boundary edges of 3D mesh model 20a (boundary edges do not need to be detected and can be directly retained in candidate mesh model 20b). The thin solid lines in candidate mesh model 20b (the remaining lines in candidate mesh model 20b other than the dashed and bold solid lines) represent the edges of the retained quadrilaterals. It is understood that the model vertices in 3D mesh model 20a are the same as those in candidate mesh model 20b, that is, merging adjacent triangle pairs in 3D mesh model 20a will not affect the model vertices.

[0058] Furthermore, collinear vertex paths can be searched for in candidate mesh model 20b. For example, candidate mesh model 20b can be converted into half-edge structure data, and based on the half-edge structure data, collinear vertex paths can be searched for on the merged quadrilaterals to obtain collinear vertex paths in three-dimensional mesh model 20a. It will be appreciated that multiple collinear vertex paths can be searched for in candidate mesh model 20b. These collinear vertex paths can be as shown in mesh model 20c. For example, the bold solid line in mesh model 20c can represent a collinear vertex path in three-dimensional mesh model 20a.

[0059] After obtaining multiple collinear vertex paths, the initial skin weights corresponding to the model vertices on each collinear vertex path can be extracted, and the initial skin weights corresponding to each model vertex on each collinear vertex path can be smoothed to obtain repaired skin weights. The repaired skin weights can also be called skin update weights to improve the smoothness of the skin weights. Among them, the smoothing method used when smoothing the initial skin weights can include but is not limited to: mean filtering, median filtering, Gaussian filtering, and bilateral filtering, etc., which are not limited in this application. Skinning the virtual object based on the skin update weights corresponding to the model vertices in the three-dimensional mesh model 20a can improve the skinning effect.

[0060] Please refer to Figure 3, which is a flowchart diagram of a data processing method provided in an embodiment of the present application. It is understood that the data processing method can be executed by a computer device, which can be the terminal device 10a in the data processing system shown in Figure 1, or the server 10b in the data processing system shown in Figure 1, and this application does not limit this. The data processing method can include the following steps S101 to S105:

[0061] Step S101 : obtaining a three-dimensional mesh model corresponding to a virtual object, and obtaining initial skinning weights corresponding to model vertices in the three-dimensional mesh model.

[0062] In an embodiment of the present application, a computer device may be installed with an application for smoothing the skin weights corresponding to a three-dimensional mesh model. The application may be any skinning tool or any manual skinning post-processing tool. The present application does not limit the type of application. The computer device may smooth the skin weights corresponding to the three-dimensional mesh model by running the application.

[0063] In actual application scenarios, when performing skin weight smoothing processing, the computer device can obtain the three-dimensional mesh model corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model; for example, one or more three-dimensional mesh models with configured skin weights can be pre-stored in a storage space (such as the database of the aforementioned application, local storage area, etc.) (different three-dimensional mesh models can correspond to different virtual objects). When performing skin weight smoothing processing, the corresponding three-dimensional mesh model can be obtained from the storage space according to actual needs, and its corresponding skin weights can be smoothed.

[0064] Among them, the three-dimensional mesh model corresponding to the virtual object can be a three-dimensional model approximated by a triangular mesh, or can be a three-dimensional model approximated by a quadrilateral mesh, or can be a three-dimensional model jointly represented by a triangular mesh and a quadrilateral mesh, or can be a three-dimensional model approximated by other polygonal meshes, and this application does not limit this. The vertex of each polygonal mesh (for example, a triangular mesh, a quadrilateral mesh, etc.) in the three-dimensional mesh model can be called a model vertex, so the three-dimensional mesh model can include multiple model vertices; each model vertex has a corresponding vertex position, and the vertex position can be described in the form of a three-dimensional position coordinate. The skin weights that have been configured for the model vertices in the three-dimensional mesh model can be called initial skin weights. The skin weights can refer to the weights assigned when the model vertices in the three-dimensional mesh model are bound to the specified bones during the skinning process. The skin weights can be used to characterize the weights of the influence of the bone joints on the model vertices.

[0065] Step S102: Merge the first shape polygon pairs in the three-dimensional mesh model into second shape polygons to obtain a candidate mesh model; the two first shape polygons included in the first shape polygon pairs have shared edges in the three-dimensional mesh model, and the shared edges are removed during the merging process.

[0066] Specifically, if the 3D mesh model is approximated using a first-shape polygonal mesh, or is represented by a combination of a first-shape polygonal mesh and a second-shape polygonal mesh, that is, the 3D mesh model contains a first-shape polygonal mesh, then the two adjacent first-shape polygons contained in a first-shape polygon pair in the 3D mesh model can be merged to obtain a second-shape polygon; wherein the two adjacent first-shape polygons contained in the first-shape polygon pair in the 3D mesh model have a shared edge. Furthermore, during the merging process, the diagonal of the second-shape polygon can be removed from the 3D mesh model, that is, the shared edge of the two first-shape polygons that have been merged into the second-shape polygon in the 3D mesh model can be deleted to obtain a candidate mesh model.

[0067] It is understandable that, during the process of merging pairs of first-shape polygons, each first-shape polygon in the three-dimensional mesh model can only be merged with at most one adjacent first-shape polygon to form a second-shape polygon. Therefore, when a first-shape polygon j in the three-dimensional mesh model (which can be any first-shape polygon in the three-dimensional mesh model) is adjacent to multiple first-shape polygons, it is necessary to select one first-shape polygon from the multiple adjacent first-shape polygons to merge with the first-shape polygon j. Specifically, this can be expressed as follows: the adjacent first-shape polygon that forms the polygon with the first-shape polygon j that is closer to a rectangle is selected to merge with the first-shape polygon j to form the final second-shape polygon.

[0068] For example, the first shape polygons adjacent to the first shape polygon j in the three-dimensional mesh model include the first shape polygon 1, the first shape polygon 2 and the first shape polygon 3, then the first shape polygon 1 and the first shape polygon j can be combined into polygon q1, the first shape polygon 2 and the first shape polygon j can be combined into polygon q2, and the first shape polygon 3 and the first shape polygon j can be combined into polygon q3; if polygon q1 among polygons q1, polygon q2 and polygon q3 is the polygon closest to a rectangle, then polygon q1 can be used as the second shape polygon finally merged.

[0069] Optionally, if the first shape polygon j and its adjacent first shape polygons in the three-dimensional mesh model cannot be merged into a second shape polygon, or the polygons formed by the first shape polygon j and its adjacent first shape polygons do not meet the merging conditions (the specific circumstances in which the merging conditions are not met can be found in the subsequent content), then the first shape polygon j can be retained in the candidate mesh model.

[0070] It should be noted that the first shape polygon and the second shape polygon may refer to different types of polygonal meshes. For example, the first shape polygon may be a triangular mesh, the second shape polygon may be a quadrilateral mesh, etc. For ease of understanding, the embodiment of the present application is described using the first shape polygon as a triangular mesh and the second shape polygon as a quadrilateral mesh as an example.

[0071] Please refer to Figure 4, which is a structural diagram of a candidate mesh model provided by an embodiment of the present application. The candidate mesh model 30a shown in Figure 4 is the effect after merging triangles in a three-dimensional mesh model. The bold solid lines in the candidate mesh model 30a represent the edges retained after merging adjacent triangles in the three-dimensional mesh model into quadrilaterals; the thin solid lines in the candidate mesh model 30a represent the edges that have been deleted in the three-dimensional mesh model, that is, the shared edges between two triangles that have been merged into a quadrilateral. The candidate mesh model 30a does not essentially contain the edges represented by the thin solid lines. They are only used here to intuitively present the edges that have been deleted in the three-dimensional mesh model; the dotted lines in the candidate mesh model 30a represent the edges in the three-dimensional mesh model that do not meet the removal conditions (also called deletion conditions), such as the edges that cannot be merged into a quadrilateral with adjacent triangles; wherein, the diagonal lines of the second shape polygon formed by merging two adjacent first shape polygons meet the removal conditions. It can be understood that the boundary edges of the three-dimensional mesh model can be directly retained in the candidate mesh model 30a without detection. The embodiment of the present application improves the search efficiency of subsequent collinear vertex paths by merging the first shape polygon pairs (triangle pairs) in the three-dimensional mesh model (equivalent to pruning the three-dimensional mesh model).

[0072] It should be noted that if the three-dimensional mesh model is a three-dimensional model approximated using a second-shape polygonal (quadrilateral) mesh, the computer device does not need to execute step S102 after obtaining the three-dimensional mesh model, but directly executes step S103 after executing step S101.

[0073] Step S103 : obtaining half-edge structure data corresponding to the candidate mesh model, performing traversal processing on the half-edges in the half-edge structure data, and obtaining a collinear vertex path in the three-dimensional mesh model.

[0074] Specifically, the edges in the candidate mesh model can be converted into two half-edges with opposite directions to generate half-edge structure data corresponding to the candidate mesh model, and then a collinear vertex path can be searched on the merged second shape polygon based on the half-edge structure data.

[0075] Please refer to Figure 5, which is a schematic diagram of half-edge structure data provided by an embodiment of the present application. The mesh model 40a shown in Figure 5 can be a candidate mesh model obtained by merging triangles in a three-dimensional mesh model. The mesh model 40a includes a quadrilateral mesh. The mesh model 40a includes model vertex A, model vertex B, model vertex C, model vertex D, and edges AB, BC, CD, and AD. Furthermore, each edge in the mesh model 40a can be converted into two half-edges with opposite directions to obtain half-edge structure data 40b, and each half-edge in the half-edge structure data 40b can be regarded as a vector. As shown in Figure 5, half-edge 40c can be represented as a boundary half-edge in the half-edge structure data 40b; for model vertex A, the half-edge 40c is the outgoing half-edge of model vertex A; for model vertex D, the half-edge 40c is the incoming half-edge of model vertex D.

[0076] In one or more embodiments, an outgoing half-edge in the half-edge structure data corresponding to the candidate mesh model can be regarded as a vector (with direction), and finding the next collinear vertex can be regarded as finding the next outgoing half-edge in the same direction. By using the idea of ​​judging vectors in the same direction, all collinear vertex paths in the three-dimensional mesh model can be searched based on the half-edge structure data.

[0077] Among them, the idea of ​​the collinear vertex path search algorithm can include traversing the half-edges in the half-edge structure data corresponding to the candidate mesh model, and looking for the next half-edge with the smallest angle in the same direction. If the cosine of the angle is greater than the cosine threshold (which can be set according to actual needs, such as the cosine threshold can be set to 0.95), then the two half-edges are considered collinear, and the path formed by these two collinear half-edges is called a candidate collinear path. The steps of the search algorithm may include but are not limited to: ① starting from any boundary half-edge in the half-edge structure data corresponding to the candidate mesh model, that is, selecting any boundary half-edge in the half-edge structure data as the starting half-edge; ② when there is no next outgoing half-edge in the half-edge structure data that meets the conditions (the cosine of the angle between the outgoing half-edge with the smallest angle and the next same-direction half-edge is greater than the cosine threshold), or the current path is accessed back (connected end to end), the search for the candidate collinear path is stopped; the half-edges included in the candidate collinear path are marked to avoid secondary access to the half-edges in the half-edge structure data; ③ repeating the aforementioned steps ① and ② until all half-edges in the half-edge structure data are traversed; ④ merging multiple candidate collinear paths, such as if two candidate collinear paths have the same starting point and the first outgoing half-edges in the two candidate collinear paths are collinear, the two candidate collinear paths are merged to obtain all collinear vertex paths in the three-dimensional mesh model.

[0078] Step S104 , smoothing the initial skin weights corresponding to the model vertices included in the collinear vertex path according to the path direction of the collinear vertex path in the half-edge structure data, to obtain the skin update weights corresponding to the model vertices.

[0079] Specifically, after obtaining all collinear vertex paths in the three-dimensional mesh model, the initial skin weights corresponding to the model vertices contained in each collinear vertex path can be obtained, and the initial skin weights corresponding to the model vertices contained in the collinear vertex path can be smoothed according to the path direction of the collinear vertex path in the half-edge structure data, and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model can be automatically repaired to obtain the skin update weights corresponding to each model vertex. Among them, the smoothing method used in the embodiment of the present application when smoothing the initial skin weights may include but is not limited to: mean filtering, median filtering, Gaussian filtering, and bilateral filtering, etc., which are not limited in this application.

[0080] In one or more embodiments, the initial skin weights can be smoothed using mean filtering. The smoothing process at this time may include but is not limited to: after obtaining all collinear vertex paths in the three-dimensional mesh model, a smoothing window corresponding to the three-dimensional mesh model can be obtained; according to the path direction of the collinear vertex path in the half-edge structure data, the smoothing window is slid on the collinear vertex path to obtain the weight average of the initial skin weights corresponding to the model vertices covered by the smoothing window; the weight average is determined as the skin update weight corresponding to the center vertex covered by the smoothing window.

[0081] Among them, the above-mentioned smoothing window can be regarded as a one-dimensional convolution kernel (it can also be regarded as a mean filter). Through the smoothing window, the initial skin weight corresponding to each model vertex contained in the collinear vertex path is subjected to a one-dimensional average convolution to obtain the skin update weight corresponding to each model vertex contained in the collinear vertex path.

[0082] For example, assuming that the size of the smoothing window is 5, that is, the size of the one-dimensional convolution kernel is 5 (which can be recorded as kernel_size = 5), that is, for the initial skin weight corresponding to each model vertex included in the collinear vertex path, a sliding average is performed with a smoothing window size of 5 to obtain the skin update weight corresponding to each model vertex; wherein, the calculation process of the skin update weight can be shown as the following formula (1): w′ i =(w i-2 +w i-1 +w i +w i+1 +w i+2 ) / kernel_size (1)

[0083] Among them, w in formula (1) irepresents the initial skin weight corresponding to the i-th model vertex in the collinear vertex path (i.e., the initial skin weight to be smoothed), w i ' represents the skin update weight obtained by smoothing the initial skin weight corresponding to the i-th model vertex, w i-2 、w i-1 、w i+1 、w i+2 represents the initial skin weights corresponding to the two model vertices before and after the i-th model vertex along the collinear vertex path to which it belongs. In other words, by sliding the smoothing window along the collinear vertex path, the average of the initial skin weights corresponding to the model vertices covered by the smoothing window is used as the skin update weight corresponding to the center vertex covered by the smoothing window. The center vertex here can be the model vertex at the center position among all the model vertices covered by the smoothing window.

[0084] Please refer to Figure 6, which is a schematic diagram of the skin weight smoothing result corresponding to a collinear vertex path provided by an embodiment of the present application. As shown in Figure 6, it is assumed that four collinear vertex paths are searched in the three-dimensional mesh model based on the half-edge structure data, which are respectively recorded as collinear vertex path 1, collinear vertex path 2, collinear vertex path 3 and collinear vertex path 4; the initial skin weight distribution corresponding to the model vertices contained in each of these four collinear vertices is shown in statistical information 50a, and the horizontal axis in the statistical information 50a represents the number of the model vertex along the direction of the collinear vertex path (for example, the first model vertex, the second model vertex, etc.), and the vertical axis in the statistical information 50a represents the initial skin weight corresponding to the model vertex contained in the collinear vertex path. A smoothing window is used to smooth the initial skin weights corresponding to the model vertices contained in each of the above four collinear vertex paths to obtain the skin update weight corresponding to each model vertex. The skin update weight distribution corresponding to the model vertices contained in each of the four collinear vertex paths is shown in statistical information 50b. The information represented by the horizontal and vertical axes in statistical information 50b is the same as that represented by the horizontal and vertical axes in statistical information 50a. As shown in FIG6 , after smoothing the initial skin weights corresponding to the model vertices using mean filtering, each model vertex in the collinear vertex path can have a smoother skin update weight, thereby improving skin smoothness.

[0085] In one or more embodiments, the initial skin weights can be smoothed using Gaussian filtering. The smoothing process at this time may include but is not limited to: after obtaining all collinear vertex paths in the three-dimensional mesh model, obtaining the smoothing filter corresponding to the three-dimensional mesh model, and obtaining the neighborhood corresponding to each model vertex contained in the collinear vertex path. The number of vertices in the neighborhood is associated with the size of the smoothing filter. The smoothing filter here can be a Gaussian filter (which can also be regarded as a convolution kernel); according to the path direction of the collinear vertex path in the half-edge structure data, the initial skin weight corresponding to the model vertex p in the collinear vertex path (any model vertex in the collinear vertex path) and the initial skin weight corresponding to the model vertex in the neighborhood corresponding to the model vertex p are filtered through the smoothing filter to obtain a weighted average weight; the weighted average weight is determined as the skin update weight corresponding to the model vertex p.

[0086] For example, assuming that the size of the smoothing filter is 5 (which can also be expressed as kernel_size=5), its corresponding parameters can be expressed as (γ1, γ2, γ3, γ4, γ5), then the process of using the smoothing filter to perform weighted smoothing on each model vertex contained in the collinear vertex path can be shown as the following formula (2): w′ i =(γ1w i-2 +γ2w i-1 +γ3w i +γ4w i+1 +γ5w i+2 ) / kernel_size (2)

[0087] Among them, w in formula (2) i Represents the initial skin weight to be smoothed in the collinear vertex path (such as the initial skin weight corresponding to the i-th model vertex in the collinear vertex path, where the i-th model vertex can be the aforementioned model vertex p). At this time, the neighborhood of the i-th model vertex (such as model vertex p) can include the i-2-th model vertex, the i-1-th model vertex, the i+1-th model vertex, and the i+2-th model vertex. When using a smoothing filter to smooth the initial skin weight corresponding to the i-th model vertex, the parameters of the smoothing filter can be used to perform a weighted average operation on the i-th model vertex and each model vertex in its neighborhood in the direction of the collinear vertex path to obtain the skin update weight corresponding to the i-th model vertex in the collinear vertex path.

[0088] In this way, by using Gaussian filtering, the initial skin weight corresponding to the model vertex p in the collinear vertex path and the initial skin weight corresponding to the model vertex in its corresponding neighborhood are smoothed, so that a smoother skin update weight can be obtained, thereby improving the skin smoothness.

[0089] Step S105 , skinning the virtual object according to the skinning update weights corresponding to the model vertices in the three-dimensional mesh model.

[0090] Specifically, the object skeleton corresponding to the virtual object is obtained, and the bone transformation parameters corresponding to the bone joints contained in the object skeleton are obtained; according to the initial vertex positions corresponding to the model vertices in the three-dimensional mesh model, the skinning update weights and the bone transformation parameters, the vertex update positions corresponding to the model vertices in the three-dimensional mesh model are determined; according to the vertex update positions corresponding to the model vertices in the three-dimensional mesh model, the object skeleton is bound to the three-dimensional mesh model to obtain the skinning result corresponding to the virtual object, and then the virtual object can be rendered based on the skinning result to obtain the virtual object form and display it. Among them, the skinning processing involved in this application can be linear blending skinning (LBS), or it can be other skinning methods. The embodiments of this application do not limit the specific method of skinning processing.

[0091] The following describes the skinning process of virtual objects by taking the linear blend skinning method as an example. In the process of making animations for three-dimensional mesh models, it is assumed that the three-dimensional mesh model corresponding to the virtual object is a character model containing 10,000 model vertices. The three-dimensional mesh model can present 80 forms. In order to show the various actions of the virtual object, it is necessary to store the positions of 10,000×80 model vertices, which is very storage-intensive. Linear blend skinning can calculate the position of each model vertex through rigid body rotation and skin weights, which can greatly reduce the storage space of the three-dimensional mesh model in skinning processing. Please refer to Figure 7, which is a schematic diagram of skinning processing provided by an embodiment of the present application; as shown in Figure 7, assuming that the virtual object is a character in the game, the initial vertex position corresponding to the vertex (model vertex) at its elbow can be recorded as v i The vertex position of the elbow is affected by the forearm and upper arm joints, and the influence sizes are recorded as w i,1 and w i,2 , the final position of the vertex at the elbow (updated vertex position) can be obtained by weighting the rotation T of the two joints of the forearm and the upper arm; wherein, the calculation process of the vertex updated position corresponding to the vertex at the elbow can be shown as the following formula (3):

[0092] Among them, v in formula (3) iIndicates the initial vertex position corresponding to the vertex at the elbow of the virtual object, w i,k represents the skin update weight corresponding to the vertex at the elbow, as shown in Figure 7, w i,1 Indicates the influence weight of the forearm joint on the vertex at the elbow, w i,2 Indicates the influence weight of the upper arm joint on the vertex at the elbow; n_bones indicates the number of bone joints associated with the position of the vertex at the elbow. Here, the value of n_bones corresponding to the vertex at the elbow can be 2; v i 'Indicates the updated position of the vertex corresponding to the elbow vertex of the virtual object, T k = represents the bone transformation parameters corresponding to the vertex at the elbow, i.e., the rotation of the two bone joints of the forearm and the upper arm. As shown in FIG7 , T1 represents the rotation of the forearm joint, i.e., the bone transformation parameters of the forearm joint, and T2 represents the rotation of the upper arm joint, i.e., the bone transformation parameters of the upper arm joint. As shown in FIG7 , the initial vertex position corresponding to the vertex at the elbow is the position v in the virtual object's form 60a. i As shown, the virtual object is skinned based on the smoothed skin update weights, and the calculated vertex update positions can be as shown in the virtual object's shape 60b. i 'shown.

[0093] In this way, the linear blend skinning method is used to skin the virtual object based on the skin update weights corresponding to the model vertices, which can ensure that the resulting skinning effect is more realistic and natural, and can reduce the storage space of the three-dimensional mesh model in the skinning process.

[0094] In an embodiment of the present application, by obtaining a three-dimensional mesh model corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model, the first shape polygon pairs in the three-dimensional mesh model are merged into second shape polygons to obtain a candidate mesh model; based on the half-edge structure data corresponding to the candidate mesh model, a collinear vertex path is searched on the second shape polygon, and the initial skin weights corresponding to the model vertices in the collinear vertex path are smoothed according to the direction of the collinear vertex path to obtain skin update weights, thereby repairing the uneven skin weights in the three-dimensional mesh model and improving the weight smoothness of the model vertices; skinning the virtual object based on the skin update weights corresponding to the model vertices can improve the skinning effect of the virtual object.

[0095] Please refer to Figure 8, which is a second flow chart of a data processing method provided in an embodiment of the present application. It is understood that the data processing method can be executed by a computer device, which can be the terminal device 10a in the data processing system shown in Figure 1, or the server 10b in the data processing system shown in Figure 1, and this application does not limit this. The data processing method can include the following steps S201 to S212:

[0096] Step S201 : obtaining a three-dimensional mesh model corresponding to the virtual object, and obtaining initial skinning weights corresponding to model vertices in the three-dimensional mesh model.

[0097] The specific implementation process of step S201 can refer to step S101 in the embodiment corresponding to FIG3 , and will not be described again here.

[0098] Step S202: determine a first shape polygon set in the three-dimensional mesh model, and obtain a second shape evaluation coefficient corresponding to a candidate polygon consisting of each group of first shape polygon pairs in the first shape polygon set; the two first shape polygons included in the first shape polygon pair have shared edges in the three-dimensional mesh model, and the second shape evaluation coefficient is used to measure the matching degree between the candidate polygon and the rectangle.

[0099] Specifically, a first-shape polygon set can be formed using first-shape polygons in a 3D mesh model. This first-shape polygon set can include all first-shape polygons in the 3D mesh model, or can only include first-shape polygons in a specified model region of the 3D mesh model. For example, a user can specify a vertex region in the 3D mesh model that requires skin weight smoothing (hereinafter referred to as the "to-be-processed vertex region"). In this way, the computer device only needs to repair the skin weights corresponding to the model vertices in the "to-be-processed vertex region" without repairing other model vertices in the 3D mesh model. In one or more embodiments, a 3D mesh model and a model region selection control can be displayed on a virtual object's skinning page. In response to a triggering operation via the model region selection control, the model region selected by the triggering operation is determined as the to-be-processed vertex region in the 3D mesh model. The first-shape polygon set is formed using the first-shape polygons contained in the "to-be-processed vertex region." This improves the flexibility of skin weight smoothing processing, allowing skin weights corresponding to model vertices in a specific region of the 3D mesh model to be smoothed according to the user's actual needs, saving related processing resources and ensuring that the user's skinning requirements for the virtual object are met.

[0100] After obtaining the first shape polygon set corresponding to the three-dimensional mesh model, the candidate polygons composed of each group of adjacent first shape polygons in the first shape polygon set (that is, the two first shape polygons included in each first shape polygon pair) can be added to the third candidate polygon set; the vertex set corresponding to the candidate polygon q in the third candidate polygon set (which can be considered as any candidate polygon in the third candidate polygon set) is obtained, and the first shape evaluation coefficient corresponding to each of the multiple first shape polygons composed of the model vertices in the vertex set is obtained (for ease of understanding, the first shape evaluation coefficient can be recorded as α), and the first shape evaluation coefficient is used to measure the matching degree between the first shape polygon (for example, a triangle) and the equilateral polygon (for example, an equilateral triangle); further, the second shape evaluation coefficient corresponding to the candidate polygon q can be determined based on the first shape evaluation coefficient corresponding to each of the multiple first shape polygons composed of the model vertices in the vertex set (for ease of understanding, the second shape evaluation coefficient can be recorded as β), and the second shape evaluation coefficient is used to measure the matching degree between the candidate polygon and the rectangle.

[0101] In one or more embodiments, the process of obtaining the first shape evaluation coefficient corresponding to the first shape polygon may include: obtaining the first shape polygon j among multiple first shape polygons composed of model vertices contained in the vertex set; obtaining the polygon area corresponding to the first shape polygon j, and obtaining the sum of the squares of the side lengths corresponding to the first shape polygon j; determining the first shape evaluation coefficient corresponding to the first shape polygon j based on the ratio between the polygon area and the sum of the squares of the side lengths.

[0102] The following example illustrates the case where the first shape polygon in a three-dimensional mesh model is a triangle. The first shape evaluation coefficient α can be used to measure the degree of matching between the triangular mesh and the equilateral triangle in the three-dimensional mesh model. Assuming that the first shape polygon j can be represented by triangle ABC, the first shape evaluation coefficient α corresponding to the first shape polygon j can be expressed as follows:

[0103] Wherein, α(ABC) in formula (4) represents the first shape evaluation coefficient corresponding to the first shape polygon j (i.e., triangle ABC); It can be used to represent the area (polygon area) corresponding to the first shape polygon j (triangle ABC); that is, the area of ​​triangle ABC can be any two adjacent edge vectors in the triangle ABC and the normal of the plane CAB in which they are located The dot product between them, such as the vector in formula (4) vector And the normal of the CAB surface The dot product between them can be used to express the area of ​​triangle ABC. ∥‖CA∥‖ represents the vector The modulus is the side length CA of the first shape polygon j (triangle ABC); ‖CA‖ 2 +‖AB‖ 2 +‖BC‖ 2 Represents the sum of the squares of the side lengths corresponding to the first shape polygon j (triangle ABC).

[0104] Please refer to Figure 9, which is a schematic diagram of calculating the first shape evaluation coefficient corresponding to a different first shape polygon provided in an embodiment of the present application. As shown in Figure 9, the first shape evaluation coefficient α corresponding to the equilateral triangle 70a is 1; the first shape evaluation coefficient α corresponding to the right triangle 70b with an angle of 45° (degrees) is 0.866; the first shape evaluation coefficient α corresponding to the isosceles triangle 70c with three angles of 30°, 75°, and 75° is 0.7637; the first shape evaluation coefficient α corresponding to the right triangle 70d with angles of 30° and 60° is 0.75. It can be understood that the different types of polygons shown in Figure 9 are only examples of the first shape polygon type. In the embodiment of the present application, the first shape evaluation coefficient corresponding to each triangle can be calculated by the above formula (4).

[0105] In this way, through the above method, the first shape evaluation coefficient corresponding to the first shape polygon is calculated based on the polygon area and the sum of the squares of the side lengths corresponding to the first shape polygon, which can ensure that the calculated first shape evaluation coefficient can more accurately reflect the degree of matching between the first shape polygon and the equilateral polygon. Accordingly, the second shape evaluation coefficient corresponding to the candidate polygon is determined based on the first shape evaluation coefficient, which is conducive to ensuring the accuracy of the second shape evaluation coefficient.

[0106] It can be understood that the first shape evaluation coefficient α of a first shape polygon (triangle) is uniquely determined, that is, a first shape polygon uniquely corresponds to a first shape evaluation coefficient, and the value range of the first shape evaluation coefficient α is 0 to 1 (the maximum value is 1). The larger the first shape evaluation coefficient α, the closer the first shape polygon is to an equilateral triangle. By calculating the first shape evaluation coefficient α corresponding to each of the multiple first shape polygons divided by any candidate polygon in the third candidate polygon set (such as candidate polygon q), and then based on the first shape evaluation coefficient α corresponding to each of the multiple first shape polygons, the second shape evaluation coefficient β corresponding to the candidate polygon q is determined. For example, when the first shape polygon is a triangle and the candidate polygon is a quadrilateral, a candidate polygon can include 4 triangles, and then the second shape evaluation coefficient β of the candidate polygon can be calculated based on the first shape evaluation coefficient α corresponding to each of the four triangles.

[0107] In one or more embodiments, assuming that the candidate polygon q is a quadrilateral, the multiple first shape polygons formed by the model vertices in the vertex set corresponding to the candidate polygon q include triangle t1, triangle t2, triangle t3 and triangle t4; the process of obtaining the second shape evaluation coefficient corresponding to the candidate polygon q (any candidate polygon in the third candidate polygon set) may include: obtaining the first coefficient product between the first shape evaluation coefficient corresponding to triangle t1 and the first shape evaluation coefficient corresponding to triangle t2, and obtaining the second coefficient product between the first shape evaluation coefficient corresponding to triangle t3 and the first shape evaluation coefficient corresponding to triangle t4; determining the ratio between the second coefficient product and the first coefficient product as the second shape evaluation coefficient corresponding to the candidate polygon q; wherein, the first shape evaluation coefficients corresponding to triangle t1 and triangle t2 are greater than or equal to the first shape evaluation coefficients corresponding to triangle t3 and triangle t4, such as the first shape evaluation coefficients corresponding to triangle t1, triangle t2, triangle t3 and triangle t4 are in the order from large to small: the first shape evaluation coefficient of triangle t1, the first shape evaluation coefficient of triangle t2, the first shape evaluation coefficient of triangle t3, and the first shape evaluation coefficient of triangle t4.

[0108] Please refer to Figure 10, which is a schematic diagram of the calculation of the second shape evaluation coefficient corresponding to a candidate polygon provided in an embodiment of the present application. Assuming that the candidate polygon q in the third candidate polygon set is the quadrilateral ABCD shown in Figure 10, the vertex set corresponding to the quadrilateral ABCD may include model vertex A, model vertex B, model vertex C, and model vertex D; four model vertices in the vertex set can form four triangles, which are respectively recorded as triangle ABC (such as the aforementioned triangle t1), triangle ACD (such as the aforementioned triangle t2), triangle ABD (such as the aforementioned triangle t3), and triangle BCD (such as the aforementioned triangle t4). The second shape evaluation coefficient corresponding to the quadrilateral ABCD can be shown as the following formula (5):

[0109] In formula (5), β(ABCD) represents the second shape evaluation coefficient corresponding to quadrilateral ABCD, α(ABD) represents the first shape evaluation coefficient corresponding to triangle ABD, α(BCD) represents the first shape evaluation coefficient corresponding to triangle BCD, α(ABC) represents the first shape evaluation coefficient corresponding to triangle ABC, and α(ACD) represents the first shape evaluation coefficient corresponding to triangle ACD; wherein, α(ABC) ≥ α(ACD) ≥ α(ABD) ≥ α(BCD).

[0110] Please refer to Figure 11, which is a schematic diagram of the second shape evaluation coefficient corresponding to a different candidate polygon provided in an embodiment of the present application. If the candidate polygon q in the third candidate polygon set is shown in Figure 80a in Figure 11, the second shape evaluation coefficient β corresponding to the candidate polygon q is 1, that is, the candidate polygon q at this time is a rectangle. If the candidate polygon q is shown in Figure 80b in Figure 11, the second shape evaluation coefficient β corresponding to the candidate polygon q is 0, that is, the candidate polygon q is not a quadrilateral. If the candidate polygon q is shown in Figure 80c in Figure 11, the second shape evaluation coefficient β corresponding to the candidate polygon q is <0, that is, the candidate polygon q is approximately a triangular pyramid. If the candidate polygon q is shown in Figure 80d in Figure 11, the second shape evaluation coefficient β corresponding to the candidate polygon q is 0.36, and the candidate polygon q is a rhombus. If the candidate polygon q is shown in Figure 80e in Figure 11, the second shape evaluation coefficient β corresponding to the candidate polygon q is 0.4, and the candidate polygon q is a quadrilateral with two right angles and one 45° angle. If the candidate polygon q is shown in figure 80f in FIG11 , the second shape evaluation coefficient β corresponding to the candidate polygon q is 0.5898. In this case, the candidate polygon q is a quadrilateral with one right angle and one angle of 75°. It is understood that the different types of polygons shown in FIG11 are merely examples of the candidate polygon types. In the embodiment of the present application, the second shape evaluation coefficient corresponding to each candidate polygon in the third candidate polygon set can be calculated using the above formulas (4) and (5).

[0111] Thus, through the above method, for a quadrilateral candidate polygon q, the second shape evaluation coefficient corresponding to the candidate polygon q is calculated based on the first shape evaluation coefficients corresponding to the four triangles formed by the four model vertices in its corresponding vertex set. This ensures that the calculated second shape evaluation coefficient has high accuracy and more accurately reflects the degree of match between the candidate polygon q and the rectangle, thereby facilitating the determination of the second shape polygon. Step S203: Obtain the dihedral angle between the two first shape polygons in each candidate polygon, and use the candidate polygons whose dihedral angles are greater than the angle threshold to form the first candidate polygon set.

[0112] Specifically, the dihedral angle between the two first-shape polygons contained in each candidate polygon in the third candidate polygon set can be obtained. The two first-shape polygons here can refer to two adjacent first-shape polygons (such as two adjacent triangles) that constitute the candidate polygon in the three-dimensional mesh model; the dihedral angle can refer to the angle between the planes on which the two first-shape polygons combined to form the candidate polygon are located. If the dihedral angle between the two first-shape polygons contained in the candidate polygon q in the third candidate polygon set is greater than the angle threshold, the candidate polygon q can be added to the first candidate polygon set, that is, the first candidate polygon set is a subset of the third candidate polygon set.

[0113] The angle threshold can be set according to the actual needs of the application scenario. For example, the angle threshold can be set to 135°. When the dihedral angle between two adjacent first-shape polygons is greater than the angle threshold (such as 135°), the two adjacent first-shape polygons can be considered to be approximately on the same plane. When the dihedral angle between two adjacent first-shape polygons is less than or equal to the angle threshold (such as 135°), the two adjacent first-shape polygons can be considered not to be on the same plane, and the candidate polygon formed by the combination of the two first-shape polygons is not a quadrilateral, but an approximate triangular pyramid. In other words, the first candidate polygon set refers to the set obtained after filtering out the candidate polygons that are approximate triangular pyramids from the third candidate polygon set.

[0114] Step S204 : using candidate polygons that overlap with the candidate polygon q in the first candidate polygon set, to form a second candidate polygon set corresponding to the candidate polygon q; the second candidate polygon set is a subset of the first candidate polygon set.

[0115] Specifically, for each candidate polygon in the first candidate polygon set, other candidate polygons in the first candidate polygon set that have overlapping areas with the candidate polygon are determined, and then the other candidate polygons are used to form a second candidate polygon set corresponding to the candidate polygon, that is, one candidate polygon corresponds to one second candidate polygon set. For example, for any candidate polygon in the first candidate polygon set (for example, candidate polygon q), all candidate polygons in the first candidate polygon set that have overlapping areas with the candidate polygon q can be obtained, and the second candidate polygon set corresponding to the candidate polygon q can be formed using all the candidate polygons with overlapping areas, that is, each candidate polygon in the first candidate polygon set can correspond to one second candidate polygon set, and all second candidate polygon sets are subsets of the first candidate polygon set.

[0116] It is understood that a first-shape polygon in a 3D mesh model (e.g., first-shape polygon j) may have multiple adjacent first-shape polygons. In this case, first-shape polygon j can be combined with all of its adjacent first-shape polygons to form multiple candidate polygons. In this case, there must be an overlapping area between the multiple candidate polygons formed by first-shape polygon j and its adjacent first-shape polygons. This overlapping area is first-shape polygon j. In other words, each first-shape polygon in a 3D mesh model can be combined into one or more candidate polygons.

[0117] Step S205: If the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the coefficient threshold, and the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the second shape evaluation coefficient corresponding to each candidate polygon contained in the second candidate polygon set corresponding to the candidate polygon q, then the candidate polygon q is determined to be a second shape polygon formed by merging the first shape polygon pair, and a candidate mesh model is obtained.

[0118] Specifically, if the second shape evaluation coefficient β corresponding to any candidate polygon in the first candidate polygon set (for example, candidate polygon q) is greater than the coefficient threshold, and the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the second shape evaluation coefficient corresponding to each candidate polygon contained in the corresponding second candidate polygon set, then the candidate polygon q can be used as the second shape polygon successfully merged in the three-dimensional mesh model, and the shared edge between the two first shape polygons constituting the second shape polygon can be removed. By performing the same operation as the aforementioned candidate polygon q for each candidate polygon in the first candidate polygon set, a candidate mesh model can be obtained. The above-mentioned coefficient threshold can be set according to the actual needs of the application scenario. For example, the coefficient threshold can be set to 0.37.

[0119] Optionally, if the second shape evaluation coefficient β corresponding to the candidate polygon q is less than or equal to the coefficient threshold, or the second shape evaluation coefficient corresponding to the candidate polygon q is less than or equal to the second shape evaluation coefficient corresponding to at least one candidate polygon in its corresponding second candidate polygon set, it can be determined that the two adjacent first shape polygons combined into the candidate polygon q cannot be merged.

[0120] In an embodiment of the present application, by traversing the second shape evaluation coefficient β of the candidate polygon composed of each group of adjacent first shape polygons in the three-dimensional mesh model, if the second shape evaluation coefficient β of the candidate polygon satisfies the following three conditions at the same time: ① the second shape evaluation coefficient β is greater than the coefficient threshold (such as 0.37); ② the dihedral angle between the two adjacent first shape polygons that constitute the candidate polygon is greater than the angle threshold (such as 135°); ③ the second shape evaluation coefficient β corresponding to the current candidate polygon is greater than the second shape evaluation coefficient β of each candidate polygon in its corresponding second candidate polygon set, then the current candidate polygon can be used as the final merged second shape polygon, and the diagonal line of the second shape polygon is removed in the three-dimensional mesh model, that is, the edge shared by the two first shape polygons that have been successfully merged into the second shape polygon is removed, and the edge of the second shape polygon is retained, and finally the candidate mesh model can be obtained, as shown in the candidate mesh model 20b in the embodiment corresponding to Figure 2 above, or as shown in the mesh model 30a in the embodiment corresponding to Figure 4 above.

[0121] Please refer to Figure 12, which is a schematic diagram of the merging of a first shape polygon pair in a three-dimensional mesh model provided by an embodiment of the present application. Assume that the candidate polygon q in the first candidate polygon set is as shown in the quadrilateral BCDF in Figure 12, and the quadrilateral BCDF can be composed of a triangle BCD and a triangle BDF in the three-dimensional mesh model, and the triangle BCD and the triangle BDF are adjacent first shape polygons in the three-dimensional mesh model. The second candidate polygon set corresponding to the quadrilateral BCDF may include quadrilateral BDEF and quadrilateral ABDF, that is, the candidate polygons that have overlapping areas with the quadrilateral BCDF may include quadrilateral BDEF and quadrilateral ABDF. When the quadrilateral BCDF is obtained by merging, it may affect the merging of quadrilateral BDEF and quadrilateral ABDF. When the second shape evaluation coefficient β of quadrilateral BCDF is greater than the coefficient threshold, and the dihedral angle between triangle BCD and triangle BDF is greater than the angle threshold, and the second shape evaluation coefficient β of quadrilateral BCDF is greater than the second shape evaluation coefficient β of all quadrilaterals with which it has overlapping areas (that is, the second shape evaluation coefficient β of quadrilateral BCDF is greater than the second shape evaluation coefficient β of quadrilateral BDEF and quadrilateral ABDF respectively), then quadrilateral BCDF can be determined as a second shape polygon, and the diagonal BD in the three-dimensional mesh model can be removed. By processing each candidate polygon in the three-dimensional mesh model in this way, a candidate mesh model can be obtained.

[0122] In this way, through the above method, for each candidate polygon composed of each group of adjacent first-shape polygons in the three-dimensional mesh model, based on the relationship between the second shape evaluation coefficient corresponding to the candidate polygon and the coefficient threshold, the angle between the two first-shape polygons in the candidate polygon, and the relationship between the second shape evaluation coefficient corresponding to the candidate polygon and the second shape evaluation coefficients corresponding to all other candidate polygons with overlapping areas, it is determined whether the candidate polygon can be used as the merged second-shape polygon, thereby ensuring that each second-shape polygon in the obtained candidate mesh model has high quality, that is, realizing the reasonable merging of the original first-shape polygons in the three-dimensional mesh model, which is beneficial to improving the smoothing effect of the skin weight.

[0123] Step S206: Convert the edges in the candidate mesh model into two half-edges with opposite directions, generate half-edge structure data corresponding to the candidate mesh model, determine the starting half-edge in the boundary half-edges of the half-edge structure data, and obtain the first adjacent half-edge set of the starting half-edge in the half-edge structure data according to the direction of the starting half-edge.

[0124] Specifically, after obtaining the candidate grid model corresponding to the virtual object, the edges in the candidate grid model can be converted into two half-edges with opposite directions to generate half-edge structure data corresponding to the candidate grid model. The generation process of the half-edge structure data can be as described in the embodiment corresponding to Figure 5 above, and will not be repeated here.

[0125] Furthermore, a starting half-edge can be determined in the half-edge structure data. This starting half-edge can be considered the starting point for searching for a collinear vertex path in the three-dimensional mesh model. This starting half-edge can be the boundary half-edge in the half-edge structure data. Furthermore, the first set of adjacent half-edges for the starting half-edge in the half-edge structure data can be obtained based on the direction of the starting half-edge. As shown in Figure 5 , assuming that half-edge 40c in half-edge structure data 40b is the starting half-edge, the first set of adjacent half-edges corresponding to the starting half-edge can include the half-edges from model vertex D to model vertex C.

[0126] Step S207: If there is a first adjacent half-edge in the first adjacent half-edge set that is collinear with the starting half-edge, the starting half-edge and the first adjacent half-edge are determined as an initial collinear path, and a second adjacent half-edge set of the first adjacent half-edge in the half-edge structure data is obtained according to the direction of the first adjacent half-edge.

[0127] Specifically, the half side with the smallest angle with the starting half side in the first adjacent half side set can be determined as the first adjacent half side, that is, the next half side with the same direction and the smallest angle of the starting half side is determined from the first adjacent half side set. If the cosine of the angle between the starting half side and the first adjacent half side is greater than the cosine threshold (which can be set according to the actual needs of the application scenario, such as the cosine threshold can be set to 0.95), it can be determined that the starting half side and the first adjacent half side are collinear; if the cosine of the angle between the starting half side and the first adjacent half side is less than or equal to the cosine threshold, it is determined that the starting half side and the first adjacent half side are not collinear. In this way, based on the cosine value of the angle between the starting half side and the first adjacent half side, it is determined whether the starting half side and the first adjacent half side are collinear, which helps to improve the accuracy and reliability of the collinear path searched, that is, to ensure that the half sides included in the collinear path searched satisfy the collinear relationship.

[0128] When it is detected that a first adjacent half-edge in the first adjacent half-edge set is collinear with the starting half-edge, the starting half-edge and the first adjacent half-edge can be determined as an initial collinear path, and then the second adjacent half-edge set corresponding to the first adjacent half-edge can be obtained in the half-edge structure data according to the direction of the first adjacent half-edge; the second adjacent half-edge set can be a set of the next half-edge with the same direction of the first adjacent half-edge in the half-edge structure data.

[0129] Step S208: If there is no second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge, or if the second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge is the starting half-edge, then the initial collinear path is determined as a candidate collinear path in the half-edge structure data.

[0130] Specifically, the next half-edge of the first adjacent half-edge with the same direction and the smallest angle can be determined in the second adjacent half-edge set, and the half-edge with the smallest angle with the first adjacent half-edge in the second adjacent half-edge set can be determined as the second adjacent half-edge. If the cosine of the angle between the first and second adjacent half-edges is greater than a cosine threshold, the second adjacent half-edge can be determined to be collinear with the first adjacent half-edge. The second adjacent half-edge can then be added to the initial collinear path. The initial collinear path can then be further expanded by traversing (or accessing) to determine whether the next half-edge of the second adjacent half-edge with the same direction and the smallest angle is collinear with the second adjacent half-edge.

[0131] If the cosine of the angle between the first adjacent half-edge and each second adjacent half-edge in the set of second adjacent half-edges is less than or equal to the cosine threshold, or if the second adjacent half-edge is the same as the starting half-edge, the search for the initial collinear path can be stopped, and the initial collinear path found at this point can be determined as the candidate collinear path for which the search operation has completed, thus completing the search for a single collinear path. Furthermore, a new starting half-edge can be determined in the half-edge structure data, and the above operation can be repeated until all candidate collinear paths in the half-edge structure data have been searched.

[0132] Step S209 : Setting traversed flags for the half-edges included in the candidate collinear paths until all the half-edges included in the half-edge structure data are set with traversed flags, thereby obtaining a plurality of candidate collinear paths in the half-edge structure data.

[0133] Specifically, after searching for a candidate collinear path from the half-edge structure data, a traversed flag can be set for all half-edges included in the candidate collinear path. This can prevent the half-edges in the half-edge structure data from being traversed twice, thereby improving the half-edge traversal rate in the half-edge structure data. When all half-edges in the half-edge structure data are set with a traversed flag, the collinear path search operation on the half-edge structure data can be stopped, i.e., the collinear path search operation on the half-edge structure data has been completed. Through the above operation, multiple candidate collinear paths in the half-edge structure data can be obtained. Since all half-edges in the half-edge structure data are directional edges, the candidate grid model is converted into the half-edge structure data. Based on the half-edge structure data, the query of adjacent edges can be quickly implemented. In other words, searching for collinear paths in a three-dimensional grid model based on the half-edge structure data can improve the search efficiency of collinear paths.

[0134] In step S210 , if there are candidate collinear paths L1 and candidate collinear paths L2 among the multiple candidate collinear paths that are collinear with the starting half-edge, the candidate collinear paths L1 and L2 are merged into a collinear vertex path.

[0135] Specifically, after obtaining multiple candidate collinear paths based on the half-edge structure data search, the multiple candidate collinear paths can be merged; for example, if the candidate collinear path L1 and the candidate collinear path L2 in the multiple candidate collinear paths have the same starting half-edge, then the candidate collinear path L1 and the candidate collinear path L2 can be merged into a collinear vertex path, thereby obtaining the collinear vertex path in the three-dimensional mesh model.

[0136] In one or more embodiments, the collinear vertex paths searched from a 3D mesh model can be applied in scenarios involving smooth skin weighting, or in scenarios involving extracting the main structure of a 3D model, or in scenarios involving extracting the principal axis of a 3D model and simplifying the structure of a 3D model. This application does not limit the specific application scenarios of the collinear vertex paths. For ease of understanding, this application embodiment uses the application of the collinear vertex paths in a scenario involving smooth skin weighting as an example for illustration.

[0137] Step S211 , smoothing the initial skin weights corresponding to the model vertices included in the collinear vertex path according to the path direction of the collinear vertex path in the half-edge structure data, to obtain the skin update weights corresponding to the model vertices.

[0138] Step S212 , skinning the virtual object according to the skinning update weights corresponding to the model vertices in the three-dimensional mesh model.

[0139] The specific implementation process of step S211 and step S212 can refer to the relevant description of step S104 and step S105 in the embodiment corresponding to Figure 3 above, and will not be repeated here.

[0140] It is understood that if the acquired three-dimensional mesh model includes a first-shape polygonal mesh, adjacent first-shape polygons (such as triangles) in the three-dimensional mesh model can be merged, and the shared edges between the merged first-shape polygon pairs can be removed to obtain a candidate mesh model composed of second-shape polygons (such as quadrilaterals). The process of converting the three-dimensional mesh model to a candidate mesh model can be considered a pruning operation, which can avoid searching for unnecessary oblique edges (for example, diagonals of the merged second-shape polygons) during the search for collinear vertex paths, thereby improving the search efficiency of collinear vertex paths. Based on the half-edge structure data corresponding to the candidate mesh model, a collinear vertex path is searched on the second shape polygon contained in the candidate mesh model. By smoothing the initial skin weights of the model vertices contained in the collinear vertex path, the smoothness of the skin weight can be improved; specifically, after searching for the warp and weft wiring (longitudinal wiring and transverse wiring) in the candidate mesh model, the weight smoothing results in the transverse axis direction will restrict each other, so that the effect after skinning is better, and the wiring is almost completely straight. The skinning effect can be seen in Figure 13. Figure 13 is a schematic diagram of the effect of skinning based on skin update weights provided in an embodiment of the present application. The three-dimensional model 90a shown in Figure 13 is an effect display of skinning a virtual object using the initial skin weights.

[0141] If, after obtaining the original three-dimensional mesh model, the computer device does not merge the adjacent first shape polygons in the three-dimensional mesh model, but directly searches for the collinear vertex path on the original three-dimensional mesh model, and then smoothes the initial skin weights corresponding to the model vertices contained in the collinear vertex path, and skins the virtual object based on the smoothed skin weights, the obtained effect is shown in the three-dimensional model 90b in Figure 13.

[0142] After obtaining the original three-dimensional mesh model, the computer device first merges the adjacent first shape polygons in the three-dimensional mesh model to obtain a candidate mesh model; then, based on the half-edge structure data corresponding to the candidate mesh model, the collinear vertex path is searched in the candidate mesh model, and the initial skin weights corresponding to the model vertices contained in the collinear vertex path are smoothed to obtain the skin update weights corresponding to the model vertices, and the virtual object is skinned based on the skin update weights. The obtained effect is shown in the three-dimensional model 90c in Figure 13.

[0143] By comparing the three-dimensional model 90b and the three-dimensional model 90c shown in Figure 13, one can intuitively perceive the necessity of merging adjacent first-shape polygons in the three-dimensional mesh model. By merging adjacent first-shape polygons in the three-dimensional mesh model, the skinning processing effect can be improved.

[0144] It should be noted that if the search for collinear vertex paths is performed directly within the 3D mesh model without merging adjacent first-shape polygons, the cosine threshold for determining collinear vertices (which can essentially be collinear half-edges) becomes more stringent. Due to the variability of positions in 3D space, two vectors with a smaller angle (e.g., two half-edges in the half-edge structure data) may not necessarily be more collinear. In this case, the angle limit between collinear half-edges needs to be increased, such as to 0.99 or 0.98. Otherwise, undesirable curves are easily found, resulting in only short collinear vertex paths. By introducing the step of merging adjacent first-shape polygons within the 3D mesh model, a relatively regular candidate mesh model can be obtained. Accordingly, the cosine threshold for determining collinear vertices (which can actually be collinear half-edges) can be appropriately relaxed. Even with this relaxation (e.g., the cosine threshold can be set to 0.95), good skinning results can still be achieved. In other words, by merging adjacent first-shape polygons in the three-dimensional mesh model, the robustness of the collinear vertex path search method can be improved.

[0145] Optionally, the embodiment of the present application is verified on 26 test samples in a game production scenario. First, the 26 test samples are skinned using the current automatic skinning tool (the initial skin weights can be obtained), and then the initial skin weights are repaired using the solution provided by the embodiment of the present application. The number of abnormal samples with uneven initial skin weights can be reduced from 19 to 3, and the repair ratio can reach 84.21%, thereby improving the final skin smoothness, reducing the problems of interlacing and unevenness of the three-dimensional model during movement, and thereby improving the rendering display effect of the virtual object.

[0146] It is understandable that the skin weight smoothing processing scheme provided in the embodiments of the present application can be applied in the fields of game production, 3D modeling, etc. For example, the skin weight smoothing processing scheme can be specifically applied in the scene of making virtual objects (various types of game characters, such as player characters, non-player characters, props, etc.) in games, and can also be applied in the scene of making virtual anchors in live broadcasts, and can also be applied in the modeling scene of any object, and this application does not limit this.

[0147] In one or more embodiments, a three-dimensional mesh model can be created for a virtual object in a game (or a virtual anchor in a live broadcast, or a real object, etc.) in a three-dimensional model making software, and a suitable object skeleton is selected for the three-dimensional mesh model. By adjusting the size and shape of the object skeleton, the object skeleton is added to the three-dimensional mesh model. In order to allow the object skeleton to drive the three-dimensional mesh model to produce reasonable movement, skin weights can be configured for the model vertices in the three-dimensional mesh model (used to characterize the weight of the influence of the skeletal joints contained in the object skeleton on the model vertices in the three-dimensional mesh model). Skinning is performed according to the skin weights corresponding to each model vertex in the three-dimensional mesh model, so that the three-dimensional mesh model of the virtual object can be made to move, that is, different forms of the virtual object can be achieved. It is understandable that if the skin weights configured for the model vertices in the three-dimensional mesh model have non-smooth problems such as jumps, then the virtual object may have problems such as deformity and wiring tortuosity when moving. The skin weight smoothing processing scheme proposed in the embodiment of the present application can smooth the skin weights of the model vertices and automatically repair the skin weights that have non-smooth problems.

[0148] Please refer to Figure 14, which is a scene diagram of repairing the skin weight of a three-dimensional mesh model provided by an embodiment of the present application. As shown in Figure 14, a three-dimensional mesh model 100a can be created in a three-dimensional model making software, and an object skeleton 100b can be selected for the three-dimensional mesh model 100a. The three-dimensional mesh model 100a and the object skeleton 100b are combined to obtain a three-dimensional model 100c; in the process of combining the three-dimensional mesh model 100a and the object skeleton 100b, the position of the bone joints in the object skeleton 100b (for example, the dots in the area 100h shown in Figure 14) can be adjusted, and the shape and size of the object skeleton 100b can be changed so that the object skeleton 100b can fit with the three-dimensional mesh model 100a. The three-dimensional mesh model with the adjusted object skeleton 100b added is shown as the three-dimensional model 100c in Figure 14.

[0149] In order to allow the object skeleton 100b to drive the three-dimensional model 100c to produce reasonable movement, skin weights (the skin weights herein may be referred to as initial skin weights) may be configured for the model vertices in the three-dimensional model 100c. Skinning may be performed based on the initial skin weights corresponding to each model vertex in the three-dimensional model 100c, thereby generating a motion animation of the three-dimensional model 100c (which may include different forms of the three-dimensional model 100c). Assume that the motion animation of the three-dimensional model 100c includes the form shown in the three-dimensional model 100d (i.e., raising the left arm while walking), and that the three-dimensional model 100d exhibits problems such as wiring twists and deformities when presenting the current form, as shown in regions 100e and 100f in the three-dimensional model 100d. It can be determined that the initial skin weights corresponding to the three-dimensional model 100c may be non-smooth, resulting in poor display effects after final rendering.

[0150] In this case, the skin weight smoothing solution proposed in the embodiment of the present application can be used to merge the adjacent triangles (first shape polygon pairs) in region 100e and region 100f to obtain a quadrilateral (second shape polygon), and remove the diagonal lines of the quadrilateral to obtain two new three-dimensional mesh regions (i.e., the mesh region after triangle merging of region 100e, and the mesh region after triangle merging of region 100f). Furthermore, collinear vertex paths can be searched in the two new three-dimensional mesh regions, and the initial skin weights corresponding to the model vertices contained in the collinear vertex paths can be smoothed to automatically repair the unevenness of the initial skin weights, thereby obtaining new skin weights (skin update weights); skinning can be performed based on the new skin weights to obtain a three-dimensional model 100g, which solves the problems of deformity and wiring tortuosity presented by regions 100e and 100f on the three-dimensional model 100d, thereby improving the skinning effect. The specific implementation process of smoothing the initial skin weights of the model vertices contained in the region 100e and the region 100f can be found in the relevant description in the embodiment corresponding to FIG8 above, which will not be repeated here.

[0151] In an embodiment of the present application, by obtaining a three-dimensional mesh model corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model, the first shape polygon pairs in the three-dimensional mesh model are merged into second shape polygons to obtain a candidate mesh model; based on the half-edge structure data corresponding to the candidate mesh model, a collinear vertex path is searched on the merged second shape polygon, and the initial skin weights corresponding to the model vertices in the collinear vertex path are smoothed according to the direction of the collinear vertex path to obtain the skin update weights corresponding to the model vertices, thereby repairing the uneven weights in the three-dimensional mesh model and improving the smoothness of the skin weights of the model vertices; skinning the virtual object based on the skin update weights corresponding to the model vertices can improve the skinning effect of the virtual object, and thereby improve the rendering display effect of the virtual object.

[0152] Please refer to Figure 15, which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. It is understood that the data processing device can be applied to the server 10b shown in Figure 1, or can be applied to the terminal device 10a shown in Figure 1, and this application does not limit this. As shown in Figure 15, the data processing device 1 can include a model acquisition unit 101, a polygon merging unit 102, a collinear vertex acquisition unit 103, a weight smoothing processing unit 104, and a skinning processing unit 105.

[0153] The model acquisition unit 101 is used to acquire a three-dimensional mesh model corresponding to the virtual object and to acquire initial skin weights corresponding to model vertices in the three-dimensional mesh model;

[0154] A polygon merging unit 102 is configured to merge a first-shape polygon pair in the three-dimensional mesh model into a second-shape polygon to obtain a candidate mesh model; two first-shape polygons included in the first-shape polygon pair have a shared edge in the three-dimensional mesh model, and the shared edge is removed during the merging process;

[0155] The collinear vertex acquisition unit 103 is used to acquire half-edge structure data corresponding to the candidate mesh model, traverse the half-edges in the half-edge structure data, and obtain collinear vertex paths in the three-dimensional mesh model;

[0156] The weight smoothing processing unit 104 is used to smooth the initial skin weights corresponding to the model vertices contained in the collinear vertex path according to the path direction of the collinear vertex path in the half-edge structure data to obtain the skin update weights corresponding to the model vertices;

[0157] The skinning processing unit 105 is configured to perform skinning processing on the virtual object according to skinning update weights corresponding to model vertices in the three-dimensional mesh model.

[0158] In one or more embodiments, the polygon merging unit 102 is specifically configured to:

[0159] Determining a first-shape polygon set in the three-dimensional grid model, and obtaining a second shape evaluation coefficient corresponding to each candidate polygon consisting of a pair of first-shape polygons in the first-shape polygon set; the second shape evaluation coefficient is used to measure the matching degree between the candidate polygon and the rectangle;

[0160] Obtaining the dihedral angle between two first-shape polygons in each candidate polygon, and using the candidate polygons whose dihedral angles are greater than an angle threshold to form a first candidate polygon set;

[0161] Using candidate polygons that have overlapping areas with the candidate polygon q in the first candidate polygon set, a second candidate polygon set corresponding to the candidate polygon q is formed; the second candidate polygon set is a subset of the first candidate polygon set;

[0162] If the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the coefficient threshold, and the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the second shape evaluation coefficient corresponding to each candidate polygon contained in the second candidate polygon set corresponding to the candidate polygon q, then the candidate polygon q is determined to be a second shape polygon formed by merging the first shape polygon pair.

[0163] In one or more embodiments, the polygon merging unit 102 is specifically configured to:

[0164] In the skinning page of the virtual object, the 3D mesh model and model area selection controls are displayed;

[0165] In response to a trigger operation through a model region selection control, the model region selected by the trigger operation is determined as a vertex region to be processed in the three-dimensional mesh model;

[0166] A first shape polygon set is formed using the first shape polygons included in the vertex area to be processed.

[0167] In one or more embodiments, the polygon merging unit 102 is specifically configured to:

[0168] adding candidate polygons consisting of each set of first-shape polygon pairs in the first-shape polygon set to a third candidate polygon set; the third candidate polygon set includes the first candidate polygon set;

[0169] Obtaining a vertex set corresponding to the candidate polygon q in the third candidate polygon set, and obtaining a first shape evaluation coefficient corresponding to each of a plurality of first shape polygons formed by the model vertices in the vertex set; the first shape evaluation coefficient is used to measure the matching degree between the first shape polygon and the equilateral polygon;

[0170] The second shape evaluation coefficient corresponding to the candidate polygon q is determined based on the first shape evaluation coefficients corresponding to each of a plurality of first shape polygons formed by the model vertices in the vertex set.

[0171] In one or more embodiments, the polygon merging unit 102 is specifically configured to:

[0172] Obtain a first shape polygon j from a plurality of first shape polygons formed by the model vertices included in the vertex set;

[0173] Obtain the polygon area corresponding to the first shape polygon j, and obtain the sum of the squares of the side lengths corresponding to the first shape polygon j;

[0174] A first shape evaluation coefficient corresponding to the first shape polygon j is determined according to the ratio between the polygon area and the sum of the squares of the side lengths.

[0175] In one or more embodiments, the candidate polygon q is a quadrilateral, and the plurality of first shape polygons formed by the model vertices in the vertex set include triangle t1, triangle t2, triangle t3, and triangle t4;

[0176] The polygon merging unit 102 is specifically used for:

[0177] Obtain a first coefficient product between the first shape evaluation coefficient corresponding to triangle t1 and the first shape evaluation coefficient corresponding to triangle t2, and obtain a second coefficient product between the first shape evaluation coefficient corresponding to triangle t3 and the first shape evaluation coefficient corresponding to triangle t4;

[0178] Determine the ratio between the second coefficient product and the first coefficient product as the second shape evaluation coefficient corresponding to the candidate polygon q;

[0179] The first shape evaluation coefficients corresponding to triangle t1 and triangle t2 are greater than or equal to the first shape evaluation coefficients corresponding to triangle t3 and triangle t4.

[0180] In one or more embodiments, the collinear vertex acquisition unit 103 is specifically configured to:

[0181] Converting edges in the candidate mesh model into two half-edges with opposite directions to generate half-edge structure data corresponding to the candidate mesh model; determining a starting half-edge among the boundary half-edges in the half-edge structure data, and obtaining the first adjacent half-edge set of the starting half-edge in the half-edge structure data according to the direction of the starting half-edge;

[0182] If there is a first adjacent half-edge in the first adjacent half-edge set that is collinear with the starting half-edge, the starting half-edge and the first adjacent half-edge are determined as an initial collinear path, and a second adjacent half-edge set of the first adjacent half-edge in the half-edge structure data is obtained according to the direction of the first adjacent half-edge.

[0183] If there is no second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge, or if the second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge is the starting half-edge, then determining the initial collinear path as the candidate collinear path in the half-edge structure data;

[0184] Setting a traversed flag for each half-edge included in the candidate collinear path until all half-edges included in the half-edge structure data are set to have a traversed flag, thereby obtaining multiple candidate collinear paths in the half-edge structure data;

[0185] If there are candidate collinear paths L1 and candidate collinear paths L2 among the multiple candidate collinear paths that are collinear with the starting half-edge, the candidate collinear paths L1 and L2 are merged into a collinear vertex path.

[0186] In one or more embodiments, the data processing device 1 further includes: an adjacent half-edge determining unit 106 , a collinear half-edge determining unit 107 , and a non-collinear half-edge determining unit 108 ;

[0187] an adjacent half-edge determining unit 106 , configured to determine the half-edge in the first adjacent half-edge set that has the smallest angle with the starting half-edge as the first adjacent half-edge;

[0188] a collinear half-edge determining unit 107 , configured to determine that the starting half-edge and the first adjacent half-edge are collinear if the cosine of the angle between the starting half-edge and the first adjacent half-edge is greater than a cosine threshold;

[0189] The non-collinear half-edge determining unit 108 is configured to determine that the starting half-edge and the first adjacent half-edge are not collinear if the cosine of the angle between the starting half-edge and the first adjacent half-edge is less than or equal to a cosine threshold.

[0190] In one or more embodiments, the weight smoothing processing unit 104 is specifically configured to:

[0191] Get the smoothing window corresponding to the three-dimensional mesh model;

[0192] According to the path direction of the collinear vertex path in the half-edge structure data, a smoothing window is slid on the collinear vertex path to obtain the weight average of the initial skinning weights corresponding to the model vertices covered by the smoothing window;

[0193] The weighted average is determined as the skin update weight corresponding to the center vertex covered by the smoothing window.

[0194] In one or more embodiments, the weight smoothing processing unit 104 is specifically configured to:

[0195] Obtaining a smoothing filter corresponding to the three-dimensional mesh model and obtaining a neighborhood corresponding to each model vertex contained in the collinear vertex path; the number of vertices in the neighborhood is associated with the size of the smoothing filter;

[0196] According to the path direction of the collinear vertex path in the half-edge structure data, the initial skin weight corresponding to the model vertex p in the collinear vertex path and the initial skin weight corresponding to the model vertices in the neighborhood corresponding to the model vertex p are filtered through a smoothing filter to obtain a weighted average weight;

[0197] The weighted average weight is determined as the skin update weight corresponding to the model vertex p.

[0198] In one or more embodiments, the skinning processing unit 105 performs skinning processing on the virtual object according to skinning update weights corresponding to model vertices in the three-dimensional mesh model, including:

[0199] Obtain the object skeleton corresponding to the virtual object, and obtain the bone transformation parameters corresponding to the bone joints contained in the object skeleton;

[0200] Determining vertex update positions corresponding to model vertices in the three-dimensional mesh model according to initial vertex positions corresponding to model vertices in the three-dimensional mesh model, skin update weights, and bone transformation parameters;

[0201] According to the vertex update position corresponding to the model vertex in the three-dimensional mesh model, the object skeleton is bound to the three-dimensional mesh model to obtain the skinning result corresponding to the virtual object.

[0202] According to one embodiment of the present application, the steps involved in the data processing method shown above can be executed by the various modules in the data processing device 1 shown in Figure 15. For example, step S101 shown in Figure 3 can be executed by the model acquisition unit 101 shown in Figure 15, step S102 shown in Figure 3 can be executed by the polygon merging unit 102 shown in Figure 15, step S103 shown in Figure 3 can be executed by the collinear vertex acquisition unit 103 shown in Figure 15, step S104 shown in Figure 3 can be executed by the weight smoothing processing unit 104 shown in Figure 15, step S105 shown in Figure 3 can be executed by the skinning processing unit 105 shown in Figure 15, etc.

[0203] According to one embodiment of the present application, the various units in the data processing device 1 shown in Figure 15 can be separately or all combined into one or several units to constitute, or one (some) of the units can be further split into at least two functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by at least two units, or the functions of at least two units can be implemented by one unit. In other embodiments of the present application, the data processing device 1 may also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of at least two units.

[0204] In an embodiment of the present application, by obtaining a three-dimensional mesh model corresponding to the virtual object and the initial skin weights corresponding to the model vertices in the three-dimensional mesh model, the first shape polygon pairs in the three-dimensional mesh model are merged into second shape polygons to obtain a candidate mesh model; based on the half-edge structure data corresponding to the candidate mesh model, a collinear vertex path is searched on the merged second shape polygon, and the initial skin weights corresponding to the model vertices in the collinear vertex path are smoothed according to the direction of the collinear vertex path to obtain the skin update weights corresponding to the model vertices, thereby repairing the uneven skin weights in the three-dimensional mesh model and improving the smoothness of the skin weights of the model vertices; skinning the virtual object based on the skin update weights corresponding to the model vertices can improve the skinning effect of the virtual object, and thereby improve the rendering display effect of the virtual object.

[0205] Please refer to Figure 16, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 16, the computer device 1000 can be the server 10b in the embodiment corresponding to Figure 1, or it can be the terminal device 10a in the embodiment corresponding to Figure 1, and it will not be limited here. For ease of understanding, the embodiment of the present application takes the computer device as an example of a terminal device. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and optionally, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally be at least one storage device located away from the processor 1001. As shown in FIG16 , the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0206] Among them, the network interface 1004 in the computer device 1000 shown in Figure 16 can also provide network communication functions; and the user interface 1003 is mainly used to provide an input interface for the user; it can be understood that the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the data processing method provided in the embodiment of the present application.

[0207] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the data processing method described in either of the embodiments corresponding to FIG. 3 and FIG. 8 , or can execute the data processing device 1 described in the embodiment corresponding to FIG. 15 , and thus will not be described in detail here. Furthermore, the beneficial effects of employing the same method will not be described in detail here either.

[0208] In addition, it should be noted that the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the description of the data processing method in any of the embodiments corresponding to Figures 3 and 8 above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the program instructions can be deployed on a computing device for execution, or executed on multiple computing devices located at one location, or executed on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.

[0209] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor can execute the computer instructions so that the computer device performs the description of the data processing method in the embodiment corresponding to any one of Figures 3 and 8 above, and therefore, will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0210] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different media contents, rather than to describe a specific order. In addition, the terms "including" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules that are not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0211] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0212] The method and related apparatus provided in the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided in the embodiment of the present application, and specifically can be implemented by computer program instructions for each process and / or box of the method flow chart and / or structural diagram, and the combination of the process and / or box in the flow chart and / or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, and the instruction device implements the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the structural diagram.

[0213] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, executed by a computer device, comprising: Acquire a three-dimensional mesh model corresponding to the virtual object, and acquire initial skinning weights corresponding to model vertices in the three-dimensional mesh model; Merging the first shape polygon pairs in the three-dimensional mesh model into second shape polygons to obtain a candidate mesh model; Two first shape polygons included in the first shape polygon pair have a shared edge in the three-dimensional mesh model, and the shared edge is removed during the merging process; Acquire half-edge structure data corresponding to the candidate mesh model, perform traversal processing on the half-edges in the half-edge structure data, and obtain a collinear vertex path in the three-dimensional mesh model; According to the path direction of the collinear vertex path in the half-edge structure data, smoothing the initial skin weights corresponding to the model vertices contained in the collinear vertex path to obtain the skin update weights corresponding to the model vertices; The virtual object is skinned according to skinning update weights corresponding to model vertices in the three-dimensional mesh model.

2. The method according to claim 1, wherein merging the first shape polygon pairs in the three-dimensional mesh model into second shape polygons comprises: Determine a first shape polygon set in the three-dimensional mesh model, and obtain a second shape evaluation coefficient corresponding to a candidate polygon composed of each group of first shape polygon pairs in the first shape polygon set; the second shape evaluation coefficient is used to measure the matching degree between the candidate polygon and the rectangle; Obtaining the dihedral angle between two first-shape polygons in each of the candidate polygons, and using the candidate polygons whose dihedral angles are greater than an angle threshold to form a first candidate polygon set; Using candidate polygons that have overlapping areas with the candidate polygon q in the first candidate polygon set, a second candidate polygon set corresponding to the candidate polygon q is formed; The second candidate polygon set is a subset of the first candidate polygon set; If the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the coefficient threshold, and the second shape evaluation coefficient corresponding to the candidate polygon q is greater than the second shape evaluation coefficient corresponding to each candidate polygon contained in the second candidate polygon set corresponding to the candidate polygon q, then the candidate polygon q is determined to be a second shape polygon formed by merging the first shape polygon pair.

3. The method according to claim 2, wherein determining a first shape polygon set in the three-dimensional mesh model comprises: In the skinning processing page of the virtual object, displaying the three-dimensional mesh model and the model area selection control; In response to a trigger operation through the model region selection control, determining the model region selected by the trigger operation as a vertex region to be processed in the three-dimensional mesh model; The first shape polygon set is formed by using the first shape polygons included in the vertex area to be processed.

4. The method according to claim 2 or 3, wherein obtaining the second shape evaluation coefficient corresponding to the candidate polygon composed of each group of first shape polygon pairs in the first shape polygon set comprises: Adding candidate polygons consisting of each set of first-shape polygon pairs in the first-shape polygon set to a third candidate polygon set; The third candidate polygon set includes the first candidate polygon set; Obtain a vertex set corresponding to the candidate polygon q in the third candidate polygon set, and obtain a first shape evaluation coefficient corresponding to each of a plurality of first shape polygons formed by the model vertices in the vertex set; the first shape evaluation coefficient is used to measure the matching degree between the first shape polygon and the equilateral polygon; The second shape evaluation coefficient corresponding to the candidate polygon q is determined according to the first shape evaluation coefficients corresponding to each of a plurality of first shape polygons formed by the model vertices in the vertex set.

5. The method according to claim 4, wherein obtaining first shape evaluation coefficients corresponding to each of a plurality of first shape polygons formed by model vertices in the vertex set comprises: Obtain a first shape polygon j from a plurality of first shape polygons formed by model vertices included in the vertex set; Obtaining the polygon area corresponding to the first shape polygon j, and obtaining the sum of the squares of the side lengths corresponding to the first shape polygon j; A first shape evaluation coefficient corresponding to the first shape polygon j is determined according to the ratio between the polygon area and the sum of the squares of the side lengths.

6. The method according to claim 4 or 5, wherein the candidate polygon q is a quadrilateral, and the plurality of first shape polygons formed by the model vertices in the vertex set include triangle t1, triangle t2, triangle t3 and triangle t4; The determining, according to first shape evaluation coefficients corresponding to each of a plurality of first shape polygons formed by model vertices in the vertex set, a second shape evaluation coefficient corresponding to the candidate polygon q comprises: Obtain a first coefficient product between a first shape evaluation coefficient corresponding to the triangle t1 and a first shape evaluation coefficient corresponding to the triangle t2, and obtain a second coefficient product between a first shape evaluation coefficient corresponding to the triangle t3 and a first shape evaluation coefficient corresponding to the triangle t4; Determine the ratio between the second coefficient product and the first coefficient product as the second shape evaluation coefficient corresponding to the candidate polygon q; The first shape evaluation coefficients corresponding to the triangle t1 and the triangle t2 are greater than or equal to the first shape evaluation coefficients corresponding to the triangle t3 and the triangle t4.

7. The method according to any one of claims 1 to 6, wherein obtaining half-edge structure data corresponding to the candidate mesh model, traversing half edges in the half-edge structure data, and obtaining collinear vertex paths in the three-dimensional mesh model comprises: Converting the edges in the candidate mesh model into two half-edges with opposite directions, and generating half-edge structure data corresponding to the candidate mesh model; Determine a starting half-edge in the boundary half-edges of the half-edge structure data, and obtain a first adjacent half-edge set of the starting half-edge in the half-edge structure data according to the direction of the starting half-edge; If there is a first adjacent half-edge in the first adjacent half-edge set that is collinear with the starting half-edge, determining the starting half-edge and the first adjacent half-edge as an initial collinear path, and acquiring a second adjacent half-edge set of the first adjacent half-edge in the half-edge structure data according to the direction of the first adjacent half-edge; If there is no second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge, or if the second adjacent half-edge in the second adjacent half-edge set that is collinear with the first adjacent half-edge is the starting half-edge, determining the initial collinear path as a candidate collinear path in the half-edge structure data; Setting a traversed flag for the half-edges included in the candidate collinear paths until all the half-edges included in the half-edge structure data are set with the traversed flag, thereby obtaining a plurality of candidate collinear paths in the half-edge structure data; If there are a candidate collinear path L1 and a candidate collinear path L2 in the multiple candidate collinear paths that are collinear with the starting half-edge, the candidate collinear path L1 and the candidate collinear path L2 are merged into a collinear vertex path.

8. The method according to claim 7, further comprising: Determine the half-edge in the first adjacent half-edge set that has the smallest angle with the starting half-edge as the first adjacent half-edge; If the cosine of the angle between the starting half-edge and the first adjacent half-edge is greater than a cosine threshold, determining that the starting half-edge and the first adjacent half-edge are collinear; If the cosine of the angle between the starting half-edge and the first adjacent half-edge is less than or equal to the cosine threshold, it is determined that the starting half-edge and the first adjacent half-edge are not collinear.

9. The method according to any one of claims 1 to 8, wherein the initial skin weights corresponding to the model vertices included in the collinear vertex path are smoothed according to the path direction of the collinear vertex path in the half-edge structure data to obtain the skin update weights corresponding to the model vertices, comprising: Obtaining a smoothing window corresponding to the three-dimensional mesh model; According to the path direction of the collinear vertex path in the half-edge structure data, sliding the smoothing window on the collinear vertex path to obtain the weight average of the initial skinning weights corresponding to the model vertices covered by the smoothing window; The weight average is determined as the skin update weight corresponding to the central vertex covered by the smoothing window.

10. The method according to any one of claims 1 to 8, wherein the initial skin weights corresponding to the model vertices included in the collinear vertex path are smoothed according to the path direction of the collinear vertex path in the half-edge structure data to obtain the skin update weights corresponding to the model vertices, comprising: Obtaining a smoothing filter corresponding to the three-dimensional mesh model, and obtaining a neighborhood corresponding to each model vertex included in the collinear vertex path; The number of vertices in the neighborhood is associated with the size of the smoothing filter; According to the path direction of the collinear vertex path in the half-edge structure data, the initial skin weights corresponding to the model vertices p in the collinear vertex path and the initial skin weights corresponding to the model vertices in the neighborhood corresponding to the model vertex p are filtered by the smoothing filter to obtain a weighted average weight; The weighted average weight is determined as the skin update weight corresponding to the model vertex p.

11. The method according to any one of claims 1 to 10, wherein the step of performing skinning processing on the virtual object according to skinning update weights corresponding to model vertices in the three-dimensional mesh model comprises: Obtaining an object skeleton corresponding to the virtual object, and obtaining skeleton transformation parameters corresponding to skeleton joints contained in the object skeleton; Determining vertex update positions corresponding to model vertices in the three-dimensional mesh model according to initial vertex positions corresponding to model vertices in the three-dimensional mesh model, the skin update weights, and the bone transformation parameters; According to the vertex update positions corresponding to the model vertices in the three-dimensional mesh model, the object skeleton is bound to the three-dimensional mesh model to obtain a skinning result corresponding to the virtual object.

12. A data processing device, comprising: A model acquisition unit, used to acquire a three-dimensional mesh model corresponding to the virtual object, and to acquire initial skin weights corresponding to model vertices in the three-dimensional mesh model; A polygon merging unit, used for merging a first shape polygon pair in the three-dimensional mesh model into a second shape polygon to obtain a candidate mesh model; Two first shape polygons included in the first shape polygon pair have a shared edge in the three-dimensional mesh model, and the shared edge is removed during the merging process; A collinear vertex acquisition unit, used to acquire half-edge structure data corresponding to the candidate mesh model, traverse the half-edges in the half-edge structure data, and obtain a collinear vertex path in the three-dimensional mesh model; A weight smoothing processing unit, configured to smooth the initial skin weights corresponding to the model vertices contained in the collinear vertex path according to the path direction of the collinear vertex path in the half-edge structure data, so as to obtain the skin update weights corresponding to the model vertices; A skinning processing unit is used to perform skinning processing on the virtual object according to skinning update weights corresponding to model vertices in the three-dimensional mesh model.

13. A computer device comprising a memory and a processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method according to any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or the instruction is executed by a processor, the method according to any one of claims 1 to 11 is implemented.