Animation generation method and device, storage medium, equipment and program product

By generating collision attribute maps and animations in the game, the problem of dynamically adjusting damage effects is solved, improving immersion and resource utilization efficiency, and it is applicable to a variety of models and scenes.

CN121937591APending Publication Date: 2026-04-28GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU BOGUAN TELECOMM TECH LTD
Filing Date
2025-12-30
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing technologies, damage effects in games cannot be dynamically adjusted according to changes in collision objects, force, and angle, resulting in insufficient immersion, high resource consumption, high production costs, and an inability to realistically represent damage effects.

Method used

By acquiring the texture map of the target model, collision parameters are written into the pixel channel to generate a collision attribute map, the target vertices within the collision range are determined, and a collision animation is generated based on the vertex attributes to adapt to the damage effects of different materials.

Benefits of technology

It achieves dynamic changes in damage effects, reduces resource consumption, enhances immersion, is applicable to various models and scenes, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937591A_ABST
    Figure CN121937591A_ABST
Patent Text Reader

Abstract

The invention discloses an animation generation method and device, a storage medium, equipment and a program product, and the method is characterized in that the method comprises the steps: obtaining a texture map of a target model, writing a collision parameter into a pixel channel of a pixel of the texture map, so as to generate a collision attribute graph, the collision attribute graph is used for representing collision attributes of all vertexes of the target model, and the collision attributes are used for representing damage conditions after collision; determining a target vertex located in a collision range of the target model, wherein the collision range is determined based on distance field data of the target model; and generating a collision animation of the target model based on the collision attribute of each target vertex. The collision animation is not displayed through single-dimensional deformation or fixed animation, but is based on the collision attribute of the target vertex, visual presentation during collision is guaranteed, and the collision animation can dynamically change along with the collision position and the collision force when different positions of the same model are collided with different forces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, specifically to an animation generation method, apparatus, storage medium, device, and program product. Background Technology

[0002] In related technologies, damage effects usually rely on preset animation clips and fixed model replacements. Regardless of the collision object, force, or angle, the same object always triggers the same effect. For example, when attacking different parts of an object or different surfaces of a wall, the broken parts or locations are often fixed and do not match the player's point of attack. The effects deviate from physical logic and lack immersion. Summary of the Invention

[0003] In view of the above, embodiments of this application provide an animation generation method, apparatus, storage medium, device, and program product, which can solve at least one of the above-mentioned technical problems.

[0004] On one hand, embodiments of this application provide an animation generation method, the method comprising: Obtain the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. Identify target vertices located within the collision range of the target model, the collision range being determined based on the distance field data of the target model; Based on the collision attributes of each target vertex, a collision animation of the target model is generated.

[0005] On the other hand, embodiments of this application provide an animation generation apparatus, the apparatus comprising: The acquisition module is used to acquire the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. A determination module is used to determine target vertices located within the collision range of the target model, wherein the collision range is determined based on the distance field data of the target model; The generation module is used to generate a collision animation of the target model based on the collision attributes of each target vertex.

[0006] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the animation generation method as described in any of the above embodiments.

[0007] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the animation generation method as described in any of the above embodiments by calling the computer program stored in the memory.

[0008] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the animation generation method as described in any of the above embodiments.

[0009] The animation generation method provided in this application obtains the texture map of the target model and writes collision parameters into the pixel channels of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after a collision. The collision parameters written into the pixel channels of the texture map can be accurately associated with the corresponding vertices. By writing the collision parameters into the pixel channels of the texture map and generating the collision attribute map, the collision attributes characterizing the damage after a collision are carried by the image, which can reduce resource consumption. The method also determines the target vertices within the collision range of the target model. The collision range is determined based on the distance field data of the target model. The logic for determining target vertices is independent of the type (vehicle, building, glass) and material of the target model, and can adapt to the collision range requirements of different models without refactoring the core logic, thus improving the applicability of the method. Finally, based on the collision attributes of each target vertex, a collision animation of the target model is generated. The collision animation is not a single-dimensional deformation or fixed animation display, but rather a visual presentation based on the collision attributes of the target vertices (including the synergistic effect of vertex deformation, texture switching, and lighting adaptation). When the same model is at different positions and subjected to collisions of different intensities, the collision animation can dynamically change with the collision position and collision intensity, which conforms to physical logic, ensures immersion, and also ensures flexible response for multi-scene adaptation. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 and Figure 2 This is a schematic diagram of the prior art as described in the embodiments of this application.

[0012] Figure 3 This is a schematic diagram illustrating an application scenario of the animation generation method provided in the embodiments of this application.

[0013] Figure 4 This is a flowchart illustrating the animation generation method provided in an embodiment of this application.

[0014] Figures 5 to 21 This is a schematic diagram illustrating an application scenario of the animation generation method provided in the embodiments of this application.

[0015] Figure 22 This is a schematic diagram of the structure of the animation generation device provided in the embodiments of this application.

[0016] Figure 23 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0018] Below, we will first provide a further introduction to the background technology and terminology used in this application.

[0019] 1. Unreal Engine (UE): Unreal Engine (UE) is a cross-platform game engine developed by Epic Games. It was first launched in 1998 and has now evolved into its fifth generation (UE5). The UE engine is mainly used to develop various types of video games, virtual reality and augmented reality applications, film and television special effects, etc.

[0020] 2. Model Normals: In computer graphics, model normals are an important concept used to represent the orientation of a 3D model's surface. A normal is typically a three-dimensional vector used to describe the local orientation of the model's surface at a given point. Understanding and correctly using normals is crucial for achieving realistic lighting and shadow effects. A normal is a vector perpendicular to a point on the model's surface. Normals are usually calculated by averaging the normals of all faces connected to that vertex.

[0021] 3. Material Expressions: Material expressions are the basic building blocks of the Material Editor, used to construct fully functional materials in Unreal Engine. Each material expression is a self-contained black box that outputs one or more specific values; or it performs a single operation on one or more inputs and then outputs the result.

[0022] 4. 3DMAX is a versatile 3D modeling, animation, and rendering software that can meet various needs for model editing and modification in the game production field.

[0023] For related technologies, please refer to Figure 1 and Figure 2 In the process of creating destruction effects in games, various 3D modeling software is needed to disassemble the various parts of a broken object (such as...). Figure 1 At the same time, the physics collision module of 3D software is used to simulate and create damage models of high, medium and low levels (such as...). Figure 2 The process involves simulating high, medium, and low levels of damage to the model from left to right, and then importing the broken objects into the game engine to create various forms of damage. This process can reproduce relatively detailed and realistic object damage effects.

