Method and device for displaying crushing effect, computer device and storage medium

By rendering and controlling the movement of fragments of virtual objects using a particle system, the problems of high computational load and performance impact of traditional shattering effects are solved, achieving efficient and artistic shattering effects and improving the user experience.

CN120571237BActive Publication Date: 2026-11-27SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510660565.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2026-11-27
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

Traditional fragmentation effects rely on complex physical simulations, which involve large amounts of computation, affect system performance, make it difficult to achieve artistic effects, and cannot be widely applied in complex and ever-changing virtual environments.

Method used

The particle system is used to render multiple fragments of the target virtual object, and the movement of the fragments is controlled based on the breaking event. This avoids complex physical calculations and achieves a realistic breaking effect by adjusting the movement of the fragments according to the actual situation through the particle system.

Benefits of technology

It significantly improves computing efficiency, reduces system resource consumption, ensures smooth operation under high load, and achieves artistic fragmentation effects while enhancing the game's visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120571237B_ABST
    Figure CN120571237B_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a display method and device of a crushing effect, computer equipment and a storage medium, and belongs to the technical field of display. The embodiment of the application provides a display method of a crushing effect. When a crushing event occurs for a target virtual object, the computer equipment renders a plurality of fragments of the target virtual object based on a particle system, and controls the plurality of fragments of the target virtual object to move, so that the particle system is used to control the display of the fragments based on the crushing event, so as to simulate the movement when the object is crushed, and the complex physical calculation is avoided, thereby significantly improving the performance of the equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular to a method, apparatus, computer device, and storage medium for displaying a broken effect. Background Technology

[0002] In modern computer graphics and game development, object breaking effects are a common and important visual effect. Whether in film special effects, virtual reality, or video games, realistic breaking effects can greatly enhance visual impact and immersion. However, traditional breaking effects usually rely on complex physics simulations, which are not only computationally intensive but also significantly impact system performance. Summary of the Invention

[0003] This application provides a method, apparatus, computer device, and storage medium for displaying a breaking effect, avoiding complex physical calculations and thus significantly improving device performance. The technical solution is as follows:

[0004] On the one hand, a method for displaying a broken effect is provided, the method comprising:

[0005] Display the target virtual object;

[0006] In response to a breakage event of the target virtual object, multiple fragments of the target virtual object are rendered based on a particle system;

[0007] Control the movement of multiple fragments of the target virtual object.

[0008] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object includes:

[0009] Determine the physical parameters of the fragments corresponding to the target virtual object;

[0010] The speed of the fragment is determined based on the physical parameters of the fragment and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0011] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object includes:

[0012] The multiple fragments corresponding to the target virtual object are controlled to move based on the event information of the breakage event.

[0013] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object based on event information of the breakage event includes:

[0014] Based on the location of the breakage event, motion parameters of some fragments among the multiple fragments corresponding to the target virtual object are determined. The fragments are located within the area corresponding to the location of the breakage event. Based on the motion parameters of the fragments, the fragments are controlled to move.

[0015] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object includes:

[0016] Obtain the element information of the environment elements of the virtual environment;

[0017] The multiple fragments corresponding to the target virtual object are controlled to move based on the element information of the environmental elements.

[0018] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object based on element information of the environmental elements includes:

[0019] Determine the physical parameters of the fragments corresponding to the target virtual object;

[0020] The resistance is determined based on the type of environmental element, and the velocity of the fragment is determined based on the resistance, the physical parameters of the fragment, and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0021] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object based on element information of the environmental elements includes:

[0022] When the environmental element is an obstacle, the velocity of the fragment after colliding with the obstacle is calculated based on the velocity of the fragment of the target virtual object in the frame in which the collision occurs, the penetration distance of the fragment when it collides with the obstacle, the collision radius of the fragment, and the simulation time interval.

[0023] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object based on the breaking event includes:

[0024] The multiple fragments corresponding to the target virtual object are controlled to move based on the event type of the breakage event, and different event types of the breakage event correspond to different movement methods of the fragments.

[0025] In some embodiments, controlling the movement of multiple fragments corresponding to the target virtual object based on the breaking event includes:

[0026] Control at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as a traversable state.

[0027] In some embodiments, controlling at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as traversable, includes:

[0028] Controlling some fragments corresponding to the target virtual object to scatter based on the breaking event, while keeping another part of the target virtual object stationary, so as to form a traversable passage within the target virtual object; or,

[0029] All fragments corresponding to the target virtual object are controlled to scatter based on the breaking event, so as to form a passable passage in the deformed target virtual object.

[0030] In some embodiments, controlling at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as traversable, includes:

[0031] The fragmentation event includes the movement event of the virtual object within the target virtual object, controlling at least some fragments corresponding to the target virtual object to disperse based on the movement trajectory of the target object, so as to display the target virtual object as a passable state.

[0032] In some embodiments, the method further includes:

[0033] The lifecycle of the multiple fragments is initialized. When the display duration of any fragment reaches the corresponding lifecycle, the fragment is destroyed; or, when any fragment moves outside the target range, the fragment is destroyed; or, when any fragment fails to render, the fragment is destroyed.

[0034] On the other hand, a display device for a shattering effect is provided, the device comprising:

[0035] The display module is used to display the target virtual object;

[0036] A rendering module, used to render multiple fragments of the target virtual object based on a particle system in response to a breaking event of the target virtual object;

[0037] The control module is used to control the movement of multiple fragments of the target virtual object.

[0038] In some embodiments, the control module is used to determine the physical parameters of the fragments corresponding to the target virtual object;

[0039] The speed of the fragment is determined based on the physical parameters of the fragment and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0040] In some embodiments, the control module is used to control multiple fragments corresponding to the target virtual object to move based on event information of the breakage event.

[0041] In some embodiments, the control module is configured to determine motion parameters of a portion of the fragments among a plurality of fragments corresponding to the target virtual object based on the location where the breakage event occurs, wherein the portion of fragments is located within the area corresponding to the location where the breakage event occurs, and control the portion of fragments to move based on the motion parameters of the portion of fragments.

[0042] In some embodiments, the control module is used to acquire element information of the environment elements of the virtual environment;

[0043] The multiple fragments corresponding to the target virtual object are controlled to move based on the element information of the environmental elements.

[0044] In some embodiments, the control module is used to determine the physical parameters of the fragments corresponding to the target virtual object;

[0045] The resistance is determined based on the type of environmental element, and the velocity of the fragment is determined based on the resistance, the physical parameters of the fragment, and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0046] In some embodiments, the control module is configured to, when the environmental element is an obstacle, calculate the velocity of the fragment after colliding with the obstacle based on the velocity of the fragment of the target virtual object in the frame in which the collision occurs, the penetration distance of the fragment when it collides with the obstacle, the collision radius of the fragment, and the simulation time interval.

[0047] In some embodiments, the control module is used to control multiple fragments corresponding to the target virtual object to move based on the event type of the breakage event, wherein different event types of the breakage event correspond to different movement modes of the fragments.

[0048] In some embodiments, the control module is configured to control at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as a traversable state.

[0049] In some embodiments, the control module is configured to control a portion of the fragments corresponding to the target virtual object to scatter based on the breaking event, while keeping another portion of the fragments corresponding to the target virtual object stationary, so as to form a traversable passage within the target virtual object; or,

[0050] All fragments corresponding to the target virtual object are controlled to scatter based on the breaking event, so as to form a passable passage in the deformed target virtual object.

[0051] In some embodiments, the control module is configured to control at least some fragments corresponding to the target virtual object to disperse based on the movement trajectory of the target virtual object, so as to display the target virtual object as a traversable state. The fragmentation event includes the movement event of a virtual object within the target virtual object.

[0052] In some embodiments, the apparatus further includes: a fragment processing module, configured to initialize the lifecycle of the plurality of fragments, and destroy the fragment when the display duration of any fragment reaches the corresponding lifecycle; or, destroy the fragment when any fragment moves outside the target range; or, destroy the fragment when any fragment fails to render.

[0053] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to perform the operations performed by the method for displaying the shattering effect as described above.

