Method and device for rendering broken animation effect

By crushing the target three-dimensional model and sampling the VAT texture in the rendering engine, the crushing effect of efficiently rendering transparent objects on mobile devices is achieved, solving the problem of poor user experience in the existing technology, and realizing realistic rendering effects and good performance balance.

CN119540410APending Publication Date: 2025-02-28TUYOO GAMES +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411594545.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-09
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently render the crushing effect of transparent objects on mobile devices, resulting in poor user experience.

Method used

By obtaining the target three-dimensional model, the crushing model is obtained through the crushing model, and the VAT texture in the crushing model is continuously sampled in the shader of the rendering engine to obtain the vertex position offset, and superimpose it to the vertex position of the target three-dimensional model to realize the rendering of the crushing animation.

Benefits of technology

Realistic rendering of transparent objects is realized, texture crushing and three-dimensional model crushing are unified, the authenticity of the crushing process is enhanced, and complex real-time ray tracing calculations are avoided, and the performance balance is maintained. It is suitable for use in three-dimensional scenarios in mobile applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540410A_ABST
    Figure CN119540410A_ABST
Patent Text Reader

Abstract

The invention provides a broken animation effect rendering method and device, computing equipment and a computer readable storage medium, and the method comprises the steps: firstly making a broken model according to a target three-dimensional model, and further carrying out the rendering of the target three-dimensional model through a rendering engine, thereby obtaining a vivid transparent object; and meanwhile, sampling and interpolation are carried out on texture data of the crushing model through the change of the crushing strength value in a rendering engine to obtain vertex position offset, and the vertex position offset is added to an original vertex position of a vertex shader, so that unification of texture crushing and three-dimensional model crushing is realized, and the crushing process is more real. According to the embodiment of the invention, complex real-time ray tracing calculation is avoided by using the rendering texture, a complex visual effect is created, good performance balance is kept, and the method is suitable for a three-dimensional scene in mobile terminal application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer graphics rendering, and in particular to a rendering method and apparatus for a fragmented animation effect, a computing device, and a computer-readable storage medium. Background Art

[0002] In existing 3D games, there is a need to render the shattering effect of objects, such as obtaining the internal objects by breaking ice. However, the rendering of the shattering effect of transparent objects needs to consider complex mechanical and optical phenomena, and its calculation process consumes a lot of resources. Mobile devices usually cannot meet the performance requirements, resulting in a poor user experience. Summary of the invention

[0003] In view of this, an embodiment of the present application provides a rendering method and apparatus for a fragmented animation effect, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a method for rendering a fragmentation animation effect is provided, comprising:

[0005] Acquire a target three-dimensional model, and perform fragmentation processing on the target three-dimensional model to obtain a fragmented model;

[0006] Implementing rendering of the target three-dimensional model in a shader of a rendering engine;

[0007] The vertex position offset is obtained by continuously sampling the VAT texture in the fragmentation model in the shader of the rendering engine, and the vertex position offset is superimposed on the vertex position of the target three-dimensional model to realize the rendering of the fragmentation animation.

[0008] According to a second aspect of an embodiment of the present application, a rendering device for a fragmentation animation effect is provided, comprising:

[0009] A rendering unit, used for rendering the imported target three-dimensional model in a shader of a rendering engine;

[0010] The calculation unit is used to obtain vertex position offsets by continuously sampling the VAT texture contained in the fragmentation model of the target three-dimensional model in the shader, and superimpose the vertex position offsets on the vertex positions of the target three-dimensional model to achieve rendering of the fragmentation animation.

[0011] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the method for rendering the broken animation effect when executing the instructions.

[0012] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the rendering method of the broken animation effect are implemented.

[0013] Through the method provided in the embodiment of the present application, a broken model is made according to the target three-dimensional model, and the target three-dimensional model is rendered to obtain a realistic transparent object. At the same time, the change of the sampled UV coordinates is driven by the change of the broken strength value in the rendering engine, and then the texture data of the broken model is sampled through the change to obtain the vertex position offset, and the vertex position offset is added to the original vertex position of the vertex shader, thereby realizing the unification of texture breakage and three-dimensional model breakage, making the breakage process more realistic. The embodiment of the present application avoids complex real-time ray tracing calculations by also using rendering textures, which not only creates complex visual effects, but also maintains a good performance balance, and is suitable for three-dimensional scenes in mobile applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;