[0024] However, taking vehicle models as an example, vehicle models are typically created by breaking them down into multiple modules such as the body, doors, and windows. Each part is pre-made with models of various deformation levels for replacement. This process is costly and time-consuming; each vehicle may require preprocessing dozens of model resources, and if high, medium, and low-level models for game performance optimization are included, the number could reach hundreds. Furthermore, corresponding damage color maps and normal maps for each part need to be created, further increasing game memory usage. Therefore, most games handle object damage rather crudely, reducing the number of damaged parts and the differentiation of damage levels to optimize the production process and reduce performance consumption. However, this also results in overly similar and monotonous damage effects, failing to realistically represent real-world damage.

[0025] For example, one method for generating damage effects relies on a combination of preset animation clips and fixed model replacement. When an object collides, the preset animation clip is displayed and the fixed model is replaced. Therefore, regardless of changes in the collision object, force, or angle, the same object always triggers the same effect. For instance, when the user attacks an object to trigger the collision, the broken parts or locations are often fixed and do not match the user's point of impact when the user attacks different parts of the object or different surfaces of a wall. The effect deviates from physical logic and lacks immersion. Furthermore, due to performance and production cost limitations, damage effects often omit key details such as microscopic texture changes on the object's surface and adjustments to lighting and shadow interactions. For example, when a metal object collides with another object, it only shows model deformation and cannot display effects such as paint scratches, dents, wrinkles, and reflections. Similarly, when glass breaks, it only displays static crack textures and cannot show the transparency of falling fragments. The damage effects are weak in both visual depth and texture, failing to achieve realistic simulation. Furthermore, damage effects in related technologies are usually created for individual objects, and the damage logic for objects, buildings, and props is not interchangeable. For example, a dent effect designed for an object cannot be reused for a wall, and a shattering effect designed for glass cannot be adapted to stone. This results in a chaotic style of damage effects in the game, and the production cost increases exponentially with the type of object, making it difficult to meet the needs of large-scale scenes such as open worlds.

[0026] In view of this, embodiments of this application provide an animation generation method, apparatus, storage medium, device, and program product. Specifically, the animation generation method of this application embodiment can be executed by a computer device, wherein the computer device can be a terminal or a server, etc. The terminal can be a smartphone, tablet computer, laptop computer, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0027] For example, when the animation generation method runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present the collision animation and receive user commands applied to the screen. The processor is used to store applications, run the animation generation method, generate the collision animation, respond to commands, and control the display of the collision animation on the display screen. When the user interacts with the displayed screen, the screen can control the local content of the terminal device in response to the received operation commands. The terminal device can provide the collision animation to the user in various ways, such as rendering it on the terminal device's display screen or presenting the collision animation through holographic projection.

[0028] For example, when this animation generation method runs on a server, it can be implemented and executed based on a cloud generation system. A cloud generation system refers to a game mode based on cloud computing. A cloud generation system includes a server and client devices. The application that generates the animation and the entity that presents the collision animation are separate. The storage and execution of the animation generation method are completed on the server. The presentation of the collision animation is completed on the client. The client is mainly used for receiving and sending data and presenting the collision animation. For example, the client can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device for processing game data is the server in the cloud. During the animation generation operation, the user operates the client to send instructions to the server. The server controls the operation according to the instructions, encodes and compresses the collision animation data, returns it to the client via the network, and finally, the client decodes and outputs the collision animation.

[0029] It should be noted that, in this embodiment, the execution entity of the animation generation method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of execution entity.

[0030] For example, in conjunction with the above description, Figure 3 This application illustrates a generation system 1000 for implementing an animation generation method, as provided in an embodiment of this application. The generation system 1000 may include at least one terminal 1001, at least one server 1002, at least one database 1003, and a network. The user-held terminal 1001 can connect to different servers via the network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game.

[0031] In the aforementioned generation system 1000, terminal 1001 is used to install and run applications. In some cases, the application may not need to be pre-installed on terminal 1001, and users can directly access the application through a browser or other client. During the process of users participating in the creation of collision animations through the application, terminal 1001 and server 1002 interact with each other. Terminal 1001 sends various information to server 1002. Server 1002 determines the collision animation of terminal 1001 based on stored data (such as texture maps) and the received information, and sends the collision animation to terminal 1001 so that terminal 1001 can display the collision animation sent by server 1002 to the user.

[0032] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different game terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different game terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to the target models located in the same scene are served by the same server 1002.

[0033] Furthermore, when the generation system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and different servers. The network can be a wireless network or a wired network; for example, wireless networks include wireless local area networks (WLAN), local area networks (LAN), cellular networks, 2G networks, 3G networks, 4G networks, 5G networks, etc. Additionally, different terminals can also connect to other terminals or to servers using their own Bluetooth networks or hotspot networks. Furthermore, the system 100 can include multiple databases, which are coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.

[0034] It should be noted that, Figure 3 The schematic diagram of the generation system shown is merely an example. The generation system 1000 described in this application embodiment is for the purpose of more clearly illustrating the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of generation systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0035] It should be noted that the triggering operations mentioned in the subsequent detailed description of the animation generation method provided in the embodiments of this application can all be regarded as triggering operations performed by the user through a finger or by controlling a medium such as a mouse, keyboard, or stylus. The specific medium used can be determined according to the type of computer device. For example, when the computer device is a touchscreen device such as a mobile phone, tablet computer, or game console, the user can operate on the touchscreen using any suitable object or accessory such as a finger or stylus. When the terminal device is a non-touchscreen terminal device such as a desktop computer or laptop computer, the user can operate using an external device such as a mouse or keyboard.

[0036] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0037] Please see Figure 4 , Figure 4 This is a flowchart illustrating an animation generation method provided in an embodiment of this application. It should be noted that the steps shown may be executed in a different logical order than that shown in the flowchart. The method may include the following steps: Step 011: Obtain the texture map of the target model and write the collision parameters into the pixel channel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision.

[0038] The target model can be a model that is damaged after being collided with in the game, such as a vehicle model or a building model.

[0039] The texture map can be a 2D image carrier corresponding to the UV topology of the target model, used to store visual or functional data of the model surface. It can be a UVW template exported by 3D modeling software, and there is a mapping relationship between the pixels on the texture map and the vertices of the target model.

[0040] The collision parameters can be quantitative data that characterizes the damage effect of each vertex of the target model after a collision.

