A method, apparatus and device for three-dimensional model interleaving repair

By generating geometry and adjusting the poses of limb parts in the 3D model, the problem of 3D model interweaving is automatically solved, achieving efficient model repair, improving animation quality, and saving human resources.

CN113888680BActive Publication Date: 2026-03-31GUANGZHOU HUYA TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, 3D models are prone to model interleaving issues during animation retargeting, leading to a decrease in animation quality and requiring manual repair that consumes a lot of manpower and time.

Method used

By generating the geometry of simulated 3D limb parts, determining the target change amount, and automatically adjusting the pose of the limb parts to avoid intersection, the automatic repair of the 3D model is achieved.

Benefits of technology

It achieves automated 3D model interleaving repair without manual repair, saving manpower and time while maintaining animation quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113888680B_ABST
    Figure CN113888680B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a method, device and equipment for repairing a three-dimensional model. For each limb part of an original three-dimensional model to be repaired, a geometric body simulating the limb part is generated. Then, based on the intersection between the geometric bodies corresponding to the limb parts in the original three-dimensional model during adjustment of the poses of the limb parts of the original three-dimensional model, a target change amount of the pose of the limb part of the original three-dimensional model is determined. The pose of the limb part of the three-dimensional model is adjusted based on the target change amount, and a repaired model is obtained. Through the method provided in the embodiments of the present application, the repair of the inserted model can be automatically realized without manual repair, thereby saving manpower and time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of artificial intelligence technology, and in particular to a method, apparatus and equipment for interlacing and repairing three-dimensional models. Background Technology

[0002] When 3D models use unreasonable animation, such as assigning a joint rotation beyond a reasonable range, or having a hybrid deformation coefficient exceeding a reasonable range, surfaces at different locations on the 3D model may intersect. For example, an arm might rotate too much and become embedded in the body; this is called model interlacing. Model interlacing frequently occurs during animation retargeting, resulting in poor animation quality. Currently, when 3D model interlacing occurs, animators need to manually repair the model, which is a significant workload, consuming both manpower and time. Summary of the Invention

[0003] Based on this, this specification provides a method, apparatus, and equipment for interlacing and repairing three-dimensional models.

[0004] According to a first aspect of the embodiments of this specification, a method for interlacing and repairing three-dimensional models is provided, the method comprising:

[0005] Obtain the original 3D model to be interlaced and repaired;

[0006] For each limb part in the original 3D model, generate a geometry to simulate each limb part, resulting in multiple geometries;

[0007] Based on the intersection of the multiple geometric objects of the limb parts in different poses of the original 3D model, the target change amount of the pose of the limb parts of the original 3D model is determined.

[0008] The poses of the limb parts of the original 3D model are adjusted based on the target change to obtain the target 3D model after interlacing repair.

[0009] According to a second aspect of the embodiments of this specification, a three-dimensional model interlacing repair device is provided, the device comprising:

[0010] The acquisition module is used to acquire the original 3D model to be interlaced and repaired;

[0011] The geometry generation module is used to generate geometry for each limb part in the original 3D model to simulate each limb part, so as to obtain multiple geometry.

[0012] The target change determination module is used to determine the target change of the pose of the limb parts of the original three-dimensional model based on the intersection of the multiple geometric objects in different poses of the limb parts of the original three-dimensional model.

[0013] The adjustment module is used to adjust the pose of the limb parts of the original three-dimensional model based on the target change amount, so as to obtain the target three-dimensional model after interlacing repair.

[0014] According to a third aspect of the embodiments of this specification, an apparatus is provided, the apparatus including a processor, a memory, and a computer program stored in the memory that is executable by the processor, wherein the processor executes the computer program to implement the method mentioned in the first aspect above.

[0015] By applying the scheme of the embodiments of this specification, a geometry simulating each limb part of the original 3D model to be repaired can be generated. Then, based on the intersection of the corresponding geometries of each limb part in the original 3D model during the adjustment of the poses of each limb part, the target change in the pose of the limb parts of the original 3D model can be determined. Based on the target change, the poses of the limb parts of the 3D model are adjusted to obtain the repaired model. The method provided by the embodiments of this application can automatically repair intersecting models without manual repair, saving manpower and time.

[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0018] Figure 1 This specification describes an embodiment of a model with and without interlacing.

[0019] Figure 2 This is a flowchart of a three-dimensional model interleaving and repair method according to one embodiment of this specification.

[0020] Figure 3 This is a schematic diagram illustrating the generation of geometry for various limb parts of a rabbit model, as one embodiment of this specification.

[0021] Figure 4 This is a schematic diagram of the intersecting depth of two geometries according to one embodiment of this specification.

[0022] Figure 5This is a schematic diagram of an animation production process according to one embodiment of this specification.

[0023] Figure 6 This is a logical structure block diagram of a three-dimensional model interleaving repair device according to one embodiment of this specification.

[0024] Figure 7 This is a logical structure block diagram of an electronic device according to one embodiment of this specification. Detailed Implementation

