Method and device for generating biogroup animation, electronic equipment and storage medium

By combining particle systems and biological individual models, we can generate animations of biological clusters under multiple behavioral states, which overcomes the limitations of single behavioral states in existing technologies and achieves diversity and realism in animation.

CN122289475APending Publication Date: 2026-06-26NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2024-12-25
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively display animations of biological clusters with multiple behavioral states, resulting in simplistic and unrealistic simulation results.

Method used

By responding to the target animation generation command, the motion logic of the target virtual biological cluster is determined, a particle cluster is generated using a particle system, and animation resources of various behavioral states of the biological individual model are combined to calculate the real-time motion state of the particle objects and render and generate cluster animations in various behavioral states.

Benefits of technology

It achieves natural transitions between various behavioral states in biological cluster animation, enhancing the diversity and realism of simulation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289475A_ABST
    Figure CN122289475A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for generating animations of biological swarms, relating to the field of animation processing technology. The method includes: responding to a target animation generation instruction and determining the target virtual biological swarm and the motion logic it needs to execute; generating vertex texture animations of individual target biological models based on multiple animation resources; generating a particle swarm that moves in a virtual scene according to the motion logic based on a particle system; calculating the real-time motion state of each particle object in the particle swarm and determining the target behavior state matching the real-time motion state; and rendering and generating a swarm animation corresponding to the target virtual biological swarm based on the target behavior state corresponding to each particle object and the vertex texture animation of the individual target biological model. This allows the swarm animation to display a target virtual biological swarm in multiple behavior states, improving the diversity and realism of the simulation results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of animation processing technology, and in particular to a method, apparatus, electronic device and storage medium for generating animations of biological clusters. Background Technology

[0002] Swarming effects generally refer to a coordinated movement pattern exhibited by animals or individual organisms in nature through collective behavior. This phenomenon is particularly common in groups of birds, fish, insects, and other animals. Swarming effects are not only spectacular in nature but also widely used in fields such as computer graphics, animation, and game development.

[0003] In existing technologies, the presentation of biological swarm effects is mainly based on particle swarm animation technology, which is a technology that simulates the collective behavior of a large number of particles (such as stars, dust, water droplets, etc.).

[0004] However, existing production methods are only applicable to biological groups in a single movement state, such as schools of fish, swarms of butterflies, and swarms of bees, but cannot display multiple behavioral states for biological groups with multiple behavioral states. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, electronic device, and storage medium for generating biological cluster animations, thereby enabling natural transitions between multiple behavioral states.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, the present invention provides a method for generating animations of biological clusters, the method comprising:

[0008] In response to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals;

[0009] A pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model are determined, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states;

[0010] Based on the multiple animation resources, a vertex texture animation of the target biological individual model is generated;

[0011] Based on the particle system, a particle cluster is generated that moves in the virtual scene according to the motion logic. The particle cluster includes multiple particle objects and corresponds to the target virtual biological cluster.

[0012] Calculate the real-time motion state of each particle object in the particle swarm, and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual;

[0013] Based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0014] Secondly, the present invention provides an apparatus for generating animations of biological clusters, comprising:

[0015] A response module is used to respond to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed, and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals;

[0016] The determination module is used to determine a pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states;

[0017] The first generation module is used to generate vertex texture animation of the target biological individual model based on the multiple animation resources;

[0018] The second generation module is used to generate a particle cluster that moves in the virtual scene according to the motion logic based on the particle system, wherein the particle cluster includes multiple particle objects and the particle cluster corresponds to the target virtual biological cluster.

[0019] The calculation module is used to calculate the real-time motion state of each particle object in the particle swarm and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual.

[0020] The rendering module is used to render and generate a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model.

[0021] Thirdly, the present invention provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the biological cluster animation generation method as described in any of the foregoing embodiments.

[0022] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method for generating biological cluster animation as described in any of the foregoing embodiments.

[0023] The beneficial effects of this application are:

[0024] The biological swarm animation generation method, apparatus, electronic device, and storage medium provided in this application include: responding to a target animation generation instruction; determining the target virtual biological swarm targeted by the target animation generation instruction and the motion logic that the target virtual biological swarm needs to execute in the swarm animation, wherein the target virtual biological swarm includes multiple biological individuals; determining a pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states; generating a vertex texture animation of the target biological individual model based on the multiple animation resources; generating a particle swarm that moves in a virtual scene according to the motion logic based on a particle system, wherein the particle swarm includes multiple particle objects, and the particle swarm corresponds to the target virtual biological swarm; calculating the real-time motion state of each particle object in the particle swarm, and determining a target behavioral state that matches the real-time motion state from the multiple behavioral states of the biological individual; and rendering and generating a swarm animation corresponding to the target virtual biological swarm based on the target behavioral state corresponding to each particle object and the vertex texture animation of the target biological individual model, so that the swarm animation corresponding to the target virtual biological swarm can display the target virtual biological swarm in multiple behavioral states, thereby improving the diversity and realism of the simulation results. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart illustrating a method for generating biological cluster animation provided in an embodiment of this application;

[0027] Figure 2 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0028] Figure 3 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0029] Figure 4 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0030] Figure 5 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0031] Figure 6 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0032] Figure 7 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0033] Figure 8 A flowchart illustrating another method for generating biological cluster animation provided in this application embodiment;

[0034] Figure 9 A rendering diagram of a biological cluster animation provided in an embodiment of this application;

[0035] Figure 10 A schematic diagram of the functional modules of a biological cluster animation generation device provided in an embodiment of this application;

[0036] Figure 11 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0038] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0039] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0040] In existing technologies, the presentation of biological swarm effects is mainly based on particle swarm animation technology, which is a technology that simulates the collective behavior of a large number of particles (such as stars, dust, water droplets, etc.).

[0041] However, existing production methods are only applicable to biological groups in a single movement state, such as schools of fish, swarms of butterflies, and swarms of bees, but cannot be used to display biological groups with multiple behavioral states.

[0042] In view of this, embodiments of this application provide a method for generating biological cluster animations. This method can be used to display target virtual biological clusters in various behavioral states, thereby improving the diversity and realism of simulation results.

[0043] Figure 1 This is a flowchart illustrating a method for generating animations of biological clusters provided in an embodiment of this application. The execution subject of this method can be an electronic device such as a computer, server, or processor. This method can be applied to displaying biological clusters with multiple behavioral states. Optionally, the biological cluster can be terrestrial organisms (e.g., humans), aerobatic organisms (e.g., flocks of birds), marine organisms (e.g., dolphins, whales), amphibious organisms (e.g., crabs), etc., without limitation.

[0044] It is understandable that different biological groups will exhibit a variety of different behavioral states. For example, flocks of birds may exhibit behaviors such as feeding, taking off, flying, landing, and resting, while dolphins may exhibit behaviors such as emerging from the water, swimming, jumping, observing, and entering the water. No specific examples are provided here. To better understand this application, the following embodiments will use dolphins as an example for illustration.

[0045] like Figure 1 As shown, the method includes:

[0046] Step 101: Respond to the target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed, and the motion logic that the target virtual biological cluster needs to execute in the cluster animation.

[0047] The target virtual biological cluster includes multiple biological individuals.

[0048] Optionally, the target animation generation instruction can be generated by acting on the cluster animation generation control. In response to the target animation generation instruction, the target virtual biological cluster and the motion logic that the target virtual biological cluster needs to execute can be determined.

[0049] The target virtual biological cluster can be specified among multiple virtual biological clusters, and each virtual biological cluster can include multiple first biological individuals. For example, multiple virtual biological clusters can include: virtual dolphin clusters, virtual bird flocks, virtual whale clusters, etc., and the target virtual biological cluster can be a virtual dolphin cluster. Of course, the specific selection is not limited to this.

[0050] The motion logic that the target virtual biological cluster needs to execute can represent the movement trajectory and route of the target virtual biological cluster. For example, a target virtual biological cluster needs to move from point M to point N in the virtual scene. The three-dimensional coordinates of point M and point N in the virtual scene are different. For example, they may be offset horizontally, but this is not a limitation.