[0041] The pixel channel can be a color storage unit of the texture map. The pixel channel can include a first channel (R channel), a second channel (G channel) and a third channel (B channel), corresponding to the three primary colors of RGB. Each pixel channel can independently store collision parameters. For ease of explanation, this application embodiment takes the first channel as the R channel, the second channel as the G channel and the third channel as the B channel as an example for illustration.

[0042] The collision attribute map can be a multi-level structural strength topology map, which can be generated by writing collision parameters into the pixel channels of the texture map and then generating an RGB encoded map. The collision attribute map can include the mapping relationship between the pixels of the texture map and the vertices of the target model.

[0043] The collision attributes can include whether damage has occurred, the degree of damage, the form of damage (such as dents, breakage, etc.), and the manifestation of microscopic damage (such as surface scratches, cracks, etc.).

[0044] Optionally, step 011: Obtain the texture map of the target model and write the collision parameters into the pixel channels of the texture map to generate a collision attribute map, including: Step 0111: For each pixel, write the corresponding breakage weight parameter into the first channel of the pixel. The breakage weight parameter is used to characterize the breakage weight when a vertex that matches the pixel collides with it. Step 0112: Write the damage morphology parameters corresponding to the pixel into the second channel of the pixel. The damage morphology parameters are used to characterize the breakage morphology when the pixel collides with the matching vertex. Step 0113: Write the damage micro parameters corresponding to the pixel into the third channel of the pixel. The damage micro parameters are used to characterize the critical threshold of micro damage when the vertex that matches the pixel collides.

[0045] Please refer to Figure 5 , Figure 5 The example shows three images obtained after writing collision parameters into three channels, and a collision attribute map obtained by merging the three images, using glass material as an example.

[0046] The breakage weight parameter can be a parameter used to quantify the fragility of a vertex, characterize the breakage weight when a vertex collides with a pixel during pixel matching, for example, in Substance In Painter, the target model is divided into three regions based on its UV topology (texture map). These three regions have different levels of fragility. For ease of explanation, let's take the three regions as an example: a core load-bearing area (such as a vehicle frame or building load-bearing wall), a buffer protection area (such as a vehicle bumper or building exterior decoration), and a vulnerable functional area (such as vehicle headlights or building glass). There is a mapping relationship between pixel values ​​and fragility: the smaller the pixel value, the greater the fragility. The vulnerable functional area is more fragile than the buffer protection area, which is more fragile than the core load-bearing area. Therefore, the core load-bearing area can be dark red (high deformation trigger threshold, difficult to break), the buffer protection area can be medium red (medium threshold, medium deformation), and the vulnerable functional area can be light red (low threshold, easily broken). Based on the mapping relationship between the pixels of the texture map and the vertices of the target model, the channel values ​​in the first channel can provide a basic judgment on whether the vertices of the target model are damaged or deformed and the degree of damage.

[0047] Among them, the breakage morphology parameter can be a parameter characterizing the physical properties of the material to which the vertex belongs (such as metal rigidity, plastic toughness, glass brittleness, etc.), which determines the breakage morphology of the vertex after collision (such as regular dents, curling, or fine fragmentation). Based on the topological partitioning of the first channel, the physical properties of the material can also be labeled through the second channel (G channel). For example, the rigidity coefficient of the metal material is labeled (the higher the value, the more regular the deformation of the effect), the toughness coefficient of the plastic material is labeled (the higher the value, the more obvious the curling effect), and the brittleness coefficient of the glass material is labeled (the higher the value, the finer the fragmentation). This allows the material to respond to its material properties during collision. For example, under the same force of collision, the metal part will show a regular dent, while the glass part will break and fall. That is to say, the breakage morphology parameter can use the material property parameter as a carrier to quantify the breakage morphology after the collision.

[0048] Among them, the microscopic damage parameters can be the critical thresholds that control the triggering of microscopic damage after a vertex collision (such as the triggering conditions for paint scratches, metal scratches, and glass cracks), determining whether microscopic damage is presented and the intensity of microscopic damage. For example, the critical values ​​of surface microscopic damage of the target model's vertices can be marked by the third channel (B channel), such as the paint scratch threshold for vehicle models (the lower the value, the easier it is to trigger paint scratch effects, etc.), the scratch threshold for metal surfaces (the lower the value, the easier it is to produce radial scratches), and the crack propagation threshold for glass surfaces (the lower the value, the faster the crack propagates), etc., making the microscopic effects of fracture deformation more detailed and adjustable. For example, after a collision occurs in an area where the microscopic damage parameters are below a certain threshold, the effect of multi-layer paint scratches and dense scratches is triggered instantly, while after a collision occurs in an area where the microscopic damage parameters are above a certain threshold, the effect of slight scratches is triggered.

[0049] Optionally, the damage weight parameters, damage morphology parameters, and damage micro-parameters can be determined in response to user input on an interactive interface, or they can be determined by reading a preset configuration file.

[0050] For example, the first, second, and third images of the target model can be created in 3D computer graphics modeling software such as 3DMAX and Blender, and 2D graphics drawing software such as Photoshop. For ease of explanation, we will use 3DMAX and Photoshop as examples. First, import the target model to be processed into 3DMAX and enter the polygon editing mode. Add a UVW Map and a UV editor to the target model. Usually, game model assets already have UVs unfolded and positioned, so this process will not be elaborated further. Then, export the unfolded UVs to Photoshop for drawing. That is, in the UVW editing window, select the toolbar module, select the bottom "Render UVW Template," and render and export to Photoshop using the default settings. Then, draw and fill in the rendered UVW template in Photoshop. During the drawing process, you can return to 3DMAX to confirm the position of the drawn object parts corresponding to the UVW template (or you can choose other software that supports real-time model drawing). Please refer to [link to relevant documentation]. Figure 6During the drawing process, the structural strength of different parts can be distinguished by the intensity of black and white colors. The more white the black and white color intensity of any area, the lower the structural strength and the more fragile the area is, and the greater the damage from impact. Conversely, the more black the intensity, the higher the structural strength and the harder the area is, and the less damage from impact. Complete black means that no deformation will occur. Therefore, the black part of the intensity map should account for a small proportion. Users can write black and white colors into each pixel channel through the first input operation to generate the first image. This image can be drawn according to the structural strength range of the real object to maximize the reproduction of the realistic effect. Similarly, users can also draw through the second input operation to obtain the second image, and through the third input operation to obtain the third image. Then, the first, second, and third images are merged to obtain the collision attribute map. By leveraging the independence of the RGB three-color channels, three types of collision parameters are written into different channels, avoiding mutual interference between parameters and enabling a single texture map to carry multi-dimensional damage control data. This replaces the redundant mode of storing a single parameter in multiple texture maps, achieving multi-dimensional and precise control over fragility, damage morphology, and micro-details. It also replaces the single damage effect of traditional fixed models and preset animations, ensuring a high degree of match between collision damage and physical logic, enhancing immersion. The pixel value of each channel (e.g., a value range of 0-255) forms a quantitative correspondence with the collision parameters (e.g., the higher the value of the first channel, the greater the damage weight, and the more difficult it is to break during a collision). During a collision, the damage response of the vertex can be directly determined by reading the pixel value, without the need for complex real-time calculations, balancing realism and performance. Furthermore, the collision parameters, through quantitative annotation, can be directly adapted to various types of models such as vehicles, buildings, and props. Only channel parameters need to be modified to match the damage characteristics of different materials such as metal, plastic, and glass, without reconstructing the core logic, making it highly applicable (e.g., suitable for large-scale scenes such as open worlds).