[0054] On the other hand, a computer-readable storage medium is provided that stores at least one computer program, which is loaded and executed by a processor to perform the operations performed by the method for displaying the shattering effect as described above.

[0055] On the other hand, a computer program product is provided, including a computer program loaded and executed by a processor to perform the operations performed by the method for displaying the shattering effect as described above. Attached Figure Description

[0056] 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 the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a structural block diagram of a computer system provided in an exemplary embodiment of this application;

[0058] Figure 2 This is a flowchart illustrating how the particle system provided in this embodiment achieves the breaking effect;

[0059] Figure 3 This is a schematic diagram of a fragmentation model provided in an embodiment of this application;

[0060] Figure 4 This is a two-dimensional schematic diagram of the obstacle in Example 1 provided in the embodiments of this application;

[0061] Figure 5 This is a schematic diagram of the breaking effect of Example 1 provided in the embodiments of this application;

[0062] Figure 6 This is a schematic diagram of the breaking effect of Example 1 provided in the embodiments of this application;

[0063] Figure 7 This is a flowchart of the method for displaying the breaking effect of Example 1 provided in the embodiments of this application;

[0064] Figure 8 This is a two-dimensional schematic diagram of the monster in Example 2 provided in the embodiments of this application;

[0065] Figure 9 This is a schematic diagram of the breaking effect of Example 2 provided in the embodiments of this application;

[0066] Figure 10 This is a schematic diagram of the breaking effect of Example 2 provided in the embodiments of this application;

[0067] Figure 11 This is a flowchart of the method for displaying the breaking effect in Example 2 provided in the embodiments of this application;

[0068] Figure 12 This is a two-dimensional schematic diagram of the insect swarm in Example 3 provided in the embodiments of this application;

[0069] Figure 13 This is a schematic diagram of the breaking effect of Example 3 provided in the embodiments of this application;

[0070] Figure 14 This is a schematic diagram of the breaking effect of Example 3 provided in the embodiments of this application;

[0071] Figure 15 This is a flowchart of the method for displaying the breaking effect in Example 3 provided in the embodiments of this application;

[0072] Figure 16 This application provides a schematic diagram of the structure of a display device for a breaking effect;

[0073] Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

[0074] Figure 18 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0076] It is understood that the terms "first," "second," etc., used in this application may be used to describe various concepts herein, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first notification message may be referred to as a second notification message, and similarly, a second notification message may be referred to as a first notification message.

[0077] Here, "at least two" refers to two or more messages. For example, "at least two messages" can be any integer number of messages greater than or equal to two, such as two messages, three messages, etc. "Each" refers to each of the "at least two" messages. For example, "each message" refers to each of the "at least two" messages. If the "at least two" messages are three messages, then "each message" refers to each of the three messages.

[0078] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals (including but not limited to signals transmitted between user terminals and other devices) involved in this application have all been fully authorized by the user or relevant parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0079] Figure 1 A structural block diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system includes: a first computer device 101, a server 102, and a second computer device 103.

[0080] The first computer device 101 has a client installed and running that supports a virtual environment. This client can be a multiplayer online interactive program or a single-player program. When the first computer device runs the client 111, the client's user interface is displayed on the screen of the first computer device 101. This client can be any one of the following: Virtual Reality (VR) application, Augmented Reality (AR) program, 3D mapping program, Virtual Reality game, Augmented Reality game, First-Person Shooting Game (FPS), Third-Person Shooting Game (TPS), Multiplayer Online Battle Arena Games (MOBA), or Simulation Game (SLG). In this embodiment, an FPS game is used as an example. The first computer device 101 is a computer device used by a first user. The first user uses the first computer device 101 to control a first virtual character located in the virtual environment to perform activities. The first virtual character can be referred to as the first user's virtual character. The activities of the first virtual character include, but are not limited to, at least one of the following: moving, jumping, teleporting, releasing skills, using items, adjusting body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the first virtual character is a realistic or anime character.

[0081] The second computer device 103 has a client installed and running that supports a virtual environment. This client can be a multiplayer online battle program or a single-player program, and its implementation is similar to that of the client on the first computer device, so it will not be described in detail here. The second computer device 103 is the computer device used by the second user. The second user uses the second computer device 103 to control a second virtual character located in the virtual environment to perform activities. The second virtual character can be referred to as the second user's virtual character. Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character can belong to the same faction, the same team, the same organization, have a friend relationship, or have temporary communication permissions. Optionally, the first virtual character and the second virtual character can belong to different factions, different teams, different organizations, or have an adversarial relationship.

[0082] Optionally, the clients installed on the first computer device 101 and the second computer device 103 are the same, or the clients installed on the two computer devices are the same type of client on different operating system platforms (Android or iOS). The first computer device 101 can refer to one of a plurality of computer devices, and the second computer device 103 can refer to another of a plurality of computer devices. This embodiment only uses the first computer device 101 and the second computer device 103 as examples. The device types of the first computer device 101 and the second computer device 103 may be the same or different, and these device types include at least one of: smartphones, tablets, e-book readers, MP3 players, MP4 players, laptops, and desktop computers.

[0083] Figure 1 Only two computer devices are shown in the illustration, but in different embodiments, multiple other computer devices can access server 102. Optionally, one or more computer devices may also be corresponding to the developer, with a client development and editing platform supporting a virtual environment installed on computer device 140. The developer can edit and update the client on the computer device and transmit the updated client installation package to server 102 via wired or wireless network. The first computer device 101 and the second computer device 103 can download the client installation package from server 102 to update the client.

[0084] The first computer device 101, the second computer device 103, and other computer devices are connected to the server 102 via a wireless network or a wired network.

[0085] Server 102 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 102 is used to provide backend services for clients supporting a three-dimensional virtual environment. Optionally, server 102 undertakes the primary computing work, and computer equipment undertakes secondary computing work; or, server 102 undertakes secondary computing work, and computer equipment undertakes primary computing work; or, server 102 and computer equipment use a distributed computing architecture for collaborative computing.

[0086] In an illustrative example, server 102 includes a processor, a user account database, an interactive service module, and a user-facing input / output interface (I / O interface). The processor loads instructions stored in the server and processes data from the user account database and the interactive service module. The user account database stores data about user accounts used by the first computer device 101, the second computer device 103, and other computer devices, such as user account avatars, nicknames, combat power indices, and the service area where the user account is located. The interactive service module provides multiple virtual spaces for user interaction. The user-facing I / O interface establishes communication and exchanges data with the first computer device 101 and / or the second computer device 103 via a wireless or wired network.

[0087] For example, the method for displaying the breaking effect provided in this application embodiment is described with the execution subject of each step being a computer device. A computer device refers to an electronic device with data computing, processing and storage capabilities, such as any terminal in the above implementation environment.

[0088] The above briefly describes the implementation environment corresponding to this application embodiment. In any virtual environment-based display, the display of breaking effects for virtual objects may be involved. Realistic breaking effects can greatly enhance visual impact and immersion. However, traditional breaking effects usually rely on complex physical simulations, which not only involve high computational demands and affect system performance, but also make it difficult to achieve artistic breaking effects. Related technical solutions include:

[0089] (1) Fracture simulation based on rigid body physics

[0090] This method uses a rigid body physics engine to simulate the physical behavior of virtual objects breaking. The virtual object is divided into multiple fragments, each of which is simulated as an independent rigid body. This method can achieve highly realistic physical effects, with the movement trajectory and collision behavior of the fragments conforming to the laws of physics. However, in practice, rigid body physics simulation of breaking objects is computationally intensive, especially when there are many fragments and complex collisions, which can easily lead to performance bottlenecks. In addition, rigid body physics simulation makes it difficult to achieve artistic effects, as the shape and trajectory of the fragments are relatively fixed.

[0091] (2) Pre-calculation of crushing effect

[0092] This method pre-calculates the breaking effects of virtual objects during the development phase and stores them as animations or preset particle systems. The pre-calculated breaking effects are then played directly at runtime. This method has low computational cost and high runtime performance, making it suitable for use on devices with limited performance. However, pre-calculated breaking effects lack flexibility; the effects are fixed and cannot be dynamically adjusted based on the real-time physical environment and interactions, making it difficult to achieve highly interactive effects. Therefore, it is only suitable for specific scenes and virtual objects and is difficult to widely apply in complex and ever-changing virtual environments.