[0051] Step 102: Determine the pre-made target biological individual model and the multiple animation resources corresponding to the target biological individual model.

[0052] Each animation resource is used to demonstrate the actions of a biological individual in a corresponding behavioral state, and the biological individual includes multiple behavioral states. It is understood that each animation resource may include multiple animation frames.

[0053] The target biological individual model is used to simulate a biological individual. Optionally, this biological individual can be a dolphin, bird, elephant, etc., without limitation. It is understood that, depending on the biological individual, it can include multiple behavioral states. Taking a dolphin as an example, it can include five behavioral states: emerging from the water, swimming, jumping, observing, and entering the water.

[0054] Optionally, for the target biological individual model, multiple corresponding animation resources can be pre-made, that is, multiple animation resources of the target biological individual model in various behavioral states can be pre-made. Taking a dolphin as an example, five animation resources corresponding to the five behavioral states of a dolphin—emerging from the water, swimming, jumping, observing, and entering the water—can be pre-made.

[0055] It should be noted that each animation resource is a loopable animation with small horizontal and vertical displacements, and includes multiple animation frames. For example, taking the animation resource corresponding to the water-leaking state as an example, this animation resource can be a looping water-leaking animation, that is, water leaching in place in a loop.

[0056] Step 103: Generate vertex texture animation for the target biological individual model based on multiple animation resources.

[0057] After acquiring multiple animation resources, vertex animation textures (VAT) can be exported from these resources using DCC software, based on vertex animation texture (VAT) technology. The vertex animation data corresponding to these VAT animations can be filled into the texture, and this vertex animation data can include vertex positions, normals, tangents, etc. Optionally, the DCC software can be Houdini, Maya, 3ds Max, etc., but is not limited here.

[0058] Understandably, in this process, the acquired vertex texture animations can be stored in textures and sampled and calculated in shaders, thus significantly reducing real-time computation and performance consumption.

[0059] Step 104: Generate a particle cluster that moves in the virtual scene according to motion logic based on the particle system. The particle cluster includes multiple particle objects and corresponds to the target virtual biological cluster.

[0060] The particle system may include a particle emitter. Optionally, the particle emitter may set emission parameters (e.g., emission rate, particle lifespan, initial velocity, etc.) according to the motion logic to be executed by the target virtual biological cluster to emit a particle cluster including multiple particle objects, so that the particle cluster corresponds to the target virtual biological cluster. Each particle object in the particle cluster is used to simulate the motion of each biological individual in the target biological cluster according to the motion logic to be executed by the target virtual biological cluster.

[0061] In addition, it should be noted that the particle system may also include a particle updater, which can update the position, velocity and other attributes of each particle object according to preset rules, without limitation here.

[0062] Step 105: Calculate the real-time motion state of each particle object in the particle swarm, and determine the target behavior state that matches the real-time motion state from the various behavior states of the biological individual.

[0063] Optionally, the real-time motion state of each particle can characterize its trajectory, position, velocity, acceleration, etc.; in some embodiments, the real-time motion state of each particle can be obtained by solving differential equations. Of course, this application does not limit the specific calculation method.

[0064] During the generation process, the real-time motion state of each particle object can be calculated, and a target behavioral state matching each real-time motion state can be determined from multiple behavioral states of the biological individual. In some embodiments, specifically when determining the target behavioral state, multiple initial behavioral states matching the real-time motion state of each particle object can be determined from multiple behavioral states based on preset matching rules; based on the determined multiple initial behavioral states, the target behavioral state corresponding to each particle object is further determined based on a random algorithm.

[0065] Understandably, setting the target behavior state of each particle object to be randomly determined using a random algorithm can prevent a large number of biological individuals from being in the same behavior state in the cluster animation corresponding to the target virtual biological cluster, thus increasing the variability and realism of the behavior states of each biological individual in the cluster animation. Optionally, if the initial behavior states include 5 types, the random value can be any value between 0 and 5.

[0066] Step 106: Based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, render and generate the cluster animation corresponding to the target virtual biological cluster.

[0067] Based on the above explanation, after determining the target behavior state corresponding to each particle object, the animation resources corresponding to each particle object can be further determined. Based on the animation resources corresponding to each particle object, the target animation playback parameters corresponding to each particle object can be determined. Furthermore, since the animation is driven by the material shader, the target animation playback parameters corresponding to each particle object can be passed to the material shader. The material shader then passes the target animation playback parameters of each particle object to the vertex texture animation of the target biological individual model, thereby rendering and generating the cluster animation corresponding to the target virtual biological cluster. It can be understood that, at this time, the cluster animation can display multiple biological individuals in various behavior states, improving the diversity and realism of the simulation results.

[0068] Optionally, during the rendering process, a preset behavior state switching logic can be incorporated. This preset behavior state switching logic indicates the switching order of each behavior state. In some embodiments, after determining the target behavior state for each particle object, the next target behavior state for each particle object can be determined based on the preset behavior state switching logic. The swarm animation is then updated based on the next target behavior state for each particle object and the vertex texture animation of the target biological individual model, allowing the swarm animation to exhibit a natural transition between multiple behavior states.

[0069] In summary, this application provides a method for generating biological swarm animation. The method includes: responding to a target animation generation instruction; determining the target virtual biological swarm targeted by the instruction and the motion logic to be executed by the target virtual biological swarm in the swarm animation, wherein the target virtual biological swarm includes multiple biological individuals; determining a pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model, wherein each animation resource is used to display the action performance of the biological individual in a corresponding behavioral state, and the biological individual includes multiple behavioral states; generating a vertex texture animation of the target biological individual model based on the multiple animation resources; generating a particle swarm that moves in a virtual scene according to the motion logic based on a particle system, wherein the particle swarm includes multiple particle objects, and the particle swarm corresponds to the target virtual biological swarm; calculating the real-time motion state of each particle object in the particle swarm, and determining a target behavioral state matching the real-time motion state from the multiple behavioral states of the biological individual; and rendering and generating a swarm animation corresponding to the target virtual biological swarm based on the target behavioral state corresponding to each particle object and the vertex texture animation of the target biological individual model, so that the swarm animation corresponding to the target virtual biological swarm can display the target virtual biological swarm in multiple behavioral states, improving the diversity and realism of the simulation results.

[0070] Figure 2 This is a flowchart illustrating another method for generating biological cluster animations provided in this application embodiment. In optional implementations, such as... Figure 2 As shown, the above-mentioned rendering of the cluster animation corresponding to the target virtual biological cluster, based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, includes:

[0071] Step 201: Based on the target behavior state of each particle object, obtain the target animation playback parameters corresponding to each particle object.

[0072] The target animation playback parameters include: animation start frame identifier, number of frames played, animation playback speed, animation frame interval, and animation frame rate.

[0073] Optionally, the animation playback speed, animation frame interval, and animation frame rate can be preset values. Among them, the animation playback speed is used to indicate the speed multiplier when the target animation resource is played, such as 1x speed or 1.5x speed; the animation frame interval is used to indicate the time interval between two adjacent frames in the target animation resource; the animation frame rate is used to indicate the number of animation frames that can be generated and displayed per second, and its value can be 24, 30, etc., without limitation.

[0074] Each behavior state corresponds to an animation resource with a range of animation frame identifiers, which indicates the value range of each frame identifier in the animation resource. The animation start frame identifier of the target animation resource is the frame identifier corresponding to the start frame in the target animation resource. Different target animation resources can correspond to different animation start frame identifiers.

[0075] The number of frames played for the target animation resource can be determined based on the playback status of the target animation resource. If the target animation resource has not been played, the number of frames played can be 0.

[0076] Step 202: Determine the target animation frame identifier and animation playback speed for each particle object based on the target animation playback parameters corresponding to each particle object.

[0077] Optionally, after obtaining the target animation playback parameters corresponding to each particle object, the target animation frame identifier corresponding to each particle object can be further determined, that is, determining which frame of the target animation resource corresponding to the target behavior state needs to be driven to play at the current time. The specific calculation formula is as follows:

