A method and system for synchronizing processing of three-dimensional object fragment animation and material evolution
Patent Information
- Application Number
- CN202611039614.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2046-07-14
AI Technical Summary
[0005]鉴于此,本发明提出了一种三维物体碎块动画与材质演化同步处理方法及系统,旨在解决三维物体发生破裂、爆炸、坍塌或分离等破坏类动画时,物体运动变化与材质外观变化难以保持同步的问题
[0015]与现有技术相比,本发明的有益效果在于:通过对待处理三维物体模型进行碎块化处理,获得具有碎块标识、断裂面区域和材质索引的碎块网格集合;并分别基于碎块网格的起动时刻生成碎块运动序列、基于断裂面区域的材质变化起始时刻生成材质演化数据,再按照相同的碎块标识和相同的采样时刻,将位移信息、旋转信息和材质参数写入同一帧记录中,形成同步帧数据,使同步播放资源在播放展示时能够基于同一帧记录调用碎块运动数据和断裂面材质数据,从而减少三维物体破坏类动画中碎块运动变化与材质外观变化不同步的情况,提高碎块动画与材质演化的对应一致性。
Smart Images

Figure CN122574179B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics processing technology, and more specifically, to a method and system for synchronously processing three-dimensional object fragment animation and material evolution. Background Technology
[0002] With the development of computer graphics, game engines, film and television special effects, virtual reality, and digital simulation technologies, 3D object animation has been widely used in interactive entertainment, scene simulation, industrial displays, and visual effects production. In 3D scenes, the dynamic representation of virtual objects typically involves changes in geometric shape, motion state, and surface display effects. In existing technologies, virtual object animation can usually be achieved through vertex offset, skeletal driving, keyframe animation, physical simulation, or material parameter adjustment to represent changes in appearance due to wind, collision deformation, localized color changes, surface heating, or environmental influences. These methods can meet the production needs of some continuous animations or localized appearance changes. However, in complex dynamic scenes, motion changes and appearance changes are often completed separately by different tools or processing stages, and the temporal relationship between the two mainly relies on manual adjustment.
[0003] For example, Chinese patent application CN112767522A discloses a rendering method, apparatus, storage medium, and electronic device for virtual object wind animation. It obtains wind field data and material data of the virtual object in a virtual scene, compares the positional offset values corresponding to the wind field data and the positional offset value ranges corresponding to the material data, determines the positional offset values of the vertices of the virtual object's abstract model, and thus generates the virtual object's wind animation. This solution can constrain the vertex offset of the virtual object under the influence of wind based on the material data, improving the rendering effect of the virtual object's wind animation. This solution mainly targets the continuous swaying or deformation effects of virtual objects caused by wind, focusing on determining the vertex offset range in the wind animation. When a 3D object undergoes destructive animations such as cracking, exploding, collapsing, or separating, the object's motion state changes abruptly, and the surface display effect also changes with the destruction process. If the motion changes and material appearance changes are still processed separately, inconsistencies between the motion stage and the appearance change stage can easily occur, affecting the realism and continuity of the destructive animation.
[0004] Therefore, it is necessary to design a method and system for synchronously processing 3D object fragment animation and material evolution to solve the problems existing in the current technology. Summary of the Invention
[0005] In view of this, the present invention proposes a method and system for synchronizing the animation of three-dimensional object fragments with the evolution of materials, aiming to solve the problem that it is difficult to keep the changes in the motion of objects and the changes in the appearance of materials synchronized when three-dimensional objects break, explode, collapse or separate in destructive animations.
[0006] This invention proposes a method for synchronizing the animation of 3D object fragments with material evolution, including: Acquire the 3D object model to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; The three-dimensional object model to be processed is fragmented according to the information of the broken area to obtain a set of fragmented meshes, and the fragment identifier, fracture surface area and material index corresponding to the fracture surface area of each fragmented mesh are determined. Based on the fragment identifier, trigger timing and fragment motion constraints, the start time of each fragment mesh is determined, and based on the motion time offset of each sampling time on the animation timeline relative to the corresponding start time, the displacement and rotation information of each fragment mesh at each sampling time are determined, thus obtaining the fragment motion sequence. Based on the fragment identifier, fracture surface region, material index and material evolution parameters, the starting time of material change in each fracture surface region is determined, and based on the material time offset of each sampling time on the animation timeline relative to the corresponding starting time of material change, the corresponding material stage and the material parameters under the corresponding material stage are determined to obtain material evolution data. Based on the same fragment identifier and the same sampling time, the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh are written into the same frame record to obtain synchronous frame data. The fragmented grid set and the synchronization frame data are packaged into a synchronized playback resource and then played and displayed.
[0007] Furthermore, the fragmentation process of the three-dimensional object model to be processed includes: The grid area to be broken is determined based on the broken area information; The area to be broken is cut to form multiple connected grid cells; The open boundaries formed by cutting in each connected mesh cell are closed to obtain a set of fragmented meshes.
[0008] Furthermore, determining the fragment identifier, fracture surface region, and material index corresponding to each fragment mesh includes: The newly added facets formed by the closed opening boundaries in each fragmented grid are identified as candidate fracture surfaces; Candidate fracture surfaces belonging to the same fragmented mesh and having adjacent boundaries or satisfying the continuity condition in the normal direction are merged into a fracture surface region. Fragment identifiers are generated based on the spatial location and connectivity order of the fragment mesh; Based on the original location of the fracture surface region and the fracture surface material type in the material evolution parameters, the material index corresponding to the fracture surface region is determined.
[0009] Furthermore, determining the start time of each fragment mesh includes: Read the trigger time and trigger range from the trigger timing sequence; The fragment grid located within the trigger range is identified as the directly activated fragment, and the trigger time is taken as the activation time of the directly activated fragment; For fragmented meshes located outside the trigger range, the start time of the corresponding fragmented mesh is determined according to the delay rule in the fragmented motion constraint and the adjacency level or spatial distance between the fragmented mesh and the directly started fragment.
[0010] Furthermore, when determining the displacement and rotation information of each fragment mesh at each sampling time, the following is included: Read the motion direction, displacement curve, rotation axis, rotation curve, and motion duration from the fragment motion constraints; The time difference between the sampling time and the start time of the corresponding fragment grid is used as the motion time offset; When the motion time offset is less than zero, the zero displacement is used as the displacement information at the current sampling time, and the initial attitude rotation is used as the rotation information at the current sampling time. When the motion time offset is greater than or equal to zero and less than the motion duration, the displacement information at the current sampling moment is determined based on the motion time offset, the displacement change curve, and the motion direction, and the rotation information at the current sampling moment is determined based on the motion time offset, the rotation change curve, and the rotation axis. When the motion time offset is greater than or equal to the motion duration, the displacement and rotation information corresponding to the motion duration are used as the displacement and rotation information at the current sampling time.
[0011] Furthermore, when determining the onset time of material change in each fracture surface region, the following factors are included: Read the fracture display distance from the material evolution parameters; Candidate start times are determined based on the start times of the fragment grid to which the fracture surface region belongs; When the fracture surface region is obscured by adjacent fragments at the candidate start time, the sampling time when the distance between adjacent fragments reaches the fracture display distance is determined as the material change start time. When the fracture surface region is not obscured by adjacent fragments at the candidate start time, the candidate start time is determined as the start time of material change.
[0012] Furthermore, when determining the corresponding material stage and the material parameters under the corresponding material stage, the following are included: Read the material stage sequence, stage time period, and stage parameter value corresponding to the material index from the material evolution parameters; The time difference between the sampling time and the starting time of the material change is used as the material time offset; The current material stage is determined in the material stage sequence based on the material time offset and the stage time period. When the material time offset is within the stable range of the current material stage, the stage parameter value of the current material stage is used as the material parameter at the current sampling time. When the material time offset is within the transition interval of an adjacent material stage, the stage parameter values of the adjacent material stages are interpolated to obtain the material parameters at the current sampling time.
[0013] Furthermore, when obtaining synchronization frame data, the following are included: Frame records are established according to the sampling times on the animation timeline; In the same frame recording, the displacement and rotation information of the corresponding fragment mesh are written according to the fragment identifier, and the material parameters of the corresponding fracture surface region are written according to the material index. If the material parameters of the corresponding fracture surface region are not obtained at the current sampling time, the initial material parameters of the fracture surface region or the material parameters of the previous sampling time are written into the current frame record.
[0014] Furthermore, when packaging the fragmented grid set and the synchronization frame data into a synchronized playback resource, the process includes: Fragmented mesh resources are generated based on the fragmented mesh set, and a frame index table is generated based on the synchronization frame data; The fragmented grid resources, the frame index table, and the synchronization frame data are packaged into synchronized playback resources; When the synchronized playback resource is invoked, the target frame record is determined in the frame index table according to the current playback time, and the corresponding fragmented mesh resource is rendered according to the target frame record.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: by fragmenting the 3D object model to be processed, a set of fragment meshes with fragment identifiers, fracture surface regions, and material indexes is obtained; and fragment motion sequences are generated based on the start time of the fragment meshes, and material evolution data is generated based on the start time of material changes in the fracture surface regions. Then, according to the same fragment identifier and the same sampling time, displacement information, rotation information, and material parameters are written into the same frame record to form synchronous frame data. This allows synchronous playback resources to call fragment motion data and fracture surface material data based on the same frame record when playing and displaying, thereby reducing the asynchronous situation between fragment motion changes and material appearance changes in 3D object destruction animations and improving the correspondence consistency between fragment animation and material evolution.
[0016] On the other hand, this application also provides a system for synchronously processing 3D object fragment animation and material evolution, used to apply the above-mentioned method for synchronously processing 3D object fragment animation and material evolution, including: The model acquisition unit is used to acquire the model of the 3D object to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; The fragment generation unit is used to fragment the three-dimensional object model to be processed according to the fragmented area information, obtain a fragment mesh set, and determine the fragment identifier, fracture surface area and the material index corresponding to the fracture surface area of each fragment mesh. The fragment motion unit is used to determine the start time of each fragment mesh according to the fragment identifier, trigger timing and fragment motion constraints, and to determine the displacement and rotation information of each fragment mesh at each sampling time based on the motion time offset of each sampling time on the animation time axis relative to the corresponding start time, so as to obtain the fragment motion sequence. The material evolution unit is used to determine the start time of material change in each fracture surface region based on the fragment identifier, fracture surface region, material index and material evolution parameters, and to determine the corresponding material stage and material parameters under the corresponding material stage based on the material time offset of each sampling time on the animation timeline relative to the corresponding material change start time, so as to obtain material evolution data. The synchronous framing unit is used to write the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh into the same frame record according to the same fragment identifier and the same sampling time, so as to obtain synchronous frame data; The resource playback unit is used to package the fragmented grid set and the synchronization frame data into a synchronized playback resource and display it.
[0017] It is understandable that the above-mentioned method and system for synchronizing the animation of 3D object fragments with material evolution have the same beneficial effects, and will not be elaborated further here. Attached Figure Description
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the method for synchronous processing of 3D object fragment animation and material evolution provided in an embodiment of the present invention; Figure 2 This is a flowchart of the material evolution data generation process provided in an embodiment of the present invention; Figure 3 This is a functional block diagram of a system for synchronously processing 3D object fragment animation and material evolution provided in an embodiment of the present invention. Detailed Implementation
[0019] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, embodiments and features in the embodiments of the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0020] In some embodiments of this application, see Figure 1-2 As shown, this application proposes a method for synchronizing the animation of 3D object fragments with material evolution, including: S100: Acquire the 3D object model to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; S200: Based on the information of the fractured area, the 3D object model to be processed is fragmented to obtain a set of fragmented meshes, and the fragment identifier, fracture surface area and the material index corresponding to the fracture surface area of each fragmented mesh are determined. S300: Based on the fragment identifier, trigger timing and fragment motion constraints, determine the start time of each fragment mesh, and based on the motion time offset of each sampling time on the animation timeline relative to the corresponding start time, determine the displacement and rotation information of each fragment mesh at each sampling time, and obtain the fragment motion sequence. S400: Based on the fragment identifier, fracture surface region, material index and material evolution parameters, determine the start time of material change in each fracture surface region, and based on the material time offset of each sampling time on the animation timeline relative to the corresponding start time of material change, determine the corresponding material stage and the material parameters under the corresponding material stage, and obtain material evolution data. S500: According to the same fragment identifier and the same sampling time, the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh are written into the same frame record to obtain synchronous frame data; S600: Packages the fragmented grid set and synchronization frame data into a synchronized playback resource and displays it for playback.
[0021] Specifically, in some embodiments of this application, the 3D object model to be processed is a triangular mesh model, and the model data includes vertex coordinates, facet topology, normals, texture coordinates, and original material information. The animation timeline is determined by the animation start time, the animation end time, and the sampling frame rate. The sampling frame rate can be provided by the target playback project or the animation editing project; if the sampling frame rate is not given separately, the project frame rate of the animation editing project is used. Multiple sampling moments are generated between the animation start time and the animation end time according to the sampling frame rate, and each sampling moment corresponds to one frame record.
[0022] The fragmentation region information is used to determine the mesh range within the 3D object model to be processed that will participate in the fragmentation process. This information can be a 3D bounding box, a spherical region, a user-selected face region, a crack path, or a vertex weight map. When using a 3D bounding box or a spherical region, the coordinates of the center point of each face are calculated, and faces whose center points are located within the 3D bounding box or spherical region are included in the fragmentation region. When using a user-selected face region, the set of face numbers selected by the user is read, and faces within this set are included in the fragmentation region. When using a crack path, the distance from the crack path to the center point of each face is calculated, and faces whose distance is not greater than the crack influence width are included in the fragmentation region. The crack influence width can be input by the user; if not input, it is obtained by multiplying the average side length of the 3D object model by a crack width coefficient, which is provided by the animation editing project.
[0023] When using a vertex weight graph, the breakage weight of each vertex is read, and the breakage determination weight is used as the weight boundary. The breakage determination weight can be input by the user; if not input, the midpoint of the vertex weight value range is used as the weight boundary. For any facet, if the breakage weight of all vertices of the facet is not less than the weight boundary, the facet is included in the area to be broken; if the breakage weight of all vertices of the facet is less than the weight boundary, the facet is not included in the area to be broken; if the facet contains both vertices with breakage weights not less than the weight boundary and vertices with breakage weights less than the weight boundary, the facet is split along the weight boundary, and the facets on the broken side after splitting are included in the area to be broken. During splitting, interpolation points are calculated on the edges where the breakage weights cross the weight boundary. The positions of the interpolation points are obtained according to the ratio between the breakage weights of the vertices at both ends of the edge and the weight boundary, and then the interpolation points are connected to form a new facet boundary.
[0024] Trigger timing is used to define the temporal relationship of the fragments' initiation of movement, including the trigger moment and trigger range. The trigger moment is a point in time on the animation timeline, and the trigger range is the spatial area or set of fragments where the breaking motion first occurs. Fragment motion constraints are used to define the fragment motion process, including the direction of motion, displacement change curve, rotation axis, rotation change curve, motion duration, and delay rules. Material evolution parameters are used to define the material change process of the fracture surface region, including the fracture surface material type, material index, fracture display distance, material stage sequence, stage time period, and stage parameter values. Material parameters can include one or more of the following: base color, roughness, metallicity, self-illumination intensity, normal intensity, ablation coefficient, and oxidation coefficient.
[0025] When fragmenting a region of mesh to be fragmented, first read the target number of fragments. The target number of fragments can be input by the user; if not input, it is obtained based on the bounding box volume of the region to be fragmented and the target fragment size. The target fragment size can be input by the user; if not input, calculate the average side length of the region to be fragmented and multiply it by a fragment size coefficient to obtain the target fragment size. Then, divide the bounding box volume of the region to be fragmented by the cube of the target fragment size to obtain the candidate fragment number; limit the candidate fragment number to the range allowed by the animation editing project to obtain the target fragment number.
[0026] Seed points are generated based on the target fragment quantity. When using a uniform distribution method, the bounding box of the grid region to be broken is divided into multiple spatial sub-regions, and a seed point is generated in each sub-region. If a seed point is located outside the grid region to be broken, it is moved to the center of the nearest fragment. When using a random distribution method, candidate points are generated within the bounding box of the grid region to be broken, and candidate points located within the grid region are retained until the number of retained candidate points reaches the target fragment quantity. When using a crack path distribution method, path seed points are generated along the crack path at a set step size, and auxiliary seed points are generated on both sides of the crack path. The set step size is obtained by dividing the crack path length by the target fragment quantity, and the distance between the auxiliary seed points and the crack path is determined by the crack influence width.
[0027] After obtaining the seed points, a cutting surface is formed based on the spatial interface between adjacent seed points. For any two adjacent seed points, the midpoint of the line connecting the two seed points is taken, and a spatial interface is generated using this midpoint as the passing point and the direction of the line connecting the two seed points as the normal direction. The spatial interface is used to cut the region of the mesh to be broken, forming multiple connected mesh cells. Each connected mesh cell consists of facets that maintain edge connections after cutting. The formation order of the connected mesh cells is obtained by sorting the spatial centers of each connected mesh cell; when the distance between the spatial centers is less than the average side length of the model, the connected mesh cells are sorted according to the generation time.
[0028] After cutting, the connected mesh cells have open boundaries formed by the cutting. Edges belonging to only one facet are extracted as boundary edges, and these end-to-end boundary edges form an open boundary loop. When closing the open boundary loop, it is first determined whether the vertices of the boundary loop lie in the same reference plane. The determination method is as follows: perform plane fitting on the vertices of the boundary loop, calculate the distance from each boundary vertex to the fitted plane; if the maximum distance is not greater than the average side length of the model multiplied by the plane tolerance coefficient, the loop is closed according to that reference plane; if the maximum distance is greater than the average side length of the model multiplied by the plane tolerance coefficient, the boundary loop is divided into multiple local boundary segments and closed separately. During closure, the boundary vertices are projected onto the reference plane, triangulation is performed within the reference plane, and the generated closed triangular faces are mapped back to 3D space. The connected mesh cells after the closure process form a fragmented mesh set.
[0029] When determining the fracture surface region, newly added facets formed by the closure of the opening boundary are used as candidate fracture surfaces. These newly added facets are generated after the cutting process and do not belong to the original outer surface of the 3D object model to be processed. For candidate fracture surfaces within the same fragmented mesh, the adjacency relationship between candidate fracture surfaces is first established based on common edges or common vertices, and then the continuity between candidate fracture surfaces is determined based on the normal direction. The threshold for determining the continuity of the normal direction is obtained from the facet density of the mesh region to be broken. Specifically, the area of each triangular facet within the mesh region to be broken is calculated to obtain the average facet area, and then the area ratio between the average facet area and the surface area of the mesh region to be broken is calculated. The smaller the area ratio, the denser the facets, and a smaller normal angle threshold is used accordingly; the larger the area ratio, the sparser the facets, and a larger normal angle threshold is used accordingly. The normal angle threshold is obtained by reading or interpolating from the area ratio-angle threshold correspondence table based on the area ratio. If the normal angle between two candidate fracture surfaces is not greater than the normal angle threshold, the normal direction is considered to meet the continuity condition. Candidate fracture surfaces that are adjacent at their boundaries or whose normal directions meet the continuity condition are merged into a fracture surface region.
[0030] Fragment identifiers are generated based on the spatial location and connectivity order of the fragment meshes. The spatial center of each fragment mesh is calculated, and the spatial center is the average of the coordinates of all vertices of the corresponding fragment mesh. The fragment meshes are then sorted according to the coordinate order of their spatial centers in the world coordinate system; if the distance between the spatial centers of two fragment meshes is less than the average side length of the model, they are further sorted according to the order in which the connected mesh cells were formed. After sorting, each fragment mesh is assigned a unique number, resulting in a fragment identifier. The average side length of the model is obtained by the arithmetic mean of the side lengths of all meshes in the 3D object model to be processed.
[0031] The material index is determined based on the original location of the fracture surface region and the fracture surface material type in the material evolution parameters. The vertex positions of the fracture surface region are mapped to the spatial positions of the 3D object model before it breaks, and the original material region or internal material region to which that spatial position belongs is searched. If the fracture surface region corresponds to the interior of concrete, the material index corresponding to the concrete cross-section material type is read; if the fracture surface region corresponds to the interior of metal, the material index corresponding to the metal cross-section material type is read. The high-temperature influence range is given by the trigger sequence or material evolution parameters. The high-temperature influence range can be a spherical range centered on the trigger center, a user-drawn patch region, or a set of fragment identifiers corresponding to the ablation cross-section material type. When the original position of the fracture surface region is within the high-temperature influence range, the material index corresponding to the ablation cross-section material type is read. If the same fracture surface region simultaneously conforms to multiple fracture surface material types, the material index is selected according to the material priority table recorded in the material evolution parameters; if no material priority table is set, the material index is selected in the order of ablation cross-section, metal cross-section, and concrete cross-section.
[0032] The ablation coefficient represents the degree of ablation on the fracture surface. Interpolation is performed between the unablated and ablated colors based on the ablation coefficient, and roughness and self-luminescence intensity are adjusted accordingly. The oxidation coefficient represents the degree of oxidation on the metal fracture surface. Interpolation is performed between the new fracture surface color and the oxidized color based on the oxidation coefficient, and metallicity and roughness are adjusted accordingly. The ablation color, oxidation color, roughness variation range, metallicity variation range, and self-luminescence intensity variation range are all provided by the stage parameter values in the material evolution parameters; if not provided, the basic stage parameter values for the corresponding material type are read.
[0033] When determining the activation time of each fragment mesh, first read the trigger time and trigger range from the trigger timing sequence. If the spatial center of the fragment mesh is within the trigger range, then the fragment mesh is determined as a directly activated fragment, and the trigger time is used as the activation time of the directly activated fragment. For fragment meshes outside the trigger range, the activation time is calculated according to the delay rule. The delay rule can adopt an adjacency level delay method or a spatial distance delay method.
[0034] When using the adjacency-level delay method, an adjacency graph is first established based on the cutting adjacency relationships between fragment meshes. When two fragment meshes share the same cutting boundary or opposite fracture surface region before cutting, a connecting edge is established in the adjacency graph. Using the directly initiated fragment as the zero-level node, the graph is traversed outwards; fragment meshes connected to the zero-level node but not marked are the first-level delayed fragments, and fragment meshes connected to the first-level delayed fragments but not marked are the second-level delayed fragments, and so on, obtaining the adjacency level of each fragment mesh. The unit delay duration is obtained from the total animation duration and the maximum adjacency level. Specifically, the time period allowed for fragment propagation is read; if not input separately, the fragment propagation segment from the total animation duration is taken. The fragment propagation segment duration is divided by the maximum adjacency level to obtain the unit delay duration. The start time of a fragment mesh is equal to the trigger time plus the product of the adjacency level and the unit delay duration.
[0035] When using the spatial distance delay method, calculate the distance from the spatial center of the fragment grid to the spatial center of the nearest directly activated fragment, and calculate the maximum distance among all fragment grids outside the trigger range. Read the fragmentation propagation completion time; if not input separately, use the end time of the fragmentation propagation segment after the trigger time as the fragmentation propagation completion time. Divide the corresponding distance of the fragment grid by the maximum distance to obtain the distance ratio, then multiply the distance ratio by the fragmentation propagation segment duration to obtain the delay duration. The activation time of the fragment grid is equal to the trigger time plus the delay duration. When there are multiple trigger times or multiple trigger ranges, calculate the candidate activation times of the same fragment grid relative to each trigger time sequence, and use the earliest candidate activation time as the activation time of the corresponding fragment grid.
[0036] When determining the displacement and rotation information of each fragment mesh at the sampling time, the time difference between the sampling time and the starting time of the corresponding fragment mesh is used as the motion time offset. When the motion time offset is less than zero, zero displacement is used as the displacement information at the current sampling time, and the initial attitude rotation is used as the rotation information at the current sampling time. Zero displacement indicates that the fragment mesh has no offset relative to its initial position, and initial attitude rotation indicates that the fragment mesh has no rotational offset relative to its initial attitude.
[0037] When the motion time offset is greater than or equal to zero and less than the motion duration, the motion time offset is divided by the motion duration to obtain the normalized motion time. If the motion duration is not specified in the fragment motion constraints, the time between the start time of the fragment mesh and the end time of the animation is used as the candidate duration, and the candidate duration is truncated according to the motion duration ratio set by the user; if no motion duration ratio is set, the base duration ratio in the animation editing project is read. The displacement and rotation curves can be linear curves, Bézier curves, or user-input custom curves. When no user-input curves are received, both the displacement and rotation curves are linear curves, and the normalized motion time is directly used as the displacement and rotation ratios.
[0038] The normalized motion time is input into the displacement change curve to obtain the displacement ratio. The maximum displacement distance is obtained by combining the failure type, the diagonal length of the bounding box of the mesh region to be broken, and the failure strength coefficient. Specifically, the displacement coefficient interval corresponding to the failure type is read first, and then the failure strength coefficient input by the user is read. The failure strength coefficient is used to determine the target displacement coefficient within the displacement coefficient interval. The product of the target displacement coefficient and the diagonal length of the bounding box of the mesh region to be broken is the maximum displacement distance. The displacement ratio is multiplied by the maximum displacement distance to obtain the motion distance. If the fragment motion constraint does not give a motion direction, the unit vector pointing from the failure center to the center of the fragment mesh space is used as the motion direction; when the failure center coincides with the center of the fragment mesh space, the average direction of the normal to the outer surface of the fragment mesh is used as the motion direction. The motion direction is multiplied by the motion distance to obtain the displacement information at the current sampling time.
[0039] Rotation information is obtained by offsetting the same motion time. The normalized motion time is input into the rotation change curve to obtain the rotation ratio. The maximum rotation angle is obtained from the fragment mesh volume and the average fragment volume. Specifically, the volume ratio between the fragment mesh volume and the average fragment volume is calculated, and the volume ratio-rotation angle correspondence table is read; the smaller the volume ratio, the larger the corresponding maximum rotation angle, and vice versa. The maximum rotation angle can be read from the volume ratio-rotation angle correspondence table, or it can be obtained by interpolation based on the volume ratio in the table. The rotation ratio is multiplied by the maximum rotation angle to obtain the current rotation angle. If the fragment motion constraint does not provide a rotation axis, the cross product of the motion direction and the vertical direction of the world coordinate system is used as the rotation axis; when the length of the cross product is zero, the X-axis of the world coordinate system is used as the rotation axis. The rotation information at the current sampling time is obtained based on the rotation axis and the current rotation angle. The rotation information can be represented using quaternions, Euler angles, or a rotation matrix. When the motion time offset is greater than or equal to the motion duration, the displacement and rotation information corresponding to the motion duration are used as the displacement and rotation information at the current sampling moment. Thus, each fragmented mesh forms a fragmented motion sequence at the sampling moment of the animation timeline.
[0040] When determining the start time of material changes in each fracture region, the fracture display distance is read from the material evolution parameters. The fracture display distance is obtained from the model scale and the patch scale. Specifically, the average side length of the 3D object model to be processed is first calculated, then the patch scale difference is calculated; the patch scale difference is the ratio between the maximum and minimum patch side lengths. When the patch scale difference does not exceed the scale difference threshold, the fracture display distance is obtained by multiplying the average side length of the model by the fracture display coefficient; when the patch scale difference exceeds the scale difference threshold, the fracture display distance is obtained by multiplying the diagonal length of the model bounding box by the global display coefficient. The fracture display coefficient and the global display coefficient are provided by the material evolution parameters; if not provided, the base coefficient corresponding to the model scale type in the animation editing project is read.
[0041] The candidate start time is determined based on the start time of the fragment mesh to which the fracture surface region belongs. If the fracture surface region corresponds to only one fragment mesh, the candidate start time is the start time of that fragment mesh. If two adjacent fragment meshes each have a corresponding fracture surface region, the candidate start time is the earlier of the start times of the two adjacent fragment meshes. To determine whether the fracture surface region is occluded by adjacent fragments at the candidate start time, the minimum point-to-surface distance between the bounding boxes of the adjacent fragment meshes and the corresponding fracture surface regions at the candidate start time is obtained. If the bounding boxes of the adjacent fragment meshes intersect, or the minimum point-to-surface distance between the corresponding fracture surface regions is less than the fracture display distance, it is determined that the fracture surface region is occluded by adjacent fragments at the candidate start time; otherwise, it is determined that the fracture surface region is not occluded by adjacent fragments at the candidate start time.
[0042] If the fracture surface region is occluded by adjacent fragments at the candidate start time, the positions of the adjacent fragment meshes are read frame by frame along the animation timeline, and the spacing between the relative fracture surface regions is calculated. The spacing between adjacent fragments is preferentially based on the minimum point-to-surface distance between the relative fracture surface regions; when the number of fracture surface regions exceeds the real-time preview threshold set in the animation editing project, the distance between the geometric centers of the relative fracture surface regions is used. The sampling time when the spacing first reaches the fracture display distance is found, and this sampling time is determined as the material change start time. If the fracture surface region is not occluded by adjacent fragments at the candidate start time, the candidate start time is determined as the material change start time.
[0043] When determining material stages and parameters, the material stage sequence, stage time interval, and stage parameter values corresponding to the material index are read from the material evolution parameters. The stage time interval is set to the zero point of the material change start time. If the material evolution parameters do not provide a stage time interval, the stage template corresponding to the material type is read; the stage template includes the stage sequence and the time ratio of each stage relative to the material change start time. The time between the material change start time and the animation end time is used as the evolvable time, and then the time intervals of each stage are allocated according to the time ratios in the stage template.
[0044] The time difference between the sampling time and the start time of the material change is used as the material time offset. The material time offset is compared sequentially with the start and end times of each stage time interval to find the stage time interval to which the material time offset belongs, and the material stage corresponding to that stage time interval is determined as the current material stage. When the material time offset is within the stable interval of the current material stage, the stage parameter value of the current material stage is used as the material parameter at the current sampling time. The stable interval is obtained by subtracting the transition interval from the stage time interval. The transition interval is obtained based on the stage time interval: when the stage time interval is not less than the engineering transition baseline, a fixed transition duration is used; when the stage time interval is less than the engineering transition baseline, the transition duration is obtained by multiplying the stage time interval by the transition ratio. The engineering transition baseline, fixed transition duration, and transition ratio are provided by the material evolution parameters or animation editing engineering parameters.
[0045] When the material time offset is within the transition interval of an adjacent material stage, the stage parameter values of the adjacent material stage are interpolated to obtain the material parameters at the current sampling time. The interpolation method is specified by the interpolation type field in the material evolution parameters. The interpolation type can be linear interpolation or Bezier interpolation. When using linear interpolation, the normalized progress within the transition interval at the current sampling time is first calculated, and then the normalized progress is used as the interpolation coefficient to interpolate the stage parameter values of the adjacent material stage. When using Bezier interpolation, the normalized progress is input into the Bezier interpolation curve to obtain the interpolation coefficient, and then the material parameters at the current sampling time are obtained based on the interpolation coefficient. The base color is interpolated according to the RGB channels, and roughness, metallicity, self-illumination intensity, ablation coefficient, and oxidation coefficient are interpolated according to their corresponding values.
[0046] After obtaining the fragment motion sequence and material evolution data, frame records are established according to the sampling times on the animation timeline. Each frame record corresponds to one sampling time. Frame records include frame number, sampling time, fragment record, and material record. Fragment records include fragment identifier, displacement information, and rotation information. Material records include fragment identifier, fracture surface region number, material index, and material parameters. In the same frame record, the displacement and rotation information of the corresponding fragment mesh are written according to the fragment identifier, and the material parameters of the corresponding fracture surface region are written according to the material index. When the same fragment mesh has multiple fracture surface regions, the material parameters of multiple fracture surface regions are written separately in the same frame record. Both fragment records and material records in the same frame record use the fragment identifier as the primary index and the fracture surface region number and material index as secondary indexes for the material record.
[0047] If the material parameters for the corresponding fracture surface region are not obtained at the current sampling time, the content to be written is determined based on the relationship between the current sampling time and the material change start time. If the current sampling time is earlier than the material change start time, the initial material parameters for the fracture surface region are written to the current frame record; if the current sampling time is later than the material change start time but no material parameters for the current sampling time have been generated, the material parameters from the previous sampling time are written to the current frame record; if no material parameters from the previous sampling time exist, the initial material parameters for the fracture surface region are written; if no stage parameter value exists for the corresponding material index, the basic material parameters corresponding to that material index are written. The basic material parameters are determined by the initial material parameters in the material evolution parameters; if no initial material parameters are set, the material parameters are read from the basic material corresponding to the fracture surface material type.
[0048] When packaging fragmented mesh sets and synchronization frame data into a synchronized playback resource, fragmented mesh resources are generated based on the fragmented mesh set, and a frame index table is generated based on the synchronization frame data. The fragmented mesh resource includes vertex data, face data, normal data, texture coordinate data, fragment identifiers, and fracture surface region numbers for each fragmented mesh. The frame index table includes the frame sequence number, sampling time, and the data location of the corresponding frame record. Subsequently, the fragmented mesh resource, frame index table, and synchronization frame data are packaged into a synchronized playback resource. The synchronized playback resource can be a binary resource package, an animation cache file, or an engine resource file.
[0049] When invoking synchronized playback resources, the target frame record is determined in the frame index table based on the current playback time. If the current playback time equals a certain sampling time, the frame record corresponding to that sampling time is read; if the current playback time is between two sampling times, the frame record with the closest time distance is read, or two adjacent frame records are read and interpolated. When interpolating two adjacent frame records, linear interpolation is used for displacement information, quaternion spherical linear interpolation or Euler angle linear interpolation is used for rotation information, and material parameters are interpolated according to each parameter field. After reading the target frame record, the corresponding fragment mesh resource is found based on the fragment identifier, and the displacement and rotation information are applied to the corresponding fragment mesh; the corresponding fracture surface region is found based on the material index and fracture surface region number, and the material parameters are applied to the corresponding fracture surface region.
[0050] As a specific embodiment, the 3D object model to be processed is a concrete wall model. The user draws a broken area in the middle of the wall, determines the mesh area to be broken based on the brush weight map, and forms multiple connected mesh units through a spatial cutting method based on seed points. After closing the opening boundaries formed by the cutting, a set of fragmented meshes is obtained. Each fragmented mesh generates a fragment identifier based on its spatial location and connectivity order. The newly added faces formed by closing are merged into the fracture surface region, and a material index is assigned according to the concrete cross-section material type.
[0051] In this embodiment, the trigger moment is the start moment on the animation timeline, and the trigger range is a spherical area surrounding the center point of the wall. Fragmented grids within this spherical area are used as directly triggered fragments; fragmented grids outside the spherical area have their delay duration determined according to their adjacency level or spatial distance. The animation timeline and sampling frame rate are read by the playback project. At each sampling moment, the displacement and rotation information of each fragmented grid are determined based on the motion time offset, displacement change curve, motion direction, rotation change curve, and rotation axis.
[0052] The material stages of the concrete cross-section are sequenced as follows: fresh cross-section stage, dusting transition stage, and dusting stabilization stage. The time intervals for each stage are determined according to the stage time intervals in the material evolution parameters; if no stage time intervals are input, the evolutionary time between the start of the material change and the end of the animation, as well as the stage template allocation, are used. The parameter values for each stage include base color, roughness, and dusting coefficient. At each sampling moment, the current material stage is determined based on the material time offset, and the material parameters are determined based on the stage parameter values of the current material stage or the interpolation results of adjacent material stages. Subsequently, the displacement information, rotation information, and material parameters of the fracture surface region of the same fragment mesh at the same sampling moment are written into the same frame record to generate synchronized frame data, and the synchronized frame data and fragment mesh resources are packaged into synchronized playback resources.
[0053] In summary, this application establishes a correspondence between fragment motion data and fracture surface material data by identifying fragment identifiers and sampling times, and writes displacement information, rotation information, and material parameters at the same sampling time into the same frame record. During playback, fragment animation data and material evolution data can be read according to the same frame record, thereby reducing inconsistencies between fragment motion stages and material change stages and improving the playback consistency of destructive 3D animations.
[0054] Based on another preferred embodiment described above, see [link to preferred embodiment]. Figure 3 As shown, this embodiment provides a system for synchronously processing 3D object fragment animation and material evolution, used to apply the above-mentioned method for synchronously processing 3D object fragment animation and material evolution, including: The model acquisition unit is used to acquire the model of the 3D object to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; The fragment generation unit is used to fragment the 3D object model to be processed based on the information of the fractured area, obtain a set of fragment meshes, and determine the fragment identifier, fracture surface area, and material index corresponding to the fracture surface area of each fragment mesh. The fragment motion unit is used to determine the start time of each fragment mesh based on the fragment identifier, trigger timing and fragment motion constraints, and to determine the displacement and rotation information of each fragment mesh at each sampling time based on the motion time offset of each sampling time on the animation timeline relative to the corresponding start time, so as to obtain the fragment motion sequence. The material evolution unit is used to determine the start time of material change in each fracture surface region based on the fragment identifier, fracture surface region, material index and material evolution parameters, and to determine the corresponding material stage and material parameters under the corresponding material stage based on the material time offset of each sampling time on the animation timeline relative to the corresponding material change start time, so as to obtain material evolution data. The synchronous framing unit is used to write the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh into the same frame record according to the same fragment identifier and the same sampling time, so as to obtain synchronous frame data; The resource playback unit is used to package fragmented grid sets and synchronous frame data into synchronous playback resources and display them.
[0055] It is understandable that the above-mentioned method and system for synchronizing the animation of 3D object fragments with material evolution have the same beneficial effects, and will not be elaborated further here.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for synchronously processing 3D object fragment animation and material evolution, characterized in that, include: Acquire the 3D object model to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; The three-dimensional object model to be processed is fragmented according to the information of the broken area to obtain a set of fragmented meshes, and the fragment identifier, fracture surface area and material index corresponding to the fracture surface area of each fragmented mesh are determined. Based on the fragment identifier, trigger timing and fragment motion constraints, the start time of each fragment mesh is determined, and based on the motion time offset of each sampling time on the animation timeline relative to the corresponding start time, the displacement and rotation information of each fragment mesh at each sampling time are determined, thus obtaining the fragment motion sequence. Based on the fragment identifier, fracture surface region, material index and material evolution parameters, the starting time of material change in each fracture surface region is determined, and based on the material time offset of each sampling time on the animation timeline relative to the corresponding starting time of material change, the corresponding material stage and the material parameters under the corresponding material stage are determined to obtain material evolution data. Based on the same fragment identifier and the same sampling time, the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh are written into the same frame record to obtain synchronous frame data. The fragmented grid set and the synchronization frame data are packaged into a synchronized playback resource and then played and displayed. When performing fragmentation processing on the three-dimensional object model to be processed, the following are included: The grid area to be broken is determined based on the broken area information; The area to be broken is cut to form multiple connected grid cells; Close the open boundaries formed by cutting in each connected mesh cell to obtain a set of fragmented meshes; When determining the fragment identifier, fracture surface region, and material index corresponding to each fragment mesh, the process includes: The newly added facets formed by the closed opening boundaries in each fragmented grid are identified as candidate fracture surfaces; Candidate fracture surfaces belonging to the same fragmented mesh and having adjacent boundaries or satisfying the continuity condition in the normal direction are merged into a fracture surface region. Fragment identifiers are generated based on the spatial location and connectivity order of the fragment mesh; Based on the original location of the fracture surface region and the fracture surface material type in the material evolution parameters, the material index corresponding to the fracture surface region is determined.
2. The method for synchronous processing of 3D object fragment animation and material evolution according to claim 1, characterized in that, When determining the start time of each fragment mesh, the following is included: Read the trigger time and trigger range from the trigger timing sequence; The fragment grid located within the trigger range is identified as the directly activated fragment, and the trigger time is taken as the activation time of the directly activated fragment; For fragmented meshes located outside the trigger range, the start time of the corresponding fragmented mesh is determined according to the delay rule in the fragmented motion constraint and the adjacency level or spatial distance between the fragmented mesh and the directly started fragment.
3. The method for synchronous processing of 3D object fragment animation and material evolution according to claim 2, characterized in that, When determining the displacement and rotation information of each fragment mesh at each sampling time, the following is included: Read the motion direction, displacement curve, rotation axis, rotation curve, and motion duration from the fragment motion constraints; The time difference between the sampling time and the start time of the corresponding fragment grid is used as the motion time offset; When the motion time offset is less than zero, the zero displacement is used as the displacement information at the current sampling time, and the initial attitude rotation is used as the rotation information at the current sampling time. When the motion time offset is greater than or equal to zero and less than the motion duration, the displacement information at the current sampling moment is determined based on the motion time offset, the displacement change curve, and the motion direction, and the rotation information at the current sampling moment is determined based on the motion time offset, the rotation change curve, and the rotation axis. When the motion time offset is greater than or equal to the motion duration, the displacement and rotation information corresponding to the motion duration are used as the displacement and rotation information at the current sampling time.
4. The method for synchronous processing of 3D object fragment animation and material evolution according to claim 3, characterized in that, When determining the onset time of material change in each fracture surface region, the following should be included: Read the fracture display distance from the material evolution parameters; Candidate start times are determined based on the start times of the fragment grid to which the fracture surface region belongs; When the fracture surface region is obscured by adjacent fragments at the candidate start time, the sampling time when the distance between adjacent fragments reaches the fracture display distance is determined as the material change start time. When the fracture surface region is not obscured by adjacent fragments at the candidate start time, the candidate start time is determined as the start time of material change.
5. The method for synchronous processing of 3D object fragment animation and material evolution according to claim 4, characterized in that, When determining the corresponding material stage and the material parameters under the corresponding material stage, the following should be included: Read the material stage sequence, stage time period, and stage parameter value corresponding to the material index from the material evolution parameters; The time difference between the sampling time and the starting time of the material change is used as the material time offset; The current material stage is determined in the material stage sequence based on the material time offset and the stage time period. When the material time offset is within the stable range of the current material stage, the stage parameter value of the current material stage is used as the material parameter at the current sampling time. When the material time offset is within the transition interval of an adjacent material stage, the stage parameter values of the adjacent material stages are interpolated to obtain the material parameters at the current sampling time.
6. The method for synchronous processing of three-dimensional object fragment animation and material evolution according to claim 5, characterized in that, When obtaining synchronization frame data, the following are included: Frame records are established according to the sampling times on the animation timeline; In the same frame recording, the displacement and rotation information of the corresponding fragment mesh are written according to the fragment identifier, and the material parameters of the corresponding fracture surface region are written according to the material index. If the material parameters of the corresponding fracture surface region are not obtained at the current sampling time, the initial material parameters of the fracture surface region or the material parameters of the previous sampling time are written into the current frame record.
7. The method for synchronous processing of 3D object fragment animation and material evolution according to claim 6, characterized in that, When packaging the fragmented grid set and the synchronization frame data into a synchronized playback resource, it includes: Fragmented mesh resources are generated based on the fragmented mesh set, and a frame index table is generated based on the synchronization frame data; The fragmented grid resources, the frame index table, and the synchronization frame data are packaged into synchronized playback resources; When the synchronized playback resource is invoked, the target frame record is determined in the frame index table according to the current playback time, and the corresponding fragmented mesh resource is rendered according to the target frame record.
8. A system for synchronously processing 3D object fragment animation and material evolution, used to apply the method for synchronously processing 3D object fragment animation and material evolution as described in any one of claims 1-7, characterized in that, include: The model acquisition unit is used to acquire the model of the 3D object to be processed, information on the broken area, trigger timing, fragment motion constraints, and material evolution parameters; The fragment generation unit is used to fragment the three-dimensional object model to be processed according to the fragmented area information, obtain a fragment mesh set, and determine the fragment identifier, fracture surface area and the material index corresponding to the fracture surface area of each fragment mesh. The fragment motion unit is used to determine the start time of each fragment mesh according to the fragment identifier, trigger timing and fragment motion constraints, and to determine the displacement and rotation information of each fragment mesh at each sampling time based on the motion time offset of each sampling time on the animation time axis relative to the corresponding start time, so as to obtain the fragment motion sequence. The material evolution unit is used to determine the start time of material change in each fracture surface region based on the fragment identifier, fracture surface region, material index and material evolution parameters, and to determine the corresponding material stage and material parameters under the corresponding material stage based on the material time offset of each sampling time on the animation timeline relative to the corresponding material change start time, so as to obtain material evolution data. The synchronous framing unit is used to write the displacement information, rotation information and material parameters of the corresponding fracture surface region of the same fragment mesh into the same frame record according to the same fragment identifier and the same sampling time, so as to obtain synchronous frame data; The resource playback unit is used to package the fragmented grid set and the synchronization frame data into a synchronized playback resource and display it.
Citation Information
Patent Citations
Virtual object wind animation rendering method and device, storage medium and electronic device
CN112767522A
Particle simulation data visualization method and device for rigid body breaking scene
CN118965940A
Crushed animation rendering method and device, computer program product and electronic equipment
CN121731748A