[0093] To address the aforementioned technical problems, this application provides a method for displaying a breaking effect. When a breaking event occurs targeting a virtual object, a computer device, based on a particle system, renders multiple fragments of the virtual object and controls the movement of these fragments based on the breaking event. By using the particle system to control the movement of the fragments based on the actual situation of the breaking event, the movement of fragments simulates the movement of fragments when an object breaks, avoiding complex physical calculations. This significantly improves computational efficiency, reduces system resource consumption, and ensures a smooth experience even under high load. Simultaneously, the flexibility of the particle system allows developers to easily adjust the type of fragments, such as their shape and color, to achieve artistic breaking effects, enhancing the visual experience and interactivity of the game. This application has broad application prospects in modern computer graphics, game development, virtual reality, and film special effects, and can significantly improve visual effects and user experience.

[0094] A target virtual object refers to any virtual object displayed in a virtual environment. This virtual object can be in a moving or stationary state. It can be of any type, such as virtual props (e.g., virtual cars or tools), virtual buildings (e.g., doors or buildings), virtual geographical elements (e.g., mountains, water bodies, trees), virtual avatars (e.g., animal or human figures), etc. This application does not limit the specific type of virtual object. The target virtual object can be displayed in the virtual environment or, based on augmented reality technology, in a captured image.

[0095] The aforementioned virtual environment refers to a two-dimensional or three-dimensional display space, which is a virtual environment supported by applications running on a computer device. This virtual environment can contain three-dimensional models of virtual objects, allowing for rendering based on these models during the display process. Users can control the virtual objects to move within the virtual environment through various operations to achieve interaction. These activities include, but are not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking other virtual objects, throwing, and changing position.

[0096] Currently, the same display effect is usually used for computer devices with different processing capabilities, which makes it impossible to personalize the display. For some computer devices with weaker processing capabilities, it will also affect the normal operation of other functions and cause performance degradation. Therefore, this application also provides a way to personalize the crushing effect based on the different capabilities of computer devices without affecting performance.

[0097] To address the aforementioned issues, in response to a fragmentation event of the target virtual object, a particle system is used to render the target virtual object into multiple fragments corresponding to the processing power of a computer device. Here, "correspondence" can refer to the number of rendered fragments matching the processing power of the computer device. In some embodiments, this correspondence can also refer to the type of rendered fragments matching the processing power of the computer device, where fragment type can refer to at least one of the fragment's size and shape. The principle of this correspondence can be that the computing resources consumed by rendering the fragments do not affect the normal operation of the computer device. Therefore, a correspondence can be established between processing power and at least one of the number and type of fragments. Thus, when determining the processing power of the computer device, at least one of the number and type of fragments to be rendered is determined based on that processing power, thereby achieving personalized fragmentation effects while ensuring device performance.

[0098] The aforementioned processing capacity can be expressed as the model of the computer device or the model of the computer device's processor, etc. The processing capacity can also refer to the amount of remaining computing resources of the computer device to reflect the current processing capacity of the computer device. This application embodiment does not limit this.

[0099] When rendering fragments of a target virtual object using a particle system, multiple particles are emitted from the system, each representing a fragment of the target virtual object. The particle system can store a correspondence between processing power and the number and type of particles (including at least one of size and shape). This allows the system to determine the number or type of particles to be rendered based on this correspondence after determining the processing power of the computer device. Accordingly, during rendering, in response to a fragmentation event of the target virtual object, the particle system renders the target virtual object as multiple particles corresponding to the processing power of the computer device. It should be noted that attributes such as the number and type of particles can affect the computational resources used during rendering and also affect rendering time. For example, more particles may require more computational resources, while fewer particles may require fewer. Therefore, determining at least one attribute of the number and type of particles corresponding to the processing power of the computer device allows for dynamic adjustment of the particle number and type, balancing visual effects and performance. For example, the number of particles can be increased on high-performance devices to provide a more detailed crushing effect, while the number of particles can be reduced on low-performance devices to display the crushing effect without affecting device performance. This achieves reasonable performance optimization and resource management, enabling the embodiments of this application to achieve efficient crushing effects on various devices and has broad application prospects. Furthermore, the flexibility of the particle system in the embodiments of this application allows developers to easily adjust the type of particles, such as shape and color, to achieve diverse crushing effects.

[0100] The technical implementation process of the above-mentioned crushing effect is explained below. (See attached text.) Figure 2 ,Should Figure 2 A flowchart is provided for a particle system to achieve a breaking effect.

[0101] See Figure 2 During the development phase, to achieve the shattering effect, a fragment model of the target virtual object needs to be pre-created. This fragment model is a digital representation of the individual parts of a broken virtual object. It describes the geometry, physical properties, material texture, and spatial position and motion of each fragment, thus presenting a realistic shattering effect. See [link to relevant documentation]. Figure 3Image (a) shows a cylinder, while image (b) shows its fragmented form, where the cylinder has broken into multiple fragments. This fragmented form can be pre-created using asset creation tools, such as cutting a virtual object model into fragments. These tools include fragmentation tools built into game engines, such as the Fracture Tool in Unreal Engine, or game modeling tools like those in 3D Max or Maya. Understandably, the fragmented form uses the aforementioned information to define the breaking method—that is, how the virtual object breaks. For example, it might shatter completely upon impact, or only shatter within the area corresponding to the hit point, or the fragments might move in a divergent or falling manner, thus presenting different breaking effects.

[0102] The fragment model stores the correspondence between particles and their various parts. It records the specific source part of each particle within the fragment model, which can be represented as a correspondence between a particle and a certain positional information on the fragment model. This mapping table ensures that each particle corresponds to a specific part of the fragment model. During rendering, the particle system can accurately represent the shape and structure of each part of the fragment model, avoiding chaotic particle distribution or model deformation. In some embodiments, the mapping table between particles and the fragment model of the target virtual object stored in the particle system can include multiple levels of mapping tables. Different levels of mapping tables correspond to different processing capabilities, indicating attributes such as the number and type of particles under that processing capability, as well as the correspondence between particles and their parts on the fragment model. This allows for personalized fragmentation effects without affecting computer performance.

[0103] During the initialization phase of the particle system, the fragment model of the pre-made target virtual object is imported into the particle system to prepare for the subsequent fragmentation effect.

[0104] During the operation phase of the particle system, the particle system learns about breakage events targeting virtual objects by listening. A breakage event refers to an event that causes the virtual object to break. This breakage event can be an interaction event targeting the virtual object, such as a collision event, an attack event, or a movement event occurring within the display range of the breakage effect. This embodiment of the application does not limit this to any particular event.

[0105] In response to a detected fragmentation event, the particle system initializes multiple particles of the target virtual object based on a mapping table between particles and fragment models. Each particle represents a fragment of the target virtual object. During this initialization process, multiple parameters for each particle can be initialized based on the fragment model. These parameters include the particle's corresponding fragment model index (Mesh Index), motion parameters, physical parameters, and lifespan. The fragment model index indicates the particle's position on the fragment model; motion parameters indicate the particle's movement; physical parameters represent the particle's physical properties, such as mass and collision radius; and the lifespan is the duration of the particle's life from appearance to disappearance. The motion parameters include position, velocity, rotation, and angular velocity. These motion parameters can be determined based on a physics engine or simple physics rules to simulate the possible movements of the fragments.

[0106] The particle's velocity needs to take into account its mass and the effects of gravity. Accordingly, the velocity of a particle under the influence of gravity can be achieved using the following formula:

[0107] Formula 1: NewVelocity=Gravity*DeltaTime+Velocity

[0108] Where Gravity is -9.8 m / s or can be user-defined; DeltaTime is the simulation time interval; Velocity is the particle's velocity in the i-th frame; NewVelocity is the particle's velocity in the (i+1)-th frame; and i is a positive integer.

[0109] The simulation time interval refers to the rendering time interval, that is, the rendering time interval between two frames. For example, for the same particle, the simulation time interval is the interval between the i-th frame and the (i+1)-th frame.