[0015] Figure 2 It is a flowchart of a method for rendering a broken animation effect provided in an embodiment of the present application;

[0016] Figure 3 It is a schematic diagram of the effect of a target three-dimensional model provided in an embodiment of the present application;

[0017] Figure 4 is a schematic diagram of a crushing model produced according to a target three-dimensional model provided in an embodiment of the present application;

[0018] Figure 5 This is a schematic diagram of the effect of a broken model without normal processing provided by an embodiment of the present application;

[0019] Figure 6 This is a schematic diagram of the effect of a surface normal continuous fragmentation model provided in an embodiment of the present application;

[0020] Figure 7 This is a schematic diagram of the effect of rendering a target three-dimensional model provided in an embodiment of the present application;

[0021] Figure 8 This is another schematic diagram of the effect of rendering a target three-dimensional model provided in an embodiment of the present application;

[0022] Figure 9a This is a schematic diagram of the effect of rendering a fragmentation effect according to the rendering method of the fragmentation animation effect provided in an embodiment of the present application;

[0023] Figure 9b is another effect schematic diagram of rendering a fragmentation effect according to the rendering method of the fragmentation animation effect provided in an embodiment of the present application;

[0024] Fig.9c is another effect schematic diagram of rendering a fragmentation effect according to the rendering method of the fragmentation animation effect provided in an embodiment of the present application;

[0025] Fig.10 It is a structural schematic diagram of a rendering device for a broken animation effect provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0027] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

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

[0029] In the present application, a rendering method and apparatus for a fragmentation animation effect, a computing device, and a computer-readable storage medium are provided, which will be described in detail one by one in the following embodiments.

[0030] Figure 1 The structure block diagram of a computing device 100 according to an embodiment of the present application is shown. The components of the computing device 100 include but are not limited to a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and the database 150 is used to store data.

[0031] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0032] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 1 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0033] Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC.

[0034] In the embodiments of the present application, Figure 2 A flowchart of a method for rendering a fragmented animation effect provided by the present application is shown, including steps 202 to 206 .

[0035] Step 202: Acquire a target three-dimensional model, and perform fragmentation processing on the target three-dimensional model to obtain a fragmented model.

[0036] In this step, a target three-dimensional model is first obtained, and the target three-dimensional model is a conventional three-dimensional model to be fragmented. In a feasible implementation, the target three-dimensional model is a three-dimensional model including multiple vertices generated by conventional modeling software, such as Figure 3 shown.

[0037] Furthermore, the target three-dimensional model is fragmented to obtain a fragmented model. In a feasible implementation, the above target three-dimensional model is imported into Houdini software, and the target three-dimensional model is processed by Houdini software to obtain a fragmented model. Houdini is a powerful three-dimensional computer graphics and visual effects software, which is widely used in the fields of film, games, advertising and virtual reality. In particular, Houdini's fragmentation function allows users to decompose three-dimensional objects into multiple fragments according to predetermined rules or randomly, and then generate natural hard body collision and interaction effects through physical simulation.

[0038] Crushing features include:

[0039] (1) Voronoi Fracture is one of the most commonly used fracture tools in Houdini. It uses the Voronoi diagram algorithm to split an object into multiple irregular fragments. Users can control the shape and size of the fracture by defining seed points.

[0040] (2) The Boolean Fracture tool can split the geometry according to the Boolean operation rules and can precisely control the shape of the fragments.

[0041] (3) The RBD Material Fracture tool is designed to simulate the fracture of materials with real physical properties, such as glass, concrete, and wood. Material properties such as toughness and crack orientation can be defined to produce more realistic fracture effects.

[0042] In engineering practice, technicians in this field can select corresponding tools according to their needs to complete the fragmentation of the target three-dimensional model.