[0078] AnimationFrame=StartFrame+ElapsedFrames+AnimationSpeed*(DeltaTi me*FrameRate)

[0079] Wherein, AnimationFrame is the target animation frame identifier corresponding to the target animation resource, StartFrame is the animation start frame identifier of the target animation resource, ElapsedFrames is the number of animation frames that have been played in the target animation resource, AnimationSpeed ​​is the animation playback speed of the target animation resource, DeltaTime represents the animation frame interval of the target animation resource, and FrameRate is the animation frame rate of the target animation resource.

[0080] It should be noted that in some scenarios, the number of elapsed frames of the target animation resource can also be determined by a random algorithm to avoid a large number of biological individuals in the cluster animation corresponding to the target virtual biological cluster being in the same motion state, thereby increasing the variability and realism of the behavior state of each biological individual in the cluster animation.

[0081] Step 203: Based on the target animation frame identifier and animation playback speed corresponding to each particle object, and based on the vertex texture animation of the target biological individual model, render and generate the cluster animation corresponding to the target virtual biological cluster.

[0082] Specifically, during the rendering process, the target animation frame identifier and animation playback speed corresponding to each particle object can be passed to the material shader. The material shader then passes the target animation frame identifier and animation playback speed of each particle object to the vertex texture animation of the target biological individual model, thereby rendering and generating the cluster animation corresponding to the target virtual biological cluster.

[0083] In an optional implementation, determining the target animation frame identifier corresponding to each particle object based on the target animation playback parameters corresponding to each particle object includes:

[0084] If the number of frames played is equal to the total number of frames corresponding to the target animation resource, then the target animation frame identifier corresponding to each particle object in the target behavior state is determined to be the animation start frame identifier corresponding to the target animation resource.

[0085] For a certain particle object, if during the calculation process there is a target animation resource whose played frame count is equal to the total frame count of the target animation resource, that is, the end frame of the target animation resource has been reached, and the behavior state has not changed, then it can loop back to the start frame, that is, set the target animation frame identifier corresponding to the particle object to the animation start frame identifier corresponding to the target animation resource.

[0086] In an optional implementation, the method further includes:

[0087] If it is determined that the target animation frame identifier exceeds the range of the first animation frame identifier corresponding to the target behavior state, then the target behavior state corresponding to the particle object is updated according to the range of the second animation frame identifier indicated by the target animation frame identifier.

[0088] The second animation frame identifier range includes: the animation start frame identifier and the animation end frame identifier of the animation resource corresponding to the first behavior state.

[0089] It should be noted that the animation resources corresponding to each behavior state can correspond to an animation frame identifier range, which includes the animation start frame identifier and the animation end frame identifier. Optionally, according to the switching order of each behavior state indicated by the preset behavior state switching logic, the animation resources corresponding to each behavior state can correspond to different animation frame identifier ranges.

[0090] Optionally, the relationship between the target behavior state and the first behavior state can be: the first behavior state can be the next behavior state of the target behavior state indicated in the preset behavior state switching logic.

[0091] Optionally, for ease of identification, a three-dimensional vector can be defined to represent the behavior state and animation frame range identifier corresponding to each animation resource, so that this structured method can be used to handle complex animation state transition logic, enabling the animation to automatically adjust according to the current state.

[0092] For example, taking dolphins as an example, the 3D vector OutWater(1, 0, 76) represents the dolphin's OutWater state, which is an out-of-water behavior and is marked as 1, starting from frame 0 and ending at frame 76; the 3D vector Swimming(2, 77, 116) represents the dolphin's Swimming state, which is a swimming behavior and is marked as 2, starting from frame 77 and ending at frame 116; the 3D vector Jump(3, 117, 169) represents the dolphin's Jump state. The dolphin is in a jumping state, marked with a state identifier of 3, from frame 117 to frame 169. The 3D vector `Watch(4, 170, 425)` represents the dolphin's watch state, marked with a state identifier of 4, from frame 170 to frame 425. The 3D vector `Diving(5, 426, 500)` represents the dolphin's diving state, marked with a state identifier of 5, from frame 426 to frame 500. It should be noted that the specific representation is not limited to these examples.

[0093] Based on the above explanation, considering that in some scenarios, the target animation frame identifier calculated under the target behavior state may exceed the range of the first animation frame identifier corresponding to the target behavior state, for example, if the target behavior state corresponding to a particle object is swimming, and if the target animation frame identifier calculated at a certain moment is 118, which exceeds the range of the first animation frame identifier corresponding to the swimming state (77 to 116), then the first behavior state can be determined based on the range of the animation frame identifier corresponding to this target animation frame identifier. It can be seen that the animation frame identifier is 118, falling between 117 and 169, so the first behavior state can be determined to be jumping, and the target behavior state corresponding to the particle object can be updated accordingly.

[0094] It is understandable that if the target behavior state corresponding to the particle object is updated, the update will be synchronized to the material shader, and the material shader will update the behavior state of each individual organism in the cluster animation corresponding to the target virtual biological cluster.

[0095] Figure 3 This is a flowchart illustrating another method for generating biological cluster animations provided in this application embodiment. In optional implementations, such as... Figure 3 As shown, the above-mentioned rendering of the cluster animation corresponding to the target virtual biological cluster, based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, includes:

[0096] Step 301: Obtain the displacement parameters of each particle object. The displacement parameters include: position parameters and / or velocity parameters.

[0097] Optionally, each particle object can obtain its displacement parameters through the particle state acquisition component in the particle system. In some embodiments, the obtained displacement parameters may include position parameters, or may include velocity parameters, or may include both position and velocity parameters, without limitation.

[0098] Step 302: Based on the displacement parameters of each particle object, the target behavior state corresponding to each particle object, and the vertex texture animation of the target biological individual model, render and generate the cluster animation corresponding to the target virtual biological cluster.

[0099] After obtaining the displacement parameters of each particle object, the motion state of the individual organisms in each behavioral state in the cluster animation corresponding to the target virtual biological cluster can be updated accordingly. Specifically, during the update, the displacement parameters of each particle object can be passed to the material shader, which calculates the new position of each vertex in the vertex texture animation based on the displacement parameters of each particle object, and controls the change of each vertex according to time to enrich the motion state of each individual organism in different behavioral states.

[0100] Taking dolphins as an example, the implementation code for the update logic can be found in the following content:

[0101] 01: OutWater Status:

[0102] Position update formula: position.y += velocity * deltaTime;

[0103] Velocity update formula: velocity = gravity * deltaTime;

[0104] 02: Swimming:

[0105] Position update formula: position.x += velocity * deltaTime;

[0106] Fluctuation formula: position.y += amplitude * sin(frequency * time);

[0107] 03: Jump State:

[0108] Position update formula: position.y += velocity * deltaTime;

[0109] Velocity update formula: velocity = gravity * deltaTime;

[0110] 04: Watch Status

[0111] Position update formula: position remains unchanged or changes slowly;

[0112] 05: Diving State

[0113] Position update formula: position.y -= velocity * deltaTime;

[0114] Velocity update formula: velocity = gravity * deltaTime;

[0115] Where gravity represents the acceleration due to gravity, with a value of 9.81 m / s². 2 `amplitude` represents the amplitude of the particle's motion, `frequency` represents the frequency of the particle's motion, `deltaTime` represents the corresponding time frame in the particle system, `position` represents the position parameter of the particle, `position.x` represents the position parameter of the particle in the X-axis direction, `position.y` represents the position parameter of the particle in the Y-axis direction, `velocity` represents the velocity of the particle, and `time` represents the time variable.

[0116] Referring to the update logic above, it can be seen that the update can enrich the movement state of the organism under various behavioral states. That is, in the emerge-from-water state, the dolphin's movement direction is upward and the movement speed is initially high and then gradually decreases, showing an emerge-from-water effect; in the swimming state, the dolphin's movement direction is horizontal or slightly fluctuating up and down, and the movement speed is constant, showing a swimming effect; in the jumping state, the dolphin's movement direction is first rising and then falling, and the movement speed is first decelerating as it rises and then accelerating as it falls, showing a jumping effect; in the observation state, the dolphin's movement direction is stationary or slowly moving, and the movement speed is extremely low or zero; in the enter-from-water state, the dolphin's movement direction is downward and the movement speed is initially high and then gradually decreases, showing an enter-from-water effect.