[0051] Specifically, since the UV topology of the target model includes the mapping relationship between the vertices of the target model and the texture pixels of the texture map (for example, sampling the texture using UV coordinates (texture coordinates) to transfer collision attributes in the pixel channels to the corresponding vertices), the collision parameters written to the pixel channels of the texture map can be precisely associated with the corresponding vertices. By writing the collision parameters to the pixel channels of the texture map and generating a collision attribute map, the collision attributes that characterize the damage after a collision can be carried by the image, reducing resource consumption.

[0052] Step 012: Determine the target vertices located within the collision range of the target model. The collision range is determined based on the distance field data of the target model.

[0053] The collision range can be the area where the collision source (such as attack props, falling objects, spherical collision objects, etc. in the game scene) affects the target model. The collision range can be dynamically defined by distance field data. The closer to the collision source, the stronger the impact.

[0054] The target vertex can be a set of vertices in the target model that are within the collision range and need to be deformed or damaged according to the collision attributes.

[0055] The distance field data of the target model includes the distance parameters between each vertex of the target model and the preset collision source model. The distance field data can be spatial distance quantization data generated by the game engine (such as UE engine, etc.), which records the signed distance (in global spatial units) between each vertex on the surface of the target model and the collision source. The distance value decreases as the distance to the collision source decreases and increases as the distance increases.

[0056] Optionally, step 012: Determine the target vertices located within the collision range of the target model, including: Step 0121: Based on the preset floating-point parameters and benchmark threshold (the floating-point parameter is Hardness, which is used to control the smoothness of the collision edge transition; the closer the value is to 1, the smoother the transition; the smaller the value, the sharper the edge), the distance parameters between each vertex of the target model and the preset collision source model are smoothed (transition processing). Step 0122: Compare each smoothed distance parameter with a preset distance threshold, and determine the target vertex based on the comparison result. The distance threshold is used to characterize the collision range.

[0057] The floating-point parameter (Hardness) can be a preset material control parameter used to adjust the transition characteristics of the collision edge and the smoothing of the distance parameter. For example, the closer the floating-point parameter (Hardness) value is to 1, the smoother the collision edge transition; the smaller the parameter value, the sharper the collision edge.

[0058] The distance parameter represents the signed distance (in global space units) between each vertex of the target model and the preset collision source model. The smaller the distance value, the closer the vertex is to the collision source.

[0059] The baseline threshold can be 1, which is used to construct a smooth transition logic for the distance parameter, ensuring the uniformity and controllability of the transition effect.

[0060] Among them, smoothing (transition processing) can be a process of adjusting the original distance parameters according to the floating-point parameter (hardness) and the baseline threshold. It can eliminate abrupt changes in the distance parameters and make the edge of the collision range present a gradual transition effect, avoiding abrupt breaks.

[0061] The distance threshold can be a critical value for determining the collision range according to the preset requirements. It is used to filter the effective distance parameters in the collision influence area. The value directly determines the coverage of the collision range (for example, if the distance threshold is 0.3, then vertices with a distance parameter ≤ 0.3 are included in the collision range as target vertices).

[0062] The target distance parameter can be a distance parameter that has been smoothed and whose value is less than or equal to a preset distance threshold. The corresponding vertex is the target vertex that needs to respond to the collision.

[0063] For example, regarding the UE engine, please refer to [link / reference]. Figure 7 , Figure 7 For example, in the interface provided by the game engine, during the operation of the UE engine, in order to render more accurate lighting effects, a relatively coarse distance field is generated in real time outside the object's outline, such as... Figure 7 As shown, the value increases with distance from the collision source model and decreases with distance. In materials, the UE engine also provides the DistanceToNearestSurface material expression node, which determines the direction and position within the current scene's distance field. The DistanceToNearestSurface material expression node allows the material to sample any point in the global distance field level. This material expression outputs the signed distance (in global spatial units) from the distance field to the nearest occluder in the scene, allowing you to obtain the gradient range of the distance field transition emitted by the interactive object.