[0043] In the embodiment of the present application, preferably, the imported target 3D model is first processed by the RBD Material Fracture tool, and the RBD Material Fracture node is used to generate a broken model after breaking. This process is completed by adjusting the number of broken faces, cracks and internal details, etc.; and the RBD Bullet Solver node is used to perform the broken animation solution, such as Figure 4 shown.

[0044] Preferably, in this step, in the process of implementing the fracture simulation by RBD Material Fracture, a collision box is added inside the target three-dimensional model, such as Figure 3-Figure 4 As shown, when the target three-dimensional model is broken, the fragments collide with the internal collision box.

[0045] Furthermore, the vertex animation data is exported into a texture using the VAT tool to form a shattered model for use in a real-time rendering engine such as Unity or Unreal Engine.

[0046] Preferably, before deriving the fragmentation model, the normals of the fragmentation model are processed so that the surface normals of the derived fragmentation model are continuous.

[0047] Specifically, due to the discontinuity of normals on the surface of the shattered model, surface lighting discontinuities will appear in the shattered animation, and the visual effect will be abrupt and unnatural. For example, some faces will appear too bright or too dark, such as Figure 5 As shown in the figure, the edges of the fragments will cause unnatural shadows and highlights due to the sudden change of normals, making the animation effect appear unrealistic. Therefore, the Attribute Transfer node is used to transfer the normals of the target 3D model to the broken model to ensure the continuity of the model normals. This step includes:

[0048] 1. Calculate the normal of the original point:

[0049] Add a Normal node to the target 3D model to generate and save the original point normal.

[0050] 2. Transfer the original normals to the broken model

[0051] Add an Attribute Transfer node to the shatter model node chain.

[0052] Connect the target 3D model containing the original normal processing to the first input of the Attribute Transfer node.

[0053] Connect the shattered model to the second input of the Attribute Transfer node.

[0054] 3. Configure the Attribute Transfer node:

[0055] In the Attribute Transfer node, set the attribute type to be transferred to Normal and adjust the parameters to ensure a smooth transition of the normals.

[0056] This ensures that when you export your animation, you can have high-quality and consistent lighting effects. Figure 6 shown.

[0057] Step 204: Implement rendering of the target three-dimensional model in a shader of a rendering engine.

[0058] In this step, after the target 3D model is imported into the rendering engine, a shader is created to render the model. It is feasible that the target 3D model is rendered as an opaque object according to the resource, such as Figure 7 shown.

[0059] Specifically, the target three-dimensional model is rendered using a parallax offset method, which is used to enhance the surface details and depth in 3D rendering. This method simulates the depth of the surface details of the object by changing the offset of the texture coordinates, and can simulate the surface bumps and depth without increasing the geometric complexity. In an embodiment of the present application, the parallax offset method is used to create the required rendering effects on the surface of the target three-dimensional model, such as tiny bumps, cracks or bubbles.

[0060] Furthermore, the parallax offset sampling coordinates of the target 3D model are saved. The parallax offset sampling coordinates usually refer to the texture coordinates processed by the parallax mapping technology, which are obtained by offsetting the original texture coordinates according to the viewing angle and height map information. The parallax offset is an offset of the texture coordinates (UV coordinates) based on the surface concave-convex information and viewing angle. The result after offset is still the UV coordinates but after offset, the offset amount depends on the viewing angle and surface height.

[0061] Preferably, a first rendering object is placed inside the target 3D model. At this time, since the target 3D model is rendered in an opaque manner, the first rendering object cannot be seen through it. Then, a dedicated camera is created to shoot the inside of the target 3D model, and the parameters of the dedicated camera are adjusted so that the non-rendering area except the first rendering object is black; after adjusting the various parameters of the camera to be consistent with the main camera in real time, the dedicated camera is used to render the first rendering object and the obtained first rendering texture is passed to the shader for sampling.

[0062] Then, the parallax offset coordinates are used to sample the first rendering texture, and a rendering result consistent with the light effect of the target three-dimensional model is obtained. Because the parallax offset sampling coordinates simulate the refraction path of light in opaque objects, and store the offset information based on the viewing angle and the surface of the opaque object. Therefore, the parallax offset coordinates are used in the shader to sample the first rendering texture, and the refraction effect of light passing through the opaque object is simulated to obtain the second rendering texture.