[0117] Figure 4 This is a flowchart illustrating another method for generating biological cluster animations provided in this application embodiment. In optional implementations, considering that certain special behavioral states can trigger event effects, such as the splashing effect on the ocean surface when dolphins emerge from and enter the water, the dust kicked up when birds land, and the impact effect on characters, etc., alternatively, as... Figure 4As shown, the above-mentioned rendering of the cluster animation corresponding to the target virtual biological cluster, based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, includes:

[0118] Step 401: Determine whether the target behavior state corresponding to each particle object is the preset behavior state.

[0119] Step 402: If yes, determine whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier.

[0120] Step 403: If so, add preset event effects corresponding to preset animation frame identifiers to each particle object.

[0121] Step 404: Based on the vertex texture animation of the target biological individual model and the target behavior state, target animation frame identifier, and preset event effects corresponding to each particle object, render and generate the cluster animation corresponding to the target virtual biological cluster.

[0122] The preset event effect is a preset special effect corresponding to a preset behavior state. Optionally, different preset behavior states can correspond to the same or different preset event effects.

[0123] Optionally, the preset behavioral states can be pre-defined behavioral identifiers. For example, for a dolphin, the corresponding preset behavioral states may include: behavioral identifiers corresponding to the water exit state and behavioral identifiers corresponding to the water entry state. Optionally, the preset event effects corresponding to the water exit state may include: water splash when exiting the water and water splash when entering the water.

[0124] Based on the above explanation, water splashes can be added during the dolphin's escaping state and during the dolphin's entering state to enrich the dolphin's jumping animation effects and increase detail and realism.

[0125] Optionally, in a specific implementation, if the behavior state corresponding to each particle object is a preset behavior state, it can be further determined whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier. If so, preset event effect parameters can be set for each particle object, and the behavior state, animation frame identifier, preset event effect, and vertex texture animation of the target biological individual model corresponding to each particle object can be imported into the preset engine. Through the material shader in the preset engine, the cluster animation corresponding to the target virtual biological cluster can be obtained, thereby enriching the animation effect of the biological individual and increasing the detail and realism.

[0126] Figure 5 This is a flowchart illustrating another method for generating biological cluster animations provided in this application embodiment. In optional implementations, such as... Figure 5As shown, the above-mentioned rendering of the cluster animation corresponding to the target virtual biological cluster, based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, includes:

[0127] Step 501: Obtain the first current position of each particle object and the second current position of each collideable virtual object within the preset motion range.

[0128] Optionally, the preset movement range can be the preset activity range of the target virtual biological cluster, which can be a set range.

[0129] The collisionable virtual objects within the preset movement range are any virtual objects that may appear in this scene. It can be understood that different collisionable virtual objects may be included in different application scenarios. Taking a dolphin as an example, the collisionable virtual objects may include: virtual ships, other virtual creatures (such as seals), etc., without limitation.

[0130] Step 502: Update the target behavior state corresponding to at least some particle objects based on the distance between each first current position and each second current position.

[0131] Step 503: Update the swarm animation based on the updated target behavior state of at least some particle objects and the vertex texture animation of the target biological individual model.

[0132] In certain scenarios, the first current position of each particle object and the second current position of each collideable virtual object within a preset motion range can be obtained in real time. After calculating the first and second current positions, the target distance between them can be calculated. If the target distance is greater than a preset threshold, it means that each particle object is far away from each collideable virtual object. Otherwise, it means that each particle object is close to each collideable virtual object. In the case of being close, the target behavior state corresponding to each particle object can be updated according to a preset update rule.

[0133] It is understandable that if the target behavior state corresponding to a certain particle object is updated, the update will be synchronized to the cluster animation corresponding to the target virtual biological cluster, and the behavior state of the biological individual corresponding to that particle object will be updated accordingly.

[0134] For example, applying the embodiments of this application, in certain scenarios, when a boat approaches a dolphin, the dolphin's animation state switches from the current watch state to the swimming state.

[0135] In summary, applying the embodiments of this application to game scenarios can enhance the dynamic interactive experience in games, enabling creatures to automatically adjust their behavior based on the approach of players or objects, thereby improving the interactivity and realism of the environment.

[0136] It should be noted that the interaction mechanism provided in this application is not only applicable to marine life, but can also be extended to other environments and organisms. For example, land creatures can trigger escape or attack behaviors based on the player's approach, and aerial creatures can adjust their flight paths. Furthermore, by incorporating environmental factors, such as weather changes or time cycles, the behavioral performance of organisms can be further enriched. Through reasonable algorithms and optimizations, the interaction process remains efficient and smooth even in complex scenarios, thereby improving the overall user experience.

[0137] Figure 6 This is a flowchart illustrating another method for generating biological cluster animations provided in this application embodiment. In optional implementations, such as... Figure 6 As shown, the above method also includes:

[0138] Step 601: Obtain the motion state parameters of each particle object. The motion state parameters include: motion position and / or motion velocity.

[0139] In addition, for each particle object, the motion state parameters of each particle object can be obtained in real time. Optionally, the motion state parameters may include the motion speed and motion position of each particle object in a preset direction.

[0140] Step 602: Determine the timing of target behavior state switching based on the motion state parameters of each particle object and / or the state switching timer.

[0141] Step 603: Based on the target behavior state corresponding to each particle object, the timing of the target behavior state switching, and the vertex texture animation of the target biological individual model, render and generate the cluster animation corresponding to the target virtual biological cluster.

[0142] Optionally, the state switching timer can be a pre-set timer for state switching. When switching, the timing of the target behavior state switching is determined based on the different times recorded by the state switching timer and / or the motion state parameters of each particle object. Furthermore, in conjunction with the foregoing description, the timing of the target behavior state switching can be simultaneously passed to the material shader. The material shader then passes the target animation playback parameters of each particle object to the vertex texture animation of the target biological individual model, thereby rendering and generating the cluster animation corresponding to the target virtual biological cluster. This allows for flexible adjustment of the timing of the target behavior state switching as needed, improving the applicability of the method in this application.

[0143] For example, taking dolphins as an example, the definitions of the various behavioral states of dolphins are as follows:

[0144] Initial state (state=0): The dolphin is in the initial position and enters the surface state after 1 second;

[0145] Emerging from the water (state=1): The dolphin rises along the y-axis, its speed gradually decreasing, until it reaches its highest point;

[0146] Swimming state (state=2): The dolphin swims horizontally on the water surface, while undulating up and down along a sine wave;

[0147] Jump state (state=3): The dolphin rises along the y-axis again, gradually decreasing in speed, and finally reaches the highest point;

[0148] Observation state (state=4): The dolphin remains suspended in the air for a period of time to observe its surroundings;

[0149] Water entry state (state=5): The dolphin descends along the y-axis and eventually returns to below the water surface.

[0150] Optionally, the timing for switching from the initial state to the water exit state can be set as: timer > 1.0f; the timing for switching from the water exit state to the swimming state can be set as: velocity.y <= 0; the timing for switching from the swimming state to the jumping state can be set as: timer > 2.0f; the timing for switching from the jumping state to the observation state can be set as: velocity.y <= 0; and the timing for switching from the observation state to the water entry state can be set as: position.y <= 0.0f. Here, state represents the dolphin's behavioral state flag, timer represents the state switching timer, velocity.y represents the particle object's velocity along the y-axis, and position.y represents the particle object's position along the y-axis.

[0151] Figure 7 This is a schematic flowchart illustrating another method for generating biological cluster animations provided in an embodiment of this application. Optionally, as... Figure 7 As shown, the above-mentioned particle system-based generation of particle swarms includes:

[0152] Step 701: Based on the biological category to which the target virtual creature belongs, sample the terrain height map or ocean height map of the virtual scene where the target virtual creature is located.