[0025] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0026] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0027] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0028] When a 3D model uses inappropriate animation, such as assigning an excessively large rotation to a limb or exceeding the reasonable range of blending deformation coefficients, surfaces at different locations on the 3D model may intersect. For example, an arm might rotate too much and become embedded in the body; this is called model interlacing. In animation production, existing animation resources are often transferred to a target model to generate new animations. When transferring an animation from model A to model B, it's necessary to resolve the incompatibility issues caused by model differences; this process is called animation retargeting. During animation retargeting, differences in model shape and proportions often lead to interlacing problems in the retargeted animation. For example, as shown... Figure 1 As shown, the model in the source animation has a slender, lifelike skeleton, while the target model is a cartoon rabbit with a short and round body. When the source animation is redirected to the target model, the resulting animation shows an interlacing problem, where the arms appear to be inserted into the body, as shown below. Figure 1 As shown in (a) above. Models without interleaving are as follows: Figure 1 As shown in (b) of the diagram.

[0029] Model overlap can severely impact the quality and presentation of animation. Therefore, it's necessary to correct model overlap to obtain models without overlap. Currently, correcting model overlap requires animators to manually repair the models, which is a significant workload and extremely time-consuming for animations with numerous and frequent overlaps.

[0030] Based on this, embodiments of this application provide a method for repairing interlaced 3D models, which can automatically repair interlaced original 3D models to obtain a target 3D model without interlacing. Interlacing in 3D models occurs because limb parts are given unreasonable animations (e.g., unreasonable rotation angles or unreasonable movement distances), causing different limb parts to intersect. Therefore, repairing the interlaced 3D model involves adjusting the pose (position and orientation) of each limb part, making the limb parts in the 3D model as non-intersecting as possible. Furthermore, to ensure that the animation of the repaired 3D model is as consistent as possible with the animation of the original 3D model, the intersection of limb parts is avoided with minimal adjustments to the pose of the 3D model. Therefore, for each limb part of the original 3D model to be repaired, a geometry simulating that limb part can be generated. Then, based on the intersection of the corresponding geometries of each limb part in the original 3D model during the adjustment of the poses of each limb part, the target change in the pose of the limb parts of the original 3D model can be determined. Based on this target change, the poses of the limb parts of the 3D model are adjusted to obtain the repaired model. The method provided in this application embodiment can automatically repair interlaced models without manual repair, saving manpower and time.

[0031] The 3D model interlacing repair method provided in this application can be used in various animation production, animation retargeting, or animation interlacing repair software. For example, it can be an APP, component, toolkit, etc. with model interlacing repair function, and this application does not impose any limitations.

[0032] The three-dimensional model in this application embodiment can be of various types, such as human body model, animal model, various virtual characters, cartoon characters, etc. As long as the three-dimensional model needs to be interlaced and repaired, it is applicable to the method provided in this application embodiment.

[0033] like Figure 2 As shown, the method may include the following steps:

[0034] S202. Obtain the original 3D model to be interlaced and repaired;

[0035] In step S202, the original 3D model to be interlaced and repaired can be obtained first. There can be one or more original 3D models. For example, the original 3D model can be a 3D model in a multi-frame animation, with each original 3D model corresponding to one frame of animation.

[0036] S204. For each limb part in the original three-dimensional model, generate a geometry to simulate each limb part, so as to obtain multiple geometries;

[0037] The intersection of different limb parts in a 3D model refers to the occurrence of intersections between different limb parts. 3D models are typically represented by mesh data; for example, a 3D model can be constructed from a large number of triangular meshes. The position information of the mesh vertices and the connection relationships between them can represent a 3D model. Since each limb part is represented by a large number of triangular meshes, determining whether two limb parts of the 3D model intersect using these meshes is computationally intensive and complex. To reduce the computational load when determining whether two limb parts of the original 3D model intersect, in step S206, a geometry simulating that limb part can be generated for each limb part in the original 3D model. By using a basic geometry to approximate each limb part, the intersection between different limb parts can be determined based on the intersection status of these geometries. Since the intersection status of geometries can be determined with minimal mathematical calculations, the determination of intersection between different limb parts can be simplified, significantly reducing the computational load.

[0038] The geometry can be generated based on the shape and position of each limb part. The shape of the geometry can be various basic geometric shapes such as spheres, capsules, and cubes. The geometry corresponding to each limb part can be determined based on the shape and position of that limb part. For example, ... Figure 3 The image shown is a schematic diagram of the geometry generated for a rabbit model. The rabbit model's hands, head, and torso are approximated using spheres, while its limbs and feet are approximated using capsules.

[0039] S206. Based on the intersection of the multiple geometric objects of the limb parts of the original three-dimensional model in different poses, determine the target change amount of the pose of the limb parts of the three-dimensional model.