[0110] For example, when a user attacks a monster displayed in a virtual environment and hits the monster's torso, the particle system can detect the attack event (i.e., detect the breakage event). It then obtains the mapping table corresponding to the monster, which indicates the mapping relationship between particles and the monster's fragment model. Based on each fragment in the fragment model in the mapping table, it initializes particles for each fragment so that the monster's breakage effect can be presented based on the particles later.

[0111] When initializing motion parameters, a physics simulation can be used. This involves employing a physics engine or simple physical equations to simulate particle motion, considering gravity and collisions to ensure the motion conforms to physical laws. The aforementioned mapping table helps determine the forces and motion states of each particle. For example, based on the physical properties (such as mass and density) at different locations on the fragment model, corresponding physical parameters are assigned to the relevant particles. Therefore, when initializing motion parameters, the initialized particle motion is affected by physical factors such as gravity, drag, and collision reactions, making the simulation more realistic. Furthermore, since the simulation uses simple physical equations without complex rigid body physics calculations, computational efficiency is improved, system resource consumption is reduced, and a smooth experience is maintained even under high loads.

[0112] In some embodiments, when initializing multiple particles, event information of a breakage event is also used to represent the breakage event. This event information may include the location of the breakage event, the direction of movement of the breakage event, the velocity of the breakage event, etc. The location of the breakage event can be used to determine the local area of ​​the target virtual object affected by the breakage event; the direction of movement of the event can be used to determine the direction of particle movement, etc.; the velocity of the breakage event, etc., is used to determine the movement mode of the particles, etc. This application embodiment does not limit this aspect. Accordingly, by combining the above-mentioned event information of the breakage event and the physical parameters of the particles, a more realistic breakage effect can be simulated.

[0113] For example, for a higher-level virtual object, its punching speed is faster, so the speed of the breaking event is greater. Therefore, when calculating the particle motion parameters, the speed of the virtual object's punch can be combined to initialize its motion parameters, so that the speed of its particles is greater than the particle speed caused by the punch of a lower-level virtual object, thus achieving a more impactful breaking effect.

[0114] For example, if a virtual object is hit, the force of the breaking event is relatively large. Therefore, when calculating the particle's motion parameters, the force of the virtual object's punch can be combined to initialize its motion parameters, so that the particle's speed is greater than the particle speed caused by a lower-level virtual object's punch, thus achieving a more impactful breaking effect.

[0115] For example, the location of a breaking event can influence which part of the fragments is initialized. That is, based on the location of the breaking event, the motion parameters of some fragments among the multiple fragments corresponding to the target virtual object are determined. These fragments are located within the area corresponding to the breaking event location. Based on the motion parameters of these fragments, their movement is controlled. Taking particle initialization as an example, if a virtual object hits the body of the target virtual object, the breaking event occurs at the body of the target virtual object. Therefore, based on the location of the breaking event on the fragment model, particles at the corresponding location or within the area centered on that location can be initialized, without initializing the particles of the entire target virtual object, thus demonstrating the effect of partial breaking of the target virtual object.

[0116] For example, for a virtual object, the direction of motion of its breaking event can determine the direction of particle movement. For instance, if its punch is an upward hook, the direction of motion of the breaking event is upward. Therefore, when initializing particles, their movement direction is either the same as the direction of motion or diverges along that direction to achieve a more realistic simulation. The relationship between the particle's movement direction and the direction of motion of the breaking event can be determined based on the breaking method defined by the fragmentation model. For example, if the breaking method is an explosion, some particles can move in the same direction as the breaking event, while other particles can move in directions diverging from the breaking event.

[0117] During the rendering phase, the particle system initializes multiple particles based on the fragment model. Then, it renders these particles in the virtual environment using the initialized parameters. This controls the particles to move in a specific shape and according to the trajectory of the fragments at their corresponding positions in the fragment model, thus creating the broken effect of the target virtual object. It should be noted that this particle system can use graphics APIs (such as OpenGL, DirectX, or WebGL) to render each particle. Depending on the particle type, it can render particles as points, sprites, or simple geometric shapes.

[0118] During initialization, the particle lifecycle is also initialized, which is the duration from a particle's display to its disappearance. When a particle exceeds its lifecycle or leaves the field of view, it is destroyed, meaning it is removed from the particle system to save computational resources. In implementation, each particle updates its age every frame. When a particle's age exceeds the set lifecycle value, the particle system destroys the particle. Additionally, users can customize particle destruction conditions; for example, a particle can be destroyed if it is not rendered or leaves the target area (such as the field of view). Based on this lifecycle setting, a richer, more layered fragmentation effect can be produced when rendering on a particle-by-particle basis. From the perspective of fragments, the above process can be understood as initializing the lifecycles of multiple fragments. When the display duration of any fragment reaches its corresponding lifecycle, the fragment is destroyed; or, when any fragment fails to render, the fragment is destroyed. By limiting the timing of fragment destruction, computational resources can be automatically released at the appropriate time to improve processing performance.

[0119] In some embodiments, the particle trajectory can be dynamically adjusted according to the real-time environment, enhancing interactivity and artistic expression. That is, element information of environmental elements in the virtual environment can be obtained, and particles can be initialized based on this information. For example, when environmental elements include weather information, the particle's motion parameters can be calculated by combining this information. For instance, if the environmental element is wind, the force acting on the particle can be calculated based on the wind level and the particle's physical parameters. In this case, the particle is affected by the wind, thus making its trajectory more reflective of the actual environment in the virtual scene.

[0120] When calculating particle velocity based on the influence of wind, wind force can be considered as resistance, and the particle velocity affected by wind can be calculated based on the wind force and the particle's mass. The particle velocity calculation based on resistance can be referenced in Formula 2 below:

[0121] Formula 2: NewVelocity=Velocity / (Drag*DeltaTime / Mass+1),

[0122] Here, Drag is the drag force, which can be defined by the user; DeltaTime is the simulation time interval; Mass is the particle mass; Velocity is the particle velocity; and NewVelocity is the updated particle velocity.

[0123] In some embodiments, if the particle motion parameters are calculated in real time based on wind force, Velocity is the particle's velocity in frame i, and NewVelocity is the particle's velocity in frame i+1, where i is a positive integer, so that the influence of wind force on particle velocity can be reflected in the next frame when the particle begins to be affected by wind force. In some embodiments, if the particle motion parameters are calculated based on wind force during initialization, Velocity is the particle's velocity considering only gravity and not wind force, and NewVelocity is the particle's velocity considering both gravity and wind force.

[0124] It should be noted that the particle velocity determination mentioned above is essentially the process of determining the velocity of fragments of the target virtual object. That is, during initialization, the physical parameters of the fragments corresponding to the target virtual object can be determined, such as mass and material. Then, the resistance is determined based on the type of environmental element. For example, when the environmental element is wind, the resistance is determined based on the wind level. Furthermore, the movement speed of the fragments is determined based on the resistance, the physical parameters of the fragments, and the simulation time interval (such as the particle simulation time interval). The simulation time interval refers to the rendering time interval between two frames.

[0125] Furthermore, when fragments collide with obstacles in the virtual environment, it affects the position and velocity of the fragments. When the environmental element includes obstacles in the virtual environment, the velocity of the fragment after colliding with the obstacle can be calculated based on the fragment's velocity in the frame where the collision occurs, the penetration distance of the fragment when colliding with the obstacle, the fragment's collision radius, and the simulation time interval. This allows for adjustment of the particle's trajectory to better conform to the structure within the virtual environment. The calculation for fragments is essentially the calculation for particles; correspondingly, the calculation method based on the collision's position and velocity can be referenced in Formulas 3 and 4 below:

[0126] Formula 3: NewPosition=Position+CollsionNormal*(CollisionPenetrationDistance+CollisionRadius);

[0127] Formula 4: NewVelocity=Velocity+(NewPosition–Position) / DeltaTime;