[0153] The target virtual organism is the biological individual corresponding to the target biological individual model. Optionally, the biological category to which the target virtual organism belongs can be terrestrial organism or marine organism, but is not limited thereto. Other biological types can be adapted by referring to the method of this application.

[0154] For terrestrial organisms, in order to maintain close-to-the-ground movement, they need to acquire terrain height data when moving or falling. Optionally, the acquired terrain height map can include two types of height maps: one is a real-time height map of a preset range (e.g., 500m*500m) near the player / camera, and the other is a static height map of the island itself. The accuracy of the real-time height map is generally greater than that of the static height map. During runtime, each organism's distance from the player / camera is determined to be within the range of the real-time height map. If it is within the range, the real-time height map near the player is sampled; otherwise, the static height map of the island itself is sampled. By applying the embodiments of this application, the acquisition scheme can be flexibly selected according to the actual application scenario, ensuring both rendering effect and rendering efficiency.

[0155] For marine life, the acquired ocean height map can optionally include two types: one is a real-time height map within a preset range (e.g., 200m*200m) near the player / camera; however, unlike terrain, sea surface height changes in real time, making it impossible to bake a height map. Alternatively, the height of the sea surface at a specific location can be calculated based on the results of the Fast Fourier Transform (FFT) waveform. Sea surface height simulation utilizes the distribution characteristics of wave energy at different frequencies influenced by factors such as wind speed, wind direction, and wavelength to statistically derive the spectral formula for ocean waves. Based on this, the height spectrum and horizontal spectrum are calculated separately, and finally, a Fast Fourier Transform is used to transform the frequency domain back to the spatial domain to obtain the horizontal and vertical displacement fields of the waves.

[0156] Furthermore, since sea surface height information includes horizontal and vertical displacement fields, it is impossible to obtain the exact location of a point on the ocean through sampling. Optionally, it can be obtained according to the following algorithm: For example, initially calculate the ocean height of point A, and obtain the height A' of point A after offset based on the sea surface height information; calculate the horizontal offset of point A minus AA'; obtain point B, and obtain the height B' of point B after offset based on the sea surface height information; calculate the horizontal offset of point A minus AB' to obtain point C; and so on iterate for about N (e.g., 4-8) times to obtain an approximate value of the ocean height of point A.

[0157] Step 702: Based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, generate a particle cluster that fits the terrain or ocean waveform in the virtual scene through the particle system, and the particle cluster moves in the virtual scene according to the motion trajectory.

[0158] The movement trajectory of the particle swarm in the virtual scene is determined by the movement logic that the target virtual creature swarm needs to execute; the generation range of the particle swarm and the generation position of each particle object can be determined by a random algorithm based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located.

[0159] In some embodiments, during specific calculations, the generation range of the particle swarm and the generation position of each particle object can be controlled according to the following formula.

[0160] Position=random((-1,0,-1),(1,0,1))*SpawnRange;

[0161] Lastposition1=[Position.x, HeightOceanPosition, Position.z];

[0162] Lastposition2=[Position.x, HeightTerrainPosition, Position.z];

[0163] Wherein, SpawnRange represents the generation range of the particle swarm, Position represents the position of each particle object, Position.x, Position.y, and Position.z represent the components of each particle object on the x, y, and z axes, Lastposition1 is the particle position updated using the ocean height map, HeightOceanPosition represents the world position height of the particle conforming to the ocean waveform, Lastposition2 is the particle position updated using the terrain height map, HeightTerrainPosition represents the world position height of the particle conforming to the terrain, and random(a, b) represents a random function between a and b.

[0164] By applying the embodiments of this application, it is possible to generate particle clusters that fit the terrain or ocean waveforms in a virtual scene for terrestrial or marine organisms, thereby making the fit between the target virtual organism and the virtual scene in the cluster animation corresponding to the target virtual organism cluster more natural.

[0165] Figure 8 This is a schematic flowchart illustrating another method for generating biological cluster animations provided in an embodiment of this application. Optionally, as... Figure 8 As shown, the above-mentioned rendering of the cluster animation corresponding to the target virtual biological cluster, based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, includes:

[0166] Step 801: Calculate the distance between each particle object and the preset camera.

[0167] Step 802: Based on the distance between each particle object and the preset camera, and according to the number of faces of the vertex texture animation model corresponding to each particle object, determine the target renderer corresponding to each particle object among multiple renderers.

[0168] The multiple renderers include: a first renderer, a second renderer, and a third renderer. The first renderer is used to render vertex texture animation models with a number of faces greater than a preset face number threshold. The second renderer is used to render vertex texture animation models with a number of faces less than the preset face number threshold. The third renderer is used to render the virtual background in the virtual scene.

[0169] In some embodiments, a third renderer can be used for bulletin board rendering, for example, rendering effects can be achieved based on Flipbook sequence frame animation.

[0170] Specifically, the vertex texture animation model can be exported together with the vertex texture animation of the target organism model. In practice, LOD (Level of Detail) technology can be used to determine the target renderer for each particle object across multiple renderers based on distance.

[0171] Optionally, the preset camera can be a player camera. By calculating the distance between each particle object and the preset camera, the target renderer corresponding to each particle object can be determined. In some embodiments, if the distance is less than or equal to a first preset distance, it indicates that the particle object is close to the preset camera, and the target renderer corresponding to the particle object is determined to be the first renderer; otherwise, if the distance is greater than the first preset distance and less than or equal to a second preset distance, the target renderer corresponding to the particle object is determined to be the second renderer; if the distance is greater than the second preset distance, it indicates that the particle object is far from the preset camera, and the target renderer corresponding to the particle object is determined to be the third renderer, wherein the second preset distance is greater than the first preset distance.

[0172] It should be noted that in some embodiments, the virtual background in the virtual scene can be predetermined and rendered by a third renderer. For the vertex texture animation model corresponding to each particle object, the number of faces of the vertex texture animation model corresponding to each particle object can be counted, and the relationship between the number of faces and the preset number of faces threshold can be compared. If it is greater than the threshold, it means that there are more faces and the first renderer can be used for rendering. Otherwise, it means that there are fewer faces and the second renderer can be used for rendering.

[0173] Step 803: Based on the target behavior state corresponding to each particle object, obtain the cluster animation corresponding to the target virtual biological cluster according to the vertex texture animation of the target renderer and the target biological individual model corresponding to each particle object.

[0174] Specifically, based on the distance between each particle object and the preset camera and / or the number of faces in the vertex texture animation model corresponding to each particle object, the vertex texture animation of the target renderer and the target biological individual model corresponding to each particle object can be used to render its corresponding vertex texture animation model. If the distance is relatively close and / or the number of faces in the vertex texture animation model corresponding to each particle object is greater than a preset face threshold, the first rendering model can be used to render in order to display the subtle surface features and textures of the target virtual biological and improve the rendering effect. If the distance is relatively far, the third rendering model can be used to render in order to improve the rendering performance. Otherwise, if the distance is moderate and / or the number of faces in the vertex texture animation model corresponding to each particle object is less than the preset face threshold, the second rendering model can be used to render in order to achieve a balance between rendering effect and rendering performance, so that the solution provided in this application embodiment can render on multiple platforms.

[0175] Based on the above description, in some embodiments, camera distance culling mechanism and view frustum culling mechanism can also be enabled to hide the vertex texture animation model, thereby saving rendering operations and improving the rendering effect.

[0176] Among them, the camera distance culling mechanism, which is based on a culling distance threshold, will cull the vertex texture animation model and not render it when the distance between the vertex texture animation model and the camera exceeds the culling distance threshold. In practice, this can be implemented through the LOD (Level of Detail) system. The view frustum culling mechanism corresponds to a view frustum, which is the visible area of ​​the camera. It is usually a truncated pyramid shape. Only objects within the view frustum will be rendered, and objects outside the view frustum will be culled.

[0177] In summary, the embodiments of this application are based on LOD (Level of Detail) technology, which can reduce the number of faces and the rendering burden, and improve rendering performance.