[0063] Furthermore, a black and white texture of the second rendering texture is obtained, and the target three-dimensional model and the second rendering texture are interpolated through the black and white texture to obtain a final rendering effect. Specifically, the second rendering texture is processed by RGB channels to generate a black and white texture of the second rendering texture, which is used to control the distribution and intensity of the rendering effect. By adjusting this texture, an effect of making some parts more transparent and some parts more opaque can be created.

[0064] For example, the opaque object is an ice cube, and the above black and white texture is used to control the freezing effect of the first rendered object:

[0065] White areas represent highly frozen parts

[0066] Black areas represent less frozen or unfrozen areas

[0067] Gray values ​​represent intermediate levels of freezing

[0068] Furthermore, the second rendering texture and the texture of the opaque object are interpolated in combination with the black and white texture to obtain a final rendering result. Schematically, the process includes the following steps:

[0069] (1) Sampling:

[0070] float2 parallaxUVOffset = ViewDir.xy*height; / / Save parallax offset texture coordinates

[0071] fixed4 iceTex = tex2D(_IceTex, IN.uv_IceTex+parallaxUVOffset); / / sample ice surface texture

[0072] fixed4 internalTex=tex2D(_InternalTex,IN.uv_InternalTex+parallaxUVOffset); / / sample internal object rendering texture, using offset UV coordinates

[0073] fixed freezeMask = max(max(internalTex.r, internalTex.g), internalTex.b); / / Process internalTex to get black and white texture (frozen mask)

[0074] (2) Adjust the intensity of the freezing effect:

[0075] freezeMask = smoothstep(0, _FrozenIntensity, freezeMask); This line of code allows you to further adjust the effect of the black and white texture. By changing the value of _FrozenIntensity, you can adjust the overall strength of the freezing effect and the steepness of the transition.

[0076] (3) Use black and white texture for color interpolation:

[0077] fixed3 finalColor=lerp(iceTex.rgb,internalTex.rgb+iceTex.rgb,freezeMask);

[0078] The value of freezeMask comes from the black and white texture, which determines the mixing ratio between the internal rendering and the ice appearance at each pixel. By changing the calculation method of freezeMask, the distribution and intensity of the freezing effect can be easily adjusted, such as Figure 8 shown.

[0079] Step 206: Continuously sample the VAT texture in the broken model in the shader of the rendering engine to obtain vertex position offsets, and superimpose them on the vertex positions of the target three-dimensional model to achieve rendering of the broken animation.

[0080] The shatter model includes a VAT texture (Vertex Animation Texture), which is a method of encoding vertex animation data into a texture, allowing complex vertex deformation animations to be played efficiently on the GPU.

[0081] In this step, the VAT texture generated above is sampled in the vertex shader. The horizontal coordinate in the VAT texture is the number of vertices of the model, and the vertical coordinate is the total number of frames of the animation.

[0082] In the embodiment of the present application, in order to make the animation play more smoothly, a shatter strength value is used in the vertex shader to control the cracks at the texture level. When the shatter strength value is greater than the preset value, the vertex position in the VAT texture is added to the vertex of the shader. At this time, the shattered model begins to show a real shattering effect, and the texture cracks also increase with the increase of the shatter strength value, which together show the shattering effect of the model. Figure 9a-9c shown.

[0083] Specifically, in the process of implementing the shattering animation, the shattering intensity value _CrackIntensity changes dynamically, and the shattering intensity value controls the intensity of the shattering effect. If this value is dynamically adjusted through the game engine interface, when its value increases, the shattering effect will become stronger and stronger, thereby gradually showing the shattering animation effect.

[0084] Preferably, controlling the intensity of the crushing effect by varying the crushing intensity value comprises the following steps:

[0085] 1. Set a threshold CrackThreshold related to the crack intensity value _CrackIntensity, for example:

[0086] float animControl=max(_CrackIntensity-CrackThreshold,0);

[0087] The max function ensures that when the shatter strength value is greater than the threshold, animControl is greater than 0 and the animation starts playing.

[0088] 2. Calculate the current animation time, such as:

