Animation effect generation method and device, electronic equipment and readable storage medium
By obtaining and utilizing the displacement information in the target motion map, the target object model in the game scene generates animation effects on the motion trajectory, solving the problem that vertex animation cannot interact with the scene and consumes a lot of resources in the prior art, and realizing the interaction between animation effects and scenes and resource reuse.
Patent Information
- Application Number
- CN202311523503.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2043-11-14
AI Technical Summary
When the prior art realizes the 3A realistic effect, the special effects using vertex animation cannot interact with the actual scene, and the resources are consumed heavily and cannot be reused.
By obtaining the displacement information in the target motion map, the target object model in the game scene generates animation effects on the motion trajectory, realizes the interaction between the object model and the scene, and allows the multiplexing of the motion map on different models.
It realizes the interaction between animation effects and scenes, saves resource consumption, avoids resource waste, and improves the reusability of animation effects.
Smart Images

Figure CN120014121A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rendering technology, and in particular to an animation effect generation method, an animation effect generation device, a corresponding electronic device, and a corresponding computer-readable storage medium. Background Art
[0002] The realization of special effects usually relies on the realization of animation. Animation can be divided into skeletal animation, particle animation, material animation and vertex animation. The first three types of animation are widely used due to their low cost, small bandwidth and complete tools. Although vertex animation is less commonly used in the game industry that requires real-time rendering, vertex animation technology is usually used to achieve 3A realistic effects.
[0003] In related technologies, complex special effects in the engine are mainly achieved by making animations in the external software Houdini, and then importing the complete model into the Messiah engine for reproduction. However, for special effects generation solutions using vertex animation, the special effects cannot interact with the actual scene, the resources are large and cannot be reused. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide an animation effect generation method, an animation effect generation device, a corresponding electronic device and a corresponding computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] An embodiment of the present invention discloses a method for generating an animation effect, the method comprising:
[0006] Obtaining a target motion map, and obtaining displacement information of target particles from the target motion map; wherein the target motion map is used to record the corresponding relationship between the displacement information of the target particles and the motion time;
[0007] A target object model in a game scene is determined, and a position of the target object model is indicated according to the displacement information of the target particle to control a motion trajectory of the target object model in the game scene and generate an animation effect of the target object model.
[0008] The embodiment of the present invention further discloses an animation effect generating device, the device comprising:
[0009] A displacement information acquisition module, used to acquire a target motion map, and to acquire the displacement information of the target particles from the target motion map; wherein the target motion map is used to record the corresponding relationship between the displacement information of the target particles and the motion time;
[0010] The animation effect generation module is used to determine the target object model in the game scene, indicate the position of the target object model according to the displacement information of the target particle, control the motion trajectory of the target object model in the game scene, and generate the animation effect of the target object model.
[0011] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements any one of the animation effect generation methods when executed by the processor.
[0012] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the animation effect generation methods is implemented.
[0013] The embodiments of the present invention include the following advantages:
[0014] In an embodiment of the present invention, by obtaining the displacement information of the target particles from the target motion map, the position of the target object model in the game scene is indicated through the correspondence between the displacement information of the target particles and the motion time, and then the motion trajectory of the target object model in the game scene is controlled to generate the animation effect of the target object model. By importing the motion map, the motion trajectory of the object model in the game scene is controlled based on the displacement information provided by the motion map, and the interaction between the animation effect of the object model and the scene is realized. The motion trajectory of different models can be controlled based on the acquired motion map to generate corresponding animation effects, and the motion map resource can be reused on different models, saving resources to avoid resource waste. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a flowchart of steps of an embodiment of an animation effect generating method of the present invention;
[0016] Figure 2 is a schematic diagram of the framework of the animation effect generation system provided by an embodiment of the present invention;
[0017] Figure 3 It is a flowchart of an animation effect generation system provided by an embodiment of the present invention;
[0018] Figure 4 is a flowchart of another method for generating animation effects according to an embodiment of the present invention;
[0019] FIG. 5A to FIG. 5F is an example diagram of particle motion provided by an embodiment of the present invention;
[0020] Figure 6is a control schematic diagram of a global switch provided by an embodiment of the present invention;
[0021] Figure 7 is a schematic diagram of controlling the offset range provided by an embodiment of the present invention;
[0022] Figure 8 It is a structural block diagram of an embodiment of an animation effect generating device of the present invention. DETAILED DESCRIPTION
[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] To facilitate those skilled in the art to understand the present invention, the following explains the terms or nouns involved in the following embodiments of the present invention:
[0025] Houdini: is a three-dimensional computer graphics software.
[0026] Messiah: It can be translated into Chinese as "Messiah". The Messiah engine is a new cross-platform game engine.
[0027] 3A realistic effect: refers to games or images with high resolution, high details and realistic effects.
[0028] Vertex Animation Texture, or VAT for short, is a technology that pre-encodes the vertex animation information of a model into a texture and calls it in the real-time rendering stage;
[0029] Particle animation: The particle animation proposed in the embodiment of the present invention mainly refers to Particle AnimationTexture, referred to as PAT, which is a new process and technology proposed in the embodiment of the present invention. It is different from the traditional Messiah engine. It can mainly export the point cloud in Houdini in the form of a map. In the Messiah engine, by sampling the map and giving a suitable speed, each point is controlled to move to the position recorded in the map.
[0030] Point cloud: A collection of data points in space that represents a 3D shape or object.
[0031] EXR: OpenEXR, EXR means Extended Range, an image storage format that can contain a wider color space than traditional RGB to accommodate higher color depth and larger exposure dynamic range, that is, it can store pixel values represented by floating-point numbers.
[0032] TGA: Tagged Image File Format, an image storage format that mainly stores pixel values represented by integers.
[0033] AABB: Axis-Aligned Bounding Box, AABB bounding box, refers to the creation of a regular geometric shape to enclose the object in order to simplify the collision detection operation between objects in the game. AABB bounding box is also called axial parallel bounding box.
[0034] Complex special effects are usually achieved through complex particle motion, which is controlled based on particle animation. For complex special effects in the engine, they are mainly achieved by animating in the external software Houdini and then reproducing them through the Messiah engine.
[0035] In the related art, it can be expressed as generating special effects by using vertex animation. Specifically, based on the vertex animation texture, the displacement data of each vertex can be recorded in the texture, and then the texture with the displacement data can be input into the world position parameter of the vertex shader, so that the GPU can restore each frame of animation. Exemplarily, in the VAT texture baked by Houdini, its horizontal axis mainly indicates that each point corresponds to a vertex on the aggregate based on the vertex number, and the vertical axis is the time axis, that is, each point on the plane corresponds to the coordinate displacement of a vertex at a certain moment, and then the displacement map and the normal map can be imported into the Messiah engine, and the motion effect can be achieved by matching the parameters.
[0036] However, Houdini's baking of VAT textures requires that the entire model be imported into the Messiah engine, and VAT records the motion information of each vertex of the model. For example, in a scenario where it is expected to achieve a special effect of fallen leaves converging to form a certain pattern, it is assumed that all 10 vertices of a maple leaf are imported. At this time, when a single frame is imported, the number is 1000, and the animation is 200 frames. Assuming double-line writing of data, 10*1000*200*2=4 million points need to be imported. Not only can the produced map not be reused in other existing models in the warehouse, but it is also easy to cause a waste of resources. In addition, VAT requires 2 TGA integer maps. Assuming that 400 In the case of 10,000 points, two maps need to be imported, that is, 8 million points. While the amount of data is large, that is, the amount of resources is large, the accuracy of the data is low because the map is an integer type. Furthermore, based on the influence of the engine's size limit on the map, when the amount of particles is large, VAT needs to be produced in batches, resulting in high time and resource costs; and, when the texture map is imported into the Messiah engine, since the VAT map is in an integer format and cannot store absolute coordinate information, the data needs to be remapped at this time, that is, a series of data such as the bounding box size and frame range need to be filled in. The process is cumbersome, and the data filled in cannot control the speed change, making the motion effect achieved by the particle motion relatively rigid. In addition, VAT is a pure custom animation, which can only be played back in a fixed manner in the game. It cannot interact with the actual game scene, such as interacting with fallen leaves in the game scene, and a large number of rigid body animations are too expensive, which may also cause high overhead problems.
[0037] In order to achieve interaction in the game and simplify the process, reduce overhead, and prepare for optimization for online mass production, the embodiment of the present invention proposes a new process and new technology PAT, which exports the point cloud in Houdini in the form of a map, and in the Messiah engine, by sampling the map and giving a suitable speed, controls each target object model to move to the position recorded in the map. Specifically, when a single frame is imported into the Messiah engine, assuming that a special effect of fallen leaves converging to form a certain pattern is desired, it is only necessary to merge, for example, 10 vertices of a maple leaf into one center point for import, and the center point obtained by merging multiple vertices can be used to indicate the center point of the model to be replaced later, and then the imported center point is replaced by an existing model in the warehouse or an object model in the game scene, so that the produced texture can be reused on different models, thereby saving resources; and PAT only needs to use one EXR floating-point texture, which not only has a small amount of data and high precision, but also because the PAT texture records the overall motion information of a single particle (model), the information recorded is more concise, so the PAT texture is very small and is not limited by the size limit of the texture in the engine; and, because the PAT texture is in floating-point format, it can directly store absolute coordinate information without remapping the data. After the texture is imported into the Messiah engine, only a small amount of data such as the frame rate needs to be filled in to control the motion trajectory, and the process is simple, and variable speed control can be achieved.
[0038] Reference Figure 1 , shows a flowchart of an embodiment of an animation effect generation method of the present invention, which may specifically include the following steps:
[0039] Step 101, obtaining a target motion map, and obtaining displacement information of target particles from the target motion map;
[0040] The target motion map can be used to record the relevant motion of the target particles during particle motion, which can be mainly reflected as the correspondence between the displacement information of the target particles and the motion time. This correspondence can be used to indicate the specific position to which the target particles move at a specific time point.
[0041] In an embodiment of the present invention, a target motion map may be obtained so as to subsequently perform corresponding motion control based on relevant particle motion information recorded in the target motion map.
[0042] In practical applications, the acquired target motion map can be a PAT map. In the PAT map imported into the Messiah engine, it is not necessary to import all the large number of particles generated in the Houdini software. In order to reduce the amount of data imported into a single frame, only a small number of particles may be imported. As an example, the PAT map can only record a small number of trajectories. In subsequent operations, multiple target particles can be allowed to move along the same PAT trajectory. Different random offsets can be added to each particle to reduce the amount of data. As another example, the PAT map can only record the relevant movement of the center particle, and the center particle is used as the target particle. The center particle can be obtained by merging multiple particles in the point cloud. For example, the 10 vertices of a maple leaf can be merged into 1 center point for import, so that only a small number of particles can be imported.
[0043] It should be noted that the formats of PAT maps generally include TAG format and EXR format. The motion map obtained in the embodiment of the present invention adopts the format of EXR floating-point map, which makes it possible to further reduce the amount of data imported by a single frame while reducing the amount of data, and improve the accuracy of the stored data based on floating-point storage data.
[0044] Step 102, determining the target object model in the game scene, indicating the position of the target object model according to the displacement information of the target particle, so as to control the motion trajectory of the target object model in the game scene and generate an animation effect of the target object model.
[0045] In one embodiment of the present invention, the position of the target object model in the game scene can be indicated based on the displacement information of the target particles recorded by the target motion map, that is, the position of the target object model can be determined according to the displacement information of the target particles, thereby controlling the motion trajectory of the target object model in the game scene.
[0046] Specifically, when indicating the position, the target particle can be regarded as the center point of the target object model in the game scene, then the displacement information of the target particle can indicate the position of the target object model, which can be the center point position. In the specific implementation, the acquisition of the displacement information of the target particle is related to different sampling modes. Since the displacement information is mainly used to indicate the position of the target object model, the sampling mode is aimed at the sampling mode corresponding to the target object model, which can be mainly based on the relevant animation effect to be presented by the target object model. At this time, the target motion map can be sampled according to the sampling mode to determine the displacement information of the target particle and indicate the center point position of the target object model.
[0047] In practical applications, since the target particle can be regarded as the center point of the target object model in the game scene, it can be understood as controlling the motion trajectory of the determined target object model based on the displacement information collected by its corresponding sampling mode based on the center point of the model, so as to realize the control of the motion trajectory of the target object model in the game scene, obtain the animation effect corresponding to the target object model, and then realize the reuse of the motion map resource on different models.
[0048] Among them, the animation effect corresponding to the target object model can be an interactive animation, and the animation can be triggered by the skills of the virtual character. The target object model in the game scene can be expressed as materials near the virtual character, such as waterfalls, fallen leaves, etc.
[0049] Exemplarily, assuming that it is desired to realize the special effect of fallen leaves converging to form a certain pattern, the target object model to be formed for the interactive dynamic effect can be the fallen leaves in the game scene. At this time, the target particles in the target motion map can be directly replaced with the aforementioned target object model, and the corresponding motion trajectory of the replaced fallen leaves can be controlled according to the displacement information of the target particles to achieve different animation effects. In an embodiment of the present invention, by obtaining the displacement information of the target particles from the target motion map, the position of the target object model in the game scene is indicated through the correspondence between the recorded displacement information of the target particles and the motion time, and then the motion trajectory of the target object model in the game scene is controlled to generate the animation effect of the target object model. By importing the motion map, the motion trajectory of the object model in the game scene is controlled based on the displacement information provided by the motion map, and the interaction between the animation effect of the object model and the scene is realized, and the motion trajectory of different models can be controlled based on the acquired motion map to generate corresponding animation effects, so as to realize the reuse of the motion map resource on different models, save resources, and avoid resource waste.
[0050] Reference Figure 2 , shows a schematic diagram of the framework of an animation effect generation system provided by an embodiment of the present invention. The animation effect generation system in the embodiment of the present invention mainly focuses on the generation of particle special effects, that is, it is mainly manifested in generating animation effects based on the control of particle motion, such as Figure 3 As shown, the animation effect generation system 210 may include Houdini software 21 and Messiah engine 22 deployed on the client.
[0051] Among them, Houdini software 21 is a three-dimensional computer graphics software, and Messiah engine 22 is a new cross-platform game engine. Complex special effects are usually achieved through complex particle motion, and particle motion is controlled based on particle animation. Houdini software 21 is a professional special effects software that can make more complex particle motion; then, the complex special effects in the engine can be mainly manifested by animation production in the external software Houdini 21, and then reproduction through Messiah engine 22.
[0052] Specifically, Figure 3 As shown in part (A) of the figure, particle motion can be generated in Houdini software 21, particle animation PAT can be made, and point cloud information in the particle animation PAT can be exported in the form of a texture, that is, a PAT motion texture can be obtained. The motion texture can be used to record the correspondence between the displacement information of the particle and the motion time; then, the motion texture exported by Houdini software 21 can be imported into the Messiah engine, and the displacement information of the imported motion texture can be sampled in the Messiah engine to control the movement of each target particle to the position recorded in the texture. It should be noted that when importing into the Messiah engine 22, as shown in FIG. Figure 3 As shown in part (B) of FIG. 1 , in the Houdini software 21, only a small number of particles in the point cloud can be imported as target particles, and in the Messiah engine 22, Figure 3 As shown in part (C) of the figure, the imported particles can be replaced with target object models that produce interactive effects in the game scene.
[0053] Reference Figure 4 , shows a flowchart of another animation effect generation method embodiment of the present invention, which is applied to Figure 3 The animation effect generation system shown may specifically include the following steps:
[0054] Step 401, obtaining a target motion map;
[0055] The target motion map can be used to record the relevant motion of the target particles during particle motion, which can be mainly reflected as the correspondence between the displacement information of the target particles and the motion time. This correspondence can be used to indicate the specific position to which the target particles move at a specific time point.
[0056] In an embodiment of the present invention, in order to facilitate corresponding motion control based on relevant particle motion information recorded in the target motion map to generate animation effects, the target motion map may be acquired.
[0057] In practical applications, the target motion map can be acquired by importing the motion map exported by Houdini software into the Messiah engine.
[0058] Specifically, the target particles in the target motion map are mainly used to indicate the position of the target point reached after the movement. At this time, a particle terminal position map corresponding to the target motion map can be made in the Houdini software. At this time, the displacement information of the randomly generated particles moving from their generation position to the terminal position indicated by the terminal particle position map can be recorded in the target motion map in correspondence with the movement time.
[0059] In a specific implementation, randomly generated particles can be obtained by emitting from random positions via a particle system. A collection of particles emitted by a particle system can be called a point cloud. The particle point in the particle terminal position diagram can be understood as the end point of the movement, that is, the particles emitted from random positions by the particle system finally reach the target point after a series of movements.
[0060] For example, assuming that it is desired to achieve a special effect of fallen leaves converging to form a certain pattern, the particle end position map can be as follows: Figure 5A As shown in the custom graph, there may be particle points on the custom graph for forming a corresponding custom pattern. The target point position to which the randomly generated point cloud moves can be controlled based on the particle points of the custom pattern, thereby attracting the point cloud into the aforementioned shape.
[0061] Among them, a preset trajectory can be obtained, which can refer to the motion trajectory of particles emitted by the particle system from random positions to particle points on the custom map, so as to control the randomly generated particles to move from their generation positions to the end positions indicated by the end particle position map according to the preset trajectory, that is, the positions of the particle points on the custom map, and then the point cloud information can be recorded in the motion map. Among them, the point cloud information is the relevant motion information of the particles.
[0062] In practical applications, Houdini software controls the movement of particles according to a preset trajectory, which can be achieved through a particle solver. For example, various spiral forces, attractive forces, disturbing forces, etc. can be used in the particle solver to attract particles to a specific position. Specifically, Figure 5BAs shown. The particle solving process can be expressed as the corresponding node triggering. For example, you can use the spiral force (node: POP Axis Force) to make the particles spin in circles when the virtual protagonist waves his hands left and right to accumulate power according to the animation sequence K frames. In the middle, use the attraction force (node: POP Attract) to make the particles gather around the virtual protagonist. Finally, use the attraction force (node: POP Attract) to give a negative direction when the skill is released, so that the particles can explode. The whole process is coordinated with the disturbance force (node: POP Force) and air resistance (node: POP Drag) to make the subsequent generated animation effect more natural. It should be noted that the function settings of the spiral force, attraction force, and disturbance force are preset and not actively triggered. Usually, manual design is required to coordinate with the actions of the virtual character to control the movement of the particles. In addition, the particles outside the shape after solving can be deleted to obtain the following Figure 5C Clear section custom pattern shown.
[0063] In a preferred embodiment, for the convenience of production, a division process can be performed in the process of generating the target motion map. Specifically, the particle terminal position map can be divided into multiple position maps, and then the displacement information of the randomly generated particles moving from their generation positions to the terminal positions indicated by the terminal particle position map is respectively matched with the movement time, and the motion maps corresponding to each position map are respectively recorded, and then the multiple motion maps are combined into a target motion map.
[0064] Among them, the motion map generated by the Houdini software is a PAT map. When the map is exported through the Houdini software later, the motion maps corresponding to each position map recorded separately are not exported, but only the target motion map obtained by the final superposition and merging is exported.
[0065] For example, assuming that the particle endpoint position map is a custom map formed by particle points, the custom map can be divided into multiple position maps. The division strategy can be divided according to the characteristics of the pattern to be formed. For example, the custom map can be divided into two parts: a single circle and a rectangle with an arc on one side. Two position maps are obtained respectively to indicate the position of the randomly generated particles that finally reach the target point after a series of movements, and the movement information of the particles is recorded in the corresponding motion maps respectively. Finally, the motion maps corresponding to the two position maps are merged to form a Figure 5D The target motion map shown.
[0066] In a preferred embodiment, the movement time in the target motion map can also be adjusted by speed change, and the current target motion map is replaced by the adjusted target motion map. The speed change adjustment can be controlled based on the animation rhythm, and the animation rhythm can usually be determined based on the key frames of the protagonist's action, such as accelerating the particle animation to explode at the moment when the protagonist releases a skill, etc., which is not limited in the embodiment of the present invention.
[0067] In addition, the frame rate corresponding to the target motion map can also be recorded, and the recorded frame rate can be used to indicate the playback frame rate of the animation effect of the target object model. The frame rate runs through the entire animation process, which refers to the number of frames played per second in the animation, and 30 frames per second is common. The recorded frame rate is convenient for the frame rate filled in the Messiah engine later to be consistent with the frame rate in Houdini production, so as to avoid different animation speeds caused by different fillings.
[0068] In practical applications, the export performed by Houdini software can be realized through the installed export plug-in, which can be specifically manifested as calling the corresponding node under the corresponding export module, such as the out module, such as the Labs Vertex AnimationTextures node and the POP node. In order to ensure that the target motion map is output in the PAT format, the PAT preset template can be used to set the parameters such as the export key frame range, export node, and export path, and then the point cloud information is recorded in the PAT map for export. It should be noted that the format of the PAT map can generally be TAG format and EXR format. The motion map obtained in the embodiment of the present invention adopts the format of the EXR floating-point map, so that the amount of data imported by a single frame can be reduced while further reducing the amount of data, and the accuracy of the stored data can be improved based on the floating-point storage data.
[0069] That is, the results exported by Houdini software can include a PAT map in EXR format and a Json file, where the Json file is used to record additional information besides point cloud information, such as the frame rate corresponding to the target motion map.
[0070] When importing the target motion map exported by Houdini software into the Messiah engine, it is not necessary to import all the large number of particles generated in Houdini software. In order to reduce the amount of data imported by a single frame, only a small number of particles may be imported. As an example, the PAT map can only record a small number of trajectories. In subsequent operations, multiple target particles can be allowed to move along the same PAT trajectory. Different random offsets can be added to each particle to reduce the amount of data. As another example, the PAT map can only record the relevant movement of the center particle, and the center particle is used as the target particle. The center particle can be obtained by merging multiple particles in the point cloud. For example, the 10 vertices of a maple leaf can be merged into 1 center point for import, so that only a small number of particles can be imported. This is not limited in the embodiments of the present invention.
[0071] Step 402, determining a target object model in the game scene;
[0072] In an embodiment of the present invention, the target particles in the target motion map can be directly replaced with the target object model in the game scene, so as to control the corresponding motion trajectory of the replaced target object model according to the displacement information of the target particles to achieve different animation effects.
[0073] Specifically, the subsequent animation effect corresponding to the target object model can be an interactive animation. The target object model in the game scene can be expressed as materials near the virtual character, such as waterfalls, fallen leaves, etc. At this time, the target object model can be determined according to the role position and / or role action of the virtual character in the game scene. For example, when the virtual character in the game scene releases relevant skills, the skills can usually be triggered through the role actions of the virtual character. For example, when the virtual protagonist waves his hands left and right to accumulate power, he can attract the fallen leaves of the actual trees in the game scene, so as to gather the fallen leaves into a certain pattern to attack the enemy. At this time, the fallen leaves can be used as the target object model based on the role position and / or role action of the virtual character.
[0074] In a preferred embodiment of the present invention, in addition to determining the target object model based on the position and / or action of the virtual character, the target object model can also be determined based on a preset range, that is, the affected object model located within the preset range can be determined as the target object model. Specifically, based on the position of the object model in the game scene and according to the displacement information of all target particles in the target motion map, the object model whose starting position in the distance displacement information is within the preset range is determined as the target object model.
[0075] In practical applications, the Messiah engine can create a GlobalPAT emitter and turn on the global switch to achieve scene interaction, so that the target particles in the target motion map are directly replaced with the aforementioned target object model, such as fallen leaves, so that the replaced object model can move along the trajectory of the target particles, achieving the following Figure 5E The scene interactions shown in Fig. 5F The virtual character shown attracts fallen leaves to form a custom pattern skill effect, which restores the player's expected martial arts dream, enhances the player's real experience, and presents a more realistic martial arts world.
[0076] Among them, the GlobalPAT transmitter can be for the target motion map (PAT map). When the GlobalPAT transmitter is running, the object model located in the game scene can be equivalent to GPU particles. GPU particles can be generated by the GPU particle transmitter. At this time, a PAT map currently acting on it can be selected for each GPU particle. At this time, based on the displacement information of all target particles in the acquired target motion map, the object model within the preset range can be determined by the bounding box calculation method, that is, each GPU particle transmitter can detect whether it is in the influence range of the PAT. If it is, it means that the object model corresponding to the GPU particle emitted by the GPU particle transmitter can be the target object model, and the GPU particle can be controlled to move according to the corresponding PAT position later.
[0077] For example, Figure 6 As shown, the bounding box method is specifically manifested in that each GPU particle emitter can obtain the GPU particles sent to its own by a GlobalPAT emitter that is within the intersection range of the AABB and is closest to the particle emitter, that is, it can be determined that its own GPU particles are under the influence range of the PAT. At this time, the sending of its own GPU particles is manifested as sending the object model corresponding to the GPU particles to the GlobalPAT emitter, that is, the sent object model is the target object model, so that the GlobalPAT emitter controls the motion trajectory of the determined target object model according to the displacement information recorded by the PAT map.
[0078] Step 403, obtaining a sampling mode corresponding to the target object model, sampling the target motion map according to the sampling mode, determining the displacement information of the target particles and indicating the position of the target object model;
[0079] In one embodiment of the present invention, the position of the target object model in the game scene can be indicated based on the displacement information of the target particles recorded by the target motion map, that is, the position of the target object model can be determined according to the displacement information of the target particles, thereby controlling the motion trajectory of the target object model in the game scene.
[0080] Specifically, when indicating the position, the target particle can be regarded as the center point of the target object model in the game scene, then the displacement information of the target particle can indicate the position of the target object model, which can be the center point position. In the specific implementation, the acquisition of the displacement information of the target particle is related to different sampling modes. Since the displacement information is mainly used to indicate the position of the target object model, the sampling mode is aimed at the sampling mode corresponding to the target object model, which can be mainly based on the relevant animation effect to be presented by the target object model. At this time, the target motion map can be sampled according to the sampling mode to determine the displacement information of the target particle and indicate the center point position of the target object model.
[0081] The sampling mode, i.e., PAT Play Mode, can be mainly used to indicate the time based on which mode needs to be selected to sample the timeline of the PAT map. For example, it can include the life cycle sampling mode and the time sampling mode. Among them, the life cycle sampling mode, i.e., ByLife mode, refers to sampling the entire timeline according to the entire life cycle of the current particle, i.e., Life (0-1); the time sampling mode, i.e., ByTime, refers to sampling the entire timeline using the play time of the particle, which can be specifically expressed as stop sampling time point = current time point - particle play time point. For example, assuming that the exported PAT duration is 2 seconds, when the particle system plays to 0.5 seconds, the displacement information at 0.5 seconds in the map can be sampled, which can be used to indicate the position of the corresponding target object model later.
[0082] Then, if the sampling mode is the life cycle sampling mode, the target motion map can be sampled according to the life cycle mode of the target object model, that is, the above-mentioned Life (0-1), to obtain the first displacement information of the target particles, and the first displacement information is used to indicate the center point position of the target object model; if the sampling mode is the time sampling mode, the target motion map can be sampled according to the sampling time to obtain the second displacement information of the target particles, and the second displacement information is used to indicate the center point position of the target object model, wherein the sampling time is mainly manifested as the playback duration of the corresponding target object model.
[0083] In practical applications, the sampling of textures is mainly achieved by using the GPU in the Messiah engine. Specifically, it can be done by creating a GPU Particle and setting multiple parameters in the GPU Particle panel to perform corresponding sampling processing based on the set parameters.
[0084] As an example, in addition to the above-mentioned sampling mode PAT Play Mode, the set parameters may also include the setting of the PAT playback speed PATSpeed. Specifically, since the indicated center point position of the target object model can be used to constitute the motion trajectory of the target object model, when the sampling mode is the life cycle sampling mode, the first speed parameter can be obtained and set accordingly to determine the number of motion trajectory cycles corresponding to the life cycle of the target object model according to the first speed parameter, that is, in the ByLife mode, the set PATSpeed parameter can be used to control how many times the target particle plays a complete trajectory within a life cycle, for example, Speed = 1 can indicate that the trajectory is played once, and Speed = 2 can indicate that the trajectory is played twice, wherein if the loop is not turned on in the subsequent parameter settings, then after the corresponding number of motion trajectories are played, it will no longer be affected by the PAT trajectory, and the target object model can perform free fall motion, for example, fallen leaves can fall naturally; when the sampling mode is the time sampling mode, the second speed parameter can be obtained and set accordingly to determine the sampling speed of the target motion map according to the second speed parameter, and the sampling speed mainly corresponds to the playback speed of the target object model.
[0085] As another example, the set parameters may also include an offset range, namely PATDistributeRange, which can be mainly used to indicate the random offset range set for the recorded position in the PAT map. Specifically, if there are at least two target object models, the first position of the displacement information of the target particle is used to indicate the center point position of one of the target object models, and the second position of the displacement information of the target particle is used to indicate the center point position of the other target object models, so as to control the motion trajectory of at least two target object models in the game scene, wherein the second position may be a position within the offset range of the first position and the distance from the first position is a random offset, and the embodiment of the present invention is not limited to this.
[0086] For example, assuming that the current PAT map only records the trajectories of 128 particles, but there is a need to emit 512 particles in the Messiah engine, one particle in the PAT map imported by Houdini needs to drive the four target object models in the Messiah engine to move, and the positions of the four target object models may be the same. At this time, based on the setting of the aforementioned offset range PATDistributeRange, a random offset position can be set for each target object model to guide the position dispersion of the target object model, so that a large number of particles can be driven by using a map with a smaller amount of data, thereby saving resources. Specifically, Figure 7As shown, multiple particles follow the same PAT point in the DistributeRange, such as the point pointed by the arrow. It should be noted that when the number of particles required in the Messiah engine is less than or equal to 128, since the target object models will not overlap, the position offset can be set at this time.
[0087] As another example, the set parameters may also include a follow speed PATMaxFollowSpeed, in which case the follow speed may be obtained and set to move the target object model in the game scene from the current position to the starting position in the displacement information of the target particle based on the follow speed. In practical applications, when the target object model follows the PAT movement, it is not achieved by directly modifying the position of the target object model, but by calculating the appropriate movement speed after obtaining the position of the target point through the displacement information of the target particle in the PAT map, thereby controlling the target object model to move to the corresponding position according to the calculated movement speed. At this time, if the current target object model is far away from the position of the target particle in the PAT map, a larger speed will be generated, and the maximum movement speed of the target object model can be controlled based on the follow speed PATMaxFollowSpeed parameter. Among them, the corresponding following method can be determined based on the sampling mode, that is, the target point corresponding to the current target object model on the PAT track can be determined by information such as particle life and playback time. For example, when the sampling mode is the life cycle sampling mode, the target point can be the position of the first frame; when the sampling mode is the time sampling mode, the target point can refer to the position of the PAT map record at the current time point (such as 1 second). This embodiment of the present invention is not limited to this.
[0088] As another example, the set parameters may also include a loop parameter PATLoop, which may be used to indicate whether to loop. In this case, the loop parameter may be acquired and set. When the loop parameter indicates a non-loop mode, after the target object model completes the motion trajectory indicated by the displacement information of the target particles, the target object model may move freely in the game scene according to the preset properties of the target object model. For example, in the non-loop mode, after the target object model plays the complete motion trajectory, PAT will not exert any influence on the motion of the particles, and the target object model may fall freely. When the loop parameter indicates a loop mode, the target object model may be controlled to perform a loop motion according to the motion trajectory indicated by the displacement information of the target particles. It should be noted that in the loop mode, attention should also be paid to whether the PAT data can be connected end to end.
[0089] As another example, the set parameters may also include a frame rate PATFrameRate, which may be used to indicate the playback frame rate of the animation effect of the target object model, which is usually consistent with that produced by Houdini to avoid different animation speeds due to different filling. In practical applications, it can be obtained from the Json file exported by the Houdini software.
[0090] As another example, the set parameters may also include a PAT format, namely, PATTexture, which may be used to indicate the texture format of the PAT texture exported from Houdini. The formats of PAT textures may generally be TAG format and EXR format, wherein the data format stored in the Tag format texture is an integer type, expressed as an RGB range (0-1), and the data format stored in the EXR format is a floating point type, and the range is not limited to (0-1), that is, the stored data is more accurate, and both types of textures require Non Compression to be turned on in the texture editor, while the embodiment of the present invention adopts the EXR floating point texture format, so that the amount of data imported by a single frame can be reduced while further reducing the amount of data, and the accuracy of the stored data can be improved based on the floating point storage data.
[0091] As another example, the set parameters may also include the maximum / minimum range of the position data, i.e., PATDataMin\PATDataMax, which is used to indicate the maximum / minimum range of the position data in the PAT map, and can be directly determined and filled in when exporting from Houdini. When Houdini is used to make resources, they are generally made relative to the origin, i.e., there may be a one-to-one correspondence between the system coordinates of Houdini software and Messiah engine. At this time, the data exported from Houdini may be converted accordingly based on the aforementioned relationship, and the maximum / minimum range of the position data may be determined and filled in.
[0092] As another example, the set parameters may also include a scaling parameter PATDataScale, which may be used to indicate a scaling process to be performed on the spatial range of the original PAT data.
[0093] As another example, the set parameters may also include whether a global switch is turned on, i.e., EnableGlobalPAT. This parameter may be used to indicate whether the probe of the GPU particle emitter is affected by the global PAT, so as to implement Figure 6The process of sending the object model shown in the figure to the GlobalPAT emitter can also include parameters of the impact range for the relevant properties of the global switch, that is, the setting of PAT AffectRange. This parameter can be used to indicate the impact range of this PAT, which can be scaled according to the average power consumption of the particle emitter. For example, EnableGlobalPATDebug in GlobalOptions can be turned on to visualize the AffectRange of PAT.
[0094] It should be noted that the above parameters can be automatically filled in by programmatically referring to the data exported by Houdini software, and manual parameter modification is also allowed, which is not limited by the embodiment of the present invention.
[0095] In an embodiment of the present invention, the Messiah engine, based on importing a target motion map that records the movement of central particles, can replace the central particles in the imported map with a target object model that interacts in the scene, thereby reusing existing models in the warehouse and achieving the purpose of saving resources.
[0096] For example, assuming that it is desired to achieve a special effect in which fallen leaves converge to form a certain pattern, and the particle motion of the fallen leaves in the scene needs to be controlled, then the target object model for interaction in the scene can be a fallen leaf model.
[0097] Step 404: Control the motion trajectory of the target object model in the game scene based on the position of the target object model to generate an animation effect of the target object model.
[0098] The target particle can be regarded as the center point of the target object model in the game scene. In the embodiment of the present invention, it can be understood that the determined target object model and the corresponding target particle are replaced based on the center point of the model, so as to replace the original target particle and control the motion trajectory according to the displacement information collected by its corresponding sampling mode, so as to realize the control of the motion trajectory of the target object model in the game scene, obtain the animation effect corresponding to the target object model, and then realize the reuse of the motion map resource on different models.
[0099] In practical applications, the movement speed can be obtained, and the target object model can be controlled to move to the position of the target object model according to the movement speed to form a movement trajectory.
[0100] That is, the motion control performed can be expressed as controlling the speed and target position of the target object model. Specifically, based on the input motion speed, the target object model can be moved to the position corresponding to the displacement information recorded in the motion map, thereby realizing variable speed control of the motion trajectory of the target object model and achieving the purpose of flexible control of the motion of the target object model.
[0101] In an embodiment of the present invention, by importing a motion map, the motion trajectory of an object model in a game scene is controlled based on the displacement information provided by the motion map, so as to achieve interaction between the animation effect of the object model and the scene. In addition, the motion trajectories of different models can be controlled based on the acquired motion map to generate corresponding animation effects, thereby achieving reuse of the motion map resource on different models, saving resources and avoiding waste of resources.
[0102] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0103] Reference Figure 8 , shows a structural block diagram of an embodiment of an animation effect generating device of the present invention, which may specifically include the following modules:
[0104] The displacement information acquisition module 801 is used to acquire a target motion map, and acquire the displacement information of the target particle from the target motion map; wherein the target motion map is used to record the corresponding relationship between the displacement information of the target particle and the motion time;
[0105] The animation effect generation module 802 is used to determine the target object model in the game scene, indicate the position of the target object model according to the displacement information of the target particle, control the motion trajectory of the target object model in the game scene, and generate the animation effect of the target object model.
[0106] In one embodiment of the present invention, the animation effect generation module 802 may include the following submodules:
[0107] The position indication submodule is used to obtain a sampling pattern corresponding to the target object model; sample the target motion map according to the sampling pattern, determine the displacement information of the target particles and indicate the position of the target object model.
[0108] In one embodiment of the present invention, the position indication submodule may include the following units:
[0109] A position indicating unit is used to sample the target motion map according to the life cycle of the target object model when the sampling mode is the life cycle sampling mode, obtain first displacement information of the target particles, and indicate the position of the target object model with the first displacement information; when the sampling mode is the time sampling mode, sample the target motion map according to the sampling time to obtain second displacement information of the target particles, and indicate the position of the target object model with the second displacement information.
[0110] Among them, when the sampling mode is a life cycle sampling mode, the position indication unit can also be used to obtain a first speed parameter, and determine the number of motion trajectory cycles corresponding to the life cycle of the target object model according to the first speed parameter; and when the sampling mode is a time sampling mode, the position indication unit can also be used to obtain a second speed parameter, and determine the sampling speed of the target motion map according to the second speed parameter.
[0111] In one embodiment of the present invention, the animation effect generation module 802 may further include the following submodules:
[0112] The frame rate acquisition submodule is used to acquire the frame rate and play the animation effect at the frame rate.
[0113] In one embodiment of the present invention, the animation effect generation module 802 may further include the following submodules:
[0114] An offset range acquisition submodule is used to acquire an offset range. If there are at least two target object models, the first position of the displacement information of the target particle is used to indicate the position of one of the target object models, and the second position of the displacement information of the target particle is used to indicate the position of the other target object models, so as to control the motion trajectory of the at least two target object models in the game scene; wherein the second position is a position within the offset range of the first position and the distance from the first position is a random offset.
[0115] In one embodiment of the present invention, the animation effect generation module 802 may further include the following submodules:
[0116] The following speed acquisition submodule is used to move the target object model in the game scene from the current position to the starting position in the displacement information of the target particle based on the following speed.
[0117] In one embodiment of the present invention, the animation effect generation module 802 may further include the following submodules:
[0118] A loop parameter acquisition submodule is used to acquire loop parameters; when the loop parameter indicates a non-loop mode, after the target object model completes the motion trajectory indicated by the displacement information of the target particle, the target object model moves freely in the game scene according to the preset properties of the target object model; when the loop parameter indicates a loop mode, the target object model is controlled to perform a loop motion according to the motion trajectory indicated by the displacement information of the target particle.
[0119] In one embodiment of the present invention, the animation effect generation module 802 may include the following submodules:
[0120] The target object model determination submodule is used to determine, based on the position of the object model in the game scene and the displacement information of all target particles in the target motion map, an object model within a preset range from the starting position in the displacement information as the target object model; and to determine the target object model according to the character position and / or character action of the virtual character in the game scene.
[0121] In an embodiment of the present invention, before obtaining the motion map, the apparatus provided by the embodiment of the present invention may further include the following modules:
[0122] The target motion map generation module is used to create a particle endpoint position map corresponding to the target motion map; the displacement information of the randomly generated particles moving from their generation position to the endpoint position indicated by the endpoint particle position map is recorded in the target motion map in correspondence with the movement time.
[0123] The target motion map generation module is further used to obtain a preset trajectory, and control the randomly generated particles to move from their generation positions to the terminal positions indicated by the terminal particle position map according to the preset trajectory.
[0124] In one embodiment of the present invention, the particle endpoint position map includes a plurality of position maps; the target motion map generation module may include the following submodules:
[0125] The target motion map generation submodule is used to record the motion maps corresponding to each position map respectively, and synthesize multiple motion maps into a target motion map.
[0126] In an embodiment of the present invention, the target motion map generation module is further used to adjust the motion time in the target motion map, and replace the current target motion map with the adjusted target motion map.
[0127] In one embodiment of the present invention, the device provided by the embodiment of the present invention may further include the following modules:
[0128] The frame rate recording module is used to record the frame rate corresponding to the target motion map, and the frame rate is used to indicate the playback frame rate of the animation effect of the target object model.
[0129] In one embodiment of the present invention, the animation effect generation module 802 may include the following submodules:
[0130] The motion trajectory control module is used to obtain the motion speed, control the target object model to move to the position of the target object model according to the motion speed, and form a motion trajectory.
[0131] In an embodiment of the present invention, the animation effect generating device provided by the embodiment of the present invention obtains the displacement information of the target particles from the target motion map, thereby indicating the position of the target object model in the game scene through the correspondence between the displacement information of the target particles and the motion time recorded, and then controls the motion trajectory of the target object model in the game scene to generate the animation effect of the target object model. By importing the motion map, the motion trajectory of the object model in the game scene is controlled based on the displacement information provided by the motion map, so as to realize the interaction between the animation effect of the object model and the scene, and the motion trajectory of different models can be controlled based on the acquired motion map to generate corresponding animation effects, so as to realize the reuse of the motion map resource on different models, save resources, and avoid resource waste.
[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] An embodiment of the present invention further provides an electronic device, including:
[0134] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned animation effect generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0135] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned animation effect generation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0136] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0137] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0138] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0142] Finally, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0143] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0144] The above describes in detail an animation effect generating method, an animation effect generating device, a corresponding electronic device and a corresponding computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for generating an animation effect, characterized in that: The method comprises: Obtaining a target motion map, and obtaining displacement information of target particles from the target motion map; wherein the target motion map is used to record the corresponding relationship between the displacement information of the target particles and the motion time; A target object model in a game scene is determined, and a position of the target object model is indicated according to the displacement information of the target particle to control a motion trajectory of the target object model in the game scene and generate an animation effect of the target object model.
2. The method according to claim 1, characterized in that The step of indicating the position of the target object model according to the displacement information of the target particle comprises: Get the sampling mode corresponding to the target object model; The target motion map is sampled according to the sampling mode to determine the displacement information of the target particles and indicate the position of the target object model.
3. The method according to claim 2, characterized in that The step of sampling the target motion map according to the sampling mode, determining the displacement information of the target particles and indicating the position of the target object model includes: If the sampling mode is the life cycle sampling mode, the target motion map is sampled according to the life cycle of the target object model to obtain first displacement information of the target particles, and the position of the target object model is indicated by the first displacement information.
4. The method according to claim 3, characterized in that The sampling of the target motion map according to the life cycle of the target object model further includes: In case the sampling mode is the life cycle sampling mode, a first speed parameter is acquired, and the number of motion trajectory cycles corresponding to the life cycle of the target object model is determined according to the first speed parameter.
5. The method according to claim 2 or 3, characterized in that: The step of sampling the target motion map according to the sampling mode, determining the displacement information of the target particles and indicating the position of the target object model includes: If the sampling mode is a time sampling mode, the target motion map is sampled according to the sampling time to obtain second displacement information of the target particles, and the position of the target object model is indicated by the second displacement information.
6. The method according to claim 5, characterized in that The sampling of the target motion map according to the sampling time further includes: When the sampling mode is the time sampling mode, a second speed parameter is obtained, and a sampling speed of the target motion map is determined according to the second speed parameter.
7. The method according to claim 1, characterized in that The method further comprises: Acquire a frame rate, and play the animation effect at the frame rate.
8. The method according to claim 1, 2 or 7, characterized in that: The method further comprises: Obtaining an offset range, if there are at least two target object models, using the first position of the displacement information of the target particle to indicate the position of one of the target object models, and using the second position of the displacement information of the target particle to indicate the positions of the other target object models, so as to control the motion trajectories of the at least two target object models in the game scene; The second position is a position within the offset range of the first position and whose distance from the first position is a random offset.
9. The method according to claim 1, 2 or 7, characterized in that: The method further comprises: A following speed is obtained, and based on the following speed, a target object model in the game scene is moved from a current position to a starting position in the displacement information of the target particle.
10. The method according to claim 1, 2 or 7, characterized in that: The method further comprises: Get loop parameters; In the case where the loop parameter indicates a non-loop mode, after the target object model completes the motion trajectory indicated by the displacement information of the target particle, the target object model moves freely in the game scene according to the preset properties of the target object model; When the cycle parameter indicates a cycle mode, the target object model is controlled to perform a cycle motion according to a motion trajectory indicated by the displacement information of the target particle.
11. The method according to claim 1, characterized in that: Determining the target object model in the game scene includes: Based on the position of the object model in the game scene and according to the displacement information of all target particles in the target motion map, an object model within a preset range from the starting position in the displacement information is determined as the target object model.
12. The method according to claim 1, characterized in that Before obtaining the motion map, the method further includes: Create a particle endpoint position map corresponding to the target motion map; The displacement information of the randomly generated particles moving from their generation positions to the end positions indicated by the end particle position map is recorded in the target motion map in correspondence with the movement time.
13. The method according to claim 12, characterized in that The method further comprises: A preset trajectory is obtained, and the randomly generated particles are controlled to move from their generation positions to the terminal positions indicated by the terminal particle position diagram according to the preset trajectory.
14. The method according to claim 13, characterized in that The particle terminal position map includes a plurality of position maps; the displacement information of the randomly generated particles moving from their generation positions to the terminal positions indicated by the terminal particle position map corresponds to the movement time and is recorded in the target motion map, including: The motion maps corresponding to each position map are recorded respectively, and multiple motion maps are synthesized into a target motion map.
15. The method according to any one of claims 12 to 14, characterized in that The method further comprises: The motion time in the target motion map is adjusted at a variable speed, and the current target motion map is replaced with the adjusted target motion map.
16. The method according to any one of claims 12 to 14, characterized in that: The method further comprises: The frame rate corresponding to the target motion map is recorded, where the frame rate is used to indicate the playback frame rate of the animation effect of the target object model.
17. The method according to claim 1 or 11, characterized in that: Determining the target object model in the game scene includes: The target object model is determined according to the role position and / or role action of the virtual character in the game scene.
18. The method according to claim 1, characterized in that The controlling the movement trajectory of the target object model in the game scene includes: The movement speed is acquired, and the target object model is controlled to move to the position of the target object model according to the movement speed to form a movement trajectory.
19. An animation effect generating device, characterized in that: The device comprises: A displacement information acquisition module, used to acquire a target motion map, and to acquire the displacement information of the target particles from the target motion map; wherein the target motion map is used to record the corresponding relationship between the displacement information of the target particles and the motion time; The animation effect generation module is used to determine the target object model in the game scene, indicate the position of the target object model according to the displacement information of the target particle, control the motion trajectory of the target object model in the game scene, and generate the animation effect of the target object model.
20. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for generating animation effects as claimed in any one of claims 1 to 18 is implemented.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating an animation effect as claimed in any one of claims 1 to 18 is implemented.
Citation Information
Patent Citations
Special effect realization method and device
CN106204696A
Animation generation method, animation playing method and related devices
CN112037311A
Game resource production method, device and equipment
CN113786624A
Animation implementation method and device of target model, storage medium and electronic equipment
CN114663560A
Virtual animation generation method and device
CN116051690A