[0128] Where Position is the particle's position in frame i, NewPosition is the particle's position in frame i+1, CollsionNormal is the normal at the point where the particle collides with the obstacle; CollisionPenetrationDistance is the distance the particle penetrates the obstacle during the collision; CollsionRadius is the particle's collision radius; Velocity is the particle's velocity in frame i, NewVelocity is the particle's velocity in frame i+1, DeltaTime is the simulation time interval, and i is a positive integer.

[0129] Using formulas three and four above, the velocity of the particle after the collision can be calculated, thus accurately reflecting the collision and its effects in the particle's trajectory.

[0130] Additionally, it should be noted that in the embodiments of this application, a collision radius is set for the particles when determining the collision reaction, that is, the particles are regarded as circles. The number of collisions can be reduced in a round way, which coarses the granularity of the calculation and can also reduce the amount of calculation accordingly.

[0131] The above process is an implementation method for initializing particles based on the element information of environmental elements. After the particles are initialized, the environmental elements may change. Accordingly, in some embodiments, the motion parameters of the particles can be calculated in real time based on the changes in the element information, thereby reflecting the changes in the motion of the fragments after the environmental changes.

[0132] In some embodiments, when movement is based on environmental elements, the motion parameters of particles can also be calculated by combining event information from the breaking event, thereby controlling the movement of multiple fragments corresponding to the target virtual object based on the breaking event and the element information of the environmental elements. For a given particle, it is affected not only by gravity and environmental elements, but also by the breaking event. Therefore, by considering the above multiple influences to initialize the particle or by calculating the particle's motion parameters in real time during the particle's movement, the breaking effect can be made more consistent with the real environment, improving the realism of the breaking effect simulation.

[0133] It should be noted that for particle systems, after detecting a breakage event, the motion parameters of the particles throughout their entire lifecycle can be initialized during particle initialization. Alternatively, the motion parameters of the particles can be calculated step by step based on the rendering progress. For example, for a particle with a lifecycle of T, the motion parameters of the particle in time period t1 are initialized first, and then the motion parameters of the particle in time period t2 are calculated based on the motion parameters of the particle in time period t1 during rendering, and so on. This real-time rendering method can reduce the computational burden on computer equipment and improve the performance of computer equipment.

[0134] In some embodiments, different event types of breaking events correspond to different breaking methods, with the breaking method indicating the movement of fragments. In the particle system, the breaking method is represented by a fragment model. Accordingly, different fragment models are configured for different breaking event types. When initializing particles, initialization can be based on the fragment model corresponding to the event type of the breaking event to achieve a more personalized breaking effect. For example, if the event type of the breaking event is an explosion, the breaking method represented by its fragment model could be multiple fragments displayed in the form of an explosion. If the event type of the breaking event is an attack behavior, the breaking method indicated by its fragment model could be that some fragments move to dodge the attack behavior. If the event type of the breaking event is a virtual object moving within a target virtual object, the breaking method indicated by its fragment model could be that some fragments move to avoid colliding with the virtual object, and so on. This application embodiment does not limit this. By configuring different breaking methods, i.e. fragment movement methods, for different event types, a single breaking effect can be avoided, improving interactivity.

[0135] Taking one type of fragmentation as an example, this fragmentation method is used to display a target virtual object as traversable based on the movement of fragments. That is, the computer device controls at least some fragments corresponding to the target virtual object to move based on a fragmentation event, so as to display the target virtual object as traversable. This fragmentation method can be implemented in any of the following forms.

[0136] Fragmentation Method 1: The computer device can initialize all the particles of the target virtual object, render all the particles of the fragments move according to their respective trajectories, so as to change the overall shape of the target virtual object and form a passable channel in the target virtual object, thereby presenting the target virtual object as a passable state.

[0137] Fragmentation Method 2: The computer device can initialize the particles of all the fragments of the target virtual object, render the particles of a portion of the fragments to disperse according to their respective motion trajectories, and keep the particles of the other portion of the fragments corresponding to the target virtual object stationary, so as to change part of the shape of the target virtual object and form a passable channel in the target virtual object, thereby presenting the target virtual object as a passable state.

[0138] Fragmentation Method 3: The computer device can initialize the particles of some fragments of the target virtual object, render the particles of that fragment to disperse according to their respective motion trajectories, and keep the corresponding other part of the target virtual object unchanged, so as to change part of the shape of the target virtual object and form a passable channel in the target virtual object, thereby presenting the target virtual object as a passable state.

[0139] This application does not limit the specific fragmentation method used. However, considering the performance of the computer device, the computer can determine the fragmentation model based on its current processing power, thereby selecting the fragmentation method. For computers with higher processing power, to achieve a more impactful display effect, the fragmentation model corresponding to fragmentation method 2 or fragmentation method 1 can be selected. For computers with lower processing power, the fragmentation model corresponding to fragmentation method 3 can be selected, thereby reducing the number of particles to be rendered and reducing the consumption of computing resources.

[0140] To more intuitively illustrate the above-mentioned method for displaying virtual objects based on particle systems, let's take a game scene as an example. In this game scene, a target virtual object is displayed. This target virtual object can undergo a non-pre-designed breaking effect after a breaking event, such as a collision. This causes the object that originally hindered movement to shatter into fragments that do not obstruct movement. This makes the player's destruction experience in the game more realistic and vivid, enriches the explorable content, and eliminates the need for customized scene destruction effects. It also eliminates the need to create a large number of highly similar destruction animations, thus significantly reducing production costs. Several possible implementation methods are described below with reference to the accompanying drawings.

[0141] Example 1

[0142] See Figure 4 The game scene displays impassable obstacles, and see... Figure 5 If a virtual object attacks an obstacle, hits the obstacle, and causes the obstacle to break, then in the case of being attacked, see [the relevant section]. Figure 6 This involves altering the overall shape of an obstacle to break it apart and create a passable passage; this breaking method is what was previously described as breaking method 1. Its implementation process includes, for example... Figure 7 The method flow shown is as follows:

[0143] 701. A computer device displays obstacles in a game scene, wherein the obstacle can be any type of virtual object, and its motion state can be either stationary or moving.

[0144] 702. In response to a virtual object launching an attack on an obstacle in the game scene, the computer device displays that the obstacle has been hit.

[0145] The act of attacking and hitting is the breaking event involved in the embodiments of this application. The event information of the breaking event, such as the hit location and the speed of the breaking event, can affect the parameters of subsequent particle initialization.

[0146] 703. The particle system of the computer device detects the hit event, calls the fragment model of the obstacle, initializes the particles of all fragments of the obstacle based on the fragment model, and obtains various parameters of multiple particles.

[0147] The parameters obtained during initialization include: the mesh index corresponding to the particle, the particle's motion parameters, the particle's physical parameters, and the particle's lifespan.

[0148] In some embodiments, when invoking the fragmentation model, a fragmentation model corresponding to the processing power of the computer device, i.e., a mapping table, can be invoked to determine the relationship between particles and fragments, as well as the initial number of particles, particle types, etc. Specifically, stronger processing power corresponds to a larger number of particles, and weaker processing power corresponds to a smaller number of particles. Furthermore, stronger processing power results in more complex particle types, while weaker processing power results in simpler particle types. It should be noted that the complexity and simplicity of the types can be determined by referring to the computational resources required to render the particles. A type being more complex than another means that rendering that type of particle requires more computational resources than the other type.

[0149] Once the number and type of particles are determined, the physical parameters of the particles can be initialized based on the particle type. When initializing motion parameters, the particle's physical parameters can be referenced. Optionally, in addition to referencing the particle's physical parameters, at least one of the following can be referenced: environmental elements in the game scene and event information from the fragmentation event, to determine the particle's trajectory. The particle's lifespan can be determined based on the shape of the fragment in the fragmentation model. For example, in the fragmentation model, if the fragment corresponding to a particle falls to the ground and disappears after a preset display time, then when initializing motion parameters, its trajectory is initialized to fall to the ground from the particle's initial display position, and its lifespan is initialized to the aforementioned preset time.