[0040] The interweaving phenomenon between different limb parts in the original 3D model is due to unreasonable animation applied to certain limb parts. For example, the arm's rotation angle is too large, causing the arm to interweave into the body. Therefore, when repairing the interweaving in the original 3D model, it is necessary to adjust the animation (i.e., pose) of one or more limb parts in the original 3D model to bring it within a reasonable range, thereby avoiding interweaving. Therefore, in step S206, based on the intersection of multiple geometric objects corresponding to the limb parts in different poses of the original 3D model, the target change in the pose of the limb parts of the original 3D model can be determined. When the pose of the limb parts of the original 3D model is changed using this target change, the intersection of the multiple geometric objects corresponding to the limb parts of the original 3D model should meet the preset requirements (i.e., no intersection, or interweaving depth less than a preset threshold), and the target change should be relatively small, ensuring that the pose of the adjusted 3D model does not change significantly from the pose of the original 3D model, thus preserving the original animation of the 3D model.

[0041] In the process of interpolating and repairing the original 3D model, the poses of one or more specific limb parts can be adjusted, while the poses of the remaining limb parts remain unchanged. Therefore, it is only necessary to determine the geometric intersections when the poses of these one or more specific limb parts change, and then determine the target change in the poses of these one or more limb parts based on the intersections. These one or more limb parts can be preset by the user.

[0042] S208. Adjust the pose of the limb parts of the original three-dimensional model based on the target change amount to obtain the target three-dimensional model after interlacing repair.

[0043] In step S208, after determining the target change amount of the pose of the limb parts of the original three-dimensional model, the pose of the limb parts of the original three-dimensional model can be adjusted based on the target change amount, so as to obtain the target three-dimensional model after interlacing repair. The target three-dimensional model and the original three-dimensional model only have some differences in the pose of the limb parts. For example, the rotation angle of some limb parts is slightly smaller, so as to minimize or avoid interlacing.

[0044] In addition, in some scenarios, besides adjusting the pose of the limbs of the 3D model to avoid the 3D model from intersecting, the deformation coefficient of the limbs of the 3D model can also be changed. It is easy to understand that similar operations that can avoid model intersecting are all within the protection scope of this application.

[0045] In some embodiments, there may be multiple original 3D models to be interpolated and repaired, each corresponding to one frame of the target animation. That is, these multiple original 3D models are multiple 3D models with different limb animations (i.e., poses), and these multiple original 3D models constitute the target animation. The target animation can be obtained by redirecting the source animation to a specified 3D model.

[0046] In some embodiments, the original 3D model can be a 3D mesh model, meaning the original 3D model can be represented by multiple mesh vertices and the connections between them. When generating the geometry to simulate each limb part in the original 3D model, the position information of the target mesh vertices corresponding to each limb part can be obtained first. Then, based on the position information of the target mesh vertices, the target values ​​of the shape parameters and pose parameters of the geometry used to simulate each limb part can be determined. The shape parameters determine the shape of the generated geometry; for example, if the geometry is a sphere, the radius can be determined; if the geometry is a cube, the length of each side can be determined. The pose parameters determine the pose of the generated geometry, such as the coordinates of the center of the geometry and the rotation angles of the geometry along various axes. Once the shape and pose parameters of the geometry are determined, the geometry can be generated.

[0047] In some embodiments, when determining the target mesh vertices corresponding to each limb part in the original 3D model, the skinning weights of each mesh vertex in the original 3D model can be determined first. These skinning weights characterize the influence of the bones corresponding to each limb part on each mesh vertex. During bone rigging, the influence of each bone on each mesh vertex in the 3D mesh model (i.e., skinning weights) can be determined. For any given bone, mesh vertices closer to that bone are more significantly affected. Therefore, the skinning weights of each mesh vertex relative to each limb part can be obtained, and mesh vertices with skinning weights greater than a preset threshold can be used as the target mesh vertices corresponding to each limb part. After determining the target mesh vertices corresponding to each limb part, the geometry simulating that limb part can be determined based on the distribution of the target mesh vertices. The geometry can enclose all the target mesh vertices.

[0048] In some embodiments, the position information of the target mesh vertices can be the position coordinates of the target mesh vertices. When determining the target values ​​of the shape parameters and the target values ​​of the position parameters of the geometry used to simulate each limb part based on the position information of the target mesh vertices, the initial values ​​of the position parameters of the geometry can be determined first based on the average value of the position coordinates of the target mesh vertices. Then, the initial values ​​of the shape parameters of the geometry can be determined based on the maximum value and the minimum value of the position coordinates of the target mesh vertices. Then, the geometry can be constrained to enclose all the target mesh vertices, with the goal of minimizing the volume of the geometry. Based on the initial values ​​of the position parameters and the initial values ​​of the shape parameters, the position parameters and the shape parameters can be further optimized to obtain the target values ​​of the position parameters and the target values ​​of the shape parameters. The geometry can be generated based on the determined target values ​​of the position parameters and the target values ​​of the shape parameters.