[0064] For example, please see Figure 8 and Figure 9 ( Figure 9This example illustrates the node connections within the game engine's interface. The target model can be placed in the game scene, and a new collision source model (e.g., a sphere) can be created as the object colliding with the target model. To prevent the target model itself from being treated as a collider and colliding with itself, the distance field of the target model needs to be removed. This can be done by unchecking the option to influence the distance field lighting of the object model in the UE engine. Then, using preset floating-point parameters (e.g., by adding a parameter named the Hardness node to control the overall hardness of the material), the Hardness node is connected to the A interface of the Lerp node (linear interpolation node). The default value of the B interface of the Lerp node is set to 1, and the DistanceToNearestSurface material expression node is added to the Alpha interface for partitioning. The purpose is to ensure a smooth transition at the edges of the collided objects. The smaller the Hardness node value, the sharper the edges; the closer the Hardness node value is to 1, the smoother the transition. The Lerp node output (i.e., the smoothed distance parameter) is then fed into the Saturate material expression node to ensure that the input value is limited to the range of 0 to 1. If the input value is less than 0, it will be output as 0; if the input value is greater than 1, it will be output as 1. This constrains the numerical range (e.g., to the 0-1 interval) to avoid data overflow causing judgment anomalies. The output value of the Saturate material expression node is then connected to 1-x and output in reverse to the material's base color interface for adjusting the collision range. Please refer to [link to relevant documentation]. Figure 9 Finally, in the UE engine, the material is applied to the target model, and a transparent material is applied to the collision source model of the collision object. It can be observed that the closer the collision source is to the target model, the whiter the color on the target model. The value is brightest at the intersection of the two and darker the further away from the intersection, forming a smooth transition. The smoothness can be controlled by adjusting the Hardness node. This effect can be used as a mask for the collision range.

[0065] Specifically, the game engine can generate a distance field range in real time outside the outline of the target model. When a collision source enters the distance field range, the distance field data can be updated in real time with the signed distance between each vertex and the collision source. The magnitude of the distance field data can correspond to the intensity of the collision effect. For example, the closer the vertex is to the collision source (the smaller the distance value), the stronger the collision effect, and the more it needs to be included in the collision range; the farther the distance (the larger the distance value), the weaker the collision effect, until it exceeds the collision range and no response is needed. That is, the distance field data can be used to determine whether a vertex is within the collision range.

[0066] It's understandable that smoothing can eliminate abrupt changes in distance parameters, allowing the edges of the collision range to have a gradual transition effect, avoiding the sharp boundaries and poor immersion issues found in related technologies. A preset distance threshold can directly define the collision range, and the size of this threshold can be flexibly adjusted according to needs (for example, a large threshold can be set to amplify the collision impact in open-world scenarios, while a small threshold can be set for precise positioning in competitive game scenarios), adapting to different scenario requirements. Since this judgment logic is independent of the target model's type (vehicle, building, glass) and material, only the Hardness parameter and distance threshold need to be adjusted to adapt to the collision range requirements of different models, without needing to reconstruct the core logic, supporting universal adaptation of global damage effects.

[0067] Step 013: Generate a collision animation of the target model based on the collision attributes of each target vertex.

[0068] Among them, collision animation can be a visual display that simulates the collision damage effect of reality, which is dynamically generated based on the collision attributes of the target vertex. It can include vertex deformation (such as inward denting), texture loss (such as scratches on car paint), light and shadow interaction (such as dents, wrinkles and reflections), and special material effects (such as glass cutouts and cracks).

[0069] Specifically, the collision attributes of each vertex can be determined through the collision attribute map. There is a mapping relationship between collision attributes and collision response effects. Based on the collision attributes of each target vertex, a collision animation for the target model is generated. For example, after generating the collision attribute map and target vertices, the collision attribute map can be imported through the texture sampling node of the UE material editor. Based on the UV mapping relationship between the target vertex and the texture map pixels, the R, G, and B channel parameters corresponding to each target vertex are read to determine the collision attributes of each target vertex. Then, the game engine controls each target vertex to deform according to the collision attributes to generate the collision animation of the target model. The collision animation is not a single-dimensional deformation or fixed animation display, but rather includes the coordinated effects of vertex deformation, texture switching, and lighting adaptation, ensuring the visual presentation during collision. When the same model is at different positions and subjected to collisions of different intensities, the collision animation can dynamically change with the collision position and intensity, achieving flexible response with one-time configuration and multi-scene adaptation.

[0070] Thus, the texture map of the target model is obtained, and collision parameters are written into the pixel channels of the texture map pixels to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after a collision. The collision parameters written into the pixel channels of the texture map pixels can be precisely associated with the corresponding vertices. By writing the collision parameters into the pixel channels of the texture map and generating the collision attribute map, the collision attributes characterizing the damage after a collision are carried by the image, which can reduce resource consumption. Target vertices within the collision range of the target model are determined. The collision range is determined based on the distance field data of the target model. The logic for determining target vertices is independent of the type (vehicle, building, glass) and material of the target model, and can adapt to the collision range requirements of different models without refactoring the core logic, thus improving the applicability of the method. Finally, based on the collision attributes of each target vertex, a collision animation of the target model is generated. The collision animation is not a single-dimensional deformation or fixed animation display, but rather a visual presentation based on the collision attributes of the target vertices (including the synergistic effect of vertex deformation, texture switching, and lighting adaptation). When the same model is at different positions and subjected to collisions of different intensities, the collision animation can dynamically change with the collision position and collision intensity, achieving a flexible response of one-time configuration and multi-scene adaptation.

[0071] It should be noted that, please refer to Figure 10 Since the vertex offset function of the material is related to the normal of the model, in order to correctly deform the model through the material vertex offset in the game engine (such as UE engine), the normal of the target model (taking the vehicle model as an example) needs to be processed separately. This is to ensure that after the material vertex offset, each vertex of the target model can be deformed into the target model to simulate the dent effect and lighting performance of being hit. Therefore, the normal of each vertex of the target model needs to be oriented towards the outside of the object. At the same time, in order to avoid the dent effect being too uniform and flat, the normal of the vertices on the same plane of the target model can be slightly offset to create an uneven effect.

[0072] Please see Figure 11 In some implementations, step 013: generating a collision animation of the target model based on the collision attributes of each target vertex, further includes: Step 0131: For each target vertex, the vertex offset direction of the target vertex and the preset concavity parameter are used as offset parameters, where the concavity parameter is used to characterize the degree of offset (offset distance) of the target vertex. Step 0132: Based on the offset parameters and collision attribute map of the target vertex, drive the target vertex to offset along the corresponding vertex offset direction to generate the collision animation of the target model.

[0073] The vertex offset direction can be a reference offset direction determined based on the normal direction of the target model vertex (the normal is preprocessed to face outwards from the model, and the offset direction is the opposite of the normal direction), ensuring that the target vertex can be offset along the inward concave physical logic and avoiding confusion in the offset direction.

[0074] The concavity parameter can be a preset negative floating-point parameter (Strength parameter) used to quantify the degree of vertex offset (offset distance). The larger the absolute value, the more significant the inward concavity of the vertex. Please refer to [link / reference]. Figure 12 Taking a vehicle model as an example, setting the negative floating-point parameter value of the Strength node to -100 will preview the effect in the game engine, where the entire vehicle body is compressed inward, similar to the effect of an object being flattened. If you need to customize the offset direction, you can set the negative floating-point parameter (Strength parameter) of the Strength node to a three-dimensional vector.

[0075] The offset parameters can include the vertex offset direction and the concavity parameter. While clarifying the orientation of the target vertex when it is offset, it can also define the specific magnitude of the offset, providing a quantitative basis for vertex offset execution.

[0076] Optionally, it also includes: Step 015: Collect the position vectors of each target vertex of the target model in the model coordinate system, and normalize the position vectors to obtain the offset direction of each vertex. The position vectors include the coordinate vectors pointing from the origin of the model coordinate system to the target vertex.

[0077] The position vector serves as the directional reference for vertex offset, ensuring that the offset direction of all vertices conforms to the spatial logic of the model surface and avoiding confusion in offset direction caused by differences in the length of the original position vector.

[0078] Please refer to Figure 12Since the nearest surface distance node only provides distance data and lacks directional information, it's necessary to introduce the target model's own normals and normalize them using the Normalize expression. The Normalize expression calculates and outputs the normalized values ​​of its inputs. The overall length of the normalized vector (i.e., the unit vector) is 1.0, meaning each input component is divided by the total size (length) of the vector. The Normalize expression requires the target model's position information as input; therefore, a LocalPosition node needs to be added and input into the Normalize expression node to obtain the target model's normal direction for vertex offset. A new parameter named Strength node can then be added as the vertex offset strength value (concavity parameter), multiplied by the Normalize expression node to adjust the offset strength. This value must be negative to simulate inward deformation of the object.

[0079] Specifically, the offset parameters include the vertex offset direction and preset concavity parameters. These are then weighted by the parameters of the target vertex and the collision attribute map to obtain a vertex offset command with fixed direction, dynamic amplitude, and differentiated shape, replacing the single control logic of fixed amplitude offset in related technologies. Therefore, please refer to... Figure 13 and Figure 14 , Figure 13 and Figure 14 This example demonstrates the node connection in the game engine's interface. First, the vertex offset direction (opposite direction of the normal) of each vertex is determined using UV mapping and the normalized normal data of the vertex via the Normalize node. Then, a preset negative floating-point parameter (Strength) is used to determine the base depth of the vertex offset (e.g., a deeper indentation when Strength = -100). Next, the target vertex and its corresponding collision attribute in the collision attribute map are determined. The vertex offset direction (normalized normal vector) of the target vertex is multiplied by the indentation parameter (Strength) to obtain initial offset data including the offset direction and base offset magnitude. This initial offset data is then weighted and optimized using the collision attributes in the collision attribute map to ensure the target vertex's offset magnitude aligns with the physical logic. Finally, the fused offset control data is output to the global position offset port of the UE engine's material, driving each target vertex to indent inward along the vertex offset direction according to the quantized magnitude, generating a collision animation. The Hardnes node for material hardness can be replaced by the G-channel of the structural collision attribute map. The final collision effect is as follows: Figure 15 As shown, the positions where the preset collision source model and the target model come into contact produce deformations of varying intensities. The deformation is stronger at the positions closer to the collision point (target vertex) until the object is completely deformed and shifted, to simulate the effect of an object being deformed and bent by an impact in reality.

[0080] Because the DistanceToNearestSurface material expression node is used, the Generate Mesh Distance Fields option must be enabled in the Rendering settings of the Project Settings for this expression to work correctly. The solution using this application embodiment can obtain the distance fields of multiple colliding objects in the scene in real time, and has a high degree of plasticity. Multiple spherical and square colliding objects can be placed and finely adjusted to form various colliding shapes.

[0081] In some implementations, the method further includes: Step 016: Obtain the preset surface damage map and surface integrity map; Step 017: Compare the channel data of the third channel of the target vertex with the preset micro-damage threshold, and select micro-damaged vertices from the target vertices based on the comparison results; Step 013: Generate collision animation for the target model, including: Step 0131: Use surface damage maps as texture data to render microscopic damaged vertices; Step 0132: Use the complete surface map as texture data to render vertices other than the microscopically damaged vertices to generate collision animations for the target model.

[0082] Among them, the surface damage map can be a preset texture map that represents the surface damage state of the target model after collision. For example, it can include microscopic damage visual details such as scratches, discoloration, and marks, and is used to present a realistic surface wear effect in the damaged area.

[0083] Among them, the surface integrity map can be a preset texture map that represents the undamaged state of the target model, presenting a complete surface without scratches or fading, and is used to preserve the original appearance of the target model in non-damaged areas.

[0084] Among them, the micro-damaged vertices can be a set of vertices selected from the target vertices (vertices within the collision range) whose channel data or channel value of the third channel of the target vertices is lower than a preset value (i.e., the micro-damage threshold). These vertices correspond to the areas that need to show surface damage effects after the collision.

[0085] Please see Figure 16 , Figure 16The example shows the node connections in the interface provided by the game engine. For ease of explanation, the target model is a vehicle model and the surface damage texture is a paint color damage texture. In the real world, vehicles typically have layers of light paint. When a collision occurs, some of the paint is scraped off, resulting in scratches or discoloration. Therefore, to better recreate the realistic effect, two different paint texture maps can be created: one for the complete paint (surface integrity map) and the other for the completely scraped paint (surface damage map). After selecting the micro-damaged vertices, the surface damage map is used as the texture data to render the micro-damaged vertices, while the surface integrity map is used as the texture data to render the vertices other than the micro-damaged vertices. Linear interpolation using Lerp nodes is used for the transition, so that the dented paint is displayed as the scraped paint texture, and the uncollision area is displayed as the surface integrity map, thus generating a collision animation. The specific node connection method can be shown in the figure. The Hardnes node for the scratched area can be replaced by the third channel of the collision attribute map. The node connection diagram is only for demonstration purposes. The paint texture map and B-channel data form a double mask. The easily damaged low-threshold areas (such as thin paint areas) are prioritized to display the scratch and color fading effect, while the difficult-to-damage high-threshold areas (such as thick paint areas) can retain the complete paint even within the collision range, enhancing the realistic correlation between paint scratches and material characteristics.

[0086] In some implementations, the method further includes: Step 018: Obtain the complete normal map and the broken normal map; Step 013: Generate collision animation for the target model, including: Step 0133: Use the broken normal map as texture data to render the microscopic broken vertices; Step 0134: Use the complete normal map as texture data to render vertices other than microscopically damaged vertices to generate collision animations for the target model.

[0087] Among them, a complete normal map can be used to restore the lighting reflection logic of a normal surface, while a broken normal map can be used to simulate microstructures such as wrinkles and hard edge dents in recessed areas.

[0088] Specifically, in the real world, the deformation and dents on the surface of an object will have many wrinkles and hard-edged marks. However, in games, due to performance optimization requirements, the face count of objects is often not very high. Relying solely on the face count of game models cannot accurately reproduce the details of real-world dents. Therefore, normal maps are introduced as a supplement. A normal map is a texture mapping technique used to enhance the surface details of a 3D model. Through normal maps, complex surface details such as bumps, scratches, and other minute features can be simulated without increasing the polygon count, thereby improving the realism of the rendering effect. Similarly, referring to the treatment of car paint in the previous example, we can create a complete object normal map and a normal map of the dented part of the object after a complete impact (a complete normal map and a damaged normal map). The damaged normal map is used as texture data to process the microscopic damaged vertices, and the complete normal map is used as texture data to process the vertices other than the microscopic damaged vertices to generate a collision animation. The specific material node linking method can be as follows: Figure 17 ( Figure 17 The example shown illustrates the node connections within the game engine's interface. This allows for richer details of object deformation and dents without modifying the model or increasing the face count, significantly reducing performance consumption and memory usage. Normal data defines the local lighting reflection direction of each vertex of the target model. This allows the vertices in the collision dent area to display lighting reflection effects matching the wrinkles and dents (e.g., more pronounced shadows in dents and more prominent reflections on raised edges) based on the damaged dent normal map, without increasing the model's polygon count (reducing performance consumption), rather than relying solely on the model's original face count for a smooth reflection. Ultimately, this improves the visual detail realism of the collision damage area.

[0089] In some implementations, the target model includes a glass material, the glass material includes an opacity channel, and the method further includes: Step 019: Calculate the channel data of the opaque channel and the preset light transmission parameters to generate the transparency parameters; Step 020: Calculate the channel data of the first channel of the target pixel and the preset floating-point parameters, and compare the calculation result with the preset transparency threshold to determine the cutout vertex based on the comparison result. The target pixel is the pixel that matches the target vertex in the collision attribute map. Step 013: Generate collision animation for the target model, including: Step 0135: Write the transparency parameter into the opacity channel of the hollow vertex, and render the hollow vertex based on the transparency parameter; Step 0136: Based on the preset glass breakage normal map, render the vertices outside the hollowed-out vertices to generate the collision animation of the target model.

[0090] Among them, the glass material can be a component made of glass in the target model (such as a car window or a glass curtain wall), which has the physical characteristics of being translucent, brittle, and easily broken and falling after a collision. Its light transmittance and damage pattern need to be controlled through specific parameters.

[0091] The opacity channel is used to control the transparency of the glass surface. When the opacity channel value is 0, it is completely transparent (simulating the cutout of broken pieces), and when the value is 1, it is opaque (keeping the glass intact). The range of 0-1 is semi-transparent (transition edge). By setting the opacity channel, cutout and light transmission effects can be achieved.

[0092] Among them, the light transmittance parameter can be a parameter used to control the overall light transmittance of the glass.

[0093] The transparency parameter can be calculated from the original data of the opacity channel and the light transmission parameter. It includes the transparency logic of the hollowed-out area and superimposed the overall light transmission characteristics of the glass, ultimately determining the visual transparency effect of the glass.

[0094] Among them, the hollowed-out vertices can be the set of vertices selected from the target vertices, with the collision attribute map R channel representing the vulnerable area. These vertices correspond to the areas where glass fragments fall after a collision, presenting a hollowed-out effect.

[0095] Among them, the glass breakage normal map can be a preset normal map that represents the microstructure of cracks and fragments after a glass collision. By adjusting the direction of light reflection, the three-dimensional details of glass cracks can be simulated without increasing the number of facets in the model.

[0096] Specifically, please refer to Figures 18 to 21 Because different parts of a real object are made of different materials with varying structural strengths, the deformation intensity and range caused by impact also differ. For example, glass has a smaller deformation range, and due to its brittle nature, its surface will show various cracks and gaps. Special treatment is required for this type of material. To recreate the effect of glass deformation and breakage in reality, a relative glass structural strength curve needs to be drawn for the glass model. To make the glass appear with sharp edges and broken fragments, the black-and-white contrast of its structural strength curve needs to be higher. The specific drawing effect is shown in the figure. Glass is a semi-transparent material. To achieve the effect of hollowed-out broken glass fragments, the structural strength curve needs to be incorporated into the semi-transparency. In terms of node connection, the glass structural strength curve is output as the first channel (R channel) of the AlphaTexture parameter and multiplied with the Hardness parameter of the target vertex. The multiplication result is compared with a preset transparency threshold to determine the hollowed-out vertex, thus achieving a transition of collision points with varying degrees of hardness and softness. For example, please refer to... Figure 18 and Figure 19 The black areas represent completely transparent regions, simulating the holes formed by falling glass shards after an impact. The white areas represent opaque regions, indicating the remaining glass. Finally, the transparency parameters are written to the opacity channel of the hollowed-out vertices, and the hollowed-out vertices are rendered based on these parameters. Simultaneously, based on a preset glass breakage normal map, the vertices outside the hollowed-out vertices are rendered to generate the collision animation of the target model. Please refer to [link / reference]. Figure 20 The distance field masking module is multiplied by a transparency parameter to adjust the overall transparency of the glass, restoring the translucent feel of the glass material. Specific node connection methods are as follows: Figure 20 As shown ( Figure 20 This example demonstrates the node connections within the game engine's interface. Additionally, parameters such as color and metallic roughness can be set to adjust the glass material for a more realistic glass texture. Furthermore, a glass breakage normal map can be added to enhance complex surface details such as bumps, scratches, and other minute features, thereby improving the realism of the rendering. Please refer again. Figure 20 and Figure 21 After the above processing, the final result is as follows: Figure 21 As shown, Figure 21 The middle circle represents a movable collision source model, and the lower right image shows the effect of the red circle being hidden, allowing for better observation of the details of object damage, dents, and deformation. In the distance field scheme used in this application embodiment, the option affecting distance field lighting must be unchecked for the target model. Therefore, the target model can be set as a dynamic object. By setting the collision source model as a static object, the dynamic dent and deformation effect of the car body can be achieved in the game.

[0097] Thus, this application embodiment, through a multi-level structural collision attribute map and a solution process for target models and materials, can solve the problems of high production costs, long cycles, high repetition, and the need for separate customization and modification of object breakage positions and degrees in related technologies, which involve splitting the production process into model preprocessing. This improves the convenience of art production and provides new technical support for enhancing the production process. Simultaneously, it can achieve a breakthrough in realism, upgrading the damage and deformation effects from static animation to dynamic, responsive, and realistic effects, providing a visual immersion far exceeding traditional solutions. Furthermore, by integrating topological encoding, gradient calculation, and multi-channel rendering, it constructs an adjustable and reusable deformation and damage system, improving the applicability of the solution. This application embodiment can cover multiple types of objects in the game, such as vehicles, buildings, and props, without requiring the separate creation of multiple types of breakage and deformation models for a single object, increasing production efficiency by 80% and adapting to the needs of open-world, competitive, and other scenarios. High-realistic effects can be achieved solely through material rendering and parameter-driven methods, without increasing the model's face count or animation clips, reducing memory usage by 90%, and balancing visual effects with game smoothness.

[0098] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.

[0099] To facilitate better implementation of the animation generation method of this application, this application also provides an animation generation apparatus. Please refer to... Figure 22 , Figure 22 This is a schematic diagram of the structure of the animation generation apparatus provided in an embodiment of this application. The animation generation apparatus 200 may include: The acquisition module 201 is used to acquire the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. The determining module 202 is used to determine the target vertices located within the collision range of the target model, wherein the collision range is determined based on the distance field data of the target model; The generation module 203 is used to generate a collision animation of the target model based on the collision attributes of each of the target vertices.

[0100] Each unit in the aforementioned animation generation device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.

[0101] The animation generation device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the animation generation device 200 can be the terminal or server.

[0102] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0103] The figure is a schematic diagram of the structure of a computer device provided in an embodiment of this application. This computer device can be a terminal or a server. As shown, the computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored on the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0104] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby performing overall processing of the computer device 300.

[0105] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: Obtain the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. Identify target vertices located within the collision range of the target model, the collision range being determined based on the distance field data of the target model; Based on the collision attributes of each target vertex, a collision animation of the target model is generated.

[0106] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0107] Optionally, as shown in the figure, the computer device 300 further includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0108] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0109] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0110] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.