[0150] In Example 1, after initializing the number of particles, when initializing the motion parameters for each particle, the motion trajectory of each particle can be initialized according to the way defined in the fragment model, where each particle disperses outward from the hit position as the center. The lifecycle of each particle can be initialized to the same lifecycle; that is, after a certain period of time following a hit, the particle system destroys all particles of the target virtual object, thus restoring the original state of the target virtual object in the game scene. From the user's perspective, this means that after hitting the target virtual object, the target virtual object temporarily shatters, forming a traversable passage, and then returns to its original state after a certain period.

[0151] 704. The computer device renders based on the parameters of multiple particles to show the debris of an obstacle scattering to form a passable passage.

[0152] Figure 6 The breaking effect shown in Figure (a) can be understood as an intermediate state between the obstacle being hit and the formation of a passable passage. At this point, the obstacle has broken into multiple fragments, and these fragments are shown to be moving in a divergent manner according to their respective trajectories based on the hit position. Ultimately, the overall shape of the obstacle will change, forming a passable passage as shown in Figure (b) within the deformed obstacle.

[0153] In this embodiment, the attack on an obstacle is used as an example of a breaking event. However, in some embodiments, interactions with obstacles, such as collisions, can also be considered breaking events. To achieve diversified displays, when a first breaking event occurs, the obstacle is displayed as breaking and forming a traversable passage. The first breaking event refers to passing through the obstacle. When a second breaking event occurs, the obstacle is displayed as breaking but no traversable passage is formed. The second breaking event refers to a collision with the obstacle without passing through it. For example, if a user controls a virtual object to rush towards an obstacle, causing it to break, and the user continues to control the virtual object to rush into the obstacle, the breaking effect further develops into the formation of a traversable passage. Alternatively, if a user controls a virtual object to rush towards an obstacle, causing it to break, and the user continues to control the virtual object to retreat, the obstacle can be restored to its original state. By personalizing the display of breaking effects based on different breaking events, a richer interactive experience can be provided.

[0154] The above example uses the target virtual object as an obstacle for illustration. However, any element in a virtual scene, such as a vase, sculpture, or furniture, can also change the display of the game scene when it is attacked.

[0155] If the fragmentation model defines fragmentation mode 2 as described above, then during initialization, all particles of the obstacle can be initialized. However, the motion parameters of some particles are initialized to their corresponding trajectories to render the fragmentation effect of particles scattering, while the remaining particles are initialized to a static state. This results in a partial change in the shape of the obstacle, with the scattered particles forming a passable passage within the obstacle, thus making the obstacle appear passable. Compared to the case where all particles move, this process reduces the consumption of computing resources, thereby improving the performance of computer equipment.

[0156] It should be noted that Example 1 above illustrates the scenario where a wall completely breaks down and gradually forms a passable passage. In other scenarios, a portion of a virtual object, rather than the entire object, can be destroyed, causing individual components to disappear without affecting other parts of the body. For example, when a monster's arm is attacked, the debris composing the arm is destroyed and disappears, but other parts of the body remain unaffected. The monster's incomplete body can affect its attack capabilities; for instance, if the arm is destroyed by the player, the monster cannot perform punches or similar attacks. Correspondingly, the breaking effect of a virtual object can also include partial breaking effects. That is, based on the location of the attack, the area corresponding to that location is displayed as broken, providing a personalized breaking effect. This type of breaking effect can correspond to breaking methods 2 and 3 mentioned above. Example 2 below illustrates this by initializing only the particles corresponding to a portion of the fragments.

[0157] Example 2

[0158] See Figure 8 The game scene displays virtual interactive objects, such as the monster mentioned above, and see... Figure 9 If a virtual object attacks a monster and hits its arm, causing the arm to break, then in the event of an attack, see [the relevant section]. Figure 10 The monster's arm is broken, but the rest of the body remains unchanged, altering part of the monster's shape to make the arm passable. The process includes, for example: Figure 11 The method flow shown is as follows:

[0159] 1101. Display monsters in the game scene.

[0160] 1102. In response to a virtual object launching an attack against a monster in the game scene, display the arm that hits the monster.

[0161] The act of attacking and hitting is the breaking event involved in the embodiments of this application. The event information of the breaking event, such as the hit location and the speed of the breaking event, can affect the parameters of subsequent particle initialization.

[0162] 1103. The particle system of the computer device detects the hit event, calls the fragment model of the monster, initializes the particles corresponding to some fragments of the monster based on the fragment model of the monster, and obtains various parameters of multiple particles.

[0163] The parameters obtained during initialization include: the mesh index corresponding to the particle, the particle's motion parameters, the particle's physical parameters, and the particle's lifespan.

[0164] The particles corresponding to the initialized fragments can be determined based on the hit location. In this embodiment, the hit part is the monster's arm, so the particles corresponding to the arm part in the fragment model will be initialized during initialization.

[0165] 1104. The computer equipment renders based on the parameters of multiple particles to show the fragments of the monster's arm scattering to form a passable passage.

[0166] Figure 10 The shattering effect shown can be understood as an intermediate state between the monster's arm being hit and the formation of a passable passage. At this point, the monster's arm has shattered into multiple fragments, and these fragments move in a divergent manner according to their respective trajectories. Ultimately, this will result in some parts of the monster's shape changing while the rest of its shape remains unchanged, and a passable passage being formed in the deformed arm.

[0167] The above example uses the target virtual object as a monster for illustration. However, any element in a virtual scene, such as a vase, sculpture, or furniture, can also change the display of the game scene when it is attacked.

[0168] The above methods can be applied to any gameplay style. For example, in combat gameplay, you can create holes in giant monsters and pass through them. When a monster attacks the player, its arms become passable, preventing it from attacking. They can also be applied to map exploration and puzzle-solving gameplay, creating holes in seemingly impassable walls, floors, and ceilings to gain views, passageways, and connect previously disconnected spaces, thereby enhancing the user's interactive experience within the scene.

[0169] It should be noted that Examples 1 and 2 above illustrate the formation of a traversable passage within a virtual object that was originally a single individual. In other scenarios, the target virtual object can be a cluster of multiple individuals, creating an impassable state. This application also provides a display of fragmentation for such target virtual objects. When a fragmentation event occurs, the movement trajectories of individual particles within the target virtual object are altered, changing it from an impassable to a traversable state. Visually, the density or movement trajectory of the clustered objects changes with the fragmentation event, and the scene's display is altered by the player's movement within the game. For example, the target virtual object can be a special weather effect, a cluster of creatures, or a skill effect. Special weather effects can refer to obstructive weather such as sandstorms or fog, clustered creatures can be animal groups, and skill effects can refer to obstacles triggered by a skill. This will be explained in Example 3 below.

[0170] Example 3

[0171] See Figure 12 The game scene displays clusters of virtual target objects, such as the aforementioned swarm of insects, and see... Figure 13 This demonstrates a fragmentation effect in the swarm caused by the movement of virtual objects within it. See [link / reference]. Figure 14 Figures (a) and (b) illustrate the movement of the swarm based on virtual objects, showing a spreading effect to create a traversable state. Figure (a) shows a planar effect, while Figure (b) shows a near-three-dimensional effect; that is, the swarm is displayed in a three-dimensional space, and this traversable state can be seen as virtual objects moving through the swarm in three-dimensional space. The implementation process includes, for example: Figure 15 The method flow shown is as follows:

[0172] 1501. Display the insect swarm in the game scene.

[0173] In this context, "swarm" corresponds to "swarm model." Computer devices render the swarm based on the swarm model. The rendering is a holistic rendering of the swarm model, rather than individual rendering of the individuals within the swarm. Individuals within the swarm do not need to be modeled separately.

[0174] 1502. Virtual objects move within the swarm.

[0175] This movement behavior is the breaking event involved in the embodiments of this application. The event information of the breaking event, such as the speed of movement, can affect the parameters of subsequent particle initialization.

[0176] 1503. The particle system of the computer device detects the movement event, calls the fragmentation model of the swarm, initializes the particles of the swarm based on the fragmentation model of the swarm, and obtains various parameters of multiple particles.

[0177] In some embodiments, if the virtual object is equipped with a virtual prop corresponding to the swarm of insects, step 1503 is executed to achieve the shattering effect. The virtual prop has a function of restraining the swarm of insects. For example, for the swarm of insects, it could be an insect repellent; for the weather effect, it could be a prop corresponding to the weather effect, to protect the virtual object, thereby increasing the virtual object's willingness to interact and causing the virtual object to actively interact to obtain the virtual prop, thus enhancing the interaction within the scene.