[0089] float currentTime=frac(-animControl*_speed);

[0090] _speed is used to control the speed of animation playback and can be adjusted by external interfaces;

[0091] frac(-animControl*_speed): Calculates the periodic fractional part of the current time, ensuring that the time parameter cycles within the interval [0,1] to achieve looping of the animation.

[0092] 3. Calculate the current frame index, such as:

[0093] float frameIndex=currentTime*_numOfFrames;

[0094] _numOfFrames: Indicates the total number of animation frames.

[0095] frameIndex: Calculates the current frame index as a decimal, by multiplying by the total number of frames.

[0096] 4. Calculate the time index near the current frame:

[0097] float timeInFramesPre=floor(frameIndex) / _numOfFrames;

[0098] The time index of the current frame after rounding down;

[0099] float timeInFramesAft=ceil(frameIndex) / _numOfFrames;

[0100] The time index of the current frame after rounding up;

[0101] These indices are used to locate the previous and next frame's data in the VAT texture.

[0102] 5. Sample the vertex position data near the current frame, such as the previous frame and the next frame:

[0103] float4 texturePosPre=tex2Dlod(_posTex,float4(v.uv1.x,(timeInFramesPre+v.uv1.y),0,0));

[0104] float4 texturePosAft=tex2Dlod(_posTex,float4(v.uv1.x,(timeInFramesAft+v.uv1.y),0,0));

[0105] The tex2Dlod function samples vertex position information from the VAT texture. The sampled coordinates come from the original UV coordinates of the target 3D model and the changes caused by the shatter strength value.

[0106] _posTex is a VAT texture that stores the position information of each vertex in different frames.

[0107] 6. Calculate the interpolation factor between frames, such as:

[0108] float fraction=frac(frameIndex);

[0109] fraction: The interpolation factor of the current frame between two frames, indicating the progress of the current frame relative to the previous frame.

[0110] This value is a decimal between [0,1] and is used to perform linear interpolation between two frames.

[0111] 7. Perform linear interpolation on the vertex positions of the two frames to obtain the vertex position offset; interpolate between texturePosPre and texturePosAft according to fraction to calculate the vertex position at the current time point. This step ensures that the animation transitions smoothly between frames, such as:

[0112] float4 texturePos=lerp(texturePosPre, texturePosAft,fraction);

[0113] 8. Add the position offset to the original vertex position of the vertex shader. The original vertex position is the initial position of each vertex of the target 3D model and is the basic form of the target 3D model without any animation or deformation.

[0114] Preferably, in the process of rendering the fragmentation effect, for the first rendering object placed inside the target three-dimensional model, the part blocked by the fragments is distorted and simulated by the map rendered by the main camera, and the unblocked part is actually rendered, which well shows the optical rendering effects of different areas on internal objects.

[0115] In the above-mentioned embodiment of the present application, in order to efficiently realize the fragmentation effect of transparent objects on the mobile terminal and ensure that the rendering result is as realistic as possible without consuming too many hardware resources, a fragmentation model is first made according to the target three-dimensional model; further, the target three-dimensional model is rendered in the rendering engine to obtain a realistic transparent object, and at the same time, the change of the sampled UV coordinates is driven by the change of the fragmentation intensity value in the rendering engine, and then the texture data of the fragmentation model is sampled to obtain the vertex position offset; the vertex position offset is added to the original vertex position of the vertex shader, realizing the unification of texture fragmentation and model fragmentation, making the fragmentation process more realistic. The embodiment of the present application also avoids complex real-time ray tracing calculations by using rendering textures, which not only creates complex visual effects, but also maintains a good performance balance, and is suitable for three-dimensional scenes in mobile applications.

[0116] Corresponding to the above method embodiment, the present application also provides an embodiment of a rendering device for a broken animation effect, such as Fig.10 As shown, the device comprises:

[0117] A rendering unit, used for rendering the target three-dimensional model in a shader of a rendering engine;

[0118] The calculation unit is used to obtain vertex position offsets by continuously sampling the VAT texture contained in the fragmentation model of the target three-dimensional model in the shader, and superimpose the vertex position offsets on the vertex positions of the target three-dimensional model to achieve rendering of the fragmentation animation.

