Animation playing method and device, electronic equipment and computer readable medium
Patent Information
- Application Number
- CN202111674019.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2041-12-31
AI Technical Summary
[0003]鉴于现实世界中流体与物体相互作用的复杂性,在游戏场景中模拟水体时,要想同时兼顾效果与游戏的运行效率,难度极大,严重制约游戏体验的提升
[0037] This disclosure provides an animation playback method and an animation playback device, electronic device, and computer-readable medium for implementing the animation playback method. In this disclosure, the force information of a character being acted upon by water flow can be determined based on attribute data characterizing the shape and flow characteristics of a water body. The dynamic characteristics of the character under the influence of water flow are then determined based on the force information. The influence of water flow on the character's dynamic characteristics is then displayed by controlling the playback speed of the animation corresponding to the character. This simulates the influence of water flow on a character, reducing computational resource consumption while ensuring the simulation effect of the influence of water flow on the character. It also reduces game development difficulty and saves development costs, achieving a balance between effectiveness and efficiency.
Smart Images

Figure CN116407832B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to an animation playback method, an animation playback device, an electronic device, and a computer-readable medium. Background Technology
[0002] Water is an important part of the game scene. To enhance the player's gaming experience, it is necessary not only to make the water scenes more realistic through animation design, but also to simulate the interaction between the water and the game characters.
[0003] Given the complexity of fluid-object interactions in the real world, simulating water in game scenarios while simultaneously achieving both visual appeal and game performance efficiency is extremely difficult, severely hindering the improvement of the gaming experience. Summary of the Invention
[0004] This disclosure provides an animation playback method, an animation playback device, an electronic device, and a computer-readable medium.
[0005] In a first aspect, embodiments of this disclosure provide an animation playback method, including:
[0006] The attribute data of the water body is obtained, corresponding to the value of the character's location. The attribute data of the water body represents the shape and flow characteristics of the water body.
[0007] Based on the attribute data of the water body corresponding to the value of the character's location, the force information of the character is determined, wherein the force information of the character represents the force exerted by the water flow on the character;
[0008] Based on the force information of the character and the initial dynamic data of the character, determine the current dynamic data of the character;
[0009] Based on the character's current dynamic data, determine the playback speed of the animation corresponding to the character, and then play the animation corresponding to the character.
[0010] In some embodiments, the force information of the character includes the magnitude and direction of the force acting on the character; determining the force information of the character based on the value of the water body's property data corresponding to the character's location includes:
[0011] Based on the attribute data of the water body corresponding to the value of the character's location, determine the water flow velocity and direction at the character's location;
[0012] Based on the water flow velocity at the location of the character, the magnitude of the force acting on the character is determined using a first custom rule; wherein, the first custom rule indicates that the magnitude of the force acting on the character is positively correlated with the water flow velocity;
[0013] The direction of the force acting on the character is determined based on the direction of the water flow at the character's location.
[0014] In some embodiments, the attribute data of the water body includes the width data, depth data, and flow rate data of the water body; the water flow velocity at the location of the character is determined in the following manner:
[0015] Based on the width, depth, and flow rate of the water body corresponding to the location of the character, the water flow velocity at the location of the character is determined using a second custom rule; wherein, the second custom rule indicates that the water flow velocity is negatively correlated with the width of the water body, negatively correlated with the depth of the water body, and positively correlated with the flow rate of the water body.
[0016] In some embodiments, the attribute data of the water body includes the direction curve of the water body; the direction of water flow at the location of the character is determined in the following manner:
[0017] The direction of water flow at the location of the character is determined based on the direction curve of the water body, wherein the direction curve of the water body represents the direction of the water body.
[0018] In some embodiments, the initial dynamic data includes the character's initial movement speed and movement direction; the current dynamic data includes the character's current movement speed and movement direction; determining the character's current dynamic data based on the character's force information and the character's initial dynamic data includes:
[0019] Based on the force information of the character, the character's initial movement speed and movement direction, determine the character's current movement speed.
[0020] In some embodiments, the initial dynamic data includes the initial swing velocity and swing direction of multiple components of the character; the current dynamic data includes the current swing velocity of multiple components of the character; determining the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character includes:
[0021] The magnitude and direction of the forces acting on each component are determined based on the force information of the character.
[0022] The current swing speed of each component is determined based on the magnitude and direction of the force acting on each component, the initial swing speed and the swing direction of each component.
[0023] In some embodiments, the initial dynamic data further includes attribute characteristics of multiple components of the character; determining the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character further includes:
[0024] The oscillation mode of each component is determined based on the magnitude and direction of the force acting on each component and the attribute characteristics of each component.
[0025] In some embodiments, determining the playback speed of the animation corresponding to the character based on the character's current dynamic data, in order to play the animation corresponding to the character, includes:
[0026] The playback speed of the animation corresponding to each component is determined based on the current swing speed of each component.
[0027] Play the animations corresponding to each of the components according to the playback speed of the animations corresponding to each component.
[0028] Secondly, embodiments of this disclosure provide an animation playback device, including:
[0029] The data acquisition module is used to acquire the attribute data of the water body corresponding to the position of the character, wherein the attribute data of the water body represents the shape and flow characteristics of the water body;
[0030] The force analysis module is used to determine the force information of the character based on the value of the water body's attribute data corresponding to the character's location, wherein the force information of the character represents the force exerted by the water flow on the character;
[0031] The dynamic analysis module is used to determine the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character.
[0032] An animation processing module is used to determine the playback speed of the animation corresponding to the character based on the character's current dynamic data, so as to play the animation corresponding to the character.
[0033] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0034] One or more processors;
[0035] A memory having stored one or more programs that, when executed by one or more processors, cause the one or more processors to implement the animation playback method described in the first aspect of the present disclosure.
[0036] Fourthly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the animation playback method described in the first aspect of embodiments of this disclosure.
[0037] This disclosure provides an animation playback method and an animation playback device, electronic device, and computer-readable medium for implementing the animation playback method. In this disclosure, the force information of a character being acted upon by water flow can be determined based on attribute data characterizing the shape and flow characteristics of a water body. The dynamic characteristics of the character under the influence of water flow are then determined based on the force information. The influence of water flow on the character's dynamic characteristics is then displayed by controlling the playback speed of the animation corresponding to the character. This simulates the influence of water flow on a character, reducing computational resource consumption while ensuring the simulation effect of the influence of water flow on the character. It also reduces game development difficulty and saves development costs, achieving a balance between effectiveness and efficiency. Attached Figure Description
[0038] Figure 1 This is a flowchart of an animation playback method according to an embodiment of this disclosure;
[0039] Figure 2 This is a flowchart of some steps in an animation playback method according to an embodiment of this disclosure;
[0040] Figure 3 This is a block diagram of an animation playback device according to an embodiment of the present disclosure;
[0041] Figure 4 This is a block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0042] To enable those skilled in the art to better understand the technical solutions of this disclosure, the animation playback method, animation playback device, electronic device, and computer-readable medium provided in this disclosure will be described in detail below with reference to the accompanying drawings.
[0043] Exemplary embodiments will be described more fully below with reference to the accompanying drawings; however, these exemplary embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will enable those skilled in the art to fully understand the scope of this disclosure.
[0044] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0045] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0046] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.
[0047] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0048] Firstly, referring to Figure 1 This disclosure provides an animation playback method, including:
[0049] S1. Obtain the attribute data of the water body corresponding to the position of the character. The attribute data of the water body represents the shape and flow characteristics of the water body.
[0050] S2. Based on the water body's attribute data corresponding to the character's location, determine the character's force information, where the character's force information represents the force exerted by the water flow on the character.
[0051] S3. Determine the current dynamic data of the character based on the force information and the character's initial dynamic data;
[0052] S4. Based on the character's current dynamic data, determine the playback speed of the character's corresponding animation in order to play the character's corresponding animation.
[0053] In this embodiment of the disclosure, water refers to areas in the game scene that simulate rivers, lakes, ponds, oceans, etc.
[0054] In this embodiment, the attribute data of the water body includes data characterizing the shape features of the water body, such as width data, depth data, and shape data; the attribute data of the water body also includes data characterizing the flow features of the water body, such as flow rate data. This embodiment does not impose any specific limitations on this. In this embodiment, different water bodies are configured with different attribute data, thereby simulating water bodies with different shape features and different flow characteristics; the attribute data of the water body corresponds to different values for different parts of the water body, thereby simulating water bodies with different shape features and different flow characteristics at different locations.
[0055] In this embodiment, the location of the character can be a cross-section of the water body perpendicular to the direction of water flow or at a certain angle. The attribute data of the water body corresponding to the location of the character refers to the attribute data of the water body corresponding to that cross-section. For example, the attribute data of the water body corresponding to the location of the character includes the width, depth, and flow rate of the water body in that cross-section. The location of the character can also be the area between two cross-sections perpendicular to the direction of water flow or at a certain angle. The attribute data of the water body corresponding to the location of the character refers to the attribute data of the water body corresponding to that area. For example, the attribute data of the water body corresponding to the location of the character includes the width, depth, and flow rate of the water body in that area. This embodiment does not impose any special limitations on this.
[0056] In this embodiment, the water body's attribute data corresponding to the character's location is obtained through a configuration file. The configuration file can be a text file or a texture. This embodiment does not impose any special limitations on this.
[0057] In this embodiment, water flow in a body of water is simulated. When a character is in the water, their movement is altered by the simulated water flow. In this embodiment, the force information of the character is data used to simulate the magnitude and direction of the force exerted by the water flow on the character in the water body. In this embodiment, the simulated water flow has velocity and direction attributes, which determine the magnitude and direction of the force represented by the force information on the character. For example, when the character's movement direction is opposite to the simulated water flow direction, the character's movement speed will decrease, and the faster the water flow velocity, the slower the character's movement speed, thus simulating the resistance of the water flow when the character moves upstream; when the character's movement direction is the same as the simulated water flow direction, the character's movement speed will increase, and the faster the water flow velocity, the faster the character's movement speed, thus simulating the thrust of the water flow when the character moves downstream.
[0058] In this embodiment of the disclosure, the attribute data characterizing the water flow and shape features of the water body determines the simulated water flow velocity and direction attributes. Once the attribute data of the water body is configured, the simulated water flow velocity and direction attributes are also determined. For example, the direction of water flow is related to the shape of the water body, and when the water flow rate is constant, the water flow velocity is related to the width of the water body. Accordingly, once the simulated water flow velocity and direction attributes are determined, the magnitude and direction of the force exerted by the water flow on the character in the water body are also determined.
[0059] In step S2, the magnitude and direction of the force exerted on the character by the water flow are determined based on the property data of the water body at the character's location.
[0060] It should be noted that, in this embodiment of the disclosure, the force exerted on the character can be determined based on the attribute data characterizing the shape and flow characteristics of the water body, which reduces the consumption of computing resources while ensuring the simulation effect of the effect of the water flow on the character.
[0061] In this embodiment of the disclosure, the dynamic data representing the character's dynamic characteristics may include the character's movement characteristics, the swaying characteristics of the character's components, or both. This embodiment of the disclosure does not impose any particular limitation on this. Accordingly, the character's dynamic data includes data representing the character's movement characteristics, such as the character's movement speed and direction; the character's dynamic data also includes data representing the character's swaying characteristics, such as the swaying speed and direction of body parts, clothing, props, etc., which are components of the character. This embodiment of the disclosure does not impose any particular limitation on this.
[0062] In step S3, the dynamic data of the character after being affected by the water flow is determined based on the magnitude and direction of the force exerted on the character by the water flow, as well as the character's initial dynamic data.
[0063] In this embodiment of the disclosure, the animation corresponding to a character may include animation corresponding to the character as a whole, or animation corresponding to components of the character. This embodiment of the disclosure does not impose any special limitations on this. In this embodiment of the disclosure, the speed of the character's movement or the speed of the swinging of the character's components is displayed by controlling the playback speed of the character's corresponding animation. For example, when the character experiences simulated water flow resistance in a body of water, the playback speed of the character's corresponding animation can be reduced to slow down the character's movement speed, simulating that the character is struggling to move due to resistance; similarly, the playback speed of the animation corresponding to the character's components can be reduced to slow down the swinging speed of the character's components, simulating that the character's components are struggling to swing due to resistance.
[0064] In step S4, the playback speed of the character's animation is determined based on the character's dynamic data after being affected by the water flow, and the animation is played at the determined speed. This demonstrates the impact of water flow on the character's dynamic characteristics and simulates water flow in a body of water.
[0065] In some embodiments, steps S1 to S4 are performed offline, meaning the character's location is any position within the water. After determining the playback speed of the character's animation through steps S1 to S4, the playback speed-related data is stored. When the game runs, the corresponding playback speed-related data is read based on the character's actual position, and the character's corresponding animation is played. In some embodiments, steps S1 to S4 are performed online, meaning that during game operation, the character's location is acquired in real time, the playback speed of the character's animation is determined by executing steps S1 to S4, and the character's corresponding animation is played.
[0066] The animation playback method provided in this disclosure can determine the force information of a character being acted upon by water flow based on attribute data representing the shape and flow characteristics of a water body. It can also determine the dynamic characteristics of the character under the influence of water flow based on the force information of the character. Then, by controlling the playback speed of the animation corresponding to the character, it can display the influence of water flow on the character's dynamic characteristics. This method simulates the influence of water flow on a character in a water body. It can ensure the simulation effect of the influence of water flow on the character while reducing the consumption of computing resources. It can also reduce the difficulty of game development and save development costs, achieving a balance between effect and efficiency.
[0067] This disclosure does not specifically limit how the force information of a character is determined based on the property data of the water body. In some embodiments, the force information of the character is determined based on the shape and flow characteristics of the water body as represented by the property data, using the principles of fluid dynamics. In some embodiments, the principles of fluid dynamics are simplified and approximated, setting the magnitude of the force exerted on the character by the water flow to be related to the flow velocity and the direction of the force exerted on the character to be related to the flow direction, and using a custom transformation rule to determine the magnitude of the force based on the flow velocity.
[0068] Accordingly, in some embodiments, the force information of the character includes the magnitude and direction of the force acting on the character; refer to Figure 2 The steps for determining the force information of a character based on the water body's property data corresponding to the character's location include:
[0069] S21. Based on the water body's attribute data corresponding to the character's location, determine the water flow velocity and direction at the character's location;
[0070] S22. Based on the water flow velocity at the character's location, determine the magnitude of the force acting on the character using a first custom rule; wherein, the first custom rule indicates that the magnitude of the force acting on the character is positively correlated with the water flow velocity;
[0071] S23. Determine the direction of the force acting on the character based on the direction of the water flow at the character's location.
[0072] In this embodiment of the disclosure, the first custom rule is an approximation and simplification of the principles of fluid dynamics.
[0073] In this embodiment, the magnitude of the force exerted on the character by the water flow is set to be related to the water flow velocity, and the direction of the force exerted on the character by the water flow is set to be related to the direction of the water flow. The force exerted on the character by the water flow is determined using a first custom rule. Compared with determining the force exerted on the character by the water flow using fluid dynamics principles, the calculation is simpler, which is conducive to improving game running efficiency, reducing development difficulty, and saving development costs. At the same time, by using the first custom rule to reasonably approximate and simplify the fluid dynamics principles, the effect of simulated water flow on the character can be made closer to the effect of water flow on objects in the real world, thereby ensuring the game effect.
[0074] This disclosure does not impose any specific limitations on how to determine the water flow velocity based on the water body's property data. In some embodiments, the determination of the water flow velocity is simplified. For example, the width, depth, and flow rate of the water body are pre-configured, the water flow velocity is set to be related only to the width, depth, and flow rate of the water body, and a custom transformation rule is used to determine the water flow velocity based on the width, depth, and flow rate of the water body.
[0075] Accordingly, in some embodiments, the attribute data of the water body includes the width data, depth data, and flow rate data of the water body; in the step of determining the water flow velocity and direction at the location of the character based on the attribute data of the water body at the location of the character, determining the water flow velocity at the location of the character includes: determining the water flow velocity at the location of the character using a second custom rule based on the width data, depth data, and flow rate data of the water body at the location of the character, wherein the second custom rule indicates that the water flow velocity is negatively correlated with the width of the water body, negatively correlated with the depth of the water body, and positively correlated with the flow rate of the water body.
[0076] In this embodiment of the disclosure, the second custom rule is an approximation and simplification of the principles of fluid dynamics.
[0077] In this embodiment of the disclosure, the water flow velocity is set to be related only to the width, depth, and flow rate of the water body, and the water flow velocity is determined according to a second custom rule obtained by approximating and simplifying the principles of fluid dynamics. This can improve the efficiency of game operation while ensuring the game effect.
[0078] In some embodiments, assuming a fixed depth of water, the flow velocity is only related to the width and flow rate of the water body, thereby further simplifying the process of determining the flow velocity.
[0079] This disclosure does not specifically limit how the direction of water flow is determined based on the attribute data of the water body. In some embodiments, to facilitate quick and accurate determination of the direction of water flow, the direction of water flow is set to be related to the direction of the water body. Accordingly, the attribute data of the water body includes a direction curve, which is used to indicate the direction of the water body. The direction curve can be used to determine the direction of water flow at any location in the water body. The direction curve is used to describe the direction of the entire water body area from a global perspective. For example, some rivers correspond to water body areas that are straight lines, while others correspond to water body areas that exhibit S-shaped or W-shaped curves. Therefore, the direction curve can macroscopically represent the overall flow direction of the water body area. Furthermore, the attribute data of the water body mentioned above corresponding to the location of the character mainly refers to the attribute data value of the local water body area corresponding to the location of the character. Therefore, the attribute data value of the local water body area corresponding to the location of the character can be determined based on the aforementioned direction curve corresponding to the global water body area.
[0080] For example, in some embodiments, the attribute data of the water body includes the direction curve of the water body; when determining the water flow velocity and direction at the location of the character based on the attribute data of the local water body region at the location of the character, the water flow direction at the location of the character is determined in the following way: the water flow direction at the location of the character is determined based on the direction curve of the water body, wherein the direction curve of the water body represents the water flow direction at any location in the water body.
[0081] This disclosure does not specifically limit how the water flow direction is determined based on the direction curve. In some embodiments, a direction vector corresponding to the character's location is determined based on the direction curve, and the water flow direction at the character's location is determined based on the direction vector. In some embodiments, a tangent line to the direction curve corresponding to the character's location is calculated, and the water flow direction at the character's location is determined based on the direction of the tangent line.
[0082] In some embodiments, the dynamic data of a character represents the dynamic characteristics of that character, including the character's movement characteristics. The dynamic data includes data characterizing these movement characteristics, such as the character's movement speed and direction. When determining the character's current dynamic data based on the force information and the character's initial dynamic data, the current movement speed and direction are determined based on the character's initial movement speed and direction, and the magnitude and direction of the force exerted by the water flow on the character.
[0083] Accordingly, in some embodiments, the character's dynamic data includes the character's movement speed and direction; refer to Figure 2The steps to determine the current dynamic data of a character based on its force information and initial dynamic data include:
[0084] S31. Determine the character's current movement speed based on the character's force information, initial movement speed, and direction of movement.
[0085] In some embodiments, while determining the character's current movement speed, the character's current movement direction is also determined, in order to further determine the playback speed and content of the animation corresponding to the character.
[0086] In some embodiments, the dynamic data of a character represents the dynamic characteristics of that character, including the swaying characteristics of its components. The dynamic data includes data characterizing these swaying characteristics, such as the swaying speed and direction of the components. When determining the current dynamic data of a character based on its force information and initial dynamic data, the current swaying speed and direction of each component are determined based on the initial swaying speed and direction of each component, and the magnitude and direction of the force exerted by the water flow on each component.
[0087] Accordingly, in some embodiments, the character's dynamic data includes the swing speed and swing direction of multiple components of the character; refer to Figure 2 The steps to determine the current dynamic data of a character based on its force information and initial dynamic data include:
[0088] S32. Determine the magnitude and direction of the forces acting on each component based on the force information of the character;
[0089] S33. Determine the current swing speed of each component based on the magnitude and direction of the force acting on each component, the initial swing speed and swing direction of each component.
[0090] In some embodiments, while determining the current swing speed of a component of a character, the current swing direction of the component of a character is also determined, in order to further determine the playback speed and content of the animation corresponding to the component of the character.
[0091] In this embodiment, the components of a character may include body parts such as the head, arms, and legs; clothing; and props held or worn by the character. This embodiment does not impose any special limitations on these components. It should be noted that when determining the current dynamic characteristics of the character, only step S31 may be executed. For example, determining the character's current movement speed and direction based on the force information and the character's initial movement speed and direction; or only step S31 may be executed. For example, determining the current swing speed and direction of the character's components based on the force information and the initial swing speed and direction of the character's components; or steps S31 and steps S32 to S33 may be executed simultaneously. For example, determining the character's current movement speed and direction based on the force information and the character's initial movement speed and direction, and determining the current swing speed and direction of the character's components based on the force information and the initial swing speed and direction of the character's components. This embodiment does not impose any special limitations on these components.
[0092] In some embodiments, the different components of a character have different attribute characteristics, which makes the different components swing in different ways under the influence of water flow. When determining the dynamic data of the character under the influence of water flow, the swinging mode of each component of the character is determined at the same time, so as to further determine the content of the animation corresponding to each component of the character.
[0093] Accordingly, in some embodiments, the dynamic data of the character also includes the attribute characteristics of multiple components of the character; determining the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character also includes: determining the swing mode of each component based on the magnitude and direction of the force acting on each component and the attribute characteristics of each component.
[0094] For example, a mapping relationship between the attribute characteristics of each component and the swinging mode is pre-defined, and the corresponding swinging mode for each component is determined based on this mapping relationship. In one optional implementation, the swinging modes include: a downstream swinging mode corresponding to the first type of attribute characteristics (also called the first type of swinging mode, i.e., the swinging direction is the same as the water flow direction), a upstream swinging mode corresponding to the second type of attribute characteristics (also called the second type of swinging mode, i.e., the swinging direction is opposite to the water flow direction), and a random swinging mode or a custom swinging mode corresponding to the third type of attribute characteristics (also called the third type of swinging mode). Components belonging to the first type of attribute characteristics can be: clothing, accessories with a weight less than a preset weight threshold, or limb parts with a volume less than a preset volume threshold. Components belonging to the second type of attribute characteristics can be: limb parts used to drive the character's movement, such as limbs, which need to swim upstream. Components belonging to the third type of attribute characteristics can be: additional parts of the character, such as props. The embodiments disclosed herein do not limit the classification of attribute features or the specific swinging mode. Those skilled in the art can flexibly set the above mapping relationship, as long as it can achieve the effect of flexibly setting different swinging modes for different components of different attributes.
[0095] This disclosure does not impose any special limitations on the way the character's components sway. For example, the character's components may include the character's clothing, which sways with the water flow; or the character's components may include the character's body or props, which sway without swaying with the water flow, but whose original swaying speed may be affected by the water flow and thus be accelerated or slowed down.
[0096] In some embodiments, the speed of the swinging of a character's parts is shown by controlling the playback speed of the animation corresponding to the character's parts. For example, when the character is subjected to simulated water flow resistance in a body of water, the playback speed of the animation corresponding to the character's parts is reduced, causing the swinging speed of the character's parts to slow down, so as to simulate that the character's parts are swinging more laboredly due to resistance.
[0097] Accordingly, in some embodiments, the step of determining the playback speed of the animation corresponding to the character based on the character's current dynamic data, and playing the animation corresponding to the character, includes: determining the playback speed of the animation corresponding to each component based on the current swing speed of each component; and playing the animation corresponding to each component according to the playback speed of the animation corresponding to each component.
[0098] Secondly, referring to Figure 3 This disclosure provides an animation playback device, including:
[0099] Data acquisition module 101 is used to acquire the attribute data of the water body corresponding to the location of the character. The attribute data of the water body represents the shape and flow characteristics of the water body.
[0100] The force analysis module 102 is used to determine the force information of the character based on the value of the water body's attribute data corresponding to the character's location. The force information of the character represents the force exerted by the water flow on the character.
[0101] The dynamic analysis module 103 is used to determine the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character.
[0102] The animation processing module 104 is used to determine the playback speed of the animation corresponding to the character based on the character's current dynamic data, so as to play the animation corresponding to the character.
[0103] In some embodiments, the force information of the character includes the magnitude and direction of the force acting on the character;
[0104] The force analysis module 102 is used to determine the water flow velocity and direction at the character's location based on the water body's property data corresponding to the character's location.
[0105] Based on the water flow velocity at the character's location, the magnitude of the force acting on the character is determined using a first custom rule; whereby the first custom rule indicates that the magnitude of the force acting on the character is positively correlated with the water flow velocity.
[0106] The direction of the force acting on the character is determined by the direction of the water flow at the character's location.
[0107] In some embodiments, the attribute data of the water body includes the width data, depth data, and flow rate data of the water body;
[0108] The force analysis module 102 is used to determine the water flow velocity at the location of the character based on the width, depth, and flow rate data of the water body corresponding to the character's location, using a second custom rule; wherein, the second custom rule indicates that the water flow velocity is negatively correlated with the width of the water body, negatively correlated with the depth of the water body, and positively correlated with the flow rate of the water body.
[0109] In some embodiments, the force analysis module 102 is used to determine the direction of water flow at the character's location based on the direction curve of the water body, wherein the direction curve of the water body represents the direction of the water body. In some embodiments, the dynamic data includes the character's movement speed and movement direction; the dynamic analysis module 103 is used to determine the character's current movement speed based on the character's force information, the character's initial movement speed, and movement direction.
[0110] In some embodiments, the dynamic data of the character includes the swing speed and swing direction of multiple components of the character; the dynamic analysis module 103 is used to determine the magnitude and direction of the force on each component based on the force information of the character; and to determine the current swing speed of each component based on the magnitude and direction of the force on each component, the initial swing speed and swing direction of each component.
[0111] In some embodiments, the dynamic data of the character also includes the attribute characteristics of multiple components of the character; the dynamic analysis module 103 is also used to determine the swing mode of each component based on the magnitude and direction of the force acting on each component and the attribute characteristics of each component.
[0112] In some embodiments, the animation processing module 104 is used to determine the playback speed of the animation corresponding to each component based on the current swing speed of each component; and to play the animation corresponding to each component according to the playback speed of the animation corresponding to each component.
[0113] Thirdly, referring to Figure 4 This disclosure provides an electronic device, which includes:
[0114] One or more processors 201;
[0115] The memory 202 stores one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the animation playback method described in the first aspect of the present disclosure.
[0116] One or more I / O interfaces 203 are connected between the processor and the memory and configured to enable information exchange between the processor and the memory.
[0117] Among them, processor 201 is a device with data processing capabilities, including but not limited to central processing unit (CPU); memory 202 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); I / O interface (read-write interface) 203 is connected between processor 201 and memory 202, and can realize information interaction between processor 201 and memory 202, including but not limited to data bus (Bus).
[0118] In some embodiments, the processor 201, memory 202, and I / O interface 203 are interconnected via bus 204, and thus connected to other components of the computing device.
[0119] Fourthly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the animation playback method described in the first aspect of embodiments of this disclosure.
[0120] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0121] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. An animation playback method, comprising: The attribute data of the water body is obtained, corresponding to the value of the character's location. The attribute data of the water body represents the shape and flow characteristics of the water body. Based on the attribute data of the water body corresponding to the value of the character's location, the force information of the character is determined, wherein the force information of the character represents the force exerted by the water flow on the character; Based on the force information of the character and the initial dynamic data of the character, determine the current dynamic data of the character; Based on the character's current dynamic data, the playback speed of the animation corresponding to the character is determined to play the animation corresponding to the character; wherein, the force information of the character includes the magnitude and direction of the force acting on the character; determining the force information of the character based on the value of the water body's attribute data corresponding to the character's location includes: determining the water flow velocity and direction at the character's location based on the value of the water body's attribute data corresponding to the character's location; determining the magnitude of the force acting on the character based on the water flow velocity at the character's location using a first custom rule; determining the direction of the force acting on the character based on the water flow direction at the character's location; and, the attribute data of the water body includes the width data, depth data, and flow rate data of the water body; the water flow velocity at the character's location is determined by: determining the water flow velocity at the character's location based on the width data, depth data, and flow rate data of the water body corresponding to the character's location using a second custom rule; wherein, the attributes of the water body... The data includes the direction curve of the water body; the water flow direction at the character's location is determined as follows: the water flow direction at the character's location is determined based on the direction curve of the water body, wherein the direction curve of the water body represents the direction of the water body, and the attribute data of the water body corresponding to the character's location includes: the attribute data values of the local water body area corresponding to the character's location; wherein the first custom rule represents that the magnitude of the force exerted by the water flow on the character is positively correlated with the water flow velocity; the second custom rule represents that the water flow velocity is negatively correlated with the width of the water body, negatively correlated with the depth of the water body, and positively correlated with the flow rate of the water body; wherein the initial dynamic data includes the character's initial movement speed and movement direction; the current dynamic data includes the character's current movement speed and movement direction; determining the character's current dynamic data based on the character's force information and the character's initial dynamic data includes: determining the character's current movement speed based on the character's force information, the character's initial movement speed, and the movement direction.
2. The animation playback method according to claim 1, wherein, The initial dynamic data includes the initial swing velocity and swing direction of multiple components of the character; the current dynamic data includes the current swing velocity of multiple components of the character; determining the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character includes: The magnitude and direction of the forces acting on each component are determined based on the force information of the character. The current swing speed of each component is determined based on the magnitude and direction of the force acting on each component, the initial swing speed and the swing direction of each component.
3. The animation playback method according to claim 2, wherein, The initial dynamic data also includes attribute characteristics of multiple components of the character; determining the current dynamic data of the character based on the force information and the initial dynamic data of the character further includes: The oscillation mode of each component is determined based on the magnitude and direction of the force acting on each component and the attribute characteristics of each component.
4. The animation playback method according to claim 3, wherein The step of determining the playback speed of the animation corresponding to the character based on the character's current dynamic data, in order to play the animation corresponding to the character, includes: The playback speed of the animation corresponding to each component is determined based on the current swing speed of each component. Play the animations corresponding to each of the components according to the playback speed of the animations corresponding to each component.
5. An animation playback device, comprising: The data acquisition module is used to acquire the attribute data of the water body corresponding to the position of the character, wherein the attribute data of the water body represents the shape and flow characteristics of the water body; The force analysis module is used to determine the force information of the character based on the value of the water body's attribute data corresponding to the character's location, wherein the force information of the character represents the force exerted by the water flow on the character; The dynamic analysis module is used to determine the current dynamic data of the character based on the force information of the character and the initial dynamic data of the character. An animation processing module is used to determine the playback speed of the animation corresponding to the character based on the character's current dynamic data, so as to play the animation corresponding to the character; wherein, the force information of the character includes the magnitude and direction of the force acting on the character; the force analysis module is specifically used to: determine the water flow velocity and direction at the character's location based on the water body's attribute data corresponding to the values at the character's location; determine the magnitude of the force acting on the character based on the water flow velocity at the character's location using a first custom rule; determine the direction of the force acting on the character based on the water flow direction at the character's location; and, the water body's attribute data includes the water body's width data, depth data, and flow rate data; the water flow velocity at the character's location is determined by: determining the water flow velocity at the character's location based on the width data, depth data, and flow rate data of the water body corresponding to the character's location using a second custom rule; wherein, the water body's attribute data includes the water body's... The direction curve; the direction of the water flow at the character's location is determined as follows: the direction curve of the water body is used to determine the direction of the water flow at the character's location, wherein the direction curve of the water body represents the direction of the water body, and the attribute data of the water body corresponding to the character's location includes the attribute data values of the local water body area corresponding to the character's location; wherein the first custom rule represents that the magnitude of the force exerted on the character by the water flow is positively correlated with the water flow velocity; the second custom rule represents that the water flow velocity is negatively correlated with the width of the water body, negatively correlated with the depth of the water body, and positively correlated with the flow rate of the water body; wherein the initial dynamic data includes the character's initial movement speed and movement direction; the current dynamic data includes the character's current movement speed and movement direction; determining the character's current dynamic data based on the character's force information and the character's initial dynamic data includes: determining the character's current movement speed based on the character's force information, the character's initial movement speed, and the movement direction.
6. An electronic device, comprising: One or more processors; A memory having stored one or more programs that, when executed by one or more processors, cause the one or more processors to implement the animation playback method according to any one of claims 1 to 4.
7. A computer-readable medium having a computer program stored thereon, the program being executed by a processor to implement the animation playback method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Animation processing method and device in game
CN109865291A