[0111] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0112] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0113] Although not shown in the figure, the computer device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0114] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the animation generation method described in the embodiments of this application; for brevity, these will not be elaborated further here.

[0115] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the animation generation method described in the embodiments of this application. For simplicity, further details are omitted here.

[0116] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the animation generation method of this application. For brevity, further details are omitted here.

[0117] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0118] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0119] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0120] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0121] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0122] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0123] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0124] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0125] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0126] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. An animation generation method, characterized in that, include: Obtain the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. Identify target vertices located within the collision range of the target model, the collision range being determined based on the distance field data of the target model; Based on the collision attributes of each target vertex, a collision animation of the target model is generated.

2. The animation generation method according to claim 1, characterized in that, The pixel channels include a first channel, a second channel, and a third channel. The step of acquiring the texture map of the target model and writing collision parameters into the pixel channels of the pixels in the texture map to generate a collision attribute map includes: For each pixel, the corresponding breakage weight parameter is written into the first channel of the pixel. The breakage weight parameter is used to characterize the breakage weight when a vertex matching the pixel collides with it. The damage morphology parameter corresponding to the pixel is written into the second channel of the pixel. The damage morphology parameter is used to characterize the breakage morphology when it collides with the matching vertex of the pixel. The microscopic damage parameters corresponding to the pixel are written into the third channel of the pixel. The microscopic damage parameters are used to characterize the critical threshold of microscopic damage when a vertex matching the pixel collides with it.