[0119] The above is a schematic scheme of a rendering device for a broken animation effect of this embodiment. It should be noted that the technical scheme of the rendering device for a broken animation effect and the technical scheme of the rendering method for a broken animation effect belong to the same concept, and the details of the technical scheme of the rendering device for a broken animation effect that are not described in detail can all be referred to the description of the technical scheme of the rendering method for a broken animation effect.

[0120] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the method for rendering the broken animation effect are implemented.

[0121] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned method for rendering broken animation effects belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned method for rendering broken animation effects.

[0122] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method for rendering the fragmented animation effect as described above.

[0123] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the rendering method of the above-mentioned broken animation effect belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the rendering method of the above-mentioned broken animation effect.

[0124] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0125] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0126] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0128] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for rendering a broken animation effect, characterized in that: include: Acquire a target three-dimensional model, and perform fragmentation processing on the target three-dimensional model to obtain a fragmented model; Implementing rendering of the target three-dimensional model in a shader of a rendering engine; In the shader of the rendering engine, the VAT texture in the broken model is continuously sampled to obtain vertex position offsets, and the vertex position offsets are superimposed on the vertex positions of the target three-dimensional model to achieve rendering of the broken animation.

2. The method according to claim 1, wherein: The fragmentation process of the target three-dimensional model to obtain a fragmented model includes: The target three-dimensional model is fragmented to obtain a first fragmented model, and the normal of the first fragmented model is processed to obtain a second fragmented model with continuous surface normals.

3. The method according to claim 2, wherein: Processing the normal of the first broken model to obtain a second broken model with continuous surface normals includes: The original point normal of the target three-dimensional model is calculated, an attribute conversion node is added to the first fragmentation model node chain, and the original point normal is transferred to the first fragmentation model through the attribute conversion node to obtain a second fragmentation model.

4. The method according to claim 1, wherein: Before the target three-dimensional model is fragmented, a collision box is added inside the target three-dimensional model.

5. The method according to claim 1, wherein: Implementing the rendering of the target three-dimensional model in the shader of the rendering engine includes: A first rendering object is placed inside the target three-dimensional model, a dedicated camera for photographing the inside of the target three-dimensional model is created, the first rendering object is rendered using the dedicated camera, and the obtained first rendering texture is passed to the shader for sampling.

6. The method according to claim 1, wherein: The vertex position offset obtained by continuously sampling the VAT texture in the broken model in the shader of the rendering engine includes: Adjust the shatter strength value, drive the original UV coordinates of the target 3D model to change according to the current shatter strength value, and then sample the VAT texture based on the changed UV coordinates to obtain the vertex position offset.

7. The method according to claim 6, wherein: According to the current shatter strength value, the original UV coordinates of the target 3D model are driven to change, and then the VAT texture is sampled based on the changed UV coordinates to obtain the vertex position offset, including: The current frame index is obtained according to the current shatter strength value and the total number of frames in the VAT texture; the original UV coordinates of the target 3D model are changed based on the current frame index, and the VAT texture near the current frame is sampled to obtain the vertex position offset.

8. The method according to claim 1, wherein: The step of superimposing the vertex position offset to the vertex position of the target three-dimensional model to realize the rendering of the broken animation includes: The vertex position offset is added to the original vertex position of the vertex shader, where the original vertex position is the initial position of each vertex of the target three-dimensional model.

9. The method according to claim 5, wherein: The method further includes: When rendering the fragmentation effect, for the first rendering object, the portion blocked by the fragments is subjected to distortion simulation on the map rendered by the camera, and the portion not blocked is subjected to actual effect rendering.

10. A rendering device for a broken animation effect, characterized in that: include: A rendering unit, used for rendering the target three-dimensional model in a shader of a rendering engine; The calculation unit is used to obtain vertex position offsets by continuously sampling the VAT texture contained in the fragmentation model of the target three-dimensional model in the shader, and superimpose the vertex position offsets on the vertex positions of the target three-dimensional model to achieve rendering of the fragmentation animation.

11. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.