[0049] Of course, in practical applications, not all limb parts of the original 3D model intersect; most intersects occur between specific limb parts, such as between the upper limb and the body, or between the lower limb and the body. Therefore, when determining the intersection between limb parts of the original 3D model, it is only necessary to determine the intersection between the corresponding geometries of certain limb part pairs, without traversing all limb part pairs, thus reducing computational load. Therefore, in some embodiments, when determining the target change in the pose of each limb part of the original 3D model based on the intersection between multiple geometries of each limb part in different poses, one or more geometry pairs can be determined from the multiple geometries. Each of these geometry pairs corresponds to a limb part pair to be repaired. These geometry pairs can be preset by the user or automatically determined based on the position parameters of the geometries. Then, the target change in the pose of the limb parts of the original 3D model can be determined based on the intersection between these one or more geometry pairs of the limb parts in different poses. For example, users can pre-set some pairs of limb parts that need to be avoided from intersecting, such as {LeftHand, Head}, {LeftHand, Spine}, {RightHand, Spine}, {LeftHand, LeftUpLeg}, {LeftHand, RightUpLeg}. During the process of adjusting the pose of the limb parts in the original 3D model, the intersection between the geometric pairs corresponding to the pre-set pairs of limb parts that need to be avoided from intersecting can be determined, and the target change amount can be determined based on the intersection.

[0050] Of course, in some scenarios, if it is not possible to determine in advance which limb pairs may intersect, all limb pairs in the original 3D model can be traversed, and the intersection between the corresponding geometric pairs of all limb pairs can be determined to ensure that no two limbs intersect.

[0051] In some embodiments, the intersection between geometric bodies can be determined based on the target values ​​of the shape parameters and the target values ​​of the position parameters of the geometric bodies. For example, after determining the values ​​of the shape parameters and position parameters of two geometric bodies, the intersection of the two geometric bodies can be determined based on these two values, such as the depth of intersection, the direction of intersection, etc.

[0052] In some embodiments, the intersection between geometric pairs includes the interpenetration depth between each geometric pair, which is the overlap distance of the two geometric pairs in the direction of the line connecting their centers. For example... Figure 4 As shown, assuming that both geometric bodies in a pair are spherical, and the two spheres intersect, the penetration depth of the pair can be the overlap distance of the two spheres along the line connecting their centers. The penetration depth can be calculated as follows: First, determine the distance between the centers of the two spheres based on their position parameters. Then, determine the radii of each sphere based on their shape parameters. The penetration depth can be obtained by the difference between the sum of their radii and the distance between their centers.

[0053] When performing interlacing repair on the original 3D model to obtain the target 3D model, the ultimate goal is to ensure that the intersection of the limb parts of the original 3D model meets expectations (e.g., no intersection or interlacing depth less than a certain value) while preserving the original animation (i.e., pose) of the original 3D model as much as possible. Therefore, in some embodiments, when determining the target change in the pose of the limb parts of the original 3D model based on the intersection between one or more pairs of geometric objects in different poses, the constraint that the interlacing depth of one or more pairs of geometric objects is less than a preset distance threshold can be used, and the optimization objective can be to minimize the change in the pose of the limb parts, thereby optimizing the change in the pose of the limb parts to obtain the target change.

[0054] In some embodiments, the original 3D model to be interlaced and repaired can be a 3D model in a multi-frame animation. For example, the multi-frame animation can be a series of animations describing a series of limb movements of a certain 3D model. Each frame of the animation corresponds to an original 3D model, and the poses of the limb parts of the original 3D model in different frames of the animation are different. When interlacing and repairing the original 3D models in these multi-frame animations, these multi-frame animations can be optimized simultaneously. For example, the constraint can be that the interlacing depth of different limb parts of the original 3D model in any frame of the animation is less than a preset distance threshold. The optimization objective is to minimize the change in pose of each limb part of the original 3D model in each frame of the animation, that is, to minimize the average change in pose of each limb part of the original 3D model in the multi-frame animation. The change in pose of each limb part of the original 3D model in each frame of the multi-frame animation is optimized to obtain the target change corresponding to each frame of the animation. Then, the pose of the original 3D model in each frame of the animation is adjusted using the target change to obtain the repaired model.

[0055] In some embodiments, the original 3D model to be interlaced and repaired can be a 3D model from a multi-frame animation. If the number of frames in the animation is large, performing interlacing and repair on the 3D models from all these frames at once would be computationally too demanding. Therefore, the multi-frame animation can be divided into multiple animation segments, and the target changes in the poses of the limb parts of the original 3D model in each frame of each segment can be optimized to perform interlacing and repair on the original 3D model in each frame. Of course, if each animation segment is optimized independently, abrupt transitions may occur at the transition points between two segments. To avoid this, when dividing a multi-frame animation into multiple segments, some overlapping frames can exist between adjacent segments. When optimizing the changes in the poses of the limbs in the 3D model of each segment, constraints can be used, such as ensuring that the interlacing depth of the original 3D model in each frame of each segment is less than a preset distance threshold, and that the pose changes of the limbs in the original 3D model in the overlapping frames of adjacent segments are consistent. The optimization objective is to minimize the average change in the poses of the limbs in the original 3D model of each frame of each segment. By optimizing the change in the poses of the limbs in the original 3D model of each segment, the target change in the poses of the limbs in the original 3D model of each frame of each segment can be obtained. By adding the constraint that the pose changes in the overlapping frames of adjacent segments are consistent, the problem of abrupt transitions at the transition points between two segments can be effectively solved.