[0178] Figure 9 This is a rendering diagram of a biological cluster animation provided in an embodiment of this application. Figure 9 It can be seen that dolphin gregariousness with multiple behavioral states can be simulated, and the simulation effect is quite realistic and natural.

[0179] In summary, the embodiments of this application can achieve high-performance, multi-behavioral state animations with hundreds of thousands of characters, and support real-time interactive, highly realistic biological cluster effects.

[0180] Optionally, the above-mentioned rendering of a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0181] In debug mode, the rendering materials of vertex texture animation models are differentiated and identified by material shaders in each behavioral state, and / or the rendering colors of particle objects in each behavioral state are differentiated and identified in the particle system.

[0182] In some scenarios, to facilitate user debugging and simplify development, in debug mode, the rendering materials of vertex texture animation models in each behavioral state can be differentiated by material shaders. Optionally, different colors can be used for differentiation to achieve quick visual differentiation.

[0183] In some embodiments, AnimationStat is denoted as the behavior state identifier, and its corresponding implementation code can be found in the following content:

[0184] AnimationState = 1? Red: Green;

[0185] AnimationState = 2? Yellow: Orange;

[0186] AnimationState = 3? Purple: Blue;

[0187] Of course, the rendering color of particle objects in different behavioral states can also be differentiated within the particle system. For example, different colors can be used to distinguish them. When the behavioral state of a particle object is updated, the particle's color (Color) is normalized using the behavioral state identifier (AnimationStat) and used as a curve index (CurveIndex). This color-encodes the animation, allowing users to visually debug it. It should be noted that the specific differentiation method is not limited to this.

[0188] Optionally, the above-mentioned determination of a pre-made target biological individual model includes:

[0189] According to the preset face reduction rules, the face count of the pre-made initial target biological individual model is reduced to obtain the target biological individual model.

[0190] The preset reduction rules include at least one of the following: the distance between the target biological individual model and the preset camera, and the size parameters of the target biological individual model.

[0191] In some embodiments, when performing the face reduction operation, the distance between the virtual biological model and the preset camera can be considered. Optionally, if the distance between the two is large, the face count of the pre-made initial target biological individual model can be appropriately reduced.

[0192] Alternatively, the size parameters of the target biological individual model can be appropriately reduced in terms of the number of faces. For example, compared to dolphins, birds can be set to have fewer faces.

[0193] It should be noted that the preset polygon reduction rules are not limited to this. For example, polygon reduction can also be performed based on the distance between the target virtual creature and the preset camera. In particular, if the distance is far, corresponding polygon reduction can be performed. This is not limited here.

[0194] Furthermore, this application does not limit the number of remaining dough pieces after the reduction operation. Optionally, the number of dough pieces can be controlled to around 1000 through the reduction operation, but it is not limited to this. Optionally, the reduction operation can be implemented using the reduction function built into the DCC software.

[0195] In summary, the embodiments of this application can reduce the number of faces and the rendering burden by performing face reduction operations, thereby improving rendering performance. Furthermore, in conjunction with the foregoing embodiments, it can be seen that this application optimizes rendering resources, enriches the behavior of individual biological entities, improves interaction and rendering quality, and enhances system performance and user experience.

[0196] Figure 10 This is a functional module diagram of a biological cluster animation generation device provided in an embodiment of this application. The basic principle and technical effects of this device are the same as those of the corresponding method embodiments described above. For the sake of brevity, parts not mentioned in this embodiment can be referred to the corresponding content in the method embodiments.

[0197] like Figure 10 As shown, the apparatus 100 for generating the biological cluster animation includes:

[0198] The response module 110 is used to respond to the target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals;

[0199] The determining module 120 is used to determine a pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states;

[0200] The first generation module 130 is used to generate vertex texture animation of the target biological individual model based on the plurality of animation resources;

[0201] The second generation module 140 is used to generate a particle cluster that moves in a virtual scene according to the motion logic based on the particle system, wherein the particle cluster includes multiple particle objects and the particle cluster corresponds to the target virtual biological cluster.

[0202] The calculation module 150 is used to calculate the real-time motion state of each particle object in the particle swarm and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual.

[0203] The rendering module 160 is used to render and generate a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model.

[0204] In an optional implementation, the rendering module 160 is specifically used to obtain target animation playback parameters corresponding to each particle object based on the target behavior state corresponding to each particle object. The target animation playback parameters include: animation start frame identifier, number of frames played, animation playback speed, animation frame interval, and animation frame rate.

[0205] Based on the target animation playback parameters corresponding to each particle object, determine the target animation frame identifier and animation playback speed corresponding to each particle object;

[0206] Based on the target animation frame identifier and animation playback speed corresponding to each particle object, and based on the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0207] In an optional implementation, the rendering module 160 is specifically used to determine the target animation frame identifier corresponding to each particle object in the target behavior state as the animation start frame identifier corresponding to the target animation resource if the number of played frames is the total number of frames corresponding to the target animation resource.

[0208] In an optional implementation, the rendering module 160 is further configured to, if it is determined that the target animation frame identifier exceeds the range of the first animation frame identifier corresponding to the target behavior state, update the target behavior state identifier corresponding to the particle object according to the range of the second animation frame identifier indicated by the target animation frame identifier, wherein the range of the second animation frame identifier includes: the animation start frame identifier and the animation end frame identifier of the animation resource corresponding to the first behavior state.

[0209] In an optional implementation, the rendering module 160 is specifically used to determine whether the target behavior state corresponding to each particle object is a preset behavior state;

[0210] If so, determine whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier;

[0211] If so, add the preset event effect corresponding to the preset animation frame identifier to each of the particle objects;

[0212] Based on the vertex texture animation of the target biological individual model and the target behavior state, target animation frame identifier, and preset event effects corresponding to each particle object, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0213] In an optional implementation, the rendering module 160 is further configured to obtain the first current position of each particle object and the second current position of each collideable virtual object within a preset motion range;

[0214] Based on the distance between each of the first current positions and each of the second current positions, the target behavior state corresponding to at least a portion of the particle objects is updated;

[0215] The swarm animation is updated based on the target behavior state updated from at least a portion of the particle objects and the vertex texture animation of the target biological individual model.

[0216] In an optional implementation, the response module 110 is further configured to acquire motion state parameters of each particle object, the motion state parameters including: motion position and / or motion speed;

[0217] If the motion state parameters and / or state switching timers of each particle object are determined to meet the preset requirements, the target animation generation instruction is generated.

[0218] In an optional implementation, the second generation module 140 is specifically used to sample the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, based on the biological category to which the target virtual creature belongs.

[0219] Based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, a particle cluster is generated by a particle system that fits the terrain or ocean waveform in the virtual scene, and the particle cluster moves in the virtual scene according to the motion logic.

[0220] In an optional implementation, the rendering module 160 is specifically used to calculate the distance between each of the particle objects and the preset camera;

[0221] Based on the distance between each particle object and the preset camera, and the number of faces of the vertex texture animation model corresponding to each particle object, the target renderer corresponding to each particle object is determined among multiple renderers;

[0222] The plurality of renderers include: a first renderer, a second renderer, and a third renderer, wherein the first renderer is used to render vertex texture animation models with a number of faces greater than a preset number of faces threshold, the second renderer is used to render vertex texture animation models with a number of faces less than a preset number of faces threshold, and the third renderer is used to render virtual backgrounds in virtual scenes.

[0223] Based on the target behavior state corresponding to each particle object, and according to the target renderer corresponding to each particle object and the vertex texture animation of the target biological individual model, the cluster animation corresponding to the target virtual biological cluster is obtained.

[0224] In an optional implementation, the rendering module 160 is specifically used in debug mode to differentiate the rendering material of the vertex texture animation model in each behavioral state through a material shader, and / or to differentiate the rendering color of the particle object in each behavioral state in the particle system.

[0225] In an optional implementation, the determining module 120 is specifically used to perform a face reduction operation on the face count of the pre-made initial target biological individual model according to a preset face reduction rule to obtain the target biological individual model. The preset face reduction rule includes at least one of the following: the distance between the target biological individual model and the preset camera, and the size parameters of the target biological individual model.