[0178] Each particle corresponds to an individual within the swarm, and its shape can be the shape of the individual within the swarm. Accordingly, the initialization parameters include: the particle's mesh index, the particle's motion parameters, the particle's physical parameters, and the particle's lifespan.

[0179] 1504. Computer devices render based on the parameters of multiple particles to show the swarm of insects spreading out as virtual objects move to form traversable passages.

[0180] Figure 14 The fragmentation effect shown can be understood as individuals within the swarm scattering to avoid the movement of virtual objects. At this point, part or all of the swarm's shape changes to create traversable passages. Partial changes in the swarm's shape could mean that the movement trajectories of some individuals change while the rest remain in their original state, creating an uneven density and clearing passages. Conversely, a change in the overall swarm's shape could mean that the movement trajectories of all individuals in the swarm change, creating traversable passages for the virtual objects.

[0181] The above example uses a swarm of insects as the target virtual object for illustration. The same breaking effect can be achieved for other clustered target virtual objects. By using a particle system to represent the individuals in the clustered target virtual objects in the form of particles, the clustered target virtual objects can present a breaking effect when a breaking event occurs, thereby changing the scene display, providing a traversable passage for virtual objects, and greatly improving the scene display effect.

[0182] It should be noted that the particle system can control the display and destruction of particles through their lifecycle. Accordingly, it can restore the target virtual object to its original state after a shattering effect is displayed, making the display within the scene more diverse and providing more interactive experiences. In some embodiments, the target virtual object may not be restored to its original state after shattering, but may disappear completely. It may also be recombined into other forms of virtual objects based on a preset model, that is, recombined from a fragmented state into another type of virtual object, thereby further enhancing the interactive experience. This application does not limit this aspect.

[0183] Figure 16 This is a schematic diagram of the structure of a display device for a breaking effect provided in an embodiment of this application. See also: Figure 16 The device includes:

[0184] Display module 1601 is used to display the target virtual object;

[0185] Rendering module 1602 is used to render multiple fragments of the target virtual object based on a particle system in response to a breaking event of the target virtual object.

[0186] The control module 1603 is used to control the movement of multiple fragments of the target virtual object.

[0187] In some embodiments, the control module is used to determine the physical parameters of the fragments corresponding to the target virtual object;

[0188] The speed of the fragment is determined based on the physical parameters of the fragment and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0189] In some embodiments, the control module is used to control multiple fragments corresponding to the target virtual object to move based on event information of the breakage event.

[0190] In some embodiments, the control module is configured to determine motion parameters of a portion of the fragments among a plurality of fragments corresponding to the target virtual object based on the location where the breakage event occurs, wherein the portion of fragments is located within the area corresponding to the location where the breakage event occurs, and control the portion of fragments to move based on the motion parameters of the portion of fragments.

[0191] In some embodiments, the control module is used to acquire element information of the environment elements of the virtual environment;

[0192] The multiple fragments corresponding to the target virtual object are controlled to move based on the element information of the environmental elements.

[0193] In some embodiments, the control module is used to determine the physical parameters of the fragments corresponding to the target virtual object;

[0194] The resistance is determined based on the type of environmental element, and the velocity of the fragment is determined based on the resistance, the physical parameters of the fragment, and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

[0195] In some embodiments, the control module is configured to, when the environmental element is an obstacle, calculate the velocity of the fragment after colliding with the obstacle based on the velocity of the fragment of the target virtual object in the frame in which the collision occurs, the penetration distance of the fragment when it collides with the obstacle, the collision radius of the fragment, and the simulation time interval.

[0196] In some embodiments, the control module is used to control multiple fragments corresponding to the target virtual object to move based on the event type of the breakage event, wherein different event types of the breakage event correspond to different movement modes of the fragments.

[0197] In some embodiments, the control module is configured to control at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as a traversable state.

[0198] In some embodiments, the control module is configured to control a portion of the fragments corresponding to the target virtual object to scatter based on the breaking event, while keeping another portion of the fragments corresponding to the target virtual object stationary, so as to form a traversable passage within the target virtual object; or,

[0199] All fragments corresponding to the target virtual object are controlled to scatter based on the breaking event, so as to form a passable passage in the deformed target virtual object.

[0200] In some embodiments, the control module is configured to control at least some fragments corresponding to the target virtual object to disperse based on the movement trajectory of the target virtual object, so as to display the target virtual object as a traversable state. The fragmentation event includes the movement event of a virtual object within the target virtual object.

[0201] In some embodiments, the apparatus further includes: a fragment processing module, configured to initialize the lifecycle of the plurality of fragments, and destroy the fragment when the display duration of any fragment reaches the corresponding lifecycle; or, destroy the fragment when any fragment moves outside the target range; or, destroy the fragment when any fragment fails to render.

[0202] It should be noted that the above-described embodiment of the display device for displaying the breaking effect is only illustrated by the division of the functional modules described above. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the above-described embodiment of the display device for displaying the breaking effect and the embodiment of the method for displaying the breaking effect belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.

[0203] Figure 17 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 1700 can vary significantly depending on its configuration or accuracy. It may include one or more Central Processing Units (CPUs) 1701 and one or more memories 1702. The memories 1702 store at least one computer program, which is loaded and executed by the processor 1701 to implement the methods provided in the above-described method embodiments. Of course, the computer device may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The computer device may also include other components for implementing device functions, which will not be elaborated upon here.

[0204] The terminal provided in this application embodiment can be implemented as a terminal. Figure 18 A structural block diagram of a terminal 1800 provided in an exemplary embodiment of this application is shown. The terminal 1800 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. The terminal 1800 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.

[0205] Typically, terminal 1800 includes a processor 1801 and a memory 1802.

[0206] Processor 1801 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1801 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0207] The memory 1802 may include one or more computer-readable storage media, which may be non-transitory. The memory 1802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1802 is used to store at least one instruction, which is executed by the processor 1801 to implement the method for displaying the breaking effect provided in the method embodiments of this application.

[0208] In some embodiments, the terminal 1800 may also optionally include a peripheral device interface 1803 and at least one peripheral device. The processor 1801, memory 1802, and peripheral device interface 1803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1803 via a bus, signal line, or circuit board. For example, the peripheral device may include at least one of the following: a radio frequency circuit 1804, a display screen 1805, a camera assembly 1806, an audio circuit 1807, and a power supply 1808.

[0209] Peripheral device interface 1803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1801 and memory 1802. In some embodiments, processor 1801, memory 1802 and peripheral device interface 1803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1801, memory 1802 and peripheral device interface 1803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0210] The radio frequency (RF) circuit 1804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1804 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 16G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1804 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0211] Display screen 1805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1801 for processing. In this case, display screen 1805 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1805, disposed on the front panel of terminal 1800; in other embodiments, there may be at least two display screens, disposed on different surfaces of terminal 1800 or in a folded design; in still other embodiments, display screen 1805 may be a flexible display screen, disposed on a curved or folded surface of terminal 1800. Furthermore, display screen 1805 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1805 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0212] The camera assembly 1806 is used to acquire images or videos. Optionally, the camera assembly 1806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.

[0213] The audio circuit 1807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 1801 for processing, or to the radio frequency circuit 1804 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal 1800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1801 or the radio frequency circuit 1804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1807 may also include a headphone jack.

[0214] Power supply 1808 is used to power the various components in terminal 1800. Power supply 1808 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1808 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0215] In some embodiments, the terminal 1800 further includes one or more sensors 1809. The one or more sensors 1809 include, but are not limited to: an acceleration sensor 1810, a gyroscope sensor 1811, a pressure sensor 1812, an optical sensor 1813, and a proximity sensor 1814.

[0216] Accelerometer 1810 can detect the magnitude of acceleration along the three axes of a coordinate system established by terminal 1800. For example, accelerometer 1810 can be used to detect the components of gravitational acceleration along the three axes. Processor 1801 can control display screen 1805 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1810. Accelerometer 1810 can also be used for games or for acquiring user motion data.