[0056] To further explain the method for interlacing and repairing three-dimensional models provided in the embodiments of this application, the following explanation is based on a specific embodiment.

[0057] In animation production, existing source animation is often redirected to a specified model to obtain the target animation. In the redirected target animation, some frames may exhibit overlapping of 3D models, thus requiring automatic correction of these overlaps. For example... Figure 5 The diagram shown is a schematic diagram of an animation production method provided in an embodiment of this application. It can obtain a source animation and a specified 3D model, migrate the source animation to the specified 3D model through animation redirection, and then perform interlacing repair on the 3D model in each frame of the redirected animation to finally obtain a target animation without interlacing.

[0058] When performing interlacing repair on the 3D model in each frame of animation, the pose and shape parameters of the simulated limb parts can be automatically determined by statistically analyzing the distribution of mesh vertices corresponding to each limb part in the 3D model. Then, an optimization task can be established based on user-configured parameters such as the limb part pairs to be avoided from interlacing, the tolerable interlacing depth threshold for these pairs, the limb parts requiring pose adjustment, the number of animation frames for each optimization, and the shape and pose parameters of the simulated limb parts. The variable in this optimization task is the pose of the limb parts requiring pose adjustment set by the user. The optimization objective is to minimize the pose change of the limb parts requiring pose adjustment in each frame of animation. The constraint in this optimization task is that the interlacing depth of the limb part pairs to be avoided in each frame of animation is less than a preset threshold (the interlacing depth of the limb part pairs can be determined based on their shape and pose parameters). By constructing the above optimization task, the amount of change in the pose of the limb parts of the 3D model in each frame of the animation can be determined. Then, based on the amount of change, the pose of the limb parts of the 3D model in each frame of the animation can be adjusted to obtain the target animation without overlap.

[0059] Specifically, the above method may include the following steps:

[0060] 1. Parameter Configuration

[0061] It can provide users with an interactive interface through which users can configure some parameters needed in the interlacing repair process, including: parameters related to the creation of geometry corresponding to each limb part of the 3D model, and parameters related to optimizing the pose changes of the limb parts of the 3D model.

[0062] Parameters related to the creation of the geometry of each limb part in the simulated 3D model:

[0063] (1) Simulate the geometry type of each limb part. The geometry type can be: sphere, capsule, cube (of course, the geometry type can also be automatically determined based on the distribution of the mesh vertices corresponding to each limb part).

[0064] (2) The range of bones included in each limb part, for example, the hand needs to include the fingers, the foot needs to include the toes, and the head only needs to include itself.

[0065] (3) Skin weight filtering threshold for each limb part. This filtering threshold is used to select the mesh vertices that are more affected by each limb part from each mesh vertex of the 3D model, so as to generate the geometry of each limb part based on the distribution of these mesh vertices.

[0066] Optimize the relevant parameters for the pose changes of each limb part in the 3D model:

[0067] (1) Limb pairs that need to be avoided. Since interweaving often occurs between specific limbs (e.g., between the upper limb and the body, or between the lower limbs), using all pairs of limbs to avoid all interweaving would lead to a lot of meaningless calculations. Therefore, limb pairs that need to be avoided can be pre-configured, and during optimization, the constraint can be that the interweaving depth between these limb pairs is less than a preset depth.

[0068] (2) Limb parts whose poses need to be adjusted. Since the interlacing of the 3D model is repaired, that is, the poses of the limb parts of the 3D model are adjusted to make the animation of the 3D model more reasonable, thereby avoiding interlacing. Therefore, the limb parts whose poses need to be adjusted can be pre-set, and the poses of these limb parts can be used as optimization variables to determine the minimum change in the poses of these limb parts.

[0069] (3) The tolerance threshold for the interpenetration depth of limb pairs that need to be avoided can be set in advance for each pair of limb pairs. When optimizing the amount of pose change, the interpenetration depth of the limb pairs that need to be avoided can be less than the preset interpenetration depth threshold as a constraint.

[0070] (4) Configure and optimize window size and window step size

[0071] In practical applications, input animations can be quite long, making it difficult to optimize very long segments at once (due to too many variables and large intermediate calculations). The optimization window size refers to the number of consecutive animation frames optimized in a single operation. The window step size refers to the interval between two consecutive windows; a step size smaller than the window size means that the windows overlap.

[0072] 2. Construct geometry for each limb part

[0073] (1) It can obtain the mesh vertices affected by each limb part;