[0226] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0227] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0228] Figure 11 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. This electronic device can be integrated into the aforementioned device. Figure 11As shown, the electronic device may include a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device is running, the processor 210 communicates with the storage medium 220 via the bus 230. The processor 210 executes the machine-readable instructions to perform the steps of the following method embodiment:

[0229] In response to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals;

[0230] A pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model are determined, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states;

[0231] Based on the multiple animation resources, a vertex texture animation of the target biological individual model is generated;

[0232] Based on the particle system, a particle cluster is generated that moves in the virtual scene according to the motion logic. The particle cluster includes multiple particle objects and corresponds to the target virtual biological cluster.

[0233] Calculate the real-time motion state of each particle object in the particle swarm, and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual;

[0234] Based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0235] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0236] Based on the target behavior state corresponding to each particle object, the target animation playback parameters corresponding to each particle object are obtained. The target animation playback parameters include: animation start frame identifier, number of frames played, animation playback speed, animation frame interval, and animation frame rate.

[0237] Based on the target animation playback parameters corresponding to each particle object, determine the target animation frame identifier and animation playback speed corresponding to each particle object;

[0238] Based on the target animation frame identifier and animation playback speed corresponding to each particle object, and based on the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0239] In an optional implementation, determining the target animation frame identifier corresponding to each particle object based on the target animation playback parameters corresponding to each particle object includes:

[0240] If the number of played frames is the total number of frames corresponding to the target animation resource, then the target animation frame identifier corresponding to each particle object in the target behavior state is determined as the animation start frame identifier corresponding to the target animation resource.

[0241] In an optional implementation, the method further includes:

[0242] If it is determined that the target animation frame identifier exceeds the range of the first animation frame identifier corresponding to the target behavior state, then the target behavior state identifier corresponding to the particle object is updated according to the range of the second animation frame identifier indicated by the target animation frame identifier. The range of the second animation frame identifier includes: the animation start frame identifier and the animation end frame identifier of the animation resource corresponding to the first behavior state.

[0243] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0244] Determine whether the target behavior state corresponding to each particle object is a preset behavior state;

[0245] If so, determine whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier;

[0246] If so, add the preset event effect corresponding to the preset animation frame identifier to each of the particle objects;

[0247] Based on the vertex texture animation of the target biological individual model and the target behavior state, target animation frame identifier, and preset event effects corresponding to each particle object, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0248] In an optional implementation, after rendering and generating the cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, the method further includes:

[0249] The first current position of each particle object and the second current position of each collideable virtual object within a preset motion range are obtained respectively;

[0250] Based on the distance between each of the first current positions and each of the second current positions, the target behavior state corresponding to at least a portion of the particle objects is updated;

[0251] The swarm animation is updated based on the target behavior state updated from at least a portion of the particle objects and the vertex texture animation of the target biological individual model.

[0252] In an optional implementation, the method further includes:

[0253] Obtain the motion state parameters of each particle object, the motion state parameters including: motion position and / or motion velocity;

[0254] If the motion state parameters and / or state switching timers of each particle object are determined to meet the preset requirements, the target animation generation instruction is generated.

[0255] In an optional implementation, the generation of particle swarms that move in the virtual scene according to the motion logic based on the particle system includes:

[0256] Based on the biological category to which the target virtual creature belongs, sample the terrain height map or ocean height map of the virtual scene in which the target virtual creature is located;

[0257] Based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, a particle cluster is generated by a particle system that fits the terrain or ocean waveform in the virtual scene, and the particle cluster moves in the virtual scene according to the motion logic.

[0258] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0259] Calculate the distance between each of the particle objects and the preset camera;

[0260] Based on the distance between each particle object and the preset camera, and the number of faces of the vertex texture animation model corresponding to each particle object, the target renderer corresponding to each particle object is determined among multiple renderers;

[0261] The plurality of renderers include: a first renderer, a second renderer, and a third renderer, wherein the first renderer is used to render vertex texture animation models with a number of faces greater than a preset number of faces threshold, the second renderer is used to render vertex texture animation models with a number of faces less than a preset number of faces threshold, and the third renderer is used to render virtual backgrounds in virtual scenes.

[0262] Based on the target behavior state corresponding to each particle object, and according to the target renderer corresponding to each particle object and the vertex texture animation of the target biological individual model, the cluster animation corresponding to the target virtual biological cluster is obtained.

[0263] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0264] In debug mode, the rendering materials of vertex texture animation models are differentiated and identified by material shaders in each behavioral state, and / or the rendering colors of particle objects in each behavioral state are differentiated and identified in the particle system.

[0265] In an optional implementation, determining the pre-made target biological individual model includes:

[0266] According to a preset face reduction rule, the face count of the pre-made initial target biological individual model is reduced to obtain the target biological individual model. The preset face reduction rule includes at least one of the following: the distance between the target biological individual model and the preset camera, and the size parameters of the target biological individual model.

[0267] The specific implementation methods and technical effects of the above steps are similar to those described above, and will not be repeated here.

[0268] Optionally, this application also provides a storage medium storing a computer program, which, when run by a processor, executes the steps of the following method embodiments:

[0269] In response to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals;

[0270] A pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model are determined, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states;

[0271] Based on the multiple animation resources, a vertex texture animation of the target biological individual model is generated;

[0272] Based on the particle system, a particle cluster is generated that moves in the virtual scene according to the motion logic. The particle cluster includes multiple particle objects and corresponds to the target virtual biological cluster.

[0273] Calculate the real-time motion state of each particle object in the particle swarm, and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual;

[0274] Based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0275] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0276] Based on the target behavior state corresponding to each particle object, the target animation playback parameters corresponding to each particle object are obtained. The target animation playback parameters include: animation start frame identifier, number of frames played, animation playback speed, animation frame interval, and animation frame rate.

[0277] Based on the target animation playback parameters corresponding to each particle object, determine the target animation frame identifier and animation playback speed corresponding to each particle object;

[0278] Based on the target animation frame identifier and animation playback speed corresponding to each particle object, and based on the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0279] In an optional implementation, determining the target animation frame identifier corresponding to each particle object based on the target animation playback parameters corresponding to each particle object includes:

[0280] If the number of played frames is the total number of frames corresponding to the target animation resource, then the target animation frame identifier corresponding to each particle object in the target behavior state is determined as the animation start frame identifier corresponding to the target animation resource.

[0281] In an optional implementation, the method further includes:

[0282] If it is determined that the target animation frame identifier exceeds the range of the first animation frame identifier corresponding to the target behavior state, then the target behavior state identifier corresponding to the particle object is updated according to the range of the second animation frame identifier indicated by the target animation frame identifier. The range of the second animation frame identifier includes: the animation start frame identifier and the animation end frame identifier of the animation resource corresponding to the first behavior state.

[0283] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0284] Determine whether the target behavior state corresponding to each particle object is a preset behavior state;

[0285] If so, determine whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier;

[0286] If so, add the preset event effect corresponding to the preset animation frame identifier to each of the particle objects;

[0287] Based on the vertex texture animation of the target biological individual model and the target behavior state, target animation frame identifier, and preset event effects corresponding to each particle object, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

[0288] In an optional implementation, after rendering and generating the cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, the method further includes:

[0289] The first current position of each particle object and the second current position of each collideable virtual object within a preset motion range are obtained respectively;

[0290] Based on the distance between each of the first current positions and each of the second current positions, the target behavior state corresponding to at least a portion of the particle objects is updated;

[0291] The swarm animation is updated based on the target behavior state updated from at least a portion of the particle objects and the vertex texture animation of the target biological individual model.

[0292] In an optional implementation, the method further includes:

[0293] Obtain the motion state parameters of each particle object, the motion state parameters including: motion position and / or motion velocity;

[0294] If the motion state parameters and / or state switching timers of each particle object are determined to meet the preset requirements, the target animation generation instruction is generated.

