Mesh simplification method and apparatus for mesh model, electronic device, and storage medium
By using a face reduction method on the mesh model, identifying and processing the vertices of the boundary region, constructing the target plane and dividing the facets, the structural problems caused by skeletal motion are solved, and the correctness and dynamism of the mesh model in animation are realized.
Patent Information
- Application Number
- PCT/CN2025/072856
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-10
- Filing Date
- 2025-01-16
- Publication Date
- 2025-10-16
AI Technical Summary
Existing mesh model reduction methods cannot effectively address the impact of skeletal motion on the mesh model structure, resulting in structural problems such as interlacing, spikes, and deformation after reduction, which cannot meet the needs of real-world scenarios.
By reducing the faces of the original mesh model with bound bones, determining the second bones and weights for vertex binding, identifying the vertices in the boundary area, constructing the target plane and determining the intersection, and dividing the faces belonging to the intersection into sub-faces, the structural correctness of the model during the bone-driven process is ensured.
It improves the dynamism and realism of the mesh model after polygon reduction, solves structural problems in the bone-driven process, and ensures the accuracy of the model in animation.
Smart Images

Figure CN2025072856_16102025_PF_FP_ABST
Abstract
Description
Mesh model face reduction method and device, electronic equipment and storage medium
[0001] The present application claims priority to Chinese Patent Application No. 202410431067.4, filed on April 10, 2024, the disclosure of which is incorporated herein in its entirety as part of the present application. TECHNICAL FIELD
[0002] Embodiments of the present disclosure relate to the technical field of computer, and in particular to a mesh model face reduction method, device, electronic equipment and storage medium. BACKGROUND
[0003] Mesh model face reduction can be understood as reducing the number of triangular patches under the premise of guaranteeing the geometric characteristics of the model, so as to reduce the data amount of the mesh model. Current face reduction methods cannot effectively cope with the impact of bone movement on the structure of the mesh model. That is, in the process of driving the mesh model based on the skeleton after face reduction, structural problems such as penetration, spurs, and deformation may occur, which cannot truly adapt to real scene requirements. SUMMARY
[0004] Embodiments of the present disclosure provide a mesh model face reduction method, device, electronic equipment and storage medium, which can guarantee the structural correctness of the mesh model in the process of driving the skeleton after face reduction.
[0005] In a first aspect, embodiments of the present disclosure provide a mesh model face reduction method, comprising:
[0006] Reducing the face of the original mesh model bound to the skeleton to obtain a first model;
[0007] According to the first skeleton bound to the plurality of vertices in the original mesh model and the first weight of the first skeleton, determining the second skeleton bound to the plurality of vertices in the first model and the second weight of the second skeleton;
[0008] According to the second skeleton and the second weight, determining the vertices of the demarcation area in the first model; wherein the demarcation area includes the demarcation area between the skeletons of different semantics;
[0009] According to the vertices belonging to the same demarcation area, constructing a target plane, and determining the intersection point of the target plane and the first model;
[0010] Dividing the patch to which the intersection point belongs into at least two sub-patches to obtain a second model.
[0011] In a second aspect, embodiments of the present disclosure further provide a mesh model face reduction device, comprising:
[0012] A mesh reduction module is configured to reduce a mesh model of a character to obtain a first model;
[0013] A skeleton weight transplanting module is configured to determine a second skeleton and a second weight of the second skeleton of a plurality of vertices in the first model according to a first skeleton and a first weight of the first skeleton to which the plurality of vertices in the original mesh model are bound;
[0014] A vertex determining module is configured to determine a vertex of a demarcation region in the first model according to the second skeleton and the second weight; the demarcation region includes a demarcation region between different semantics of skeletons.
[0015] An intersection determining module is configured to construct a target plane according to vertices belonging to a same demarcation region, and determine an intersection of the target plane and the first model.
[0016] A patch generating module is configured to divide a patch to which the intersection belongs into at least two sub-patches to obtain a second model.
[0017] In a third aspect, the embodiments of the present disclosure further provide an electronic device, which comprises:
[0018] One or more processors;
[0019] A storage device configured to store one or more programs,
[0020] When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the mesh model reduction method according to any of the embodiments of the present disclosure.
[0021] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer executable instructions, which, when executed by a computer processor, are configured to perform the mesh model reduction method according to any of the embodiments of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0022] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent upon reading the following detailed description in conjunction with the accompanying drawings, in which like reference numerals refer to like elements. It is to be understood that the drawings are designed solely for the purpose of illustration and not as a definition of the limits of the disclosure, for which reference should be made only to the appended claims. Throughout the drawings, like reference numerals indicate like elements.
[0023] FIG. 1 is a flowchart of a mesh model reduction method according to an embodiment of the present disclosure;
[0024] FIG. 2 is a schematic diagram of generating sub-patches in a mesh model reduction method according to an embodiment of the present disclosure;
[0025] FIG. 3 is a flow diagram of a method for reducing the surface of a mesh model according to an embodiment of the present disclosure;
[0026] FIG. 4 is a flow diagram of a method for reducing the surface of a mesh model according to an embodiment of the present disclosure;
[0027] FIG. 5 is a structural diagram of a device for reducing the surface of a mesh model according to an embodiment of the present disclosure; and
[0028] FIG. 6 is a structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] Embodiments of the present disclosure will be described in more detail with reference to the drawings. While certain embodiments of the present disclosure will be shown and described below, it is to be understood that the present disclosure can be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided as part of disclosure to convey the principles of the present disclosure to those skilled in the art so that they can be better understood.
[0030] It should be understood that the various steps in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. Additionally, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the present disclosure is not limited in this regard.
[0031] The term "comprising" and variations thereof as used herein are used inclusively, i.e., "comprising but not limited to." The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related definitions are given below.
[0032] It should be noted that the terms "first", "second", and the like in the present disclosure are used only to distinguish different devices, modules or units, and do not imply the order or sequence of the functions performed by these devices, modules or units.
[0033] It should be noted that the terms "one", "multiple", and the like in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that "one or more" should be understood unless otherwise explicitly stated in the context.
[0034] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0035] FIG. 1 is a flowchart of a mesh model decimation method according to an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the case of decimating a mesh model bound with a skeleton. The method can be performed by a mesh model decimation device, which can be implemented in the form of software and / or hardware, and can be configured in an electronic device, such as a computer.
[0036] As shown in FIG. 1, the mesh model decimation method provided by the embodiment can include the following steps.
[0037] S110, decimating an original mesh model bound with a skeleton to obtain a first model.
[0038] In the embodiment of the present disclosure, the original mesh model can be considered as a three-dimensional mesh model with a large number of faces and complex topology. The original mesh model can be bound with a skeleton in advance, and the motion of the original mesh model can be realized by driving the skeleton.
[0039] The original mesh model can be decimated based on an existing decimation algorithm, such as vertex merging, vertex deletion, edge collapse, face collapse, and mesh reconstruction, to obtain a decimated mesh model, i.e., the first model. For example, the original mesh model can be iteratively merged based on a Quadric Error Metrics (QEM) algorithm to realize automatic decimation of the original mesh model. The QEM algorithm can quickly and accurately decimate a high-face complex mesh, effectively reduce the number of vertices while maintaining the overall shape and detail features of the model, to obtain a more streamlined and efficient mesh model. By using the QEM algorithm, the performance and rendering efficiency of the original mesh model can be improved to meet the needs of various application fields for face number optimization.
[0040] S120, determining a second skeleton bound with a plurality of vertices in the first model and a second weight of the second skeleton according to the first skeleton bound with the plurality of vertices in the original mesh model and the first weight of the first skeleton.
[0041] The skeleton bound with the vertex in the original mesh model and / or the skeleton weight corresponding to the bound skeleton can be different. In the embodiment of the present disclosure, the skeleton bound with the vertex in the original mesh model can be referred to as the first skeleton of the vertex, and the skeleton weight corresponding to the first skeleton can be referred to as the first weight. In the case where the vertex in the original mesh model is bound with at least two first skeletons and the first weights of the first skeletons are different, the motion of the vertex will be affected by the at least two first skeletons, and the greater the first weight, the greater the influence on the motion of the vertex.
[0042] To ensure the drivability of the reduced model, after obtaining the first model, the second bones and the second weights of the vertices in the first model can be determined according to the first bones and the first weights of the vertices in the original mesh model. The bone bound to a vertex in the first model can be referred to as the second bone of the vertex, and the bone weight corresponding to the second bone can be referred to as the second weight. In the case where a vertex in the first model is bound to at least two second bones, the operation of the vertex is more affected by the second bone with a larger second weight.
[0043] The process of determining the second bones and the second weights can include, for example, mapping the vertices in the first model to the vertices in the original mesh model according to the spatial position relationship, and setting the second bones and the second weights of the corresponding vertices in the first model according to the first bones bound to the mapped vertices and the first weights of the first bones.
[0044] For example, the process can include aligning the first model with the original mesh model in shape, determining a first adjacent range with the vertices in the first model as the center and a first predetermined distance value as the radius, and determining the second bones and the second weights of the corresponding vertices in the first model according to the first bones bound to the vertices in the original mesh model within the first adjacent range and the first weights of the first bones. In addition, the second bones and the weights of the vertices in the first model can be determined according to the bones and the weights of the vertices in the original mesh model based on other manners, which will not be enumerated here.
[0045] In the embodiments of the present disclosure, by associating the vertices of the first model with the related vertices of the original mesh model and determining the bones and the weights to be bound accordingly, the original shape and motion characteristics of the first model can be maintained during the animation driving process, and the drivability and authenticity of the first model can be improved.
[0046] S130, determining the vertices of the first model in the demarcation region according to the second bones and the second weights.
[0047] In the embodiments of the present disclosure, the demarcation region includes a demarcation region between bones with different semantics. It has been found through research that the area where the reduced mesh model is prone to structural problems during movement is usually located in the demarcation region between bones with different semantics. For example, the number of patches in the joint region between bones in the first model is reduced compared to the original mesh model, which can cause the patches to protrude out of the model surface when the model is in joint motion, showing an abnormal state of "spikes".
[0048] After determining the second bones and their bone weights bound to multiple vertices in the first model, the vertex positions of the boundary area in the first model can be further determined based on the second bones and their bone weights bound to multiple vertices to locate areas of the first model that are prone to structural problems.
[0049] Among them, the process of determining the vertices of the boundary area in the first model may include, for example: looping to obtain the second bone and second weight bound to the vertices in the first model; determining whether the current vertex is the vertex of the boundary area based on the currently obtained second bone and second weight; if so, recording relevant information of the vertex of the boundary area, such as vertex sequence information, position information, bound second bone and second weight, etc.; otherwise, obtaining the second bone and second weight bound to the next vertex; stopping the loop until the positions of all vertices in the first model are traversed to obtain the vertices of each boundary area in the first model.
[0050] In the disclosed embodiment, the correspondence between the bound bones and their weights and the vertex categories can be pre-constructed, and then based on the correspondence, it can be determined whether the vertex of the bound second bone and the second weight is the vertex of the boundary area. For example, the correspondence between the bound bones and their weights and the vertex categories can be learned by deep learning; then the second bone bound to the vertex and its second weight can be input into the model after deep learning to determine whether the vertex is the vertex of the boundary area. For another example, the correspondence between the bound bones and their weights and the vertex categories can be characterized by constructing a data formula; then, based on the data formula, it can be determined whether the vertex is the vertex of the boundary area. In addition, other methods of constructing the correspondence between the bound bones and their weights and the vertex categories can also be applied here, and they are not exhaustively listed here.
[0051] In the disclosed embodiment, by identifying the vertices of the boundary area in the first model, it is helpful to further take repair measures according to the area to which the vertices of the boundary area belong, so as to solve structural problems that may occur during the movement of the first model.
[0052] S140: Construct a target plane according to the vertices belonging to the same boundary area, and determine the intersection point between the target plane and the first model.
[0053] In the embodiment of the present disclosure, the first model may include at least one boundary area. For each boundary area, a target plane can be constructed based on the pre-recorded relevant information of the vertices in the area (such as position information, etc.). The constructed target plane can represent the plane where the bones in the initial mesh model are located. The target plane can be used to cut the first model to obtain the intersection with the first model. The facets on the first model can have 0, 1 or 2 intersections with the target plane.
[0054] In the embodiments of the present disclosure, the third bone and the third weight of the third bone bound by the intersection point can be determined according to the second bone and the second weight. Wherein, the bone bound by the intersection point can be referred to as the third bone, and the bone weight corresponding to the third bone can be referred to as the third weight. In the case that there are at least two third bones bound by the intersection point, the operation of the intersection point is greatly affected by the third bone with a larger third weight.
[0055] Wherein, the process of determining the third bone and the third weight bound by the intersection point can include: determining a second adjacent range with the intersection point as the center and the second predetermined distance value as the radius, and determining the third bone and the third weight bound by the intersection point according to the second bone and the second weight bound by the vertex in the initial mesh model in the second adjacent range. In addition, the bone and the weight bound by the intersection point can also be determined based on other ways according to the bones and the weights bound by the plurality of vertices in the first model, which will not be exhausted here. By determining the third bone and the third weight bound by the intersection point, the motion correctness of the model can be ensured.
[0056] S150, dividing the patch to which the intersection point belongs into at least two sub-patches to obtain a second model.
[0057] In the embodiments of the present disclosure, the intersection point of the target plane and the first model can be used as a new vertex of the first model, and the intersection point can be used to split the patch to which the intersection point belongs to achieve the subdivision of at least part of the patches in the demarcation region of the first model into a plurality of sub-patches.
[0058] Wherein, the splitting of the patch to which the intersection point belongs can be based on a preset mathematical algorithm. For example, the intersection point and the vertex in the patch to which the intersection point belongs that do not have a connection relationship can be connected to generate a sub-patch. For example, FIG. 2 is a schematic diagram of generating a sub-patch in a mesh model reduction method provided by the embodiments of the present disclosure. Referring to FIG. 2, the intersection points of the target plane A and the triangular patch BCD in the first model can include points a and b, the point a and the point C can be connected to obtain the sub-patches BCa and aCD; then, the point a and the point b can be connected to obtain the sub-patches aCb and abD; thereby, the triangular patch BCD can be split into three sub-patches BCa, aCb and abD.
[0059] By increasing the number of patches in the demarcation region, the mesh wiring of the bone turning region is enriched, the structural problems such as penetration and spurs in the process of driving the mesh model based on the bone after the reduction of the number of patches can be solved while the number of patches in the model is preserved, the structural correctness of the mesh model can be ensured, and the mesh model has better animation performance.
[0060] The technical scheme of the embodiment of the present disclosure reduces the original mesh model bound to the skeleton to obtain a first model; determines a second skeleton bound to a plurality of vertices in the first model and a second weight of the second skeleton according to a first skeleton bound to the plurality of vertices in the original mesh model and a first weight of the first skeleton; determines a vertex of a demarcation region in the first model according to the second skeleton and the second weight; wherein the demarcation region includes a demarcation region between skeletons of different semantics; constructs a target plane according to the vertices belonging to the same demarcation region, and determines an intersection point of the target plane and the first model; divides a patch to which the intersection point belongs into at least two sub-patches to obtain a second model.
[0061] After the model reduction operation, the connection region of the skeletons of different semantics is a demarcation region with a large deformation amplitude. By identifying the vertices in the demarcation region, the target plane is constructed based on the related information of the vertices in the demarcation region, and the intersection points can be obtained by cutting the first model using the target plane. These intersection points can be used as new boundary points in the model. By generating new patches based on these new boundary points, the mesh patches in the region with a large deformation amplitude can be refined, and the structural problems such as penetration and spurs that occur in the skeleton driving process of the reduced mesh model can be solved, thereby ensuring the structural correctness of the mesh model and making the mesh model have better animation performance.
[0062] The embodiment of the present disclosure can be combined with the optional schemes of the mesh model reduction method provided in the above embodiments. The mesh model reduction method provided in the embodiment is described in detail for determining the skeleton bound to the plurality of vertices in the first model and the weight of the skeleton. By using the nearest neighbor matching method, the first skeleton bound to the plurality of vertices in the original mesh model before reduction and the first weight can be transplanted to each vertex of the first model after reduction, so as to ensure that the first model after reduction retains the original shape and action characteristics in the animation driving process, and improve the drivability and authenticity of the model after reduction.
[0063] FIG. 3 is a flowchart of a mesh model reduction method provided by an embodiment of the present disclosure. As shown in FIG. 3, the mesh model reduction method provided by the embodiment can include:
[0064] S310, reducing the original mesh model bound to the skeleton to obtain a first model.
[0065] S320, determining a preset number of target vertices adjacent to the vertices in the first model from the plurality of vertices of the original mesh model.
[0066] In this embodiment, the original mesh model and the first model can be aligned in shape; after alignment, for the vertices in the first model, the preset number N of target vertices in the original mesh model closest to them can be determined. The preset number can be set in advance according to empirical or experimental values.
[0067] S330, according to the first bone and the first weight of the first bone bound by each target vertex, determine the second bone and the second weight of the second bone bound by the corresponding vertex in the first model.
[0068] In this embodiment, N target vertices adjacent to the vertices in the first model can be determined based on the N-neighbor algorithm. For each vertex in the first model, the second bone and the second weight of the vertex can be determined according to the first bone and the first weight bound by the corresponding preset number of target vertices.
[0069] In some optional implementations, according to the first bone and the first weight of the first bone bound by each target vertex, the second bone and the second weight of the second bone bound by the corresponding vertex in the first model can include:
[0070] The union of the first bones bound by each target vertex is used as the second bone bound by the corresponding vertex in the first model; and the second weight of the second bone bound by the corresponding vertex in the first model is determined according to the distance between each target vertex and the corresponding vertex in the first model, and the first weight of the first bone bound by each target vertex.
[0071] Since the target vertices are the nearest neighbors of the vertices in the first model, the target vertices are usually also adjacent. For the same vertex in the first model, the first bones bound by each target vertex are usually the same. At this time, the same at least one first bone bound by each target vertex can be used as the second bone of the corresponding vertex. According to the distance between each target vertex and the corresponding vertex, an interpolation method or a weighted average method can be used to determine the second weight of the second bone based on the first weight of the first bone bound by each target vertex.
[0072] In addition, there can also be cases where the first bones bound by each target vertex differ. For example, assuming that for vertex A in the first model, vertex B and vertex C in the original mesh model are target vertices of vertex A. In the case where the first bone bound by vertex B is bone 1 and bone 2, and the first bone bound by vertex C is bone 2 and bone 3, the second bone bound by vertex A can be bone 1, bone 2 and bone 3. Based on this example, according to the distance between vertex A and vertex B and vertex C, a sampling interpolation method or a weighted average method can be used to determine the weights of bone 1, bone 2 and bone 3 bound by vertex A based on the first weight of the first bone bound by vertex B and the first weight of the first bone bound by vertex C.
[0073] In the optional implementation, the N-neighbor algorithm can be used to transplant the plurality of vertex-bound bones and the weights thereof in the original mesh model into the first model to ensure the drivability and motion correctness of the first model.
[0074] S340, determining the vertices of the demarcation region in the first model according to the second bones and the second weights.
[0075] The demarcation region includes the vertices of the demarcation region between the bones with different semantics.
[0076] S350, constructing a target plane according to the vertices belonging to the same demarcation region, and determining the intersection of the target plane and the first model.
[0077] In the embodiment, the third bones and the third weights of the third bones bound by the intersection points are determined according to the second bones and the second weights.
[0078] S360, dividing the face sheet to which the intersection point belongs into at least two sub-face sheets to obtain a second model.
[0079] The technical solution of the embodiment of the present disclosure has described in detail the determination of the plurality of vertex-bound bones and the bone weights in the first model. By using the neighbor matching method, the first bones and the first weights bound by the plurality of vertices in the original mesh model before the face reduction can be transplanted into each vertex of the first model after the face reduction, so as to ensure that the first model after the face reduction maintains the original shape and action characteristics in the process of animation driving, and improve the drivability and authenticity of the model after the face reduction.
[0080] In addition, the face reduction method of the mesh model provided by the embodiment of the present disclosure belongs to the same disclosure concept as the face reduction method of the mesh model provided by the above-described embodiment, and the technical details not described in detail in the present embodiment can be referred to the above-described embodiment, and the same technical features have the same beneficial effects in the present embodiment and the above-described embodiment.
[0081] The embodiments of the present disclosure can be combined with the optional schemes of the mesh model surface reduction method provided in the above embodiments. The mesh model surface reduction method provided in the present embodiment is described in detail with respect to the processes of determining the vertices of the demarcation region, constructing the target plane, determining the bound skeleton and the skeleton weight of the intersection point, etc. The vertices of the demarcation region with large deformation amplitude in the motion process can be determined according to the second skeleton and the second weight bound to the plurality of vertices in the first model. The vertices belonging to the same demarcation region can be determined by clustering the vertices of the demarcation region. The target planes can be constructed according to the position and normal information of the vertices belonging to the same demarcation region. The new boundary points (i.e. the intersection points) can be generated by cutting the first model with the target planes. The bound skeleton and the skeleton weight of the intersection point can be determined according to the skeleton and the skeleton weight bound to the plurality of vertices in the face sheet to which the intersection point belongs, so as to ensure the correctness of the motion of the second model.
[0082] FIG. 4 is a flowchart of a mesh model surface reduction method provided in an embodiment of the present disclosure. As shown in FIG. 4, the mesh model surface reduction method provided in the present embodiment can include:
[0083] S410, reducing the surface of the original mesh model bound to the skeleton to obtain a first model.
[0084] S420, determining the second skeleton bound to the plurality of vertices in the first model and the second weight of the second skeleton according to the first skeleton bound to the plurality of vertices in the original mesh model and the first weight of the first skeleton.
[0085] S430, in the case that the bound second skeleton includes at least two and the at least two second weights are greater than a preset threshold, determining the corresponding vertices as the vertices of the demarcation region.
[0086] The demarcation region includes the vertices of the demarcation region between the skeletons with different semantics.
[0087] For example, for the i th vertex in the first model, assuming that the corresponding second weights are and the second skeleton corresponding to the second weight is the i th vertex can be determined as the vertex of the demarcation region by the following formula:
[0088] Wherein, I(·) can represent an indicator function, which is 1 when the internal function is determined to be correct, that is, 1; when the internal function is determined to be incorrect, that is, 0, I(·) is 0; wherein, Sgn(i) can represent the result of the vertex determination of the boundary region, when it is 1, it can be considered that the ith vertex belongs to the vertex of the boundary region, when it is 0, it can be considered that the ith vertex does not belong to the vertex of the boundary region; wherein, thres can represent a preset threshold, which can be set according to experimental values or empirical values.
[0089] S440, according to the second skeleton bound to the vertex of each boundary region, determining the vertex belonging to the same boundary region.
[0090] In this embodiment, based on the existing clustering algorithm (such as K-means algorithm, etc.), according to the second skeleton bound to the vertex of each boundary region, the vertex of each boundary region is clustered to obtain the vertex of the boundary region of different clusters. Wherein, the vertex in each cluster binds the same or similar second skeleton, which can be considered that the vertex in each cluster belongs to the same boundary region.
[0091] S451, determining the center position according to the position of the vertex belonging to the same boundary region.
[0092] In this embodiment, for each boundary region, a simple average or weighted average value can be used to determine the position of the center point of the boundary region (i.e. the center position) based on the position of the vertex inside it.
[0093] S452, determining the target normal information according to the preset correspondence between the semantic of the skeleton and the normal information, and the semantic of the second skeleton corresponding to the vertex belonging to the same boundary region.
[0094] Wherein, the original mesh model can be a mesh model in a preset pose, and accordingly, after the face reduction operation, the pose of the initial mesh model is the same as the preset pose. Since the pose of the original mesh model is known in advance, the pose of the corresponding region of each skeleton bound to the original mesh model is also known. Therefore, the correspondence between each skeleton and the normal information of the corresponding region can be preset, and the pair of correspondence can be represented in the form of a pair of data of the semantic of the skeleton and the normal information.
[0095] Accordingly, after determining each boundary region, the semantic of the second skeleton with the largest second weight bound to it can be determined; and the normal information corresponding to the semantic of the second skeleton from the preset correspondence between the semantic of the skeleton and the normal information is queried as the target normal information.
[0096] Compared with determining the target normal vector based on the graphical information (such as position information, etc.) of the vertex of the boundary region, the target normal information can be obtained faster through the query mode, so that the generation efficiency of the second model can be improved to a certain extent.
[0097] S460, constructing a target plane according to the center position and the target normal information, and determining an intersection of the target plane and the first model.
[0098] In the embodiments of the present disclosure, for each boundary region, an infinite target plane can be constructed according to the corresponding center position and target normal information. Correspondingly, the intersection of the target plane and the face patch in the first model can be determined.
[0099] The third skeleton bound by the intersection point and the third weight of the third skeleton can be determined according to the second skeleton and the second weight. In some optional implementation manners, the determination process of the third skeleton bound by the intersection point and the third weight of the third skeleton can include: determining the third weight of the third skeleton corresponding to the intersection point according to the target second skeleton bound by a plurality of vertices in the face patch to which the intersection point belongs and the second weight of the target second skeleton.
[0100] In these optional implementation manners, the face patch to which the intersection point belongs can be determined according to the coordinate position of the intersection point first; then the distances between the intersection point and each vertex on the face patch can be determined; finally, according to the distances, the third weight of the third skeleton bound by the intersection point can be determined according to the second skeleton bound by a plurality of vertices on the face patch and the second weight by using a barycentric interpolation algorithm or the like. The barycentric interpolation can be considered as a linear interpolation method based on geometric positions, wherein the interpolation weight of the barycentric interpolation is inversely proportional to the distance, that is, the closer the distance, the greater the interpolation weight, and the farther the distance, the smaller the interpolation weight. By weighting and averaging the second weight of each vertex and the interpolation weight, the third weight of the intersection point can be obtained.
[0101] By determining the third skeleton bound by the intersection point and the third weight according to the second skeleton and the second weight of the vertices of the face patch to which the intersection point belongs, the smoothness of the skeleton weight at the intersection point can be ensured, and structural problems in the movement process can be avoided.
[0102] S470, dividing the face patch to which the intersection point belongs into at least two sub-face patches to obtain a second model.
[0103] The technical solutions of the embodiments of the present disclosure are described in detail. The vertices of the demarcation region in the motion process with large deformation amplitude can be determined according to the second skeleton and the second weight bound to the plurality of vertices in the first model. The vertices belonging to the same demarcation region can be determined by clustering the vertices of the demarcation region. The target planes can be constructed according to the positions and normal information of the vertices belonging to the same demarcation region. The new boundary points (i.e., the intersection points) can be generated by cutting the first model with the target planes. The skeleton and the skeleton weight bound to the intersection points can be determined according to the skeleton and the skeleton weight bound to the plurality of vertices in the face sheet to which the intersection points belong, so that the correctness of the motion of the second model can be ensured.
[0104] In addition, the mesh model surface reduction method provided by the embodiments of the present disclosure belongs to the same disclosure concept as the mesh model surface reduction method provided by the above-mentioned embodiments. The technical details not described in detail in the present embodiments can be referred to the above-mentioned embodiments, and the same technical features have the same beneficial effects in the present embodiments and the above-mentioned embodiments.
[0105] FIG. 5 is a structural schematic diagram of a mesh model surface reduction device provided by an embodiment of the present disclosure. The mesh model surface reduction device provided by the present embodiment is suitable for the case of reducing the surface of a mesh model bound to a skeleton.
[0106] As shown in FIG. 5, the mesh model surface reduction device provided by the embodiments of the present disclosure can include:
[0107] The surface reduction module 510 is configured to reduce the surface of the original mesh model bound to the skeleton to obtain the first model.
[0108] The skeleton weight transplantation module 520 is configured to determine the second skeleton and the second weight of the second skeleton bound to the plurality of vertices in the first model according to the first skeleton and the first weight of the first skeleton bound to the plurality of vertices in the original mesh model.
[0109] The vertex determination module 530 is configured to determine the vertices of the demarcation region in the first model according to the second skeleton and the second weight; wherein the demarcation region includes the demarcation region between the skeletons with different semantics.
[0110] The intersection point determination module 540 is configured to construct the target plane according to the vertices belonging to the same demarcation region, and determine the intersection points of the target plane and the first model.
[0111] The face sheet division module 550 is configured to divide the face sheet to which the intersection points belong into at least two sub-face sheets to obtain the second model.
[0112] In some optional implementations, the skeleton weight transplantation module can be configured to:
[0113] determining a preset number of target vertices adjacent to the vertices in the first model from a plurality of vertices of the original mesh model;
[0114] determining a second bone to which the corresponding vertex in the first model is bound and a second weight of the second bone according to the first bone to which each target vertex is bound and the first weight of the first bone.
[0115] In some optional implementations, the bone weight transplantation module can be configured to:
[0116] taking a union of the first bones to which each target vertex is bound as the second bone to which the corresponding vertex in the first model is bound.
[0117] determining the second bone to which the corresponding vertex in the first model is bound and the second weight of the second bone according to the distance between each target vertex and the corresponding vertex in the first model and the first weight of the first bone to which each target vertex is bound.
[0118] In some optional implementations, the vertex determination module can be configured to:
[0119] in a case where the second bone includes at least two and the at least two second weights are greater than a preset threshold, determining the corresponding vertex as a vertex of the demarcation region.
[0120] In some optional implementations, the mesh model reduction device can further include:
[0121] a clustering module configured to, after determining the vertices of the demarcation region in the first model, determine the vertices belonging to the same demarcation region according to the second bone to which each vertex of the demarcation region is bound.
[0122] In some optional implementations, the intersection point determination module can be configured to:
[0123] determining a center position according to the positions of the vertices belonging to the same demarcation region;
[0124] determining target normal information according to a preset correspondence between bone semantics and normal information and the semantics of the second bone corresponding to the vertices belonging to the same demarcation region.
[0125] constructing a target plane according to the center position and the target normal information.
[0126] In some optional implementations, the bone weight transplantation module can be further configured to:
[0127] determining a third bone to which the corresponding intersection point is bound and a third weight of the third bone according to the target second bone to which each vertex in the patch to which the intersection point belongs is bound and the second weight of the target second bone.
[0128] The surface reduction device of the grid model provided by the embodiments of the present disclosure can execute the surface reduction method of the grid model provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method. It should be noted that each unit and module included in the above device is only divided according to the function logic, but is not limited to the above division, as long as the corresponding function can be realized; in addition, the specific name of each functional unit is only for easy mutual distinction, and does not serve to limit the protection scope of the embodiments of the present disclosure.
[0129] Reference is made below to FIG. 6, which shows a structural schematic diagram of an electronic device (e.g., a terminal device or a server in FIG. 6) 600 suitable for implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure can include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a vehicle-mounted terminal (e.g., a vehicle-mounted navigation terminal), and the like, as well as a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present disclosure.
[0130] As shown in FIG. 6, the electronic device 600 can include a processing device (e.g., a central processor, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to programs stored in a Read-Only Memory (ROM) 602 or loaded into a Random Access Memory (RAM) 603 from a storage device 608. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.
[0131] Generally, the following devices can be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, and the like; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; a storage device 608 including, for example, a magnetic tape, a hard disk, and the like; and a communication device 609. The communication device 609 can allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows the electronic device 600 with various devices, it should be understood that it is not required to implement or have all the shown devices. More or less devices can be alternatively implemented or had.
[0132] In particular, according to embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from the network through the communication apparatus 609, or installed from the storage apparatus 608, or installed from the ROM 602. When the computer program is executed by the processing apparatus 601, the above-mentioned functions defined in the mesh model surface reduction method of embodiments of the present disclosure are executed.
[0133] The electronic device provided by the embodiments of the present disclosure belongs to the same disclosure concept as the mesh model surface reduction method provided by the above-mentioned embodiments, and the technical details not described in detail in the present embodiment can be referred to the above-mentioned embodiments, and the present embodiment has the same beneficial effects as the above-mentioned embodiments.
[0134] The embodiments of the present disclosure provide a computer storage medium, which stores a computer program, and the program is executed by a processor to implement the mesh model surface reduction method provided by the above-mentioned embodiments.
[0135] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the present disclosure, the computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such a propagated data signal can take any of a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including, but not limited to, wire, cable, RF (radio frequency), or the like, or any suitable combination of the foregoing.
[0136] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0137] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device described above, and can be accessed via the electronic device described above.
[0138] The computer-readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to:
[0139] The original mesh model of the bound skeleton is decimated to obtain a first model; a first bone and a second bone to which a plurality of vertices in the first model are bound and a second weight of the second bone are determined according to a first weight of the first bone to which the plurality of vertices in the original mesh model are bound; a vertex of a demarcation region in the first model is determined according to the second bone and the second weight; wherein the demarcation region includes a demarcation region between bones of different semantics; a target plane is constructed according to the vertices belonging to the same demarcation region, and an intersection of the target plane and the first model is determined; a face sheet to which the intersection belongs is divided into at least two sub-face sheets to obtain a second model.
[0140] Computer program code for carrying out operations of the present disclosure can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0141] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations of blocks in the block diagrams and / or flow diagrams, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0142] The units described in the embodiments of the present disclosure can be implemented by software or by hardware. In some cases, the names of the units and modules do not constitute a limitation on the units and modules themselves.
[0143] The functionality described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that can be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Parts (ASSPs), System on Chips (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0144] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, which comprises:
[0146] Decimating an original mesh model of a bound skeleton to obtain a first model;
[0147] According to a first bone bound to a plurality of vertices in the original mesh model and a first weight of the first bone, a second bone bound to the plurality of vertices in the first model and a second weight of the second bone are determined;
[0148] According to the second bone and the second weight, a vertex of a demarcation region in the first model is determined; wherein the demarcation region comprises a demarcation region between bones of different semantics;
[0149] A target plane is constructed according to vertices belonging to the same demarcation region, and an intersection point of the target plane and the first model is determined;
[0150] Divide the patch to which the intersection belongs into at least two sub-patches to obtain a second model.
[0151] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0152] In some optional implementations, the process of determining the second skeleton and the second weight comprises:
[0153] Determining, from the plurality of vertices of the original mesh model, a preset number of target vertices adjacent to the vertices in the first model;
[0154] Determining, according to the first skeleton bound to each of the target vertices and the first weight of the first skeleton, a second skeleton bound to the corresponding vertices in the first model and a second weight of the second skeleton.
[0155] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0156] In some optional implementations, the process of determining, according to the first skeleton bound to each of the target vertices and the first weight of the first skeleton, a second skeleton bound to the corresponding vertices in the first model and a second weight of the second skeleton comprises:
[0157] Taking the union set of the first skeleton bound to each of the target vertices as the second skeleton bound to the corresponding vertices in the first model.
[0158] Determining, according to the distance between each of the target vertices and the corresponding vertices in the first model and the first weight of the first skeleton bound to each of the target vertices, the second weight of the second skeleton bound to the corresponding vertices in the first model.
[0159] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0160] In some optional implementations,
[0161] The process of determining, according to the second skeleton and the second weight, the vertices of the demarcation region in the first model comprises:
[0162] In the case where the bound second skeleton comprises at least two and at least two second weights are greater than a preset threshold, the corresponding vertices are determined as the vertices of the demarcation region.
[0163] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0164] In some optional implementations, after the process of determining the vertices of the demarcation region in the first model, the method further comprises:
[0165] determine vertices belonging to the same boundary region according to the second bone bound to the vertices of each boundary region.
[0166] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0167] In some optional implementations, the target plane is constructed according to the vertices belonging to the same boundary region, comprising:
[0168] determine a center position according to the positions of the vertices belonging to the same boundary region;
[0169] determine target normal information according to a preset correspondence between bone semantics and normal information, and the semantics of the second bone corresponding to the vertices belonging to the same boundary region;
[0170] construct a target plane according to the center position and the target normal information.
[0171] According to one or more embodiments of the present disclosure, a mesh model decimation method is provided, further comprising:
[0172] In some optional implementations, the third bone bound to the intersection point and the third weight of the third bone are determined, comprising:
[0173] determine a third bone corresponding to the intersection point and a third weight of the third bone according to a target second bone bound to a plurality of vertices in a face sheet to which the intersection point belongs and a second weight of the target second bone.
[0174] According to one or more embodiments of the present disclosure, a mesh model decimation device is provided, comprising:
[0175] a decimation module, configured to decimate an original mesh model bound to a bone to obtain a first model;
[0176] a bone weight transplantation module, configured to determine a second bone bound to a plurality of vertices in the first model and a second weight of the second bone according to a first bone bound to the plurality of vertices in the original mesh model and a first weight of the first bone;
[0177] a vertex determination module, configured to determine vertices of a boundary region in the first model according to the second bone and the second weight; wherein the boundary region comprises a boundary region between bones of different semantics;
[0178] an intersection point determination module, configured to construct a target plane according to the vertices belonging to the same boundary region, and determine an intersection point of the target plane and the first model;
[0179] The face patch division module is configured to divide the face patch to which the intersection belongs into at least two sub-face patches, to obtain a second model.
[0180] The above description is merely that of the preferred embodiments of the present disclosure and the principles of the technology employed, and the scope of the disclosure involved is not limited to the technical solutions formed by the specific combinations of the technical features described above. It should also be understood that other technical solutions formed by the combinations of the technical features described above or their equivalent features, without departing from the above disclosed concepts, should also be encompassed in the scope of the disclosure. For example, the technical solutions formed by the mutual replacement of the above described features and the technical features with similar functions disclosed in the present disclosure (but not limited to) should also be encompassed.
[0181] Further, while operations are depicted in a particular, chronological sequence, this should not be understood as requiring such order unless otherwise specified. In some cases, the activities can be performed in different order, or concurrently. Similarly, while specific implementation details are discussed above, these should not be construed as limiting the scope of the disclosure. Certain features described in the context of separate embodiments can also be implemented together in a single embodiment. Conversely, various features described in the context of a single embodiment can also be implemented separately or in any suitable subcombination. It will be appreciated that various features described herein can be implemented in hardware, software or a combination thereof.
[0182] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A method for reducing the surface area of a mesh model, comprising: Reduce the original mesh model of the bound skeleton to obtain the first model; Determining a second bone bound to a plurality of vertices in the first model and a second weight of the second bone based on a first bone bound to a plurality of vertices in the original mesh model and a first weight of the first bone; Determining vertices of a boundary region in the first model according to the second skeleton and the second weight; wherein the boundary region includes boundary regions between skeletons of different semantics; constructing a target plane based on vertices belonging to the same boundary area, and determining an intersection point between the target plane and the first model; The patch to which the intersection point belongs is divided into at least two sub-patches to obtain a second model.
2. The method according to claim 1, wherein The process of determining the second skeleton and the second weight includes: Determining a preset number of target vertices adjacent to vertices in the first model from a plurality of vertices in the original mesh model; According to the first bone bound to each target vertex and the first weight of the first bone, the second bone bound to the corresponding vertex in the first model and the second weight of the second bone are determined.
3. The method according to claim 2, wherein: The determining, based on the first bone bound to each target vertex and the first weight of the first bone, the second bone bound to the corresponding vertex in the first model and the second weight of the second bone, includes: The union of the first bones bound to each of the target vertices is used as the second bone bound to the corresponding vertex in the first model; The second weight of the second bone bound to the corresponding vertex in the first model is determined based on the distance between each target vertex and the corresponding vertex in the first model, and the first weight of the first bone bound to each target vertex.
4. The method according to any one of claims 1 to 3, wherein: The step of determining the vertices of the boundary area in the first model according to the second skeleton and the second weight includes: When the bound second bones include at least two and at least two second weights are greater than a preset threshold, the corresponding vertices are determined as vertices of the boundary area.
5. The method according to any one of claims 1 to 4, wherein: After determining the vertices of the boundary area in the first model, the method further includes: According to the second skeleton bound to the vertices of each boundary area, the vertices belonging to the same boundary area are determined.
6. The method according to any one of claims 1 to 5, wherein: The step of constructing a target plane based on vertices belonging to the same boundary region includes: Determine the center position based on the positions of the vertices belonging to the same boundary area; Determine the target normal information based on the correspondence between the preset bone semantics and the normal information, and the semantics of the second bone corresponding to the vertices belonging to the same boundary area; A target plane is constructed according to the center position and the target normal information.
7. The method according to any one of claims 1 to 6, wherein: The process of determining the third bone bound to the intersection and the third weight of the third bone includes: According to the target second bone bound to multiple vertices in the face patch to which the intersection belongs and the second weight of the target second bone, the third bone corresponding to the intersection and the third weight of the third bone are determined.
8. A surface reduction device for a mesh model, comprising: A face reduction module is configured to reduce faces of an original mesh model with bound bones to obtain a first model; a bone weight transplantation module configured to determine a second bone bound to a plurality of vertices in the first model and a second weight of the second bone based on a first bone bound to a plurality of vertices in the original mesh model and a first weight of the first bone; a vertex determination module configured to determine vertices of a boundary area in the first model according to the second skeleton and the second weight; wherein the boundary area includes a boundary area between skeletons of different semantics; an intersection determination module configured to construct a target plane based on vertices belonging to the same boundary area, and determine an intersection point between the target plane and the first model; The patch division module is configured to divide the patch to which the intersection point belongs into at least two sub-patches to obtain a second model.
9. An electronic device comprising: one or more processors; A storage device configured to store one or more programs, wherein When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the mesh model surface reduction method according to any one of claims 1 to 7.
10. A storage medium containing computer-executable instructions, wherein: When the computer executable instructions are executed by a computer processor, the computer executable instructions are used to perform the mesh model surface reduction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Face model generation method, interaction method and related device
CN113610981A
Model area reduction processing method and device, electronic equipment and storage medium
CN115222879A
Vertex weight processing method and device, electronic equipment and storage medium
CN116612214A
Systems and methods for virtual entity animation
US20180096510A1