[0074] The vertices corresponding to each limb part are determined based on the skinning weights of the bones to the mesh vertices and a pre-set skinning weight filtering threshold. Theoretically, the head includes the vertices near the head, and the hand includes all the vertices near the hand. Each vertex is represented by {x, y, z} in 3D space.

[0075] (2) Determine the initial values ​​of the shape parameters (e.g., radius) and pose parameters (e.g., rotation and translation) of the geometry of each limb part.

[0076] By obtaining the average position of all mesh vertices corresponding to each limb part in three-dimensional space, the initial values ​​of the pose parameters of the geometry can be roughly estimated; by using the maximum and minimum positions of all mesh vertices and the main directions (using principal component analysis), the initial values ​​of the shape parameters of the geometry can be roughly calculated.

[0077] (3) Establish a constrained optimization problem and determine the target values ​​of the shape parameters and position parameters of the geometry.

[0078] Using all the mesh vertices of the limb as constraints, minimizing the volume of the geometry as the optimization objective, the initial values ​​of the shape parameters and pose parameters of the geometry are further optimized to obtain the target values ​​of the shape parameters and the target values ​​of the position parameters, thereby generating the geometry.

[0079] 3. Optimize the pose changes of the limb parts of the 3D model in each frame of the animation.

[0080] When optimizing the pose change, the optimization objective can be to minimize the pose change of the limb part (limb part A) to be adjusted, and the constraint that the interlacing depth between limb parts to be avoided should be less than a preset interlacing depth threshold can be used to optimize the pose change of limb part A. This will yield the target pose change of limb part A in each frame of the animation. Then, the pose of limb part A in each frame of the animation can be adjusted using this target pose change to obtain the repaired animation.

[0081] When there are many animation frames (200 or more), it's impossible to process them all in one optimization (too many variables, requiring a lot of memory). The animation needs to be processed in segments, but the smoothness of the transitions between segments cannot be guaranteed. In this case, multiple optimization windows can be set up, each corresponding to one segment of the animation. Adjacent optimization windows may have overlapping frames, and additional constraints are added to these overlapping frames. Specifically, the pose changes of the 3D model's limb parts in the overlapping frames of adjacent optimization windows must be consistent. By adding these additional constraints, the smoothness of the transitions between the repaired animation segments can be guaranteed, without any abrupt changes.

[0082] Corresponding to the above methods, this disclosure also provides an apparatus for interlacing and repairing three-dimensional models, such as... Figure 6 As shown, the device 60 includes:

[0083] The acquisition module 61 is used to acquire the original 3D model to be interlaced and repaired;

[0084] The geometry generation module 62 is used to generate a geometry for each limb part in the original three-dimensional model to simulate each limb part, so as to obtain multiple geometry.

[0085] The target change determination module 63 is used to determine the target change of the pose of the limb part of the original three-dimensional model based on the intersection of the multiple geometric objects in different poses of the limb part of the original three-dimensional model.

[0086] The adjustment module 64 is used to adjust the pose of the limb parts of the original three-dimensional model based on the target change amount, so as to obtain the target three-dimensional model after interlacing repair.

[0087] In some embodiments, the original 3D model includes multiple original 3D models, each of which corresponds to a frame of animation in the target animation, which is obtained by redirecting the source animation to a preset 3D model.

[0088] In some embodiments, the original 3D model is a 3D mesh model, and the target change determination module is used to generate geometry for simulating each limb part in the original 3D model, specifically for:

[0089] Obtain the position information of the target mesh vertices corresponding to each limb part;

[0090] Based on the position information of the target mesh vertices, target values ​​for the shape parameters and pose parameters of the geometry used to simulate each limb part are determined. The shape parameters are used to indicate the shape of the geometry, and the pose parameters are used to indicate the pose of the geometry.

[0091] In some embodiments, the target mesh vertices are determined based on the following methods:

[0092] Determine the skinning weights of each mesh vertex in the original 3D model. The skinning weights are used to characterize the influence of the bone corresponding to each limb part on each mesh vertex.

[0093] The mesh vertices whose skin weight is greater than a preset threshold are used as the target mesh vertices corresponding to each limb part.

[0094] In some embodiments, the position information includes the position coordinates of the target mesh vertices, and the target change determination module is used to determine, based on the position information of the target mesh vertices, the target values ​​of the shape parameters and the pose parameters of the geometry used to simulate each limb part, specifically for:

[0095] The initial values ​​of the pose parameters are determined based on the average value of the position coordinates of the target mesh vertices;

[0096] The initial values ​​of the shape parameters are determined based on the maximum and minimum values ​​of the position coordinates of the target mesh vertices.

[0097] Using the geometry surrounding all the vertices of the target mesh as a constraint, and minimizing the volume of the geometry as the optimization objective, the initial values ​​of the pose parameters and the initial values ​​of the shape parameters are optimized to obtain the target values ​​of the position parameters and the target values ​​of the shape parameters.