[0295] In an optional implementation, the generation of particle swarms that move in the virtual scene according to the motion logic based on the particle system includes:

[0296] Based on the biological category to which the target virtual creature belongs, sample the terrain height map or ocean height map of the virtual scene in which the target virtual creature is located;

[0297] Based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, a particle cluster is generated by a particle system that fits the terrain or ocean waveform in the virtual scene, and the particle cluster moves in the virtual scene according to the motion logic.

[0298] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0299] Calculate the distance between each of the particle objects and the preset camera;

[0300] Based on the distance between each particle object and the preset camera, and the number of faces of the vertex texture animation model corresponding to each particle object, the target renderer corresponding to each particle object is determined among multiple renderers;

[0301] The plurality of renderers include: a first renderer, a second renderer, and a third renderer, wherein the first renderer is used to render vertex texture animation models with a number of faces greater than a preset number of faces threshold, the second renderer is used to render vertex texture animation models with a number of faces less than a preset number of faces threshold, and the third renderer is used to render virtual backgrounds in virtual scenes.

[0302] Based on the target behavior state corresponding to each particle object, and according to the target renderer corresponding to each particle object and the vertex texture animation of the target biological individual model, the cluster animation corresponding to the target virtual biological cluster is obtained.

[0303] In an optional implementation, the step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes:

[0304] In debug mode, the rendering materials of vertex texture animation models are differentiated and identified by material shaders in each behavioral state, and / or the rendering colors of particle objects in each behavioral state are differentiated and identified in the particle system.

[0305] In an optional implementation, determining the pre-made target biological individual model includes:

[0306] According to a preset face reduction rule, the face count of the pre-made initial target biological individual model is reduced to obtain the target biological individual model. The preset face reduction rule includes at least one of the following: the distance between the target biological individual model and the preset camera, and the size parameters of the target biological individual model.

[0307] The specific implementation methods and technical effects of the above steps are similar to those described above, and will not be repeated here.

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

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

[0310] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0311] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0312] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0313] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need further definition and explanation in subsequent figures. The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating animations of biological clusters, characterized in that, The method includes: In response to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals; A pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model are determined, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states; Based on the multiple animation resources, a vertex texture animation of the target biological individual model is generated; Based on the particle system, a particle cluster is generated that moves in the virtual scene according to the motion logic. The particle cluster includes multiple particle objects and corresponds to the target virtual biological cluster. Calculate the real-time motion state of each particle object in the particle swarm, and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual; Based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

2. The method according to claim 1, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: Based on the target behavior state corresponding to each particle object, the target animation playback parameters corresponding to each particle object are obtained. The target animation playback parameters include: animation start frame identifier, number of frames played, animation playback speed, animation frame interval, and animation frame rate. Based on the target animation playback parameters corresponding to each particle object, determine the target animation frame identifier and animation playback speed corresponding to each particle object; Based on the target animation frame identifier and animation playback speed corresponding to each particle object, and based on the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

3. The method according to claim 2, characterized in that, The step of determining the target animation frame identifier corresponding to each particle object based on the target animation playback parameters corresponding to each particle object includes: If the number of played frames is the total number of frames corresponding to the target animation resource, then the target animation frame identifier corresponding to each particle object in the target behavior state is determined as the animation start frame identifier corresponding to the target animation resource.

4. The method according to claim 2, characterized in that, The method further includes: If it is determined that the target animation frame identifier exceeds the range of the first animation frame identifier corresponding to the target behavior state, then the target behavior state identifier corresponding to the particle object is updated according to the range of the second animation frame identifier indicated by the target animation frame identifier. The range of the second animation frame identifier includes: the animation start frame identifier and the animation end frame identifier of the animation resource corresponding to the first behavior state.

5. The method according to claim 2, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: Determine whether the target behavior state corresponding to each particle object is a preset behavior state; If so, determine whether the target animation frame identifier corresponding to each particle object is a preset animation frame identifier; If so, add the preset event effect corresponding to the preset animation frame identifier to each of the particle objects; Based on the vertex texture animation of the target biological individual model and the target behavior state, target animation frame identifier, and preset event effects corresponding to each particle object, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

6. The method according to claim 1, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: The first current position of each particle object and the second current position of each collideable virtual object within a preset motion range are obtained respectively; Based on the distance between each of the first current positions and each of the second current positions, the target behavior state corresponding to at least a portion of the particle objects is updated; The swarm animation is updated based on the target behavior state updated from at least a portion of the particle objects and the vertex texture animation of the target biological individual model.

7. The method according to claim 1, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: Obtain the motion state parameters of each particle object, the motion state parameters including: motion position and / or motion velocity; The timing of switching the target behavior state is determined based on the motion state parameters of each particle and / or the state switching timer. Based on the target behavior state corresponding to each particle object, the timing of the switching of the target behavior state, and the vertex texture animation of the target biological individual model, a cluster animation corresponding to the target virtual biological cluster is rendered and generated.

8. The method according to claim 1, characterized in that, The generation of particle swarms that move in the virtual scene according to the motion logic based on the particle system includes: Based on the biological category to which the target virtual creature belongs, sample the terrain height map or ocean height map of the virtual scene in which the target virtual creature is located; Based on the terrain height map or ocean height map of the virtual scene where the target virtual creature is located, a particle cluster is generated by a particle system that fits the terrain or ocean waveform in the virtual scene, and the particle cluster moves in the virtual scene according to the motion logic.

9. The method according to claim 1, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: Calculate the distance between each of the particle objects and the preset camera; Based on the distance between each particle object and the preset camera, and according to the number of faces of the vertex texture animation model corresponding to each particle object, the target renderer corresponding to each particle object is determined among multiple renderers. The plurality of renderers include: a first renderer, a second renderer, and a third renderer, wherein the first renderer is used to render vertex texture animation models with a number of faces greater than a preset number of faces threshold, the second renderer is used to render vertex texture animation models with a number of faces less than a preset number of faces threshold, and the third renderer is used to render virtual backgrounds in virtual scenes. Based on the target behavior state corresponding to each particle object, and according to the target renderer corresponding to each particle object and the vertex texture animation of the target biological individual model, the cluster animation corresponding to the target virtual biological cluster is obtained.

10. The method according to claim 1, characterized in that, The step of rendering and generating a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model includes: In debug mode, the rendering materials of vertex texture animation models are differentiated and identified by material shaders in each behavioral state, and / or the rendering colors of particle objects in each behavioral state are differentiated and identified in the particle system.

11. The method according to any one of claims 1-10, characterized in that, The determination of the pre-made target biological individual model includes: According to a preset face reduction rule, the face count of the pre-made initial target biological individual model is reduced to obtain the target biological individual model. The preset face reduction rule includes at least one of the following: the distance between the target biological individual model and the preset camera, and the size parameters of the target biological individual model.

12. A device for generating animations of biological clusters, characterized in that, include: A response module is used to respond to a target animation generation instruction, determine the target virtual biological cluster to which the target animation generation instruction is directed, and the motion logic that the target virtual biological cluster needs to execute in the cluster animation, wherein the target virtual biological cluster includes multiple biological individuals; The determination module is used to determine a pre-made target biological individual model and multiple animation resources corresponding to the target biological individual model, wherein each animation resource is used to display the action performance of the biological individual when it is in a corresponding behavioral state, and the biological individual includes multiple behavioral states; The first generation module is used to generate vertex texture animation of the target biological individual model based on the multiple animation resources; The second generation module is used to generate a particle cluster that moves in the virtual scene according to the motion logic based on the particle system, wherein the particle cluster includes multiple particle objects and the particle cluster corresponds to the target virtual biological cluster. The calculation module is used to calculate the real-time motion state of each particle object in the particle swarm and determine the target behavior state that matches the real-time motion state from the multiple behavior states of the biological individual. The rendering module is used to render and generate a cluster animation corresponding to the target virtual biological cluster based on the target behavior state corresponding to each particle object and the vertex texture animation of the target biological individual model.

13. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating biological cluster animation as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for generating biological cluster animation as described in any one of claims 1-11.