3. The animation generation method according to claim 1, characterized in that, The distance field data of the target model includes distance parameters between each vertex of the target model and a preset collision source model. Determining the target vertices located within the collision range of the target model includes: Based on preset floating-point parameters and benchmark thresholds, the distance parameters between each vertex of the target model and the preset collision source model are smoothed. The smoothed distance parameters are compared with a preset distance threshold, and the target vertex is determined based on the comparison result. The distance threshold is used to characterize the collision range.

4. The animation generation method according to any one of claims 1-3, characterized in that, Based on the collision attributes of each target vertex, a collision animation of the target model is generated, including: For each target vertex, the vertex offset direction of the target vertex and a preset concavity parameter are used as offset parameters, wherein the concavity parameter is used to characterize the degree of offset of the target vertex; Based on the offset parameters of the target vertex and the collision attribute map, the target vertex is driven to offset along the corresponding vertex offset direction to generate the collision animation of the target model.

5. The animation generation method according to claim 4, characterized in that, Also includes: The position vectors of each target vertex of the target model in the model coordinate system are collected, and the position vectors are normalized to obtain the offset direction of each vertex. The position vectors include coordinate vectors pointing from the origin of the model coordinate system to the target vertex.

6. The animation generation method according to claim 4, characterized in that, The method further includes: Obtain the preset surface damage texture and surface integrity texture; The channel data of the third channel of the target pixel is compared with a preset micro-damage threshold. Based on the comparison result, micro-damaged vertices are selected from the target vertices. The target pixel is the pixel that matches the target vertex in the collision attribute map. The generation of the collision animation for the target model includes: The surface damage map is used as texture data to render the microscopic damaged vertices; The complete surface texture is used as texture data to render vertices other than the microscopically damaged vertices to generate a collision animation for the target model.