[0098] In some embodiments, the intersection between the geometries is determined based on target values ​​of the shape parameters of the geometries and target values ​​of the position parameters of the geometries.

[0099] In some embodiments, when the target change determination module determines the target change in the pose of each limb part of the original 3D model based on the intersection of the multiple geometric objects in different poses of each limb part of the original 3D model, it is specifically used for:

[0100] One or more geometric pairs are determined from the plurality of geometric bodies, and the limb part pairs corresponding to each geometric pair are the limb part pairs to be interlaced and repaired;

[0101] Based on the intersection of one or more geometric pairs of the limb parts in different poses of the original 3D model, the target change in the pose of the limb parts of the original 3D model is determined.

[0102] In some embodiments, the intersection includes the intersecting depth between each pair of geometries, the intersecting depth being the overlap distance of the two geometries in each pair along the line connecting their centers.

[0103] In some embodiments, when the target change determination module determines the target change in the pose of the limb parts of the original 3D model based on the intersection of one or more pairs of geometric bodies in different poses of the limb parts of the original 3D model, it is specifically used for:

[0104] Using the insertion depth being less than a preset distance threshold as a constraint, and minimizing the change in the pose of the limb as the optimization objective, the change in the pose of the limb is optimized to obtain the target change.

[0105] In some embodiments, the original 3D model includes a 3D model in a multi-frame animation, the constraint is that the interpenetration depth of the original 3D model in each frame of the animation is less than a preset distance threshold, and the optimization objective is to minimize the average value of the pose changes of the limb parts of the original 3D model in the multi-frame animation.

[0106] In some embodiments, the original 3D model includes a 3D model from a multi-frame animation, and the apparatus is further configured to:

[0107] The multi-frame animation is divided into multiple animation segments, with overlapping frames between adjacent animation segments;

[0108] Based on the intersection of one or more geometric pairs of limb parts in different poses of the original 3D model, the target change in pose of the limb parts of the original 3D model is determined, including:

[0109] For each segment of the multi-segment animation, the constraints are that the interlacing depth of the original 3D model in each frame of each segment is less than a preset distance threshold, and that the target change amount of the overlapping frames of two adjacent segments is consistent. The optimization objective is to minimize the average value of the change amount of the limb pose of the original 3D model in each segment. The change amount of the limb pose of the original 3D model in each segment is optimized to obtain the target change amount of each frame of each segment.

[0110] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 7 As shown, the electronic device includes a processor 71, a memory 72, and a computer program stored in the memory 72 that can be executed by the processor 71. When the processor 71 executes the computer program, it implements the method described in any of the above embodiments.

[0111] Accordingly, this application also provides a computer storage medium storing a program, which, when executed by a processor, implements the methods described in any of the above embodiments.

[0112] The embodiments of this specification may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0113] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0114] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the description disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0115] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

[0116] The above description is merely a preferred embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method of three-dimensional model interpenetration repair, characterized by, The method comprises: obtaining an original three-dimensional model to be repaired by interpenetration; for each limb part in the original three-dimensional model, generating a geometric body for simulating the each limb part to obtain a plurality of geometric bodies, wherein the original three-dimensional model is a three-dimensional mesh model, and the geometric body of each limb part is generated based on the following manner: target mesh vertices with skinning weights greater than a preset threshold are screened out from mesh vertices of the original three-dimensional model, and a geometric body of the limb part is generated based on a distribution of the target mesh vertices, wherein the geometric body is a geometric body that can surround all the target mesh vertices and has the smallest volume, and the skinning weight is used to represent an influence of a corresponding skeleton of the each limb part on each mesh vertex; determining a target change amount of a pose of a limb part of the original three-dimensional model based on an intersection between the plurality of geometric bodies when the limb part of the original three-dimensional model is in different poses, wherein when the pose of the limb part of the original three-dimensional model is changed by using the target change amount, an intersection between the plurality of geometric bodies corresponding to the limb part of the original three-dimensional model meets a preset condition, and the preset condition includes non-intersection or intersection with an interpenetration depth less than a preset threshold; adjusting the pose of the limb part of the original three-dimensional model based on the target change amount to obtain a target three-dimensional model after interpenetration repair.

2. The method of claim 1, wherein, The original three-dimensional model comprises a plurality of original three-dimensional models, each of which corresponds to a frame of animation in a target animation, and the target animation is obtained by reorienting a source animation to a preset three-dimensional model.

3. The method of claim 1, wherein, The generating of the geometric body of the limb part based on the distribution of the target mesh vertices comprises: obtaining position information of the target mesh vertices corresponding to the each limb part; determining a target value of a shape parameter and a target value of a pose parameter of the geometric body for simulating the each limb part based on the position information of the target mesh vertices, wherein the shape parameter is used to indicate a shape of the geometric body, and the pose parameter is used to indicate a pose of the geometric body.