[0217] The gyroscope sensor 1811 can detect the orientation and rotation angle of the terminal 1800. The gyroscope sensor 1811 can work in conjunction with the accelerometer sensor 1810 to acquire the user's 3D movements on the terminal 1800. Based on the data acquired by the gyroscope sensor 1811, the processor 1801 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0218] Pressure sensor 1812 is disposed on the side bezel of terminal 1800 and / or on the lower layer of display screen 1805. When pressure sensor 1812 is disposed on the side bezel of terminal 1800, it can detect the user's grip signal on terminal 1800, and processor 1801 performs left / right hand recognition or quick operation based on the grip signal collected by pressure sensor 1812. When pressure sensor 1812 is disposed on the lower layer of display screen 1805, processor 1801 controls operable controls on the UI interface based on the user's pressure operation on display screen 1805. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0219] An optical sensor 1813 is used to collect ambient light intensity. In one embodiment, the processor 1801 can control the display brightness of the display screen 1805 based on the ambient light intensity collected by the optical sensor 1813. For example, when the ambient light intensity is high, the display brightness of the display screen 1805 is increased; when the ambient light intensity is low, the display brightness of the display screen 1805 is decreased. In another embodiment, the processor 1801 can also dynamically adjust the shooting parameters of the camera assembly 1806 based on the ambient light intensity collected by the optical sensor 1813.

[0220] The proximity sensor 1814, also known as a distance sensor, is typically located on the front panel of the terminal 1800. The proximity sensor 1814 is used to detect the distance between the user and the front of the terminal 1800. In one embodiment, when the proximity sensor 1814 detects that the distance between the user and the front of the terminal 1800 is gradually decreasing, the processor 1801 controls the display screen 1805 to switch from a screen-on state to a screen-off state; when the proximity sensor 1814 detects that the distance between the user and the front of the terminal 1800 is gradually increasing, the processor 1801 controls the display screen 1805 to switch from a screen-off state to a screen-on state.

[0221] Those skilled in the art will understand that Figure 18 The structure shown does not constitute a limitation on terminal 1800 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0222] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the operations performed by the method for displaying the breaking effect in the above embodiments.

[0223] This application also provides a computer program product, including a computer program loaded and executed by a processor to perform the operations performed by the method for displaying the breaking effect as described in the above embodiments.

[0224] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0225] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.

Claims

1. A method for displaying a broken effect, characterized in that, The method includes: Display the target virtual object; In response to a breakage event of the target virtual object, multiple fragments of the target virtual object are rendered based on a particle system; Control at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as a traversable state; When a fragment of the target virtual object collides with an obstacle in the virtual environment, the velocity of the fragment after colliding with the obstacle is calculated based on the velocity of the fragment in the frame in which the collision occurs, the penetration distance of the fragment when it collides with the obstacle, the collision radius of the fragment, and the simulation time interval. The trajectory of the fragment is adjusted based on its velocity after colliding with the obstacle; Wherein, controlling at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as a traversable state, includes: The fragments corresponding to the target virtual object are controlled to scatter based on the breaking event, while another fragment corresponding to the target virtual object remains stationary, so as to form a traversable passage in the target virtual object.

2. The method according to claim 1, characterized in that, In response to a breakage event of the target virtual object, rendering multiple fragments corresponding to the target virtual object based on a particle system includes: In response to a breakage event of the target virtual object, the target virtual object is rendered into a number of fragments corresponding to the processing power of the computer device, based on a particle system.

3. The method according to claim 1, characterized in that, In response to a breakage event of the target virtual object, rendering multiple fragments corresponding to the target virtual object based on a particle system includes: In response to a breakage event of the target virtual object, the target virtual object is rendered into multiple fragments of a type corresponding to the processing power of the computer device, based on a particle system.

4. The method according to claim 1, characterized in that, The steps for controlling the movement of multiple fragments corresponding to the target virtual object include: Determine the physical parameters of the fragments corresponding to the target virtual object; The speed of the fragment is determined based on the physical parameters of the fragment and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

5. The method according to claim 1, characterized in that, The steps for controlling the movement of multiple fragments corresponding to the target virtual object include: The multiple fragments corresponding to the target virtual object are controlled to move based on the event information of the breakage event.

6. The method according to claim 5, characterized in that, The step of controlling the movement of multiple fragments corresponding to the target virtual object based on the event information of the breakage event includes: Based on the location of the breakage event, motion parameters of some fragments among the multiple fragments corresponding to the target virtual object are determined. The fragments are located within the area corresponding to the location of the breakage event. Based on the motion parameters of the fragments, the fragments are controlled to move.

7. The method according to claim 1, characterized in that, The steps for controlling the movement of multiple fragments corresponding to the target virtual object include: Obtain the element information of the environment elements of the virtual environment; Determine the physical parameters of the fragments corresponding to the target virtual object; The resistance is determined based on the type of environmental element, and the velocity of the fragment is determined based on the resistance, the physical parameters of the fragment, and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

8. The method according to claim 1, characterized in that, The steps for controlling the movement of multiple fragments corresponding to the target virtual object include: The multiple fragments corresponding to the target virtual object are controlled to move based on the event type of the breakage event, and different event types of the breakage event correspond to different movement methods of the fragments.

9. The method according to claim 1, characterized in that, The method further includes: All fragments corresponding to the target virtual object are controlled to scatter based on the breaking event, so as to form a passable passage in the deformed target virtual object.

10. The method according to claim 1, characterized in that, The step of controlling at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as traversable, includes: The fragmentation event includes the movement event of the virtual object within the target virtual object, controlling at least some fragments corresponding to the virtual object to disperse based on the movement trajectory of the virtual object, so as to display the target virtual object as a passable state.

11. The method according to claim 1, characterized in that, The method further includes: The lifecycle of the multiple fragments is initialized. When the display duration of any fragment reaches the corresponding lifecycle, the fragment is destroyed; or, when any fragment moves outside the target range, the fragment is destroyed; or, when any fragment fails to render, the fragment is destroyed.

12. A display device for a breaking effect, characterized in that, The device includes: The display module is used to display the target virtual object; A rendering module, used to render multiple fragments of the target virtual object based on a particle system in response to a breaking event of the target virtual object; A control module is configured to control at least some fragments corresponding to the target virtual object to move based on the breaking event, so as to display the target virtual object as traversable; when the fragments of the target virtual object collide with obstacles in the virtual environment, the module calculates the velocity of the fragments after colliding with the obstacle based on the velocity of the fragments in the frame in which the collision occurs, the penetration distance of the fragments when colliding with the obstacle, the collision radius of the fragments, and the simulation time interval; and adjusts the movement trajectory of the fragments based on the velocity of the fragments after colliding with the obstacle. The control module is used to control some fragments corresponding to the target virtual object to scatter based on the breaking event, while keeping another part of the fragments corresponding to the target virtual object stationary, so as to form a passable passage in the target virtual object.

13. The apparatus according to claim 12, characterized in that, The control module is used to determine the physical parameters of the fragments corresponding to the target virtual object; and to determine the speed of the fragments based on the physical parameters of the fragments and the simulation time interval, wherein the simulation time interval refers to the rendering time interval between two frames.

14. The apparatus according to claim 12, characterized in that, The control module is used to control the movement of multiple fragments corresponding to the target virtual object based on the event information of the breakage event.

15. The apparatus according to claim 14, characterized in that, The control module is used to determine the motion parameters of some fragments among multiple fragments corresponding to the target virtual object based on the location of the breakage event, wherein the partial fragments are located within the area corresponding to the location of the breakage event, and to control the partial fragments to move based on the motion parameters of the partial fragments.

16. A computer device, characterized in that, The computer device includes a transceiver, a processor, and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to perform the operations performed by the method for displaying the shattering effect as described in any one of claims 1 to 11.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the operations performed by the method for displaying the shattering effect as described in any one of claims 1 to 11.

18. A computer program product, comprising a computer program, characterized in that, The computer program is loaded and executed by a processor to perform the operations performed by the method for displaying the shattering effect as described in any one of claims 1 to 11.