7. The animation generation method according to claim 6, characterized in that, The method further includes: Obtain the complete normal map and the broken normal map; The generation of the collision animation for the target model includes: The damaged normal map is used as texture data to render the microscopic damaged vertices; The complete normal map is used as texture data to render vertices other than the microscopically damaged vertices to generate a collision animation for the target model.

8. The animation generation method according to claim 4, characterized in that, The target model includes a glass material, the glass material includes an opacity channel, and the method further includes: The channel data of the opaque channel and the preset light transmission parameters are calculated to generate the transparency parameters; The channel data of the first channel of the target pixel and the preset floating-point parameters are calculated, and the calculation result is compared with the preset transparency threshold to determine the hollow vertex based on the comparison result. The target pixel is the pixel that matches the target vertex in the collision attribute map. The generation of the collision animation for the target model includes: Write the transparency parameter into the opacity channel of the hollow vertex, and render the hollow vertex based on the transparency parameter; Based on a preset glass breakage normal map, the vertices outside the hollowed-out vertices are rendered to generate a collision animation for the target model.

9. An animation generation device, characterized in that, The device includes: The acquisition module is used to acquire the texture map of the target model and write the collision parameters into the pixel channel of the pixel of the texture map to generate a collision attribute map. The collision attribute map is used to characterize the collision attributes of each vertex of the target model, and the collision attributes are used to characterize the damage after the collision. A determination module is used to determine target vertices located within the collision range of the target model, wherein the collision range is determined based on the distance field data of the target model; The generation module is used to generate a collision animation of the target model based on the collision attributes of each target vertex.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the animation generation method as described in any one of claims 1-8.

11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the animation generation method according to any one of claims 1-8 by calling the computer program stored in the memory.