4. The method of claim 3, wherein, The position information comprises position coordinates of the target mesh vertices, and the determining of the target value of the shape parameter and the target value of the pose parameter of the geometric body for simulating the each limb part based on the position information of the target mesh vertices comprises: determining an initial value of the pose parameter based on an average value of the position coordinates of the target mesh vertices; determining an initial value of the shape parameter based on a maximum value of the position coordinates of the target mesh vertices and a minimum value of the position coordinates of the target mesh vertices; optimizing the initial value of the pose parameter and the initial value of the shape parameter to obtain the target value of the pose parameter and the target value of the shape parameter, with the constraint that the geometric body surrounds all the target mesh vertices and the optimization target of minimizing the volume of the geometric body.

5. The method of claim 3, wherein, The intersection between the geometric bodies is determined based on the target value of the shape parameter of the geometric body and the target value of the pose parameter of the geometric body.

6. The method of claim 1, wherein, determine a target change amount of the pose of the limb part of the original three-dimensional model based on intersection conditions between the plurality of geometric bodies when the limb part of the original three-dimensional model is in different poses, including: determine one or more geometric body pairs from the plurality of geometric bodies, each geometric body pair corresponding to a limb part pair to be repaired by penetration; determine a target change amount of the pose of the limb part of the original three-dimensional model based on intersection conditions between the one or more geometric body pairs when the limb part of the original three-dimensional model is in different poses.

7. The method of claim 6, wherein, The intersection conditions include a penetration depth between each geometric body pair, and the penetration depth is an overlapping distance of two geometric bodies in each geometric body pair in a direction of a center line of the two geometric bodies.

8. The method of claim 7, wherein, determine a target change amount of the pose of the limb part of the original three-dimensional model based on intersection conditions between the one or more geometric body pairs when the limb part of the original three-dimensional model is in different poses, including: optimize the change amount of the pose of the limb part under the constraint that the penetration depth is less than a preset distance threshold and the optimization target of minimizing the change amount of the pose of the limb part, to obtain the target change amount.

9. The method of claim 8, wherein, The original three-dimensional model includes a three-dimensional model in a plurality of animation frames, the constraint is that the penetration depth of the original three-dimensional model in each animation frame is less than a preset distance threshold, and the optimization target is to minimize the average value of the change amount of the pose of the limb part of the original three-dimensional model in the plurality of animation frames.

10. The method of claim 7, wherein, The original three-dimensional model includes a three-dimensional model in a plurality of animation frames, and the method further includes: segmenting the plurality of animation frames into a plurality of animation segments, and there are overlapping frames between adjacent two animation segments; determine a target change amount of the pose of the limb part of the original three-dimensional model based on intersection conditions between the one or more geometric body pairs when the limb part of the original three-dimensional model is in different poses, including: for each animation segment in the plurality of animation segments, optimize the change amount of the pose of the limb part of the original three-dimensional model in the animation segment under the constraints that the penetration depth of the original three-dimensional model in each animation frame in the animation segment is less than a preset distance threshold, and the target change amount of the overlapping frames of adjacent two animation segments is consistent, and the optimization target of minimizing the average value of the change amount of the pose of the limb part of the original three-dimensional model in the animation segment, to obtain the target change amount of each animation frame in the animation segment.

11. An apparatus for three-dimensional model tessellation repair, the apparatus comprising: The device includes: an acquisition module configured to acquire an original three-dimensional model to be repaired by penetration; The geometric body generation module is configured to generate, for each limb part in the original three-dimensional model, a geometric body for simulating the each limb part to obtain a plurality of geometric bodies, wherein the original three-dimensional model is a three-dimensional mesh model, and the geometric body of each limb part is generated based on the following manner: target mesh vertices with skinning weights greater than a preset threshold are screened from mesh vertices of the original three-dimensional model, and the geometric body of the limb part is generated based on a distribution of the target mesh vertices, wherein the geometric body is a geometric body that can surround all the target mesh vertices and has a minimum volume, and the skinning weight is used to represent an influence of a corresponding skeleton of the each limb part on each mesh vertex; The target change amount determination module is configured to determine a target change amount of the pose of the limb part of the original three-dimensional model based on an intersection between the plurality of geometric bodies when the limb part of the original three-dimensional model is in different poses, wherein when the pose of the limb part of the original three-dimensional model is changed by using the target change amount, an intersection between the plurality of geometric bodies corresponding to the limb part of the original three-dimensional model meets a preset condition, and the preset condition includes non-intersection or intersection with a penetration depth less than a preset threshold; The adjustment module is configured to adjust the pose of the limb part of the original three-dimensional model based on the target change amount to obtain a target three-dimensional model after penetration repair.

12. An electronic device, comprising: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, and the processor implements the method of any one of claims 1-10 when executing the computer program. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, and the processor implements the method of any one of claims 1-10 when executing the computer program.

Citation Information

Patent Citations

  • Data matching method and device, electronic equipment and storage medium

    CN112258609A

  • Action redirection method and device, equipment and storage medium

    CN112562072A

  • Three-dimensional model construction method, device and system and storage medium

    CN112785690A