Method, device and equipment for generating morphing special effect and storage medium
Patent Information
- Application Number
- CN202510571339.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]然而,通过直接手动调整几何模型的形状或外观,相关技术容易引入操作误差,从而导致变形特效的生成准确性不高
[0031]本申请实施例提供的技术方案至少包括如下有益效果。
Smart Images

Figure CN123015767A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for generating deformation effects. Background Technology
[0002] Transformation effects are a common type of special effect that can be used to change the shape or appearance of an object. For example, in game applications, transformation effects can be the visual effect of a virtual object deforming when it is hit by a virtual bullet.
[0003] The method for generating deformation effects in related technologies is as follows: When a special effects creation application displays the geometric model of a virtual object, in response to the user's operation of adjusting the shape or appearance of the geometric model, the special effects creation application generates deformation effects for the virtual object.
[0004] However, by directly and manually adjusting the shape or appearance of the geometric model, the relevant techniques are prone to introducing operational errors, resulting in low accuracy in generating deformation effects. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for generating deformation effects. The technical solution provided by this application can be as follows:
[0006] According to one aspect of the embodiments of this application, a method for generating deformation effects is provided, the method comprising:
[0007] Determine geometry data and collision data, wherein the geometry data is used to construct a first geometry and the collision data is used to construct a second geometry that collides with the first geometry.
[0008] Based on the shape of the first geometric object, the impact point data of the first geometric object is obtained, and the impact point data is used to determine the impact point between the first geometric object and the second geometric object.
[0009] Based on the geometric data, crease data of the first geometric body is obtained, and the crease data is used to construct creases on the surface of the first geometric body;
[0010] Based on the collision body data, the impact point data, and the crease data, the deformation effect data of the first geometry is simulated and calculated. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect includes the crease.
[0011] According to one aspect of the embodiments of this application, a method for generating deformation effects is provided, the method comprising:
[0012] A first user interface for displaying a first tool node is shown, the first user interface including a first control;
[0013] In response to an operation on the first control, a node network is displayed, the node network including the first tool node and a second tool node connected to the first tool node;
[0014] In response to an operation on the second user interface of the second tool node, preprocessing parameters are displayed, the preprocessing parameters being used to determine geometry data and collider data, the geometry data being used to construct a first geometry, and the collider data being used to construct a second geometry that collides with the first geometry;
[0015] In response to an operation on the first user interface, impact point setting parameters and crease setting parameters are displayed. The impact point setting parameters are used to determine the impact point data of the first geometry, and the impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry, and the crease data are used to construct the creases on the surface of the first geometry.
[0016] In response to a trigger operation for generating deformation effects, the first tool corresponding to the first tool node simulates and calculates deformation effect data of the first geometry based on the collision data, the impact point data, and the crease data. The deformation effect data is used to generate deformation effects of the first geometry at the impact point, and the deformation effect includes the crease.
[0017] According to one aspect of the embodiments of this application, an apparatus for generating deformation effects is provided, the apparatus comprising:
[0018] A data determination module is used to determine geometric data and collision data, wherein the geometric data is used to construct a first geometry and the collision data is used to construct a second geometry that collides with the first geometry.
[0019] The impact point determination module is used to obtain the impact point data of the first geometric object based on the shape of the first geometric object, and the impact point data is used to determine the impact point between the first geometric object and the second geometric object.
[0020] A crease determination module is used to obtain crease data of the first geometric body based on the geometric body data, and the crease data is used to construct creases on the surface of the first geometric body;
[0021] The special effects generation module is used to simulate and calculate the deformation effect data of the first geometry based on the collision body data, the impact point data and the crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect includes the crease.
[0022] According to one aspect of the embodiments of this application, an apparatus for generating deformation effects is provided, the apparatus comprising:
[0023] The interface display module is used to display the first user interface of the first tool node, the first user interface including the first control;
[0024] A network construction module is configured to display a node network in response to an operation on the first control, the node network including the first tool node and a second tool node connected to the first tool node;
[0025] A data preprocessing module is used to display preprocessing parameters in response to an operation on the second user interface of the second tool node. The preprocessing parameters are used to determine geometry data and collider data. The geometry data is used to construct a first geometry, and the collider data is used to construct a second geometry that collides with the first geometry.
[0026] The parameter setting module is used to display impact point setting parameters and crease setting parameters in response to operations on the first user interface. The impact point setting parameters are used to determine the impact point data of the first geometry, and the impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry, and the crease data are used to construct the creases on the surface of the first geometry.
[0027] The data generation module is used to respond to a trigger operation for generating deformation effects. It uses a first tool corresponding to the first tool node to simulate and calculate the deformation effect data of the first geometry based on the collision body data, the impact point data, and the crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect has the crease.
[0028] According to one aspect of the embodiments of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-described method for generating morphing effects.
[0029] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, the computer program being loaded and executed by a processor to implement the above-described method for generating morphing effects.
[0030] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program stored in a computer-readable storage medium, wherein a processor reads from the computer-readable storage medium and executes the computer program to implement the above-described method for generating morphing effects.
[0031] The technical solutions provided in this application include at least the following beneficial effects.
[0032] After determining the impact point and crease of the first geometry, the deformation effect of the first geometry is simulated and calculated based on the second geometry, the impact point, and the crease. This realizes the procedural generation of the deformation effect of the first geometry, which can avoid the operational errors introduced by manually adjusting the first geometry to generate deformation effects in related technologies, and reduce human error, thereby improving the accuracy of deformation effect generation.
[0033] In addition, by supporting procedural generation of geometric deformation effects, human intervention and decision-making can be reduced, which helps to improve the generation efficiency of deformation effects. Furthermore, when multiple deformation effects need to be generated, it helps to maintain the same generation rules and processes for multiple deformation effects, thereby improving the consistency of deformation effect generation. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of a computer system provided in one embodiment of this application;
[0035] Figure 2 This is a schematic diagram of a method for generating deformation effects according to an embodiment of this application;
[0036] Figure 3 This is a flowchart of a method for generating deformation effects according to an embodiment of this application;
[0037] Figure 4 This is a schematic diagram of a source geometry and a second source geometry provided in one embodiment of this application;
[0038] Figure 5 This is a schematic diagram of an axis-aligned bounding box provided in one embodiment of this application;
[0039] Figure 6 This is a schematic diagram of a target surface provided in one embodiment of this application;
[0040] Figure 7This is a schematic diagram of the target surface and impact point provided in one embodiment of this application;
[0041] Figure 8 This is a schematic diagram of a method for determining the impact point provided in one embodiment of this application;
[0042] Figure 9 This is a schematic diagram of a method for determining creases provided in one embodiment of this application;
[0043] Figure 10 This is a schematic diagram of the first geometry after surface reconstruction provided in one embodiment of this application;
[0044] Figure 11 This is a schematic diagram of a crease provided in one embodiment of this application;
[0045] Figure 12 This is a schematic diagram of a crease provided in another embodiment of this application;
[0046] Figure 13 This is a schematic diagram of a crease provided in another embodiment of this application;
[0047] Figure 14 This is a schematic diagram illustrating the effect of creases during deformation according to one embodiment of this application;
[0048] Figure 15 This is a schematic diagram of a fixed point and a defined area provided in one embodiment of this application;
[0049] Figure 16 This is a schematic diagram of a method for determining a constraint network provided in one embodiment of this application;
[0050] Figure 17 This is a schematic diagram of the fused deformation effects provided in one embodiment of this application;
[0051] Figure 18 This is a schematic diagram of the overlapping area between deformation effects provided in one embodiment of this application;
[0052] Figure 19 This is a schematic diagram of a method for determining a closed geometry according to an embodiment of this application;
[0053] Figure 20 This is a schematic diagram of a method for determining a large volume geometry according to an embodiment of this application;
[0054] Figure 21 This is a flowchart of a method for generating deformation effects according to another embodiment of this application;
[0055] Figure 22 This is a schematic diagram of a node network provided in one embodiment of this application;
[0056] Figure 23 This is a schematic diagram of a second user interface provided in one embodiment of this application;
[0057] Figure 24 This is a schematic diagram illustrating the selection of geometries based on volume according to an embodiment of this application;
[0058] Figure 25 This is a schematic diagram of a second user interface provided in another embodiment of this application;
[0059] Figure 26 This is a schematic diagram of a first user interface provided in one embodiment of this application;
[0060] Figure 27 This is a schematic diagram of impact point coverage provided in one embodiment of this application;
[0061] Figure 28 This is a schematic diagram of a first user interface provided in another embodiment of this application;
[0062] Figure 29 This is a schematic diagram of a first user interface provided in another embodiment of this application;
[0063] Figure 30 This is a schematic diagram of the impact force provided in one embodiment of this application;
[0064] Figure 31 This is a schematic diagram illustrating the opening of a file with morphing effects according to an embodiment of this application;
[0065] Figure 32 This is a schematic diagram of a file for removing deformation effects according to an embodiment of this application;
[0066] Figure 33 This is a schematic diagram of a deformation effect provided in one embodiment of this application;
[0067] Figure 34 This is a schematic diagram of a first user interface provided in another embodiment of this application;
[0068] Figure 35 This is a schematic diagram of the interior of a first tool node provided in one embodiment of this application;
[0069] Figure 36 This is a schematic diagram of a third user interface provided in one embodiment of this application;
[0070] Figure 37 This is a schematic diagram of a user interface for a node used to adjust weight parameters according to an embodiment of this application;
[0071] Figure 38 This is a schematic diagram of a method for generating deformation effects according to another embodiment of this application;
[0072] Figure 39 This is a block diagram of a deformation effect generation apparatus provided in one embodiment of this application;
[0073] Figure 40 This is a block diagram of a deformation effect generation apparatus provided in another embodiment of this application;
[0074] Figure 41 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0076] Before introducing the technical solutions of this application, some terms involved in this application will be explained. The following related explanations are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0077] 1. The deformation effect is a common special effect that can achieve the visual effect of changing the shape or appearance of an object.
[0078] 2. Procedural special effects generation is a process of generating complex visual effects based on rules and algorithms. By defining rules, operation units, and parameter relationships, highly complex special effects, such as breaking, smoke, and water flow, can be dynamically generated, avoiding manual repetition. Different operation units are used to achieve different functions, such as geometry processing, special effects generation, and rendering.
[0079] In this embodiment, the operation unit can also be referred to as a node. By constructing a node graph composed of nodes, a programmatic workflow (such as a programmatic special effects generation process) can be defined. Each node has inputs, outputs, and parameters, and its behavior can be dynamically adjusted based on data from upstream and downstream nodes.
[0080] 3. Geometry refers to an object with a certain shape and size in space. Geometry data is structural data used to describe the basic shape and attributes of the geometry. Structural data can be used to record basic components such as vertices, edges, and faces of the geometry, as well as multi-dimensional information such as normals, UVs (two-dimensional texture coordinates), materials, and custom attributes of the geometry.
[0081] In terms of technical implementation, the geometry is typically represented by a set of polygons suitable for rendering, physical simulation, and special effects processing, such as a set composed of triangular facets, by discretizing and topologically reconstructing the geometry. In the embodiments of this application, the geometry can also be referred to as a mesh.
[0082] 4. Simulation solvers are the process of calculating the behavior of dynamic systems based on the principles of physics. They can be used to generate realistic dynamic effects, such as rigid body collisions, cloth movement, and fluid motion. This application provides various simulation solvers, including rigid body solvers, soft body solvers, and fluid solvers, to meet the needs of generating different special effects.
[0083] 5. A rigid body is an object that maintains its shape and volume during the simulation, such as stone or metal. Rigid body simulations primarily handle collisions, fragmentation, and motion behaviors.
[0084] 6. Soft body refers to an object that can deform during the simulation process, such as rubber or fabric. Soft body simulation needs to consider deformation, internal tension, and external forces.
[0085] 7. Water-tight geometry refers to a seamless, closed geometry without holes or missing faces. Water-tight geometries are commonly used in fluid simulations, collision detection, and Boolean operations to ensure computational stability and the accuracy of results.
[0086] 8. Non-watertight geometry (or open geometry) is an open geometry that does not have a seamless closure; it may even be just a plane with no thickness.
[0087] The implementation environment of the technical solutions provided in the embodiments of this application will be described below.
[0088] Please refer to Figure 1 This diagram illustrates a computer system provided in one embodiment of this application. The computer system can implement the technical solutions provided in the embodiments of this application within a specific environment. The computer system may include: a terminal device 10 and a server 20.
[0089] Terminal device 10 can be an electronic device such as a mobile phone, tablet computer, multimedia playback device, PC (Personal Computer), wearable device, in-vehicle terminal device, intelligent robot, or laptop computer. Terminal device 10 can install and run a client application with a second application, which can be: a game creation application, an animation creation application, a special effects creation application, a video creation application, an advertising creation application, a live streaming application, a virtual model creation application, or any application that supports special effects creation.
[0090] The embodiments of this application do not limit the implementation form of the above-mentioned application. For example, it can be an application that needs to be downloaded and installed, a mini-program that does not need to be installed, a web application, a browser, etc.
[0091] Server 20 can be used to provide background services for the client of the aforementioned second application (such as a special effects creation application). For example, server 20 can be the background server for the aforementioned second application. Server 20 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0092] Terminal device 10 can communicate with server 20 via network 30, such as a wireless or wired network. Optionally, for the computation work of the technical solution provided in the embodiments of this application, server 20 undertakes the main computation work and terminal device 10 undertakes the secondary computation work; or, server 20 undertakes the secondary computation work and terminal device 10 undertakes the main computation work; or, server 20 and terminal device 10 adopt a distributed computing architecture for collaborative computation.
[0093] In one example, the terminal device 10 also has a client running a first application installed, which can be a game engine (such as UE (Unreal Engine)), DCC (Digital Content Creation) software, or any application that supports special effects rendering.
[0094] Optionally, the first application and the second application can be installed and run on the same terminal device 10, or they can be installed and run on different terminal devices 10 respectively. This application embodiment does not limit this.
[0095] Please refer to Figure 2 The method for generating deformation effects provided in this application includes at least one of the following steps:
[0096] 1. Import source geometry 201 and source second geometry 202.
[0097] 2. Preprocess the source geometry 201 to obtain the first geometry 203, and align the source second geometry 202 with the source geometry 201 to obtain the second geometry 204. The second geometry 204 is the geometry that collides with the first geometry 203.
[0098] Preprocessing includes filtering out unclosed geometry and small-volume geometry. Alignment includes aligning in both position and size dimensions. The second geometry 204 is the source collider 202 after alignment.
[0099] 3. Determine the impact point 205 between the first geometric body 203 and the second geometric body 204.
[0100] 4. Construct the creases 206 on the surface of the first geometry 203.
[0101] 5. Based on the second geometry 204, the impact point 205, and the crease 206, the deformation effect 207 of the first geometry 203 at the impact point 205 is obtained by simulation calculation. The deformation effect 207 has the crease 206.
[0102] In this embodiment, after determining the impact point and crease of the first geometry, the deformation effect of the first geometry is simulated and calculated based on the second geometry, the impact point, and the crease. This realizes the programmed generation of the deformation effect of the first geometry, which avoids the operational errors introduced by manually adjusting the first geometry to generate the deformation effect in related technologies, and reduces human error, thereby improving the accuracy of deformation effect generation.
[0103] In addition, by supporting procedural generation of geometric deformation effects, human intervention and decision-making can be reduced, which helps to improve the generation efficiency of deformation effects. Furthermore, when multiple deformation effects need to be generated, it helps to maintain the same generation rules and processes for multiple deformation effects, thereby improving the consistency of deformation effect generation.
[0104] The following will use method embodiments to specifically describe the technical solutions provided in the embodiments of this application.
[0105] Please refer to Figure 3 The diagram illustrates a flowchart of a method for generating deformation effects according to an embodiment of this application. The execution entity for each step of this method is a computer device; however, the execution entity for each step of this method may be... Figure 1 The terminal device 10 or server 20 in the computer system shown may be a client or backend server for a second application (such as a special effects creation application) in the terminal device 10. The method may include at least one of steps 310 to 340 below.
[0106] Step 310: Determine the geometry data and collision data. The geometry data is used to construct the first geometry, and the collision data is used to construct the second geometry that collides with the first geometry.
[0107] In this embodiment, geometric data is structural data used to describe the basic shape and attributes of a first geometric body. For example, it can be used to describe the basic components of the first geometric body, such as vertices, edges, and faces, to construct the first geometric body. The first geometric body refers to the geometric body from which deformation effects are to be generated. For example, in game development applications, the first geometric body can be a 3D model from which deformation effects are to be generated, such as a 3D model of a virtual character or a 3D model of a virtual object. In animation development applications, the first geometric body can be a 3D model of an animated character; this embodiment does not limit this.
[0108] Optionally, the aforementioned first geometry is the geometry that ultimately participates in the simulation calculation of the deformation effect, such as a closed geometry with a volume greater than a volume threshold. The volume threshold can be a set value or can be set and adjusted by the user according to actual usage needs. The first geometry can be obtained by preprocessing a source geometry, which includes the first geometry and can be the geometry initially imported into the second application. The preprocessing process for the source geometry will be described in detail below and will not be repeated here.
[0109] For example, refer to Figure 4 When the source geometry is the geometry of a virtual door, the source geometry can include the geometry corresponding to the door panel 4011, door lock 4012, door bolt 4013, hinge (not shown in the figure), lock hole, handle, bolt, nut, etc. Since the geometry of the door panel 4011 is a closed geometry with a volume greater than the volume threshold, the geometry of the door panel 4011 can be determined as the first geometry.
[0110] The collision data is structural data used to describe the basic shape and properties of the collision. A collision is a geometric object that collides with the first geometry during the simulation process; in this embodiment, it is referred to as the second geometry.
[0111] Optionally, the second geometry can refer to a source second geometry aligned with the first geometry (or source geometry), which can be a collider initially imported into the second application. The position of the second geometry is aligned with the position of the first geometry, meaning the positional relationship between the first and second geometry satisfies the positional relationship in the collision scene. The size of the second geometry is aligned with the size of the first geometry, meaning the size of the second geometry matches the size of the first geometry.
[0112] For example, refer to Figure 4In simulating the deformation effects when a door panel collides with a door frame 402, if the door frame 402 is aligned with the virtual door, the geometry of the door frame 402 can be determined as the second geometry. In this embodiment, the geometry of the door frame 402 and the geometry of the virtual door are imported into the second application separately, so they need to be aligned to ensure the accuracy and realism of the simulation.
[0113] Step 320: Based on the shape of the first geometric body, obtain the impact point data of the first geometric body. The impact point data is used to determine the impact point between the first geometric body and the second geometric body.
[0114] The shape of the first geometric object can be used to indicate its shape in space, such as a sphere, cube, cylinder, etc. Impact point data can be used to describe the location of the impact point, such as its location in the world space coordinate system provided by the second application. This application does not limit the way the world space coordinate system is set; it can be set and adjusted according to actual usage requirements.
[0115] The impact point is the specific point of contact when the first and second geometric bodies collide. The location of the impact point is the core location where the first geometric body undergoes deformation.
[0116] In one example, the process of acquiring impact point data may include the following.
[0117] 1. Generate the axis-aligned bounding box (AABB) of the first geometry. The axis-aligned bounding box is used to indicate the shape of the first geometry.
[0118] An axis-aligned bounding box is a simple geometric shape used to represent an object in three-dimensional space, whose boundaries are always aligned with the coordinate axes of the world space coordinate system. The axis-aligned bounding box of the first geometry defines the boundary of the first geometry in space, providing the spatial range for determining the impact point.
[0119] For example, when the world space coordinate system includes six directions: x+ (positive direction of x-axis), x- (negative direction of x-axis), y+, y-, z+, and z-, the axis-aligned bounding box of the first geometry can be constructed based on the maximum coordinate values of the first geometry in the x+, y+, and z+ directions, and the minimum coordinate values in the x-, y-, and z- directions, respectively. The axis-aligned bounding box of the first geometry is cube-shaped and includes six faces.
[0120] For example, refer to Figure 5The first geometry's axis-aligned bounding box 501 includes six faces, the boundaries of which are always aligned with the coordinate axes of the world space coordinate system. These six faces correspond to the six directions of the world space coordinate system, and the direction corresponding to each face is the impact direction of the first geometry. The impact direction is the direction in which the second geometry collides with the first geometry.
[0121] 2. For the target face among multiple faces of the axis-aligned bounding box, divide the target face into multiple mesh elements.
[0122] The aforementioned target surface can refer to the surface selected for determining the impact point. For example, the target impact direction corresponding to the target surface is the impact direction of the impact point corresponding to the target surface. For instance, multiple surfaces can be determined as target surfaces, or the surface selected by the user among multiple surfaces can be determined as the target surface. This application embodiment does not limit this.
[0123] For example, refer to Figure 6 If the faces of the axis-aligned bounding box 501 in the x+ and x- directions are the target faces, then the impact point can be determined only for the faces in the x+ and x- directions; if the faces of the axis-aligned bounding box 501 in the y+ and y- directions are the target faces, then the impact point can be determined only for the faces in the y+ and y- directions; if the faces of the axis-aligned bounding box 501 in the z+ and z- directions are the target faces, then the impact point can be determined only for the faces in the z+ and z- directions.
[0124] For example, refer to Figure 7 When the first geometry is the geometry of the door panel 701, only the face of the axis-aligned bounding box of the door panel 701 in the z+ direction can be selected as the target face to determine the impact point.
[0125] In one example, the target surface can be uniformly divided into multiple grid cells, each of which is a regular grid (bricker), such as a square, rectangle, or other regular shape. In this embodiment, the density of the grid cells can be determined by their size and offset. The density of the grid cells is positively correlated with the number of grid cells; therefore, the number of grid cells required to divide the target surface can be determined based on their size and offset. The size and offset of the grid cells can be set and adjusted according to actual usage requirements, such as by the user. The offset of the grid cells can be used to indicate the distance between grid cells.
[0126] For example, refer to Figure 8 After generating the axis-aligned bounding box 802 of the first geometry 801, all six faces of the axis-aligned bounding box 802 are determined as target faces; according to the size and offset of the mesh cells, each target face is evenly divided into multiple mesh cells 803, such as each target face including 16 mesh cells 803.
[0127] In a feasible example, the density of the mesh cells can be dynamically adjusted based on the size and complexity of the first geometry to ensure the reasonable distribution of impact points and the adaptability of the impact point determination process. For example, the density of the mesh cells is positively correlated with the size of the first geometry, and also positively correlated with the complexity of the first geometry.
[0128] 3. Based on multiple mesh elements, obtain the impact point data of the first geometry in the target impact direction corresponding to the target surface.
[0129] Optionally, each grid cell is used to determine an impact point. In other words, multiple impact points corresponding to the target surface can be determined based on multiple grid cells of the target surface, and the positions of multiple impact points corresponding to multiple target surfaces can be combined to form the impact point data of the first geometry in the target impact direction.
[0130] Since the bounding box is the smallest enclosed region describing the spatial occupancy of a geometry, determining the impact point by aligning the first geometry with its bounding box reduces the probability of missing impact points, which helps improve the completeness of impact point determination. Furthermore, decomposing the target surface into smaller mesh cells facilitates precise control over the impact point distribution, thereby improving the accuracy of impact point determination.
[0131] In one example, the process of determining the impact point data in the direction of the target impact may include the following.
[0132] (1) For any grid cell among multiple grid cells, determine the center point of the grid cell.
[0133] Optionally, the geometric center of the mesh cell can be determined as the center point of the mesh cell. For example, the center point of the mesh cell can be obtained by averaging the positions of each vertex of the mesh cell.
[0134] For example, refer to Figure 8 For each grid cell 803, the center point of each grid cell 803 is determined.
[0135] In this embodiment, the center point of the grid cell can be determined as the impact point that is not attached to the first geometry.
[0136] (2) The point on the surface of the first geometry that is the smallest distance from the center point is determined as the first initial impact point corresponding to the grid cell.
[0137] The first initial impact point can refer to the point where the center point is attached to the first geometric body.
[0138] For example, a second ray is constructed starting from the center point, and the point with the shortest distance from the center point to the surface of the first geometry is found through the second ray. This point can be used as the first initial impact point. This helps to ensure that each mesh cell can determine a first initial impact point.
[0139] For example, the distance from each point on the surface of the first geometry to the center point is calculated, and the point with the smallest distance on the surface of the first geometry is determined as the first initial impact point. Optionally, a spatial acceleration structure can be used to reduce the computational complexity of traversing each point on the surface of the first geometry, thereby improving the efficiency of determining the first initial impact point. The spatial acceleration structure may include at least one of the following: KD-Tree (K-Dimensional Tree, a data structure for efficiently processing K-dimensional spatial data) or Bounding Volume Hierarchy (BVH).
[0140] For example, refer to Figure 8 For center point 804, if the distance between point 805 on the surface of the first geometry 801 and center point 804 is the smallest, then point 805 can be determined as the first initial impact point corresponding to center point 804.
[0141] (3) The first intersection point of the first ray and the first geometry is determined as the second initial impact point corresponding to the grid cell.
[0142] The starting point of the first ray is the center point, and the direction of the first ray is the target impact direction, that is, the direction of the first ray is the opposite direction of the surface normal vector of the first geometric object. For example, if the target impact direction is x+, then the direction of the first ray is also x+. This helps to ensure that the impact direction of the second initial impact point conforms to the target impact direction.
[0143] The second initial impact point also refers to the point where the center point is attached to the first geometry, but the method for determining the second initial impact point is different from the method for determining the first initial impact point.
[0144] For example, refer to Figure 8 For center point 806, if the first ray 807, which starts from center point 806, is launched along the target impact direction and intersects the first geometry 801 at point 808, and point 808 is the first intersection point between the first ray 807 and the first geometry 801, then point 808 is determined as the second initial impact point.
[0145] Optionally, if there is no intersection between the first ray and the first geometry, and the minimum distance between the center point and the first geometry is less than or equal to a distance threshold, the center point can be directly determined as the second initial impact point; if the minimum distance between the center point and the first geometry is greater than the distance threshold, the center point is discarded. The distance threshold can be set and adjusted according to actual usage requirements.
[0146] (4) Based on the first initial impact point and the second initial impact point, determine the initial impact point corresponding to the grid cell.
[0147] The initial impact point is the point where the center point ultimately attaches to the first geometry. For example, the initial impact point corresponding to a mesh cell can be determined by fusing the first and second initial impact points. Therefore, embodiments of this application may further include the following:
[0148] Interpolation parameters are obtained, which are used to determine the method for determining the initial impact point. This application embodiment does not limit the interpolation parameters; they can be set and adjusted according to actual usage requirements. Optionally, the range of the interpolation parameters is from a first value to a second value, such as [0, 1]. In one example, the interpolation parameters can be set by the user.
[0149] For example, the process of determining the initial impact point can be represented as follows:
[0150] Initial impact point = (first initial impact point, second initial impact point, interpolation parameter);
[0151] If the interpolation parameter is the first value, then the first initial impact point is determined as the initial impact point corresponding to the mesh cell. For example, if the interpolation parameter is 0, then the first initial impact point is determined as the initial impact point.
[0152] If the interpolation parameter is the second value, then the second initial impact point is determined as the initial impact point corresponding to the mesh cell. For example, if the interpolation parameter is 1, then the second initial impact point is determined as the initial impact point.
[0153] If the interpolation parameter is greater than the first value and less than the second value, then linear interpolation is performed on the positions of the first and second initial impact points to obtain the initial impact points corresponding to the mesh elements.
[0154] For example, based on the position of the first initial impact point, the difference between the positions of the second and first initial impact points is used as the amplitude for linear interpolation to obtain the initial impact point. The initial impact point can then be represented as follows:
[0155] C = A + t(BA); C is the position of the initial impact point, A is the position of the first initial impact point, B is the position of the second initial impact point, and t is a weighting factor, falling between 0 and 1. Optionally, t can be the interpolation parameter mentioned above.
[0156] Optionally, for the center point of a certain grid cell, if there is no second initial impact point, the first initial impact point can be directly determined as the initial impact point corresponding to the grid cell.
[0157] (5) Move the initial impact point in the opposite direction of the target impact direction to obtain the impact point corresponding to the grid cell.
[0158] Optionally, the initial impact point is moved in the opposite direction to the target impact direction to obtain the moved initial impact point, and the moved initial impact point is determined as the impact point, thus ensuring that there is enough space for acceleration before impact.
[0159] Optionally, the initial impact point's movement distance can be determined based on the impact point expansion amount. This impact point expansion amount can be dynamically adjusted according to the size and complexity of the first geometry to ensure the adaptability of the impact point determination process and the rationality of the impact point distribution.
[0160] For example, the impact point expansion is positively correlated with the size of the first geometry, and the impact point expansion is also positively correlated with the complexity of the first geometry.
[0161] refer to Figure 8 By moving multiple initial impact points in the opposite direction to the target impact direction, multiple impact points 809 can be obtained.
[0162] (6) Based on the positions of the impact points corresponding to multiple grid cells, the impact point data of the first geometry in the target impact direction is obtained.
[0163] By combining the positions of the impact points corresponding to multiple grid cells, the impact point data of the first geometry under the target impact direction can be obtained, that is, the impact point data corresponding to the target surface.
[0164] The impact point data corresponding to all target surfaces can be combined to obtain the impact point data of the first geometry. Optionally, the impact point data of the first geometry is used to indicate at least one impact point.
[0165] This embodiment of the application determines the initial impact point corresponding to a mesh cell by combining a first initial impact point determined by the minimum distance and a second initial impact point determined by the target impact direction. This ensures that the impact direction of the initial impact point matches the target impact direction, allowing each mesh cell to determine one initial impact point, thereby improving the accuracy and completeness of impact point determination. Furthermore, determining the first or second initial impact point using rays ensures that the initial impact point precisely conforms to the surface of the first geometry, further improving the accuracy of impact point determination.
[0166] Step 330: Based on the geometric data, obtain the crease data of the first geometric body. The crease data is used to construct the creases on the surface of the first geometric body.
[0167] A crease is a mark left after an object has deformed. The creases indicated by the crease data above are the creases of the first geometry before deformation. They can be used to indicate the location of the creases after deformation, meaning the creases indicated by the crease data are used to simulate and calculate the creases after deformation of the first geometry. The crease data includes the location of the creases, such as the location of each point within at least one crease. Presetting the crease locations facilitates the rapid simulation and calculation of deformation effects.
[0168] In one example, the process of obtaining crease data may include the following:
[0169] 1. Convert the geometry data into mesh data. The mesh data is used to construct the first geometry of the surface, which consists of multiple polygon meshes.
[0170] This involves reconstructing the surface of the first geometry into multiple polygonal meshes to obtain mesh data. Optionally, each polygonal mesh has equal sides; for example, the surface of the first geometry can be reconstructed into multiple equilateral triangular meshes. This ensures a uniform topological structure of the first geometry, thereby improving the stability of the simulation solution.
[0171] For example, refer to Figure 9 After obtaining the first geometry 901, the surface of the first geometry 901 can be reconstructed into multiple equilateral triangle meshes to obtain the reconstructed first geometry 901.
[0172] Optionally, the length of the sides of the polygonal mesh can be set by the user.
[0173] For example, refer to Figure 10 When the length of the side of the polygonal mesh is set to 0.1, the first geometry 1001 is reconstructed into the reconstructed first geometry 1002; when the length of the side of the polygonal mesh is set to 0.03, the first geometry 1001 is reconstructed into the reconstructed first geometry 1003.
[0174] 2. Generate multiple seed points randomly on the surface of the first geometric object. These seed points are used to generate creases.
[0175] Seed points are used to define the cutting boundaries of the first geometry, dividing it into multiple sub-geographs. For example, the boundaries of the regions formed by the seed points can be used as cutting boundaries to cut the first geometry. Each cutting boundary can form a crease.
[0176] Optionally, the number of seed points corresponds to the number of creases; for example, a first number of creases can be obtained using a second number of seed points. The number of seed points can be less than or equal to the number of creases. For example, three creases can be formed by interconnecting three seed points.
[0177] Optionally, the number of creases can be set by the user. For example, see reference. Figure 11 When the number of creases is set to 5, a first geometry 1101 with 5 creases can be generated using 8 seed points; when the number of creases is set to 50, the first application can generate a first geometry 1101 with 50 creases; when the number of creases is set to 100, the first application can generate a first geometry 1101 with 100 creases.
[0178] 3. Add noise displacement to the surface of the first geometry to obtain processed mesh data. The processed mesh data is used to indicate the first geometry with wrinkles.
[0179] Adding noise displacement refers to the process of applying a randomly varying displacement to the surface of a geometry to simulate natural or irregular surface morphology. The surface of the first geometry after adding noise displacement has irregular undulations to form wrinkles.
[0180] The aforementioned noise displacement can be used to indirectly control the tortuous shape of the crease, such as making the crease have tortuous changes instead of a straight line. For example, since the boundary obtained by cutting from the seed point is a straight line, in this embodiment of the application, by adding noise displacement to the surface of the first geometric body and then cutting the first geometric body, the boundary obtained by the cutting can be made irregular due to the noise displacement, forming an irregular boundary. This makes the irregular boundary more consistent with the natural characteristics of the fracture or deformation of real materials, thereby improving the realism of the crease construction.
[0181] For example, refer to Figure 9 By adding noise displacement to the surface of the reconstructed first geometry 901, a first geometry 901 with wrinkles can be obtained.
[0182] Optionally, the noise shift can be set by the user. For example, refer to Figure 12The noise displacement added to the surface of the first geometric object 1201 on the left is smaller, so the curvature of the crease on the left side of the first geometric object 1201 is not obvious. However, the noise displacement added to the surface of the first geometric object 1201 on the right is larger, so the curvature of the crease on the right side of the first geometric object 1201 is more obvious.
[0183] 4. Based on multiple seed points, the processed grid data is divided into multiple sub-grid data. Each sub-grid data is used to construct a sub-geometry with folds.
[0184] Optionally, for any one of the multiple seed points, points whose distance to that seed point is less than their distance to other seed points can be grouped into a region corresponding to that seed point. Then, according to the regions corresponding to the multiple seed points, the first geometry with folds can be divided to obtain multiple sub-geometries with folds. Alternatively, adjacent seed points can be directly connected to divide the first geometry with folds. The method of using seed points is not limited in the embodiments of this application.
[0185] That is, the effect of noise displacement is preserved during the cutting of the first geometry, making the shape of each sub-geometry more irregular and unique.
[0186] For example, refer to Figure 9 By cutting the first geometric body 901 with folds through multiple seed points, multiple sub-geometry bodies 902 with folds can be obtained. Each sub-geometry body 902 has an irregular shape and is unique.
[0187] 5. Correct the displacement of multiple sub-mesh data to obtain multiple corrected sub-mesh data. Each corrected sub-mesh data is used to construct a sub-geometry without wrinkles and with irregular boundaries.
[0188] Displacement correction can refer to the process of removing noise displacement to eliminate wrinkles on the surface of a sub-geometry. In the embodiments of this application, only the noise displacement inside the sub-geometry (i.e., the area within the boundary) is removed, while the noise displacement at the boundary of the sub-geometry is retained, so that the sub-geometry still has irregular boundaries without affecting the overall structure of the first geometry.
[0189] For example, refer to Figure 9 For any sub-geometry 902, the noise displacement inside the sub-geometry 902 is removed, while the noise displacement of the boundary of the sub-geometry 902 is retained, resulting in a sub-geometry 902 with a flat surface and irregular boundaries.
[0190] This application embodiment constructs an initial crease by combining seed point and noise displacement, so that the initial crease has an irregularity similar to natural creases, which helps to improve the realism of the crease, and thus helps to improve the realism of the deformation effect.
[0191] 6. Based on the irregular boundaries corresponding to the multiple corrected sub-grid data, determine the initial crease data. The initial crease data is used to determine the multiple initial creases formed by the irregular boundaries.
[0192] Optionally, the irregular boundary is defined as the initial crease. For example, for any sub-geometry, the irregular boundary and interior of the sub-geometry are separated to obtain the irregular boundary and interior, and the irregular boundary is directly defined as the initial crease.
[0193] The initial crease data includes the locations of multiple initial creases.
[0194] 7. Based on the initial crease data and multiple corrected subgrid data, obtain the crease data.
[0195] After separating the irregular boundary and interior of the sub-geometry, the bending stiffness of the irregular boundary and the interior can be set separately, so that the irregular boundary (i.e., irregular boundary) is converted into a crease and the interior is converted into a flexible region. Since the flexible region is easy to deform and the irregular boundary forms a crease, it is easy to simulate and calculate the deformation effect.
[0196] Bending stiffness refers to the ability of a geometric object to resist bending. Bending stiffness determines the rigidity and elasticity of a geometric object when bent. Lower bending stiffness makes the geometric object more prone to bending.
[0197] For example, the process of setting the bending stiffness may include the following.
[0198] (1) Set the bending stiffness of the multiple initial creases indicated by the initial crease data to the third value to obtain the set crease data.
[0199] The set crease data is used to indicate the initial crease after the bending stiffness is set. In this embodiment, the third value is a large value so that the crease belongs to the hardened area and is not easily deformed. For example, the third value is greater than the stiffness threshold, which can be set and adjusted according to actual usage requirements. For example, when the bending stiffness range is [0, 1], the bending stiffness of the initial crease can be set to 1.
[0200] Optionally, if the material of the first geometry is metal, setting the bending stiffness of the initial crease to 1 can simulate a metal crease.
[0201] In one example, the prominence and softness of a crease can be controlled by its solid width and blend width. The solid width indicates the extent of the crease, while the blend width indicates the degree of crease decay, such as the distance over which the crease gradually disappears.
[0202] For example, refer to Figure 13 For crease 1301, the solid width of crease 1301 is the distance from the center line 1302 of crease to the solid boundary of crease 1301, and the blend width of crease 1301 is the distance from the solid boundary of crease 1301 to the vanishing boundary of crease 1301.
[0203] The wider the crease, the less noticeable it is; the narrower the crease, the more noticeable it is.
[0204] The wider the mixed width of the crease, the softer the crease (i.e., the smaller the range of variation); the narrower the solid width of the crease, the harder the crease (i.e., the greater the range of variation).
[0205] For example, refer to Figure 14 The solid width of the crease of geometry 1401 is greater than that of geometry 1402. The blend width of the crease of geometry 1401 is greater than that of geometry 1402. Compared to the crease of geometry 1402 in the deformation effect, the crease of geometry 1401 in the deformation effect is less obvious and softer (i.e., the change range is smaller).
[0206] (2) Set the bending stiffness of the sub-geometry corresponding to the multiple corrected sub-mesh data to the fourth value to obtain multiple set sub-mesh data, where the fourth value is less than the third value.
[0207] The set sub-mesh data is used to indicate the sub-geometry after the internal bending stiffness is set. In this embodiment, the fourth value is a small value so that the interior of the sub-geometry is a flexible region that is easy to deform. For example, the fourth value is less than the stiffness threshold. For example, when the bending stiffness ranges from [0, 1], the bending stiffness inside the sub-geometry can be set to 0.
[0208] Optionally, if the material of the first geometry is metal, setting the bending stiffness inside the sub-geometry to 0 can simulate metal deformation.
[0209] (3) Combine the set crease data and multiple set subgrid data to obtain crease data.
[0210] Optionally, based on the set bending stiffness, the initial crease (i.e., the rigid region) of the sub-geometry is combined with the interior (i.e., the flexible region) of the sub-geometry to obtain a first geometry with creases.
[0211] For example, the initial crease is merged with the interior of the sub-geometry to ensure a smooth transition between them, thereby avoiding simulation instability caused by hard switching between the initial crease and the interior of the sub-geometry. After merging the initial crease with the interior of the sub-geometry, the initial crease is transformed into a crease.
[0212] For example, refer to Figure 9 For any sub-geometry 902, after setting the bending stiffness of the irregular boundary of the sub-geometry 902 to 1 and the bending stiffness of the interior of the sub-geometry 902 to 0, the irregular boundary of the sub-geometry 902 is merged with the interior of the sub-geometry 902 to obtain the first geometry 901 with creases 903.
[0213] This application's embodiments, by supporting the setting of bending stiffness within creases and sub-geometry, facilitate the accurate simulation of the mixed deformation effect of realistic hardened edges and flexible regions within the first geometry, without needing to start the simulation of deformation effects from scratch. This improves the efficiency of the simulation and, under the constraint of the mixed deformation effect, enhances the stability of the simulation. Furthermore, by providing realistic physical effects for the simulation of deformation effects, the realism of the simulation is improved.
[0214] Step 340: Based on the collision body data, impact point data, and crease data, the deformation effect data of the first geometry is obtained by simulation calculation. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect has creases.
[0215] In this embodiment of the application, the simulation calculation is based on the principle of physics, simulating the deformation behavior of the first geometric body at the impact point after being hit by the second geometric body. The deformation effect is the result of the simulation calculation, and the deformation effect data is used to record the deformation effect.
[0216] The deformation effects of the first geometric object vary depending on its material. The material of the first geometric object includes metal. For example, if the material of the first geometric object is metal, the aforementioned deformation effect can be a metal deformation effect.
[0217] Optionally, different metal materials (such as copper, iron, titanium, etc.) have different physical properties, and the deformation effects of the first geometric shape correspond to different deformation behaviors. For the same metal material, different hardness or thickness will also result in different deformation behaviors for the deformation effects of the first geometric shape. In the embodiments of this application, the second application can simulate and calculate the corresponding deformation effects based on the physical properties such as material, hardness, and thickness, thereby improving the applicability of the technical solution provided in this application.
[0218] Optionally, the deformation mode of the first geometry can also be set and adjusted according to actual usage requirements. For example, the deformation mode includes at least one of the following: shear failure, tensile failure, and fatigue failure. For instance, in the case of shear failure or fatigue failure, the second application can simulate and calculate a metal tearing effect or a metal hole effect. In the case of tensile failure, the second application can simulate and calculate a metal tensile effect. This application embodiment does not limit this. Metal deformation effects include at least one of metal tearing effects, metal hole effects, and metal tensile effects. This allows users to select different deformation modes according to their needs to generate deformation effects under different deformation modes, thereby providing flexibility in generating deformation effects.
[0219] In one example, the process of acquiring deformation effect data may include the following:
[0220] 1. Obtain the convexity parameters of the first geometric object. The convexity parameters are used to indicate the shape of the first geometric object.
[0221] The convexity parameter is used to simulate the convex and concave effects of geometry. For example, the shape of a first geometric object can be adjusted by setting the convexity parameter to simulate its convex and concave effects. By setting different convexity parameters, more realistic and complex geometric shapes can be created, such as wrinkles and waves.
[0222] Optionally, the geometry data includes convexity parameters of the first geometry, which can be directly obtained from the geometry data. In embodiments of this application, the convexity parameters of the first geometry can be used to indicate hard transitions within the first geometry.
[0223] 2. Extract the bending stiffness from the crease data to obtain the bending stiffness data.
[0224] Optionally, the bending stiffness of the crease is extracted from the crease data to obtain bending stiffness data, which is used to record the value of the bending stiffness of the crease.
[0225] 3. Based on the convexity parameter, adjust the bending stiffness in the bending stiffness data to obtain the adjusted bending stiffness data.
[0226] Optionally, the adjusted bending stiffness is determined based on the convexity parameter and the bending stiffness of the crease, and the adjusted bending stiffness is updated to the value of the bending stiffness of the crease. The adjusted bending stiffness data is used to record the value of the adjusted bending stiffness.
[0227] For example, the adjusted bending stiffness can be expressed as follows:
[0228] The adjusted bending stiffness is equal to max(bending stiffness, convexity parameter), which means that the larger of the bending stiffness and the convexity parameter is determined as the adjusted bending stiffness.
[0229] 4. Based on the adjusted bending stiffness data, crease data, and collision data, construct a constraint network. The constraint network is used to constrain the mechanical behavior of the first geometry when it deforms.
[0230] A constraint network is a network or set of constraints. A constraint network includes at least one constraint. For example, the process of constructing a constraint network may include the following.
[0231] (1) Based on the adjusted bending stiffness data and the set extension stiffness, determine the cloth constraint, which is used to constrain the degree of surface flexible deformation of the first geometry.
[0232] Fabric constraints include tensile parameters and bending parameters. Tensile parameters constrain the degree of stretching of the geometry and can be determined based on the elongation stiffness. Elongation stiffness refers to the geometry's ability to resist elastic deformation after being subjected to external forces. Elongation stiffness can be set and adjusted according to actual usage requirements. For example, elongation stiffness can be directly determined as a tensile parameter.
[0233] Bending parameters are used to constrain the degree of bending of a geometry, and they can be determined based on the adjusted bending stiffness. For example, the adjusted bending stiffness can be directly determined as the bending parameter.
[0234] The tensile and bending parameters together constrain the degree of surface flexible deformation of the first geometry.
[0235] (2) Determine the glue constraint based on the vertex of each crease in the crease data. The glue constraint is used to constrain the degree of fracture of the first geometry after being subjected to force.
[0236] Glue constraints are used to simulate the gradual separation of geometry under stress. Glue constraints include constraint strength parameters, which can be used to control the dynamic process of fracture. A constraint strength parameter can be set for each crease, which constrains the ability of each vertex within that crease to withstand forces.
[0237] The constraint strength parameters can be set and adjusted according to actual usage requirements, and this application embodiment does not limit this.
[0238] (3) Based on the fixed points on the first geometry, determine the fixed constraints. The fixed constraints are used to constrain the positions of the vertices on the first geometry located within the set area. They remain unchanged during the simulation and calculation process. The fixed points are used to fix the first geometry. The set area is determined based on the fixed points.
[0239] A fixed point can refer to a point on the boundary of the first geometric body, or a pre-defined point within the first geometric body; this embodiment does not limit this. For example, the geometric data includes fixed points, which can be directly determined from the geometric data. Optionally, fixed constraints include the positions of vertices within a defined region.
[0240] For example, refer to Figure 15 The first geometry 1501 (i.e., the virtual door) includes two fixed points 1502, which are used to fix the hinges of the virtual door. Each fixed point 1502 corresponds to a defined region 1503. The positions of the vertices in the defined region 1503 remain unchanged during the simulation solution process.
[0241] In one example, the process of determining fixed constraints can be as follows: if a third geometry is selected at a fixed point, the bounding box of the third geometry is generated. The third geometry is used to fix the first geometry with the fixed point as a reference, and the bounding box is used to indicate the area occupied by the third geometry. Fixed constraints are determined based on the bounding box. The fixed constraints are used to indicate the positions of vertices on the first geometry located within the bounding box and remain unchanged during the simulation solution.
[0242] The third geometry can be selected by the user. The second application can automatically generate the bounding box of the third geometry based on its shape; for example, the bounding box can be the smallest cube that can enclose the third geometry. The positions of the vertices within the bounding box are obtained, and fixed constraints are determined based on these positions. The area indicated by the bounding box is the aforementioned defined area.
[0243] For example, refer to Figure 15 The hinge is the third geometry selected by the user, and the set area 1503 is the area indicated by the boundary box of the hinge.
[0244] This application embodiment sets fixed constraints based on fixed points of the first geometric body, so that the set area on the first geometric body will not be affected by deformation, so as to conform to the real deformation scene of the object, which helps to improve the realism of the deformation effect generation.
[0245] (4) Determine the structural constraints based on the shape of the first geometric body. The structural constraints are used to constrain the shape of the first geometric body.
[0246] Structural constraints are used to provide internal structural support for the first geometry to simulate the overall rigidity of the first geometry, thereby preventing the first geometry from losing its shape due to excessive flexibility.
[0247] Optionally, structural constraints are determined based on the boundary points of the first geometry to ensure that the first geometry maintains its overall shape during the simulation. The structural constraints include the positions of the boundary points of the first geometry.
[0248] (5) Determine the collision constraints based on the collision data. The collision constraints are used to constrain the interaction between the first geometry and the second geometry.
[0249] Collision constraints are used to ensure that the first geometry has a reasonable physical interaction with the second geometry or itself during deformation.
[0250] Optionally, the deformation boundary of the first geometry is determined through collision detection between the first and second geometries, and then collision constraints are constructed based on the deformation boundary of the first geometry. For example, the collision constraints include the position of the deformation boundary of the first geometry.
[0251] (6) Construct a constraint network based on at least one of the following constraints: fabric constraint, glue constraint, fixation constraint, structural constraint and collision constraint.
[0252] Constraints can be selected according to actual usage requirements to construct a constraint network. For example, the constraint network includes fabric constraints, glue constraints, fixation constraints, structural constraints, and collision constraints.
[0253] 5. Under the constraints of the constraint network, the deformation effect data of the first geometry is obtained by simulating and solving the impact point data through the soft body solver. The soft body solver is a solver used to simulate the flexible dynamics of object collision.
[0254] The soft body solver is built on position-constrained dynamics and can be applied to the simulation of flexible objects such as cloth and hair. It uses multi-step iteration and collision detection to achieve simulation calculation.
[0255] Optionally, the constraint and impact point data in the constraint network are input into the soft body solver, which automatically simulates and calculates the deformation effect data. Alternatively, geometric data or crease data can also be input into the soft body solver; this embodiment of the application does not limit this approach.
[0256] For example, refer to Figure 16 For the first geometry 1601 with creases on its surface, cloth constraints, glue constraints, fixing constraints, structural constraints and collision constraints are determined to construct a constraint network. The constraint network, crease data and impact point data are then input into the soft body solver, which automatically simulates and calculates the deformation effect data.
[0257] This application's embodiments precisely control the dynamic deformation process of the geometric surface and creases by setting various constraints for bending stiffness, creases, etc., which helps improve the realism and accuracy of the simulation solution. Furthermore, by supporting flexible combinations of constraints to construct the constraint network, it helps improve the flexibility and fine granularity of constraint network determination.
[0258] In one example, impact point data is used to indicate at least one impact point. The soft body solver performs independent simulation calculations for each impact point to obtain the deformation effect corresponding to each impact point. The embodiments of this application may further include the following: for any one of the at least one impact points, under the constraints of the constraint network, the soft body solver simulates and calculates the deformation effect of the first geometry at the impact point based on the position of the impact point; based on the deformation effect of the first geometry at each of the at least one impact point, deformation effect data of the first geometry is obtained.
[0259] In the presence of multiple impact points, a simulation can be performed once for each impact point to achieve batch simulation and thus batch generation of deformation effects, which helps improve the generation efficiency of deformation effects. The batch simulation can be executed in parallel.
[0260] In a feasible example, multiple impact points can be divided into multiple impact point groups, and a parallel simulation solution can be performed once for each impact point group, thereby achieving batch simulation solutions, which improves the flexibility of simulation solutions. Optionally, the impact point groups can be divided by the user according to actual usage requirements.
[0261] Optionally, the deformation effects at each impact point will be output to different folders, and the data recorded in these folders is the deformation effect data.
[0262] In one example, after simulating and calculating the deformation effect, the deformation intensity can be adjusted by changing the weight parameter of the deformation effect. A larger weight parameter value results in a more pronounced deformation, while a smaller value results in a less pronounced deformation. For instance, with a weight parameter range of [0, 1], a weight parameter of 0 results in no deformation of the first geometric object, while a weight parameter of 1 results in no significant deformation of the first geometric object.
[0263] Optionally, each impact point corresponds to a weight parameter for its deformation effect. Users can adjust the weight parameters according to their needs to obtain the desired deformation effect, which helps to improve the flexibility of generating deformation effects.
[0264] In one example, for at least one of the n transformation effects, the n transformation effects are merged to obtain a new transformation effect, where n is an integer greater than 1.
[0265] In other words, the second application supports the fusion of deformation effects, with the newly added deformation effects including those at n impact points. The weight parameters for any of the n deformation effects can also be set and adjusted according to actual usage requirements.
[0266] Optionally, the n deformation effects can be selected by the user, and the weight parameters of each of the n deformation effects can also be selected by the user. This application embodiment does not limit this.
[0267] For example, refer to Figure 17 Three different deformation effects can be combined on the first geometry 1701: deformation effect 1702, deformation effect 1703 and deformation effect 1704, to obtain a new deformation effect.
[0268] With all deformation effects having a weight of 0, the first geometry 1701 did not deform, meaning no deformation effect was invoked. With deformation effect 1702 having a weight parameter of 1, deformation effect 1703 having a weight parameter of 0.59, and deformation effect 1704 having a weight parameter of 0.74, the first geometry 1701 on the right deformed at the three impact points, with the deformation effect of each deformation effect matching its corresponding weight parameter.
[0269] Optionally, during the fusion of n deformation effects, if there is an overlapping area between two deformation effects, the deformation effects within the overlapping area are fused, such as by fusion based on the respective weight parameters of the two deformation effects.
[0270] For example, refer to Figure 18 There is an overlapping area 1801 between morphing effect 1 and morphing effect 2, which can be merged with the content of morphing effect 1 in the overlapping area 1801 and the content of morphing effect 2 in the overlapping area 1801; there is an overlapping area 1802 between morphing effect 2 and morphing effect 3, which can be merged with the content of morphing effect 2 in the overlapping area 1802 and the content of morphing effect 3 in the overlapping area 1802, and then the remaining content of morphing effect 1, morphing effect 2 and morphing effect 3 are retained to obtain the newly added morphing effect.
[0271] The embodiments of this application, by supporting the fusion of deformation effects, are beneficial to improving the flexibility of generating deformation effects, and facilitate the expansion of deformation effects without having to restart the simulation calculation.
[0272] In one example, the embodiments of this application may further include the following:
[0273] 1. Export the deformation effect data as model rendering data.
[0274] The model rendering data is used to render deformation effects on the first model corresponding to the first geometry. For any deformation effect in the deformation effect data, the deformation effect is exported as a model sub-rendering data, which is used to render the deformation effect on the first model. Combining all the model sub-rendering data yields the final model rendering data.
[0275] Optionally, the model sub-rendering data includes the location of the corresponding impact point or the identification information of the impact point.
[0276] For example, the deformation effect can be exported as a skeleton mesh with deformation effect, or the deformation effect can be exported as a VAT (Vertex Animation Texture) map. This application embodiment does not limit this.
[0277] VAT is a technique that stores vertex animation information in textures. This allows for complex vertex animation effects without using skeletal animation. The RGB (Red-Green-Blue) channels of a VAT map can be used to store the positional changes of vertices of a first geometry with deformation effects.
[0278] 2. Send the model rendering data to the first application. The first application is used to render the first model by calling the deformation effect of the impact point that matches the impact position in the model rendering data according to the impact position of the first model corresponding to the first geometry.
[0279] Based on the impact location, the system iterates through the positions of each impact point in the model rendering data, identifying those with the same location as the impact point. A deformation effect for this impact point can then be rendered on the first model. The position of the impact point can first be converted to coordinates in the coordinate system provided by the first application. The deformation effect for this impact point in the model rendering data can be retrieved using the impact point's identification information.
[0280] Optionally, the first application can also determine the corresponding deformation effect based on the impact location, combined with the impact direction and impact force of the first model. For example, after determining the deformation effect that matches the impact location, the weight parameters of the deformation effect can be adjusted according to the impact direction and impact force to adapt to the effect of adjusting the deformation effect. This application embodiment does not limit this.
[0281] For example, when the deformation effect is exported as a skeletal network with deformation effect, the deformation effect can be rendered on the first model based on the skeletal network with deformation effect; when the deformation effect is exported as a VAT map, the deformation effect can be rendered on the first model based on the VAT map, such as controlling the displacement intensity of the VAT map by the impact force and impact direction to render the deformation effect.
[0282] This application embodiment supports exporting deformation effects, enabling the first application to render deformation effects on the first model in real time based on model rendering data. This allows the first application to dynamically control the deformation of the first model based on the impact position, which helps improve the realism of the deformation effects and enhances the interactivity and immersion of the first application (such as a game application).
[0283] In summary, the technical solution provided in this application, after determining the impact point and crease of the first geometry, simulates and calculates the deformation effect of the first geometry based on the second geometry, the impact point, and the crease. This achieves the programmed generation of the deformation effect of the first geometry, which avoids the operational errors introduced by manually adjusting the first geometry to generate the deformation effect in related technologies, and reduces human error, thereby improving the accuracy of deformation effect generation.
[0284] In addition, by supporting procedural generation of geometric deformation effects, human intervention and decision-making can be reduced, which helps to improve the generation efficiency of deformation effects. Furthermore, when multiple deformation effects need to be generated, it helps to maintain the same generation rules and processes for multiple deformation effects, thereby improving the consistency of deformation effect generation.
[0285] In some embodiments, the preprocessing of the source geometry may include the following.
[0286] 1. Obtain source geometry data and source collision data. The source geometry data is used to construct the source geometry including the first geometry, and the source collision data is used to construct the initially imported source second geometry.
[0287] The geometric source data and collision source data can be imported from the first application, in which case the second application can obtain the geometric source data and collision source data from the first application; or the geometric source data and collision source data can be possessed by the second application itself, in which case the second application can obtain the geometric source data and collision source data from the storage unit corresponding to the second application. This application embodiment does not limit this.
[0288] The source geometry and the second source geometry are described in the same way as in the above embodiments, and will not be repeated here.
[0289] 2. The closed geometric bodies in the source geometry whose volume is greater than or equal to the volume threshold are identified as the first geometric body.
[0290] Optionally, a closed geometry in the source geometry can be determined first, and then a closed geometry with a volume greater than or equal to a volume threshold can be determined from the closed geometry. Alternatively, a target geometry with a volume greater than or equal to a volume threshold in the source geometry can be determined first, and then a closed geometry can be determined from the target geometry. This application does not limit this approach.
[0291] In one example, the process of determining a closed geometry may include the following:
[0292] (1) Determine the first set of vertices of the source geometry. The first set of vertices consists of unshared vertices in the source geometry. Unshared vertices belong to only one of the multiple faces used to form the source geometry.
[0293] Unshared vertices are often markers of the boundaries of a geometry and can be used to initially identify geometries that may contain holes or be unclosed. For example, vertices on the boundary of a source geometry that belong to only one face can be identified as unshared vertices, and combining these unshared vertices yields a first set of vertices.
[0294] For example, refer to Figure 19 The source geometry 1900 includes geometry 1901 and geometry 1902. Geometry 1901 has unshared vertices, while geometry 1902 does not have unshared vertices. All unshared vertices can be combined into the first vertex set.
[0295] (2) The unshared vertices in the first vertex set are expanded using the connectivity algorithm to obtain the expanded first vertex set, and the remaining vertices in the source geometry excluding the vertices in the expanded first vertex set are combined to form the second vertex set.
[0296] Connectivity algorithms are algorithms built upon the connectivity of geometric objects. The core of geometry connectivity is detecting independent connected components within a geometric object, such as different fragments of a broken model or separated mechanical parts. Essentially, it's a problem of connected components in graph theory, identifying different regions by traversing adjacency relationships (vertices, edges, or faces).
[0297] Taking the Flood Fill algorithm as an example of connectivity algorithms, the Flood Fill algorithm is a classic region diffusion algorithm that can be used to expand connected regions. Its core idea is to start from a starting point and diffuse to adjacent regions according to certain rules (such as color, attributes, or geometric connectivity) until a stopping condition is met, so as to map unshared vertices to the overall connected structure of the geometry.
[0298] For example, for any unshared vertex in the first vertex set, starting from that unshared vertex, the system expands to adjacent regions based on geometric connectivity until all vertices belonging to the same geometry as the unshared vertex are found, thereby forming an expanded first vertex set.
[0299] For example, refer to Figure 19 Since there are unshared vertices on geometry 1901, after expansion using a connectivity algorithm, the expanded first vertex set includes all vertices on geometry 1901. The remaining vertices after removing all vertices on geometry 1901 (i.e. all vertices on geometry 1902) form the second vertex set.
[0300] (3) Split the expanded first vertex set and the second vertex set separately to obtain multiple connected geometric groups, each connected geometric group corresponding to a geometric body.
[0301] The expanded first vertex set may include vertices of multiple geometries, and the second vertex set may also include vertices of multiple geometries. Therefore, vertices belonging to the same geometries in the expanded first vertex set can be split into a connected geometric group, and vertices belonging to the same geometries in the second vertex set can also be split into a connected geometric group.
[0302] For example, refer to Figure 19 The expanded first vertex set can be split into connected geometric groups corresponding to geometry 1901, and the second vertex set can be split into connected geometric groups corresponding to geometry 1902.
[0303] (4) The geometry corresponding to the connected geometric group with unshared vertices is identified as an unclosed geometry.
[0304] For example, refer to Figure 19 If the connected geometric group corresponding to geometry 1901 includes unshared vertices, then geometry 1901 can be determined as an unclosed geometry.
[0305] (5) Define the geometry corresponding to the connected geometric group that does not have unshared vertices as a closed geometry.
[0306] For example, refer to Figure 19 If the connected geometry group corresponding to geometry 1902 does not include unshared vertices, then geometry 1901 can be determined as a closed geometry.
[0307] This application embodiment achieves the programmed and automated determination of closed geometry through an algorithm based on unshared vertices and connected directions, without the need for manual intervention. This avoids the delays and errors introduced by manual intervention, which helps to improve the accuracy and efficiency of determining closed geometry.
[0308] In this embodiment, unclosed geometry does not participate in the simulation solution process, but it is not deleted either. Exemplarily, the processing methods for unclosed geometry include at least one of the following: automatically stitching openings, or separating and assigning to a geometry attachment. Automatically stitching openings refers to the process of converting an unclosed geometry into a closed geometry. For geometry attachments, after completing the simulation solution for deformation effects, the geometry attachment can be reattached to the source geometry, such as using the Point Deform method. The Point Deform method is a geometry-based deformation method that can drive the deformation of the target geometry through the vertex positions and attributes of the geometry, such as using vertex mapping relationships to achieve non-destructive deformation control.
[0309] In one example, taking a closed geometric solid as an example, the process of determining the volume of a closed geometric solid may include the following:
[0310] (1) Generate the oriented bounding box (OBB) of the closed geometry.
[0311] An oriented bounding box is a three-dimensional bounding box that is aligned with the rotational direction of a geometry and can tightly enclose the geometry. For example, the smallest bounding box aligned with the shape of a closed geometry can be determined as the oriented bounding box of the closed geometry.
[0312] For example, based on point cloud data of a closed geometry, its principal direction vector is calculated and aligned to the optimal rotation direction. The bounding box that matches this optimal rotation direction and has the smallest volume is determined as the oriented bounding box of the closed geometry. This helps to accurately describe the spatial occupancy of the closed geometry, thereby reducing errors and improving the accuracy of determining the volume of the closed geometry. In addition, using oriented bounding boxes simplifies volume calculation, which helps to improve the efficiency of determining the volume of closed geometry.
[0313] Optionally, after determining the volume of the geometry in the source geometry, a geometry connectivity analysis can be performed on the source geometry to decompose it into multiple independent geometry, and then the volume of each geometry can be calculated separately to ensure that the volume of each independent geometry in the source geometry can be calculated individually.
[0314] (2) Determine the volume of the oriented bounding box.
[0315] Optionally, the volume of the orientation bounding box is determined by the product of its three axial lengths.
[0316] (3) Normalize the volume to obtain the processed volume.
[0317] For example, the volume can be normalized according to the unit size of the geometry or a set standard scale to obtain the processed volume. Optionally, if the range of the processed volume is [0, 1], the volume threshold can be a value in [0, 1].
[0318] For example, the largest and smallest closed geometric shapes can be identified as references for 1 and 0. The rate of change of the numerical values can be controlled using the `power` function, thereby normalizing the volume to the processed volume.
[0319] The power function is used to perform non-linear mapping of values in graphics programming. It achieves more natural material effects (such as highlight sharpening, texture gradation, or light attenuation) by adjusting the exponent (such as enhancing contrast, controlling the decay rate, compressing or expanding the data range).
[0320] By normalizing the volume, it can be ensured that geometric objects of different scales can be compared uniformly during the calculation process, which helps to reduce the difficulty of determining the first geometric object.
[0321] (4) Determine the volume of the processed volume as the volume of the closed geometry.
[0322] In other words, the volume of the closed geometry can be obtained by normalizing the volume of the oriented bounding box of the closed geometry.
[0323] In this embodiment, closed geometries with a volume smaller than the volume threshold (i.e., small-volume closed geometries) do not participate in the simulation calculation process, but they are not deleted either. Small-volume closed geometries can also be assigned to the geometry attachments, and after the simulation calculation of the deformation effect is completed, the geometry attachments are reattached to the source geometry.
[0324] For example, refer to Figure 20 For each geometry in the source geometry 2001, a bounding box 2002 is generated for each geometry. For any geometry, the volume of the bounding box 2002 is normalized to obtain the volume of the geometry. Geometries with a volume greater than or equal to a volume threshold are identified as large-volume geometries, and geometries with a volume less than the volume threshold are identified as small-volume geometries.
[0325] Optionally, large-volume and small-volume geometries can be distinguished by different colors to help users quickly obtain the partitioning results.
[0326] 3. Determine the data corresponding to the first geometric body in the geometric body source data as the geometric body data.
[0327] That is, the data used to generate the first geometry in the source geometry data is defined as geometry data.
[0328] 4. Align the source second geometry and the source geometry in both the position and size dimensions to convert the collision source data into collision data.
[0329] That is, the source second geometry is moved in the position dimension so that the positional relationship between the source first geometry and the second geometry satisfies the positional relationship in the collision scene, and the source first geometry is scaled in the size dimension so that the size of the source second geometry matches the size of the first geometry.
[0330] The collision data is used to indicate the source second geometry after it has been moved and scaled, i.e., the second geometry.
[0331] Aligning the source second geometry with the source geometry ensures the correct positioning of the collider, which improves the accuracy of the simulation solution. For example, the door frame relative to the door is a collider, and it needs to be precisely aligned with the edge of the door.
[0332] In one example, the preprocessing of the source geometry also includes: obtaining the fixed points of the first geometry and determining the defined region. This process is the same as described in the above embodiments and will not be repeated here.
[0333] By filtering out large-volume closed geometries, unnecessary geometries (such as unclosed geometries and small-volume closed geometries) can be eliminated. This retains the primary geometries that have a significant impact on the simulation solution while reducing the computational resources required for the simulation solution. This helps ensure that the physical effects of key parts are realized and improves the efficiency of the simulation solution.
[0334] In addition, the preprocessing of the source geometry is fully automated and requires no user intervention, which helps to reduce operational complexity and improve the efficiency of source geometry preprocessing.
[0335] Please refer to Figure 21 The diagram illustrates a flowchart of a method for generating deformation effects according to another embodiment of this application. The entity executing each step of this method may be... Figure 1 The terminal device 10 in the computer system shown is a client for a second application (such as a special effects creation application) in the terminal device 10. The method may include at least one of the following steps 2110 to 2150.
[0336] Step 2110: Display the first user interface of the first tool node, the first user interface including the first control.
[0337] A first tool node is used to represent a first tool, which may include at least one operation unit, with different operation units used to implement different functions. For example, the first tool node may be implemented as a control for controlling the first tool, through which the functions of the first tool can be used. For example, the tool node may be used to implement at least one of the following: node creation, parameter setting, network connection, simulation calculation, and asset management. Node creation may refer to the process of creating an operation unit, and network connection may refer to the process of connecting an operation unit. Parameter setting may refer to the process of setting the parameters of the operation unit.
[0338] In this embodiment, the first tool is used to generate deformation effects. The first user interface is the user interface of the first tool, allowing the user to interact with the first tool.
[0339] In one example, the client displays the main user interface of the second application. In response to the user's invocation of the first tool, the client displays the first tool node in the main user interface; in response to an operation on the first tool node, the client displays the first user interface.
[0340] The first control is used to establish a node network, which refers to a network composed of multiple nodes (i.e., operation units) connected together. In this embodiment, the node network is used to programmatically generate deformation effects. This embodiment does not limit the structure of the node network; it can be set and adjusted according to actual usage requirements.
[0341] For example, refer to Figure 22 The client displays the main user interface 2200 of the second application. In response to the user's invocation of the first tool, the client displays the first tool node 2201 in the main user interface 2200. In response to a trigger operation on the first tool node 2201, the client displays the first user interface 2202 of the first tool node 2201. The first user interface 2202 includes a first control 2203.
[0342] For details not described in the embodiments of this application, please refer to the above embodiments, and they will not be repeated here.
[0343] Step 2120: In response to an operation on the first control, a node network is displayed, the node network including a first tool node and a second tool node connected to the first tool node.
[0344] The second tool node is used to characterize a second tool, which may include at least one operation unit. In embodiments of this application, the second tool is used to preprocess the source geometry. Exemplarily, the second tool node can be implemented as a control for controlling the second tool, through which the functions of the second tool can be used.
[0345] Optionally, the first tool node takes the output of the second tool node as input.
[0346] For example, refer to Figure 22 In response to a user's trigger operation on the first control 2203, the client automatically creates a node network 2204 and displays the node network 2204 in the main user interface 2200. The node network 2204 includes a first tool node 2201 and a second tool node 2205 connected to the first tool node 2201. The four output ports of the second tool node 2205 are respectively connected to the four input ports of the first tool node 2201.
[0347] This application supports one-click automatic creation of node networks without requiring users to manually create nodes and connect them to create the node network. This improves the convenience and efficiency of node network creation, and thus improves the generation efficiency of deformation effects.
[0348] In one example, the node network further includes a first input node and a second input node respectively connected to the second tool node; wherein the first input node is used to import geometry source data and the second input node is used to import collision source data, then the embodiments of this application may also include the following.
[0349] 1. In response to an operation on the first input node, display the first path parameter, which is used to obtain geometry source data, and the geometry source data is used to construct a source geometry including the first geometry.
[0350] Here, the first path parameter is the storage path of the geometric source data. By modifying the path parameter in the first input node to the first path parameter, the first input node automatically obtains the geometric source data according to the first path parameter. For example, when the first path parameter is the storage path of the geometric source data in the first application, the first input node imports the geometric source data from the first application to the second application.
[0351] Optionally, the geometric source data may be in at least one of the following formats: FBX format or ABC format.
[0352] For example, refer to Figure 22 In response to the user's operation of modifying the path parameter of the first input node 2206 to the first path parameter, the first input node 2206 imports geometric source data.
[0353] 2. In response to the operation on the second input node, display the second path parameters. The second path parameters are used to obtain the collision source data, which is used to construct the initially imported source second geometry.
[0354] The second path parameter is the storage path of the collision source data. By modifying the path parameter in the second input node to the second path parameter, the second input node automatically obtains the collision source data according to the second path parameter.
[0355] For example, refer to Figure 22 In response to the user's operation of modifying the path parameter of the second input node 2207 to the second path parameter, the second input node 2207 imports collision source data.
[0356] Among them, geometric source data is used to determine geometric data, and collision source data is used to determine collision data.
[0357] Users can easily import data automatically by setting the data storage path, which improves the convenience and efficiency of importing geometric source data and collision source data.
[0358] Optionally, a first scaling node may also be connected between the first input node and the second tool node, and a second scaling node may also be connected between the second input node and the second tool node. Both the first scaling node and the second scaling node are used to adjust the size of the imported geometry so that the geometry source data and collision source data meet the size standards of the second application.
[0359] Step 2130: In response to an operation on the second user interface of the second tool node, preprocessing parameters are displayed. The preprocessing parameters are used to determine geometry data and collider data. The geometry data is used to construct the first geometry, and the collider data is used to construct the second geometry that collides with the first geometry.
[0360] The second user interface is the user interface of the second tool, allowing the user to interact with the second tool. Optionally, in response to a user's triggering action on the second tool node, the client displays the second user interface of the second tool node.
[0361] Preprocessing parameters can refer to parameters set by the user for the preprocessing of the source geometry. For example, preprocessing parameters may include at least one of the following: a volume threshold. The volume threshold in the preprocessing parameters is used to obtain geometry data from the source geometry data.
[0362] For example, refer to Figure 23 The second user interface 2300 includes a control 2303. In response to the user's adjustment of the control 2303, the client displays a volume threshold. The volume threshold is a parameter belonging to [0, 1]. The user can set the volume threshold by sliding the control 2303 to filter geometry of different volumes.
[0363] like Figure 24As shown, for different volume thresholds, the client only displays the geometry in source geometry 2401 whose volume is greater than or equal to the volume threshold.
[0364] The second user interface 2300 also includes a control 2301. In response to the user's trigger operation on the control 2301, the second application automatically creates a first input node and a second input node, and connects the first input node and the second input node to the second tool node respectively to support the import of geometry source data and collision source data.
[0365] The second user interface 2300 also includes a control 2302. In response to the user's triggering operation on the control 2302, the client displays multiple visualization options. Different visualization options are used to control the display of different parts of the source geometry.
[0366] like Figure 25 As shown, the "Remove Unclosed Geometry" option displays only closed geometry from the source geometry.
[0367] The "Unclosed Geometry" option displays only unclosed geometry within the source geometry.
[0368] The "Final Solution Model" option displays only closed geometries in the source geometry whose volume is greater than or equal to the volume threshold, such as the first geometry in the source geometry.
[0369] The "Small Objects" option displays only closed geometries in the source geometry whose volume is less than the volume threshold.
[0370] The "Geometry Attachments" option displays closed geometries with a volume smaller than the volume threshold from the source geometry, as well as open geometries.
[0371] The "Final Solution Model + Collision Bodies + Specified Region" option displays closed geometries, collision bodies (such as the second geometry), and defined regions (regions determined based on fixed points) in the source geometry whose volume is greater than or equal to the volume threshold.
[0372] The second user interface 2300 also includes a control 2304. In response to a user's triggering operation on the control 2304, the second tool aligns the source second geometry and the source geometry in the position and size dimensions to convert the collision source data into collision data.
[0373] The second user interface 2300 also includes a control 2305. In response to a user's trigger operation on the control 2305, the client displays the fixed points (e.g., the source geometry, i.e., the first geometry) of the source geometry. Figure 15 (Fixed point 1502 in the image), the user can select a third geometry using the identification information provided by the second tool. After the user selects the third geometry, the second tool automatically generates a defined area (e.g., ...). Figure 15 (Set area 1503 in the middle).
[0374] refer to Figure 22 The inputs of the second tool node 2205 are geometry source data and collision point source data, and the outputs of the second tool node 2205 are geometry data, collision point data, set area and geometry attachments.
[0375] Optionally, after the preprocessing of the source geometry is completed, in response to the user's operation on the first tool node 2201, the first user interface is redisplayed so that the user can generate the deformation effect through the first tool.
[0376] Step 2140, in response to an operation on the first user interface, display impact point setting parameters and crease setting parameters. The impact point setting parameters are used to determine the impact point data of the first geometry. The impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry. The crease data are used to construct the creases on the surface of the first geometry.
[0377] Optionally, the first user interface includes a third control and a first area, wherein the third control is used to adjust the displayed content of the first area. For example, the third control corresponds to multiple stage options, each stage option corresponding to a type of displayed content. Users can set impact point setting parameters and crease setting parameters through different stage options.
[0378] For example, refer to Figure 22 The first user interface 2202 includes a third control 2208 and a first area 2209. When the stage option in the third control 2208 is set to "Import Asset Preprocessing" by default, the first display content is displayed in the first area 2209, and the first display content includes the first control 2203.
[0379] like Figure 26 As shown, when the stage option in the third control 2208 is selected as "Import Asset Preprocessing", the second display content is displayed in the first area 2209. The second display content is used to set the impact point setting parameters.
[0380] In one example, the impact point setting parameters include at least one of an impact direction parameter and an impact quantity parameter. The impact direction parameter determines the impact direction of the impact point, and the impact quantity parameter determines the number of impact points. The first tool can automatically generate impact point data based on the impact direction parameter and the impact quantity parameter.
[0381] For example, in response to an operation that sets the impact direction of a first geometry, impact direction parameters are displayed. For example, refer to... Figure 26The first region 2209 includes six impact directions: X+, X-, Y+, Y-, Z+, and Z-. The impact direction selected by the user from these six impact directions can be determined as the target impact direction (corresponding to the target surface mentioned above). The target impact direction is the impact direction parameter.
[0382] For example, in response to an operation that sets the number of impact points for a first geometry, an impact number parameter is displayed. For example, refer to... Figure 26 The first area 2209 includes "Grid Cell" and "Offset" options. In response to user settings for these options, the first tool displays the size and offset of the grid cells. The impact quantity parameter includes the size and offset of the grid cells, which can be used to determine the number of impact points in each impact direction.
[0383] The first tool can determine the number of impact points in each impact direction based on the impact quantity parameter, and determine the target impact direction based on the impact direction parameter. Then, it can determine the impact point data based on the number of impact points and the target impact direction.
[0384] Alternatively, impact points can also be culled using geometry as a mask. For example, refer to... Figure 26 and 27 For the "mask" control in the first region 2209, when the "mask" control is selected as the "no mask" option, the first tool displays all impact points; when the "mask" control is selected as the "mask filter" option, the first tool only displays impact points in geometry 2701; when the "mask" control is selected as the "mask" option, the first tool only displays impact points outside geometry 2701.
[0385] like Figure 28 As shown, when the stage option in the third control 2208 is selected as "crease processing and soft / hard weight", the third display content is displayed in the first area 2209. The third display content is used to set the crease setting parameters.
[0386] In one example, the crease setting parameters include at least one of the following: mesh length parameter, crease number parameter, noise parameter, and soft / hard weight parameter. Specifically, the mesh length parameter is used to reconstruct the surface of the first geometry into multiple polygonal meshes, the crease number parameter is used to determine the number of creases, the noise parameter is used to determine the noise displacement, and the soft / hard weight parameter is used to determine the prominence and soft / hard effect of the creases.
[0387] For example, in response to an operation reconstructing the surface of the first geometry, the mesh length parameter is displayed. Figure 28As shown, in response to the user adjusting the "length" control in the first region 2209, the first tool displays the length of the sides of the polygonal mesh when the first geometry is weighed, i.e., the mesh length parameter.
[0388] For example, in response to an operation that sets the number of creases for a first geometry, the crease number parameter is displayed. Figure 28 As shown, in response to the user adjusting the "Quantity" control in the first area 2209, the first tool displays the number of creases, i.e., the crease quantity parameter. Optionally, the crease quantity parameter can be used to determine the number of seed points.
[0389] For example, noise parameters are displayed in response to an operation that sets the shape of the crease of the first geometry. Figure 28 As shown, the first area 2209 includes a "Type" control, a "Frequency" control, an "Offset" control, an "Amplitude" control, and a "Roughness" control. These five controls are used to generate noise parameters, namely noise displacement, which controls the shape of the crease. In response to user actions on these five controls, the first tool displays the noise parameters.
[0390] The "Type" control selects the specific algorithm type for generating the noise displacement, such as mathematical noise algorithms like Perlin or Simplex. The "Frequency" control controls the spatial period of the noise displacement; a higher value results in denser detail. The "Offset" control shifts the sampling position of the noise displacement for animation or randomization effects. The "Amplitude" control determines the overall intensity of the noise displacement; a higher value makes the displacement more pronounced. The "Roughness" control controls the fractal level of the noise displacement; a higher value results in richer detail and a coarser texture.
[0391] For example, in response to an operation that sets the bending stiffness of the crease of the first geometry, soft and hard weight parameters are displayed. Figure 28 As shown, the first area 2209 also includes a "solid width" control and a "blended width" control. In response to user actions on the "solid width" control, the first tool displays the solid width of the crease; in response to user actions on the "blended width" control, the first tool displays the blended width of the crease. The solid width controls the prominence of the crease, and the blended width controls the softness or hardness of the crease.
[0392] Optionally, the first tool automatically determines the bending stiffness of the crease to be 1, and sets the bending stiffness of the remaining areas in the first geometry to be 0.
[0393] By manipulating the controls in the first user interface, the parameter settings required for simulation calculation can be completed conveniently and quickly without manually adjusting the geometry. This helps to improve the convenience and efficiency of generating deformation effects, as well as reduce the complexity of operation.
[0394] Step 2150: In response to the trigger operation for generating deformation effects, the first tool corresponding to the first tool node simulates and calculates the deformation effect data of the first geometry based on the collision body data, impact point data and crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect has creases.
[0395] like Figure 29 As shown, when the stage option in the third control 2208 is selected as "force field and simulation solution", the fourth display content is displayed in the first area 2209. The fourth display content is used to trigger the first tool to generate deformation effects.
[0396] In this embodiment, the first tool has a built-in solver. The first tool can simulate and calculate the deformation effect data of the first geometry based on the collision body data, impact point data, and crease data by calling the solver. The solver can be selected by the user.
[0397] For example, in response to the operation of setting the solver, solver parameters are displayed, which are used to indicate the soft body solver in the first tool.
[0398] For example, such as Figure 29 As shown, the first area 2209 includes a "Solver" control. In response to a user's selection of the "Flexible Solver" option within the "Solver" control, the first tool displays solver parameters, such as the solver's name. In a feasible example, for the simulation of morphing effects, the first tool automatically invokes the flexible solver without requiring user selection.
[0399] After the soft body solver is selected, in response to the operation of the second control in the first user interface, the deformation effect data of the first geometry is obtained by simulating and solving the collision body data, impact point data and crease data through the soft body solver.
[0400] For example, such as Figure 29 As shown, the first area 2209 includes a "Save to Background" control. In response to the user's trigger operation on the "Save to Background" control, the first tool calls the soft body solver to simulate and calculate the deformation effect data of the first geometry based on the collider data, impact point data, and crease data. The first tool can perform multi-threaded batch simulation calculations of deformation effects in the background, such as performing separate simulation calculations for each impact point under each impact direction to obtain the deformation effect at each impact point.
[0401] Optionally, the first region 2209 also includes a "Local Disturbance Force Field" option, which is used to add some additional disturbance force field to the impact force. The "Local Disturbance Force Field" option also includes five controls: "Type" control, "Frequency" control, "Offset" control, "Amplitude" control, and "Roughness" control, but these five controls are used to generate noise displacement that controls the disturbance force field.
[0402] like Figure 30 As shown, the impact force of 3000 becomes disordered after a local disturbance force field is added, which is consistent with real impact scenarios.
[0403] The first area 2209 also includes a "Disruption Radius" option, which includes controls for controlling the radius range of the impact.
[0404] The first area 2209 also includes an "Open File" control, such as... Figure 31 As shown, in response to the user's trigger operation on the "Open File" control, the first tool displays files 3101 with various deformation effects. Each file 3101 is labeled with the impact direction and representation information of the impact point corresponding to the deformation effect. For example, Front0 represents the deformation effect of the first impact point under the forward impact direction.
[0405] The first area 2209 also includes a "Clear Files" control, such as... Figure 32 As shown, in response to a user's action on the "Clear Files" control, the first tool displays options for files with various transformation effects. In response to a user's action on a file's option, the first tool deletes that file to remove the transformation effect corresponding to that file. In response to an action on the "All" control, the first tool deletes all files.
[0406] The first area 2209 also includes an "Asset Name" control, which is used to obtain the name of the geometry source data. Assets refer to all reusable data used or generated during the effects generation process, such as 3D models, texture maps, deformation effects, and animation data.
[0407] The first area 2209 also includes an "Add Internal Support" control, which is used to trigger the construction of the aforementioned structural constraints. For example... Figure 33 As shown, when the "Add Internal Support" control is enabled, the first tool generates a more rigid and less prone-to-crease deformation effect for the first geometry 3201 by default. When the "Add Internal Support" control is disabled, the first tool generates a deformation effect similar to that of a deformed aluminum can for the first geometry 3201 by default.
[0408] The first area 2209 also includes a "Version" control, which manages the versions of the files (i.e., morphing effects) obtained from the simulation. The first tool can automatically determine the storage path of the files according to preset rules, without requiring user settings. The files obtained from the simulation can be automatically stored according to this storage path.
[0409] This embodiment uses a soft-body solver to simulate and calculate the deformation effects of the first geometry based on the impact point and crease, resulting in more accurate and realistic deformation effects. Furthermore, users can trigger the generation of deformation effects simply by operating the first user interface, without manually adjusting the first geometry, which improves the convenience and efficiency of generating deformation effects.
[0410] In one example, after generating the deformation effect data, in response to the operation for exporting the deformation effect data, the deformation effect data is exported as model rendering data, which is used to render the deformation effect for the first model corresponding to the first geometry.
[0411] After completing the simulation solution, as follows Figure 34 As shown, when the stage option in the third control 2208 is selected as "deformation effect post-processing and output", the fifth display content is displayed in the first area 2209. The fifth display content is used to trigger the first tool to export the deformation effect data as model rendering data.
[0412] The first area 2209 includes a "Reconstruct Graphics" control, which is used to batch import the results of simulation calculations, i.e., multiple deformation effect files.
[0413] like Figure 35 As shown, in response to the user's trigger operation on the "Reconstruct Graphics" control, the first tool creates a third tool node 2210 within the first tool node 2201 for each deformation effect. The third tool node 2210 is used to represent the third tool, which is used for post-processing deformation effects and exporting the post-processed deformation effects. Post-processing includes adjusting the weight parameters of the deformation effects and adding geometric attachments.
[0414] Multiple third tool nodes 2210 are connected to nodes 2212 in the first tool node 2201, and nodes 2212 are used to control the weight parameters of the deformation effect. The multiple third tool nodes 2210 are arranged according to the meshing rules to ensure that the multiple third tool nodes 2210 do not overlap and the layout is clear and neat. The number of multiple third tool nodes 2210 is the same as the number of impact points.
[0415] Optionally, third tool nodes 2210 can be created by region and color. For example, for deformation effects of impact points under the same impact direction, the third tool nodes 2210 corresponding to the deformation effects are grouped together and assigned the same color. For different impact directions, the third tool nodes 2210 are set with different colors. Third tool nodes 2210 within the same region can be arranged according to the identification information of the impact points (such as ID numbers). Optionally, the first tool node 2201 contains nodes for storing the impact direction and identification information of the impact points. In response to a user's trigger operation on the "Reconstruct Graphics" control, the first tool automatically locates to the first tool node 2201.
[0416] Optionally, each third tool node 2210 also creates a corresponding output node (null). The output port of the output node is connected to the input port of node 2212, and the input port of the output node is connected to the output port of the third tool node 2210 to ensure the validity of the data flow in the first tool.
[0417] After all nodes in the first tool node 2201 are created and connected, the first tool automatically refreshes all input and output connections to ensure that parameters are updated synchronously.
[0418] The first tool can automatically adjust the number, parameters, and connection methods of the third tool nodes based on the input collision point data, ensuring that the first tool is applicable to different collision point data. The regional and gridded layout of the third tool node 2210 improves the readability of the node network and avoids the node chaos problem in related technologies. Through standardized node and parameter settings, the first tool has good scalability.
[0419] The automatic layout and connection of the third tool node 2210 by the first tool effectively solves the problems of low efficiency and error in node network construction in related technologies, thus providing users with a more efficient and intuitive working experience.
[0420] like Figure 36 As shown, in response to a trigger operation on the third tool node 2210, the third tool displays its third user interface 3601, which is used for user interaction with the third tool. The "Axis" and "ID" options in the third user interface 3601 automatically display the impact direction and identification information of the corresponding deformation effect, as well as modify the name of the deformation effect.
[0421] The "Frame" option in the third user interface 3601 is used to control which frame of the morphing effect is displayed.
[0422] Optionally, commands can be sent to the third tool node 2210 based on the impact direction and identification information of the impact point.
[0423] After the first tool automatically configures each third tool node 2210, the user can adjust the weight parameters of the deformation effect through node 2212 to change the deformation effect. For example... Figure 37 As shown, in response to the user's trigger operation on node 2212, user interface 3701 is displayed. User interface 3701 includes weight adjustment controls 3702 corresponding to each deformation effect. Weight adjustment controls 3702 are used to adjust the weight parameters of the deformation effect.
[0424] Optionally, in response to a user's operation of mixing multiple deformation effects, the first tool merges the multiple deformation effects to obtain a new deformation effect, and the deformation effect data includes the new deformation effect.
[0425] like Figure 34 As shown, the first area 2209 also includes a "Clear Graphics" control. In response to a user's triggering operation on the "Clear Graphics" control, the first tool clears all third tool nodes 2210.
[0426] The first area 2209 also includes a "Custom Effects" control. In response to user actions on this control, the first tool creates a new node 2212. This new node 2212 can be used to reshape a new deformation effect based on all existing deformation effects, similar to "face-sculpting." For example, it can merge multiple existing deformation effects to generate multi-point or large-area deformation effects, such as simulating a grenade explosion. This improves the flexibility of deformation effect generation. The new node 2212 can be connected to the output node of each third tool node 2210.
[0427] The first tool node 2201 also includes node 2213. In response to the "Save File" control in node 2213, the first tool automatically exports model rendering data. This model rendering data can be used to generate a skeletal network with deformation effects. The model rendering data can be user-post-processed deformation effect data, such as deformation effects after weight parameter adjustments, deformation effects after adding geometric attachments, and newly added deformation effects. The model rendering data can be in FBX format.
[0428] In one example, such as Figure 35 As shown, the first tool also creates a fourth tool node 2211 inside the first tool node 2201. The fourth tool node 2211 is used to export the position of each impact point for import into the first application.
[0429] The first application can render deformation effects on the first model corresponding to the first geometry based on the location of the impact point and the model rendering data.
[0430] This application embodiment supports one-click export of deformation effects, which helps to improve the ease of exporting deformation effects.
[0431] In some embodiments, the first tool traverses each impact point using wedge nodes to perform independent simulation calculations. The wedge nodes are used to perform batch parameter testing, enabling batch simulation of deformation effects at each impact point.
[0432] For example, each impact point corresponds to an ID number, such as 16 impact points corresponding to ID numbers 0-15. These 16 ID numbers can be set as attributes of 16 wedge nodes, so the 16 wedge nodes correspond to 16 impact points. Impact points can then be filtered by selecting a wedge node; for example, if the wedge node's attribute is 1, the tool will only retain impact points with ID number 1. This allows users to select impact points for simulation calculations using wedge nodes, thereby achieving batch simulation calculations of deformation effects.
[0433] In summary, the technical solution provided in this application supports one-click automatic creation of node networks, eliminating the need for users to manually create and connect nodes. This improves the convenience and efficiency of node network creation, thereby increasing the efficiency of generating deformation effects. Furthermore, it simplifies the operation of triggering deformation effect generation, thus lowering the technical barrier to generating deformation effects.
[0434] In addition, after determining the impact point and crease of the first geometry, the deformation effect of the first geometry is simulated and calculated based on the second geometry, the impact point and crease. This realizes the procedural generation of the deformation effect of the first geometry, which can avoid the operational errors introduced by manually adjusting the first geometry to generate deformation effects in related technologies, and reduce human error, thereby improving the accuracy of deformation effect generation.
[0435] Furthermore, the first tool node allows for the rapid generation of different deformation effects for the first geometry, eliminating the need to generate each effect individually, thus improving the efficiency of deformation effect generation. The first tool enables efficient and automated batch generation of skeletal meshes with multiple deformation effects. Based on batch simulation calculations, this embodiment can maintain efficient generation of deformation effects as the number of required effects increases without significantly increasing the workload. This gives the technical solution provided by this embodiment a significant advantage when handling large-scale, multi-deformation requirements.
[0436] In some embodiments, reference Figure 38 Taking metal deformation effects as an example, the embodiments of this application may also include the following contents.
[0437] 1. The first application exports geometry source data and collision source data.
[0438] Geometric source data is used to indicate source geometries of metallic material, including a first geometry. Collision source data refers to source second geometries that collide with the first geometry.
[0439] 2. The second application imports geometric source data and collision source data, and preprocesses the geometric source data and collision source data using the first tool.
[0440] 2.1 Import the geometric source data through the first tool node.
[0441] Optionally, the node network created by the first tool node, and the geometry source data imported through the first input node in the node network.
[0442] 2.2 Select the fixed point of the source geometry (i.e., the first geometry) using the first tool.
[0443] Optionally, a fixed point of the source geometry (i.e., the first geometry) can be selected via a second tool node in the node network.
[0444] 2.3 Import collision source data using the first tool.
[0445] Optionally, the second input node in the node network imports geometry source data.
[0446] 2.4. Determine the closed geometric solid.
[0447] The second tool node in the node network automatically identifies closed and open geometries from the source geometry.
[0448] 2.5. Determine the large-volume geometric shape.
[0449] The second tool node in the node network automatically identifies closed geometries whose volume is greater than or equal to a volume threshold from among the closed geometries. The volume threshold can be set by the user.
[0450] 2.6. The large-volume closed geometric body is determined as the final solution geometric body, namely the first geometric body mentioned above.
[0451] 2.7. Small-volume closed geometric bodies, as well as unclosed geometric bodies, are defined as geometric attachments.
[0452] 2.8. Define the set area.
[0453] The second tool node displays a fixed point. In response to the user's selection of a third geometry for the fixed point, the second tool automatically generates the bounding boxes of the three geometries and defines the area corresponding to the bounding boxes as the set area.
[0454] 2.9 Determine the collision data.
[0455] Using the second tool node, the source second geometry is aligned with the source geometry (the first geometry) in both the position and size dimensions to obtain collision point data used to indicate the second geometry.
[0456] 3. Simulation and calculation of metal deformation effects.
[0457] 3.1 Determine the impact point data.
[0458] The first tool node automatically generates impact point data to indicate at least one impact point, based on the target impact direction and number of impact points set by the user, as well as the geometry data.
[0459] 3.2 Determine the crease data.
[0460] Using the first tool node, based on the user-defined mesh length parameters, crease number parameters, noise displacement and bending stiffness, as well as the geometry data, crease data is automatically generated to indicate the location of creases during deformation.
[0461] 3.3 Batch simulation solution.
[0462] Using the first tool node, fixed constraints are determined based on the defined area; collision constraints are determined based on the collision data; structural constraints are determined based on the geometry data (i.e., the shape of the first geometry); and glue constraints and fabric constraints are determined based on the crease data. This process constructs a constraint network.
[0463] Under the constraints of the constraint network, the first tool node calls the soft body solver to simulate and calculate the first geometry at at least one impact point based on the impact point data and geometry data. The simulation results are used to indicate the metal deformation effect.
[0464] 4. Merge and export the skeletal network with metal deformation effects.
[0465] 4.1 Post-processing of simulation results to generate deformation effect data.
[0466] Optionally, the third tool node in the first tool node is used to post-process at least one simulation result to obtain the metal deformation effect of the first geometry at at least one impact point, and to merge and export the metal deformation effect of the first geometry at at least one impact point as deformation effect data.
[0467] 4.2 Export the skeletal network and impact points.
[0468] The third tool node converts the deformation effect data into model rendering data, and the fourth tool node in the first tool node exports the location of at least one impact point. The model rendering data is the skeletal network with metal deformation effects.
[0469] 5. The first application uses a skeletal network and impact points to render metal deformation effects in real time.
[0470] 5.1 The first application imports the model rendering data and the location of at least one impact point.
[0471] 5.2 The first application calls the metal deformation effect (i.e., skeletal network) of the impact point that matches the impact position in the model rendering data according to the impact position of the first model corresponding to the first geometry, and renders the first model in real time.
[0472] In summary, the technical solution provided in this application, after determining the impact point and crease of the first geometry, simulates and calculates the metal deformation effect of the first geometry based on the second geometry, the impact point, and the crease. This achieves the programmed generation of the metal deformation effect of the first geometry, which avoids the operational errors introduced by manually adjusting the first geometry to generate the metal deformation effect in related technologies, and reduces human error, thereby improving the accuracy of metal deformation effect generation.
[0473] In addition, by supporting the procedural generation of metal deformation effects, human intervention and decision-making can be reduced, which is conducive to improving the generation efficiency of metal deformation effects. Furthermore, when multiple metal deformation effects need to be generated, it is beneficial to maintain the same generation rules and processes for multiple metal deformation effects, thereby improving the consistency of metal deformation effect generation.
[0474] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0475] Please refer to Figure 39 This diagram illustrates a block diagram of a deformation effect generation apparatus according to an embodiment of this application. The apparatus has the function of implementing the above-described deformation effect generation method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus 3900 can be a computer device or can be installed within a computer device. The apparatus 3900 may include: a data determination module 3901, an impact point determination module 3902, a crease determination module 3903, and an effect generation module 3904.
[0476] The data determination module 3901 is used to determine geometric data and collision data. The geometric data is used to construct a first geometry, and the collision data is used to construct a second geometry that collides with the first geometry.
[0477] The impact point determination module 3902 is used to obtain the impact point data of the first geometric body according to the shape of the first geometric body, and the impact point data is used to determine the impact point between the first geometric body and the second geometric body.
[0478] The crease determination module 3903 is used to obtain crease data of the first geometric body based on the geometric body data, and the crease data is used to construct creases on the surface of the first geometric body.
[0479] The special effects generation module 3904 is used to simulate and calculate the deformation effect data of the first geometry based on the collision body data, the impact point data and the crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect has the crease.
[0480] In some embodiments, the impact point determination module 3902 is configured to:
[0481] Generate an axis-aligned bounding box for the first geometry, the axis-aligned bounding box being used to indicate the shape of the first geometry;
[0482] For the target face among the multiple faces of the axis-aligned bounding box, the target face is divided into multiple mesh cells;
[0483] Based on the plurality of grid cells, the impact point data of the first geometry under the target impact direction corresponding to the target surface is obtained;
[0484] In some embodiments, the impact point determination module 3902 is further configured to:
[0485] For any one of the plurality of grid cells, determine the center point of the grid cell;
[0486] The point on the surface of the first geometry that has the smallest distance from the center point is determined as the first initial impact point corresponding to the mesh unit;
[0487] The first intersection point of the first ray and the first geometry is determined as the second initial impact point corresponding to the grid cell, the starting point of the first ray is the center point, and the direction of the first ray is the target impact direction;
[0488] Based on the first initial impact point and the second initial impact point, the initial impact point corresponding to the grid cell is determined;
[0489] Move the initial impact point in the opposite direction to the target impact direction to obtain the impact point corresponding to the grid cell;
[0490] Based on the positions of the impact points corresponding to the multiple grid cells, the impact point data of the first geometry under the target impact direction is obtained.
[0491] In some embodiments, the impact point determination module 3902 is further configured to:
[0492] Obtain interpolation parameters, which are used to determine the method for determining the initial impact point;
[0493] If the interpolation parameter is a first value, then the first initial impact point is determined as the initial impact point corresponding to the grid cell;
[0494] If the interpolation parameter is a second value, then the second initial impact point is determined as the initial impact point corresponding to the grid cell;
[0495] If the interpolation parameter is greater than the first value and less than the second value, then linear interpolation is performed on the positions of the first initial impact point and the second initial impact point to obtain the initial impact point corresponding to the grid cell.
[0496] In some embodiments, the crease determination module 3903 is configured to:
[0497] The geometric data is converted into mesh data, which is used to construct the first geometry, whose surface is composed of multiple polygonal meshes;
[0498] Multiple seed points are randomly generated on the surface of the first geometric body, and the seed points are used to generate the crease.
[0499] A noise displacement is added to the surface of the first geometry to obtain processed mesh data, which is used to indicate the first geometry with wrinkles;
[0500] Based on the multiple seed points, the processed mesh data is divided to obtain multiple sub-mesh data, and each sub-mesh data is used to construct a sub-geometry with folds;
[0501] The displacement of the multiple sub-mesh data is corrected to obtain multiple corrected sub-mesh data, wherein each corrected sub-mesh data is used to construct a sub-geometry without wrinkles and with irregular boundaries;
[0502] Based on the irregular boundaries corresponding to the multiple corrected sub-grid data, initial crease data is determined, and the initial crease data is used to determine multiple initial creases formed by the irregular boundaries.
[0503] The crease data is obtained based on the initial crease data and the multiple corrected sub-mesh data.
[0504] In some embodiments, the crease determination module 3903 is further configured to:
[0505] The bending stiffness of the plurality of initial creases indicated by the initial crease data is set to a third value to obtain the set crease data;
[0506] The bending stiffness of the sub-geometry corresponding to the multiple corrected sub-mesh data is set to a fourth value to obtain multiple set sub-mesh data, wherein the fourth value is less than the third value;
[0507] The crease data is obtained by combining the configured crease data and the multiple configured sub-grid data.
[0508] In some embodiments, the data determination module 3901 is configured to:
[0509] Obtain geometry source data and collision source data. The geometry source data is used to construct a source geometry including the first geometry, and the collision source data is used to construct an initially imported source second geometry.
[0510] The closed geometric body with a volume greater than or equal to the volume threshold in the source geometry is determined as the first geometric body;
[0511] The data corresponding to the first geometric object in the geometric object source data is determined as the geometric object data;
[0512] Align the source second geometry and the source geometry in both the position and size dimensions to convert the collider source data into the collider data.
[0513] In some embodiments, the data determining module 3901 is further configured to:
[0514] Determine a first set of vertices of the source geometry, the first set of vertices consisting of unshared vertices in the source geometry, wherein each unshared vertex belongs to only one of the multiple faces used to constitute the source geometry;
[0515] The unshared vertices in the first vertex set are expanded using a connectivity algorithm to obtain an expanded first vertex set. The remaining vertices in the source geometry excluding the vertices in the expanded first vertex set are combined to form a second vertex set.
[0516] The expanded first vertex set and the second vertex set are split separately to obtain multiple connected geometric groups, each of which corresponds to a geometric body;
[0517] The geometry corresponding to the connected geometry group with the unshared vertices is determined as an unclosed geometry;
[0518] The geometry corresponding to the connected geometric group that does not have the unshared vertices is determined as the closed geometry.
[0519] In some embodiments, the data determining module 3901 is further configured to:
[0520] Generate the oriented bounding box of the closed geometry;
[0521] Determine the volume of the oriented bounding box;
[0522] The volume is normalized to obtain the processed volume;
[0523] The processed volume is determined as the volume of the closed geometry.
[0524] In some embodiments, the special effects generation module 3904 is used for:
[0525] Obtain the convexity parameter of the first geometric object, the convexity parameter being used to indicate the shape of the first geometric object;
[0526] The bending stiffness is extracted from the crease data to obtain the bending stiffness data;
[0527] Based on the convexity parameter, the bending stiffness in the bending stiffness data is adjusted to obtain the adjusted bending stiffness data.
[0528] Based on the adjusted bending stiffness data, the crease data, and the collision body data, a constraint network is constructed. The constraint network is used to constrain the mechanical behavior of the first geometry when it deforms.
[0529] Under the constraints of the constraint network, the deformation effect data of the first geometry is obtained by simulating and solving the impact point data through a soft body solver. The soft body solver is a solver used to simulate the flexible dynamics of object collision.
[0530] In some embodiments, the special effects generation module 3904 is further configured to:
[0531] Based on the adjusted bending stiffness data and the set extension stiffness, the fabric constraint is determined, which is used to constrain the degree of surface flexible deformation of the first geometry.
[0532] Based on the vertices of each crease in the crease data, a glue constraint is determined, which is used to constrain the degree of fracture of the first geometry after being subjected to force.
[0533] Based on fixed points on the first geometry, fixed constraints are determined. The fixed constraints are used to constrain the positions of vertices on the first geometry located within a set region, which remain unchanged during the simulation solution process. The fixed points are used to fix the first geometry, and the set region is determined based on the fixed points.
[0534] Based on the shape of the first geometric object, structural constraints are determined, and the structural constraints are used to constrain the shape of the first geometric object.
[0535] Based on the collision data, collision constraints are determined, which are used to constrain the interaction between the first geometry and the second geometry.
[0536] The constraint network is constructed based on at least one of the fabric constraint, the adhesive constraint, the fixing constraint, the structural constraint, and the collision constraint.
[0537] In some embodiments, the special effects generation module 3904 is further configured to:
[0538] When a third geometry is selected at the fixed point, a bounding box of the third geometry is generated. The third geometry is used to fix the first geometry with the fixed point as a reference, and the bounding box is used to indicate the area occupied by the third geometry.
[0539] The fixed constraint is determined based on the bounding box, and the fixed constraint is used to indicate the position of the vertex on the first geometry located within the bounding box, which remains unchanged during the simulation solution.
[0540] In some embodiments, the impact point data is used to indicate at least one impact point; the special effects generation module 3904 is further used for:
[0541] Under the constraints of the constraint network, the soft body solver simulates and calculates the deformation effect data of the first geometry based on the impact point data, including:
[0542] For any one of the at least one impact points, under the constraints of the constraint network, the soft body solver simulates and calculates the deformation effect of the first geometry at the impact point based on the position of the impact point.
[0543] Based on the deformation effects of the first geometry at the at least one impact point, deformation effect data of the first geometry is obtained.
[0544] In some embodiments, the special effects generation module 3904 is further configured to fuse n deformation effects in at least one of the deformation effects to obtain a new deformation effect, where n is an integer greater than 1.
[0545] In some embodiments, the device 3900 further includes a data export module and a data transmission module (not shown in the figure).
[0546] The data export module is used to export the deformation effect data as model rendering data.
[0547] The data sending module is used to send the model rendering data to the first application. The first application is used to render the first model by calling the deformation effect of the impact point in the model rendering data that matches the impact position according to the impact position of the first model corresponding to the first geometry.
[0548] In summary, the technical solution provided in this application, after determining the impact point and crease of the first geometry, simulates and calculates the deformation effect of the first geometry based on the second geometry, the impact point, and the crease. This achieves the programmed generation of the deformation effect of the first geometry, which avoids the operational errors introduced by manually adjusting the first geometry to generate the deformation effect in related technologies, and reduces human error, thereby improving the accuracy of deformation effect generation.
[0549] In addition, by supporting procedural generation of geometric deformation effects, human intervention and decision-making can be reduced, which helps to improve the generation efficiency of deformation effects. Furthermore, when multiple deformation effects need to be generated, it helps to maintain the same generation rules and processes for multiple deformation effects, thereby improving the consistency of deformation effect generation.
[0550] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0551] Please refer to Figure 40 This diagram illustrates a block diagram of a deformation effect generation apparatus according to another embodiment of this application. The apparatus has the function of implementing the above-described deformation effect generation method; this function can be implemented in hardware or by hardware executing corresponding software. The apparatus 4000 can be a computer device or can be installed within a computer device. The apparatus 4000 may include: an interface display module 4001, a network construction module 4002, a data preprocessing module 4003, a parameter setting module 4004, and a data generation module 4005.
[0552] The interface display module 4001 is used to display the first user interface of the first tool node, the first user interface including the first control.
[0553] The network construction module 4002 is configured to display a node network in response to an operation on the first control, the node network including the first tool node and a second tool node connected to the first tool node.
[0554] The data preprocessing module 4003 is used to display preprocessing parameters in response to an operation on the second user interface of the second tool node. The preprocessing parameters are used to determine geometry data and collider data. The geometry data is used to construct a first geometry, and the collider data is used to construct a second geometry that collides with the first geometry.
[0555] The parameter setting module 4004 is used to display impact point setting parameters and crease setting parameters in response to an operation on the first user interface. The impact point setting parameters are used to determine the impact point data of the first geometry, and the impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry, and the crease data are used to construct the creases on the surface of the first geometry.
[0556] The data generation module 4005 is used to respond to a trigger operation for generating deformation effects, and to simulate and calculate deformation effect data of the first geometry based on the collision body data, the impact point data and the crease data through the first tool corresponding to the first tool node. The deformation effect data is used to generate deformation effects of the first geometry at the impact point, and the deformation effect has the crease.
[0557] In some embodiments, the node network further includes a first input node and a second input node respectively connected to the second tool node; the interface display module 4001 is further configured to:
[0558] In response to an operation on the first input node, a first path parameter is displayed, the first path parameter being used to obtain geometry source data, the geometry source data being used to construct a source geometry including the first geometry;
[0559] In response to an operation on the second input node, a second path parameter is displayed, which is used to obtain collision source data, and the collision source data is used to construct the initially imported source second geometry;
[0560] The volume threshold in the preprocessing parameters is used to obtain the geometric data from the geometric source data, and the collision source data is used to convert it into the collision data.
[0561] In some embodiments, the impact point setting parameters include at least one of impact direction parameters and impact quantity parameters, and the crease setting parameters include at least one of mesh length parameters, crease quantity parameters, noise parameters, and soft / hard weight parameters; the interface display module 4001 is further configured to:
[0562] In response to the operation of setting the impact direction of the first geometry, the impact direction parameters are displayed;
[0563] In response to the operation of setting the number of impact points of the first geometry, the impact number parameter is displayed;
[0564] In response to the operation of reconstructing the surface of the first geometry, the mesh length parameter is displayed, which is used to reconstruct the surface of the first geometry into a plurality of polygonal meshes;
[0565] In response to the operation of setting the number of creases of the first geometry, the crease number parameter is displayed;
[0566] The noise parameters are displayed in response to the operation of setting the shape of the crease of the first geometry;
[0567] In response to the operation of setting the bending stiffness of the crease of the first geometry, the soft and hard weight parameters are displayed.
[0568] In some embodiments, the interface display module 4001 is further configured to:
[0569] In response to the operation of setting the solver, the solver parameters are displayed, which are used to indicate the soft body solver in the first tool;
[0570] In response to an operation on the second control in the first user interface, the deformation effect data of the first geometry is obtained by simulation calculation using the soft body solver based on the collision data, the impact point data, and the crease data.
[0571] In some embodiments, the device 4000 further includes a data export module (not shown in the figure).
[0572] The data to export module is used to export the deformation effect data as model rendering data in response to the operation of exporting the deformation effect data. The model rendering data is used to render the deformation effect for the first model corresponding to the first geometry.
[0573] In summary, the technical solution provided in this application supports one-click automatic creation of node networks, eliminating the need for users to manually create and connect nodes. This improves the convenience and efficiency of node network creation, thereby increasing the efficiency of generating deformation effects. Furthermore, it simplifies the operation of triggering deformation effect generation, thus lowering the technical barrier to generating deformation effects.
[0574] In addition, after determining the impact point and crease of the first geometry, the deformation effect of the first geometry is simulated and calculated based on the second geometry, the impact point and crease. This realizes the procedural generation of the deformation effect of the first geometry, which can avoid the operational errors introduced by manually adjusting the first geometry to generate deformation effects in related technologies, and reduce human error, thereby improving the accuracy of deformation effect generation.
[0575] Please refer to Figure 41 This illustrates a structural block diagram of a computer device provided in one embodiment of this application. The computer device 4100 can be implemented as... Figure 1 The terminal device 10 or server 20 shown.
[0576] Typically, computer device 4100 includes a processor 4101 and a memory 4102.
[0577] Processor 4101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 4101 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). Processor 4101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 4101 may integrate a GPU, which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 4101 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0578] The memory 4102 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 4102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 4102 stores a computer program that is loaded and executed by the processor 4101 to implement the method for generating the aforementioned variant effects.
[0579] Those skilled in the art will understand that Figure 41 The structure shown does not constitute a limitation on the computer device 4100, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0580] In some embodiments, a computer-readable storage medium is also provided, wherein a computer program is stored therein, the computer program being loaded and executed by a processor to implement the above-described method for generating morphing effects.
[0581] Optionally, the computer-readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives), or optical disc, etc. The random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0582] In some embodiments, a computer program product is also provided, the computer program product including a computer program stored in a computer-readable storage medium, and a processor reading from the computer-readable storage medium and executing the computer program to implement the above-described method for generating morphing effects.
[0583] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0584] The above are merely exemplary embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application shall be included within the protection scope of this application.
Claims
1. A method for generating deformation effects, characterized in that, The method includes: Determine geometry data and collision data, wherein the geometry data is used to construct a first geometry and the collision data is used to construct a second geometry that collides with the first geometry. Based on the shape of the first geometric object, the impact point data of the first geometric object is obtained, and the impact point data is used to determine the impact point between the first geometric object and the second geometric object. Based on the geometric data, crease data of the first geometric body is obtained, and the crease data is used to construct creases on the surface of the first geometric body; Based on the collision body data, the impact point data, and the crease data, the deformation effect data of the first geometry is simulated and calculated. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect includes the crease.
2. The method according to claim 1, characterized in that, The step of obtaining the impact point data of the first geometric body based on its shape includes: Generate an axis-aligned bounding box for the first geometry, the axis-aligned bounding box being used to indicate the shape of the first geometry; For the target face among the multiple faces of the axis-aligned bounding box, the target face is divided into multiple mesh cells; Based on the multiple mesh cells, the impact point data of the first geometry under the target impact direction corresponding to the target surface is obtained.
3. The method according to claim 2, characterized in that, The step of obtaining the impact point data of the first geometry under the target impact direction corresponding to the target surface based on the plurality of mesh elements includes: For any one of the plurality of grid cells, determine the center point of the grid cell; The point on the surface of the first geometry that has the smallest distance from the center point is determined as the first initial impact point corresponding to the mesh unit; The first intersection point of the first ray and the first geometry is determined as the second initial impact point corresponding to the grid cell, the starting point of the first ray is the center point, and the direction of the first ray is the target impact direction; Based on the first initial impact point and the second initial impact point, the initial impact point corresponding to the grid cell is determined; Move the initial impact point in the opposite direction to the target impact direction to obtain the impact point corresponding to the grid cell; Based on the positions of the impact points corresponding to the multiple grid cells, the impact point data of the first geometry under the target impact direction is obtained.
4. The method according to claim 3, characterized in that, The step of determining the initial impact point corresponding to the mesh cell based on the first initial impact point and the second initial impact point includes: Obtain interpolation parameters, which are used to determine the method for determining the initial impact point; If the interpolation parameter is a first value, then the first initial impact point is determined as the initial impact point corresponding to the grid cell; If the interpolation parameter is a second value, then the second initial impact point is determined as the initial impact point corresponding to the grid cell; If the interpolation parameter is greater than the first value and less than the second value, then linear interpolation is performed on the positions of the first initial impact point and the second initial impact point to obtain the initial impact point corresponding to the grid cell.
5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the crease data of the first geometric body based on the geometric body data includes: The geometric data is converted into mesh data, which is used to construct the first geometry, whose surface is composed of multiple polygonal meshes; Multiple seed points are randomly generated on the surface of the first geometric body, and the seed points are used to generate the crease. A noise displacement is added to the surface of the first geometry to obtain processed mesh data, which is used to indicate the first geometry with wrinkles; Based on the multiple seed points, the processed grid data is divided to obtain multiple sub-grid data, and each sub-grid data is used to construct a sub-geometry with folds; The displacement of the multiple sub-mesh data is corrected to obtain multiple corrected sub-mesh data, wherein each corrected sub-mesh data is used to construct a sub-geometry without wrinkles and with irregular boundaries; Based on the irregular boundaries corresponding to the multiple corrected sub-grid data, initial crease data is determined, and the initial crease data is used to determine multiple initial creases formed by the irregular boundaries. The crease data is obtained based on the initial crease data and the multiple corrected sub-mesh data.
6. The method according to claim 5, characterized in that, The process of obtaining the crease data based on the initial crease data and the plurality of corrected sub-mesh data includes: The bending stiffness of the plurality of initial creases indicated by the initial crease data is set to a third value to obtain the set crease data; The bending stiffness of the sub-geometry corresponding to the multiple corrected sub-mesh data is set to a fourth value to obtain multiple set sub-mesh data, wherein the fourth value is less than the third value; The crease data is obtained by combining the configured crease data and the multiple configured sub-grid data.
7. The method according to any one of claims 1 to 6, characterized in that, The determination of geometric data and collision data includes: Obtain geometry source data and collision source data. The geometry source data is used to construct a source geometry including the first geometry, and the collision source data is used to construct an initially imported source second geometry. The closed geometric body with a volume greater than or equal to the volume threshold in the source geometry is determined as the first geometric body; The data corresponding to the first geometric object in the geometric object source data is determined as the geometric object data; Align the source second geometry and the source geometry in both the position and size dimensions to convert the collider source data into the collider data.
8. The method according to claim 7, characterized in that, Before determining the closed geometry with a volume greater than or equal to a volume threshold in the source geometry as the first geometry, the method further includes: Determine a first set of vertices of the source geometry, the first set of vertices consisting of unshared vertices in the source geometry, wherein each unshared vertex belongs to only one of the multiple faces used to constitute the source geometry; The unshared vertices in the first vertex set are expanded using a connectivity algorithm to obtain an expanded first vertex set. The remaining vertices in the source geometry excluding the vertices in the expanded first vertex set are combined to form a second vertex set. The expanded first vertex set and the second vertex set are split separately to obtain multiple connected geometric groups, each of which corresponds to a geometric body; The geometry corresponding to the connected geometry group with the unshared vertices is determined as an unclosed geometry; The geometry corresponding to the connected geometric group that does not have the unshared vertices is determined as the closed geometry.
9. The method according to claim 8, characterized in that, After determining the geometry corresponding to the connected geometric group that does not have the unshared vertices as the closed geometry, the method further includes: Generate the oriented bounding box of the closed geometry; Determine the volume of the oriented bounding box; The volume is normalized to obtain the processed volume; The processed volume is determined as the volume of the closed geometry.
10. The method according to any one of claims 1 to 9, characterized in that, The step of simulating and calculating the deformation effect data of the first geometry based on the collision body data, the impact point data, and the crease data includes: Obtain the convexity parameter of the first geometric object, the convexity parameter being used to indicate the shape of the first geometric object; The bending stiffness is extracted from the crease data to obtain the bending stiffness data; Based on the convexity parameter, the bending stiffness in the bending stiffness data is adjusted to obtain the adjusted bending stiffness data. Based on the adjusted bending stiffness data, the crease data, and the collision body data, a constraint network is constructed. The constraint network is used to constrain the mechanical behavior of the first geometry when it deforms. Under the constraints of the constraint network, the deformation effect data of the first geometry is obtained by simulating and solving the impact point data through a soft body solver. The soft body solver is a solver used to simulate the flexible dynamics of object collision.
11. The method according to claim 10, characterized in that, The step of constructing a constraint network based on the adjusted bending stiffness data, the crease data, and the collision body data includes: Based on the adjusted bending stiffness data and the set extension stiffness, the fabric constraint is determined, which is used to constrain the degree of surface flexible deformation of the first geometry. Based on the vertices of each crease in the crease data, a glue constraint is determined, which is used to constrain the degree of fracture of the first geometry after being subjected to force. Based on fixed points on the first geometry, fixed constraints are determined. The fixed constraints are used to constrain the positions of vertices on the first geometry located within a set region, which remain unchanged during the simulation solution process. The fixed points are used to fix the first geometry, and the set region is determined based on the fixed points. Based on the shape of the first geometric object, structural constraints are determined, and the structural constraints are used to constrain the shape of the first geometric object. Based on the collision data, collision constraints are determined, which are used to constrain the interaction between the first geometry and the second geometry. The constraint network is constructed based on at least one of the fabric constraint, the adhesive constraint, the fixing constraint, the structural constraint, and the collision constraint.
12. The method according to claim 10 or 11, characterized in that, The impact point data is used to indicate at least one impact point; Under the constraints of the constraint network, the soft body solver simulates and calculates the deformation effect data of the first geometry based on the impact point data, including: For any one of the at least one impact points, under the constraints of the constraint network, the soft body solver simulates and calculates the deformation effect of the first geometry at the impact point based on the position of the impact point. Based on the deformation effects of the first geometry at the at least one impact point, deformation effect data of the first geometry is obtained.
13. The method according to claim 12, characterized in that, The method further includes: For at least one of the n deformation effects, the n deformation effects are merged to obtain a new deformation effect, where n is an integer greater than 1.
14. A method for generating deformation effects, characterized in that, The method includes: A first user interface for displaying a first tool node is shown, the first user interface including a first control; In response to an operation on the first control, a node network is displayed, the node network including the first tool node and a second tool node connected to the first tool node; In response to an operation on the second user interface of the second tool node, preprocessing parameters are displayed, the preprocessing parameters being used to determine geometry data and collider data, the geometry data being used to construct a first geometry, and the collider data being used to construct a second geometry that collides with the first geometry; In response to an operation on the first user interface, impact point setting parameters and crease setting parameters are displayed. The impact point setting parameters are used to determine the impact point data of the first geometry, and the impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry, and the crease data are used to construct the creases on the surface of the first geometry. In response to a trigger operation for generating deformation effects, the first tool corresponding to the first tool node simulates and calculates deformation effect data of the first geometry based on the collision data, the impact point data, and the crease data. The deformation effect data is used to generate deformation effects of the first geometry at the impact point, and the deformation effect includes the crease.
15. The method according to claim 14, characterized in that, The impact point setting parameters include at least one of the impact direction parameters and impact quantity parameters, and the crease setting parameters include at least one of the mesh length parameters, crease quantity parameters, noise parameters, and soft / hard weight parameters. The display of impact point setting parameters and crease setting parameters in response to an operation on the first user interface includes at least one of the following: In response to the operation of setting the impact direction of the first geometry, the impact direction parameters are displayed; In response to the operation of setting the number of impact points of the first geometry, the impact number parameter is displayed; In response to the operation of reconstructing the surface of the first geometry, the mesh length parameter is displayed, which is used to reconstruct the surface of the first geometry into a plurality of polygonal meshes; In response to the operation of setting the number of creases of the first geometry, the crease number parameter is displayed; The noise parameters are displayed in response to the operation of setting the shape of the crease of the first geometry; In response to the operation of setting the bending stiffness of the crease of the first geometry, the soft and hard weight parameters are displayed.
16. A device for generating deformation effects, characterized in that, The device includes: A data determination module is used to determine geometric data and collision data, wherein the geometric data is used to construct a first geometry and the collision data is used to construct a second geometry that collides with the first geometry. The impact point determination module is used to obtain the impact point data of the first geometric object based on the shape of the first geometric object, and the impact point data is used to determine the impact point between the first geometric object and the second geometric object. A crease determination module is used to obtain crease data of the first geometric body based on the geometric body data, and the crease data is used to construct creases on the surface of the first geometric body; The special effects generation module is used to simulate and calculate the deformation effect data of the first geometry based on the collision body data, the impact point data and the crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect includes the crease.
17. A device for generating deformation effects, characterized in that, The device includes: An interface display module is used to display a first user interface of a first tool node, wherein the first user interface includes a first control; A network construction module is configured to display a node network in response to an operation on the first control, the node network including the first tool node and a second tool node connected to the first tool node; A data preprocessing module is used to display preprocessing parameters in response to an operation on the second user interface of the second tool node. The preprocessing parameters are used to determine geometry data and collider data. The geometry data is used to construct a first geometry, and the collider data is used to construct a second geometry that collides with the first geometry. The parameter setting module is used to display impact point setting parameters and crease setting parameters in response to operations on the first user interface. The impact point setting parameters are used to determine the impact point data of the first geometry, and the impact point data are used to determine the impact point between the first geometry and the second geometry. The crease setting parameters are used to determine the crease data of the first geometry, and the crease data are used to construct the creases on the surface of the first geometry. The data generation module is used to respond to a trigger operation for generating deformation effects. It uses a first tool corresponding to the first tool node to simulate and calculate the deformation effect data of the first geometry based on the collision body data, the impact point data, and the crease data. The deformation effect data is used to generate the deformation effect of the first geometry at the impact point, and the deformation effect has the crease.
18. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program that is loaded and executed by the processor to implement the method as claimed in any one of claims 1 to 13, or to implement the method as claimed in any one of claims 14 to 15.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is loaded and executed by a processor to implement the method as claimed in any one of claims 1 to 13, or to implement the method as claimed in any one of claims 14 to 15.
20. A computer program product, characterized in that, The computer program product includes a computer program stored in a computer-readable storage medium, which a processor reads from and executes to implement the method as claimed in any one of claims 1 to 13, or to implement the method as claimed in any one of claims 14 to 15.
