Method and apparatus for animating an action object

By detecting when a moving object enters a water area in a virtual reality scene, calculating its lurking depth, and dynamically selecting a lurking animation, the problem of virtual reality animation display methods being unable to balance realism and resource consumption is solved, thus improving both smoothness and realism.

CN116363267BActive Publication Date: 2026-06-23SHANGHAI MIHA YOUHAIYUANCHENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI MIHA YOUHAIYUANCHENG TECH CO LTD
Filing Date
2021-12-28
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing animation methods cannot balance realism and resource consumption in virtual reality scenarios. Fixed motion animations lack realism, and real-time rendering consumes a lot of computing resources, causing stuttering.

Method used

After detecting when an object enters the water area, the submerged depth is calculated, and the submerged animation is obtained based on the correspondence between the depth data and the animation. The submerged animation is then dynamically selected and played, avoiding complex calculations using a physics engine.

Benefits of technology

It achieves improved animation playback smoothness and realism while saving computing power and reducing system resource consumption, avoiding the lack of realism caused by fixed motion animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116363267B_ABST
    Figure CN116363267B_ABST
Patent Text Reader

Abstract

The application relates to the field of animation, and particularly discloses an animation display method and device for a motion object, which comprises the following steps: in the case that the motion object enters a water body region, calculating the diving depth of the motion object according to diving position information of the motion object and water surface information of the water body region; obtaining a diving animation corresponding to the diving depth according to the corresponding relationship between depth data and depth animation, and playing the obtained diving animation. According to the method, the diving animation can be quickly determined directly according to the diving depth, and complex calculation by means of a physical engine is not needed, so that the fluency of animation playing can be improved under the condition of saving computing power and reducing system resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of animation, specifically to a method and apparatus for displaying animated objects. Background Technology

[0002] In virtual reality scenarios, motion objects refer to objects capable of displaying motion animation, such as human figures and animal objects. Motion animation is typically played in two ways:

[0003] In the first playback method, fixed motion animations are pre-set for the action object. For example, for character A, at least one motion animation for character A is pre-set, and the dynamics of character A are displayed through this motion animation. In this method, the motion animation cannot adapt to changes in the scene and environment in which the action object is located, lacking realism.

[0004] In the second playback method, a physics engine dynamically calculates the relevant data of the action object and its surrounding scene and environment, and renders the animation data of the action object in real time. This method provides a better sense of realism; however, real-time rendering via a physics engine consumes a large amount of computing resources, resulting in significant system resource consumption and potentially causing issues such as animation stuttering and playback choppy.

[0005] This shows that existing animation methods cannot balance realism and resource consumption. Summary of the Invention

[0006] In view of the above problems, the present invention is proposed to provide a method and apparatus for displaying animation of motion objects that overcomes or at least partially solves the above problems.

[0007] According to one aspect of the present invention, a method for animate display of an action object is provided, comprising:

[0008] If the action object is detected to have entered the water area, the lurking depth of the action object is calculated based on the lurking location information of the action object and the water surface information of the water area;

[0009] Based on the correspondence between depth data and depth animation, obtain the latent animation corresponding to the latent depth, and play the obtained latent animation.

[0010] Optionally, the correspondence between the depth data and the depth animation includes:

[0011] At least two depth intervals and depth animations corresponding to each depth interval; wherein the latent animation corresponding to the latent depth is obtained by: determining the depth interval corresponding to the latent depth, and determining the latent animation corresponding to the latent depth based on the depth animation of the depth interval corresponding to the latent depth; or,

[0012] The correspondence between the depth data and the depth animation includes: at least two depth values ​​and depth animations corresponding to each depth value; wherein, the latent animation corresponding to the latent depth is obtained by: determining two depth values ​​corresponding to the latent depth, and performing interpolation processing on the two depth animations corresponding to the two depth values ​​to obtain the latent animation.

[0013] Optionally, the correspondence between the depth data and the depth animation includes:

[0014] The motion speed of the animation action contained in the depth animation has a first proportional relationship with the depth data, and / or the motion amplitude of the animation action contained in the depth animation has a second proportional relationship with the depth data.

[0015] Optionally, calculating the lurking depth of the action object based on its lurking location information and the water surface information of the water body area includes:

[0016] Determine a horizontal grid corresponding to the first water surface information, emit a first ray between the moving object and the horizontal grid, and determine the lurking depth of the moving object based on the first ray; and / or

[0017] A bottom surface grid corresponding to the second water surface information is determined, a second ray is emitted between the action object and the bottom surface grid, and the lurking depth of the action object is determined based on the second ray.

[0018] Optionally, obtaining the lurking animation corresponding to the lurking depth based on the correspondence between depth data and depth animation, and playing the obtained lurking animation includes:

[0019] The lurking depth is obtained through the object animation model of the action object, and the lurking animation corresponding to the lurking depth is determined and played.

[0020] The object animation model of the action object is used to display the animated actions of the action object, and the correspondence between the depth data and the depth animation is stored in the object animation model of the action object.

[0021] Optionally, detecting that the moving object has entered the water area includes:

[0022] Determine the action collider corresponding to the action object, and the mesh collider corresponding to the water body region;

[0023] When a collision is detected between the action collider and the mesh collider, it is determined that the action object has entered the water area.

[0024] Optionally, obtaining the lurking animation corresponding to the lurking depth includes:

[0025] Obtain water feature data corresponding to the lurking depth, and determine the lurking animation by combining the water feature data;

[0026] The water body feature data includes: water body attribute information, which includes: water flow velocity information, water flow direction information, water flow temperature information, and water flow illumination information; furthermore, the water body feature data also includes: object attribute information of water body associated objects; wherein, the water body associated objects include: biological objects.

[0027] According to another aspect of the present invention, an animation display device for a moving object is provided, comprising:

[0028] The detection module is adapted to calculate the lurking depth of the moving object based on the lurking position information of the moving object and the water surface information of the water body area when the moving object is detected to have entered the water area.

[0029] The playback module is adapted to obtain the latent animation corresponding to the latent depth based on the correspondence between depth data and depth animation, and to play the obtained latent animation.

[0030] Optionally, the correspondence between the depth data and the depth animation includes:

[0031] At least two depth intervals and depth animations corresponding to each depth interval; wherein the latent animation corresponding to the latent depth is obtained by: determining the depth interval corresponding to the latent depth, and determining the latent animation corresponding to the latent depth based on the depth animation of the depth interval corresponding to the latent depth; or,

[0032] The correspondence between the depth data and the depth animation includes: at least two depth values ​​and depth animations corresponding to each depth value; wherein, the latent animation corresponding to the latent depth is obtained by: determining two depth values ​​corresponding to the latent depth, and performing interpolation processing on the two depth animations corresponding to the two depth values ​​to obtain the latent animation.

[0033] Optionally, the correspondence between the depth data and the depth animation includes:

[0034] The motion speed of the animation action contained in the depth animation has a first proportional relationship with the depth data, and / or the motion amplitude of the animation action contained in the depth animation has a second proportional relationship with the depth data.

[0035] Optionally, the detection module is specifically adapted to:

[0036] Determine a horizontal grid corresponding to the first water surface information, emit a first ray between the moving object and the horizontal grid, and determine the lurking depth of the moving object based on the first ray; and / or

[0037] A bottom surface grid corresponding to the second water surface information is determined, a second ray is emitted between the action object and the bottom surface grid, and the lurking depth of the action object is determined based on the second ray.

[0038] Optionally, the playback module is specifically adapted to:

[0039] The lurking depth is obtained through the object animation model of the action object, and the lurking animation corresponding to the lurking depth is determined and played.

[0040] The object animation model of the action object is used to display the animated actions of the action object, and the correspondence between the depth data and the depth animation is stored in the object animation model of the action object.

[0041] Optionally, the detection module is specifically adapted to:

[0042] Determine the action collider corresponding to the action object, and the mesh collider corresponding to the water body region;

[0043] When a collision is detected between the action collider and the mesh collider, it is determined that the action object has entered the water area.

[0044] Optionally, the playback module is specifically adapted to:

[0045] Obtain water feature data corresponding to the lurking depth, and determine the lurking animation by combining the water feature data;

[0046] The water body feature data includes: water body attribute information, which includes: water flow velocity information, water flow direction information, water flow temperature information, and water flow illumination information; furthermore, the water body feature data also includes: object attribute information of water body associated objects; wherein, the water body associated objects include: biological objects.

[0047] According to another aspect of the present invention, an electronic device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0048] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the animation display method of the action object described above.

[0049] According to another aspect of the present invention, a computer storage medium is provided, the storage medium storing at least one executable instruction, the executable instruction causing a processor to perform an operation corresponding to the above-described animation display method for an action object.

[0050] In the animation display method and apparatus for motion objects provided by this invention, when a motion object is detected entering a water area, the submerged depth of the motion object is calculated based on the object's lurking position information and the water surface information of the water area. Based on the correspondence between depth data and depth animation, the submerged animation corresponding to the lurking depth is obtained and played. This method can dynamically obtain the lurking depth of the motion object after entering the water area and dynamically select the submerged animation to play based on the lurking depth, thus avoiding the lack of realism caused by fixed motion animation. Furthermore, this method directly and quickly determines the submerged animation based on the lurking depth without relying on a physics engine to perform complex calculations. Therefore, it can improve the smoothness of animation playback while saving computing power and reducing system resource consumption.

[0051] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0052] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0053] Figure 1 A flowchart of an animation display method for motion objects according to an embodiment of the present invention is shown;

[0054] Figure 2 A flowchart of an animation display method for motion objects according to another embodiment of the present invention is shown;

[0055] Figure 3 A schematic diagram illustrating how the percentage of latency is calculated is shown;

[0056] Figure 4 This diagram illustrates a structural diagram of an animation display device for motion objects according to another embodiment of the present invention;

[0057] Figure 5 A schematic diagram of the structure of an electronic device provided in another embodiment of the present invention is shown. Detailed Implementation

[0058] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0059] Figure 1 A flowchart illustrating an animation display method for a motion object according to an embodiment of the present invention is shown. Figure 1 As shown, the method includes:

[0060] Step S110: When the action object is detected to have entered the water area, calculate the hiding depth of the action object based on the hiding position information of the action object and the water surface information of the water area.

[0061] The action object includes virtual objects with motion capabilities contained in game applications or video applications. The activity range of the action object may include various areas such as land areas, air areas, and water areas. In this embodiment, when the action object is detected to have entered a water area, the hidden position information of the action object and the water surface information of the water area are obtained, thereby calculating the hidden depth of the action object.

[0062] The latent position information describes the location of the object within the water body area and can be represented by coordinates, orientation data, etc. The water surface information includes the horizontal plane information of the water body area, used to describe the water surface position. Accordingly, based on the latent position information of the object and the water surface information of the water body area, the latent depth of the object can be calculated. This latent depth refers to the vertical distance from the object's location to the horizontal plane.

[0063] Step S120: Based on the correspondence between depth data and depth animation, obtain the lurking animation corresponding to the lurking depth, and play the obtained lurking animation.

[0064] In the process of developing this invention, the inventors discovered that moving objects in water are affected by factors such as water pressure and buoyancy, causing the animation state of the moving object in water to differ from its animation state on land or in the air. Furthermore, because the water pressure varies at different depths underwater, the animation state of the same moving object will also differ at different depths underwater.

[0065] To accurately reflect the correlation between the animation state of a moving object and its underwater depth, this embodiment pre-establishes a correspondence between depth data and depth animation. Depth data refers to the underwater depth of the moving object, i.e., the vertical distance between the moving object and the horizontal plane. Depth animation refers to the video animation corresponding to a specific depth data point. In short, by pre-establishing the correspondence between depth data and depth animation, the submerged animation corresponding to the submerged depth is determined.

[0066] The lurking animation corresponding to the lurking depth can be either a depth animation or an interpolated animation obtained by interpolating the depth animation; this invention does not limit either.

[0067] Therefore, this method can dynamically obtain the submerged depth of an object after entering a water area and dynamically select the submerged animation to play based on the submerged depth. This avoids the lack of realism caused by fixed animation. Furthermore, this method directly and quickly determines the submerged animation based on the submerged depth without relying on a physics engine to perform complex calculations. Therefore, it can improve the smoothness of animation playback while saving computing power and reducing system resource consumption.

[0068] Figure 2 A flowchart illustrating a method for displaying animated objects according to another embodiment of the present invention is shown. Figure 2 As shown, the method includes:

[0069] Step S200: Detect whether the object of the action has entered the water area.

[0070] The action objects include virtual objects with motion capabilities within game or video applications. Video applications include virtual reality video applications, augmented reality video applications, etc. The activity range of the action objects may include various areas such as land areas, air areas, and water areas. Because action objects are affected by both water pressure and buoyancy in water, underwater animation differs from above-water animation. Therefore, it is necessary to detect whether the action object has entered the water area. This detection can be achieved through several methods:

[0071] In the first detection method, detection is based on collision operations between colliders. Specifically, an action collider corresponding to the motion object and a mesh collider corresponding to the water area are identified. When a collision operation is detected between the action collider and the mesh collider, it is determined that the motion object has entered the water area. The mesh collider corresponding to the water area can be the mesh collider used to render the water surface object. Collision operations can be detected through collision events, collision commands, etc. Collider detection allows for timely detection as soon as the motion object comes into contact with the water area, thus ensuring real-time animation adjustments.

[0072] In the second detection method, a pre-defined area of ​​the water body is set, and the current position information of the moving object is dynamically detected. When the current position falls within the area of ​​the water body, it is determined that the moving object has entered the water body. This method can quickly detect whether a moving object has fallen into the water body based on its area, achieving efficient detection with relatively low computational power.

[0073] Step S210: When the action object is detected to have entered the water area, calculate the hiding depth of the action object based on the hiding position information of the action object and the water surface information of the water area.

[0074] In this embodiment, when an object is detected entering a water area, the object's lurking position information and the water surface information of the water area are acquired to calculate the object's lurking depth. The lurking position information describes the object's location within the water area and can be represented by coordinates, orientation data, etc. The water surface information includes the horizontal plane information and the bottom surface information of the water area, used to comprehensively describe the water surface position. Accordingly, based on the object's lurking position information and the water surface information, the object's lurking depth can be calculated. This lurking depth refers to the vertical distance from the object's location to the horizontal plane.

[0075] In practice, the stealth depth of the target object can be determined using ray casting, which can be achieved through at least one of the following methods:

[0076] In the first implementation, a horizontal grid corresponding to the first water surface information is determined, and a first ray is emitted between the action object and the horizontal grid. The lurking depth of the action object is determined based on the first ray. Specifically, firstly, a horizontal surface and a corresponding horizontal grid are defined. This horizontal grid is typically not perfectly horizontal but rather wavy. Accordingly, to simulate the disturbance of a real water surface, a disturbance value N needs to be set for the water surface. Assuming the highest point of the water surface is Mu and the lowest point is Md, the horizontal coordinates of the horizontal grid are Sw = (Mu - Md) / 2 * N. In practice, a first scattering ray (also called a first emitted ray) is emitted from the location of the action object upwards in the world coordinate system. The lurking depth of the action object is determined based on the distance at which the first emitted ray touches the horizontal grid. Furthermore, to accurately determine the latency depth, after the first emitted ray touches the horizontal grid, a first reflected ray can be obtained after the first emitted ray is reflected by the horizontal grid. This first reflected ray is emitted vertically downwards from the horizontal grid. When this first reflected ray touches the moving object, the total length of the first emitted ray and the first reflected ray is calculated, and half of the total length is determined as the latency depth of the moving object. Since the length of the reflected ray is included, the calculation combines the lengths of both rays, making it more accurate than simply using the emitted ray to calculate the latency depth.

[0077] In the second implementation, a bottom surface mesh corresponding to the second water surface information is determined, and a second ray is emitted between the action object and the bottom surface mesh. The lurking depth of the action object is determined based on the second ray. The bottom surface mesh corresponds to the bottom of the water. Since the bottom surface is usually uneven, unlike a rippled horizontal surface, the shape of the bottom surface mesh may have significant undulations. Therefore, the distance between the action object and the bottom can be calculated using the second ray, and this distance can more accurately reflect the state of the action object in the water. In practice, a scattering ray can be emitted vertically upwards from the bottom scene (such as the bottom surface mesh) within the water area. When the ray touches the action object, the length of the ray is obtained.

[0078] Since the state of the action object is uncontrollable, and the deeper the depth, the greater the impact on the behavior, to avoid inaccurate calculations of the latency depth, the emitted rays can be a group of rays. The calculation is then performed based on the density of each ray within the group. For example, when the ray density of the group is greater than a first preset threshold, the calculation is based on the ray with the longest contact distance within the group; when the ray density is less than a second preset threshold, the calculation is based on the ray with the shortest contact distance within the group. Furthermore, the calculation can be further combined with the action object's state attributes and depth label.

[0079] Furthermore, the lurking depth can further include: a first lurking depth determined by the first method, used to describe the distance between the moving object and the horizontal surface; and a second lurking depth determined by the second method, used to describe the distance between the moving object and the bottom surface. The first lurking depth is used to calculate data such as water pressure and buoyancy. The second lurking depth is used to determine the distance between the moving object and the bottom, in order to determine whether the moving object will touch the bottom when performing a downward movement.

[0080] To better reflect the distance between the moving object and both the horizontal and underwater surfaces, in another optional implementation, the submerged depth is expressed as a percentage. The submerged depth is calculated using the following formula: (Moving object's position coordinates / (Underwater position coordinates - Horizontal position coordinates)) * 100% = Current depth percentage. Here, the horizontal surface is used as the origin of the coordinate axes. The moving object's position coordinates reflect the distance between the moving object and the horizontal surface. The difference between the underwater position coordinates and the horizontal position coordinates reflects the overall depth of the water area. The submerged depth expressed as a percentage more comprehensively reflects the relative position of the moving object underwater. Specifically, when the submerged depth is expressed as a percentage, the percentage is the ratio of the first submerged depth determined using the first method to the sum of the first and second submerged depths mentioned above.

[0081] For ease of understanding, Figure 3 A schematic diagram illustrating how the percentage of latency is calculated is shown. (For example...) Figure 3 As shown, position O between the horizontal grid 31 and the underwater grid 32 represents the current position of the action object. The horizontal grid 31 can essentially be a wavy grid, while the shape of the underwater grid 32 is determined by the specific riverbed topography. Line segment OE represents the first vertical distance between the action object and the horizontal grid, and line segment OF represents the second vertical distance between the action object and the underwater grid. The sum of the first and second vertical distances represents the total water depth; correspondingly, the ratio between the first vertical distance and the total water depth is the percentage of the lurking depth.

[0082] Step S220: Based on the correspondence between depth data and depth animation, obtain the lurking animation corresponding to the lurking depth, and play the obtained lurking animation.

[0083] In developing this invention, the inventors discovered that moving objects in water are affected by factors such as water pressure and buoyancy, causing their animation state in water to differ from their animation state on land or in the air. Furthermore, because water pressure varies at different depths underwater, the animation state of the same moving object also differs at different depths. To accurately reflect the correlation between the animation state of a moving object and underwater depth, this embodiment pre-sets a correspondence between depth data and depth animation. Depth data refers to the depth of the moving object underwater, i.e., the vertical distance between the moving object and the horizontal plane. Depth animation refers to the video animation corresponding to a specific depth data point.

[0084] In practice, stealth animation can be obtained through the following methods:

[0085] In the first approach, multiple depth intervals are pre-defined, and depth animations corresponding to each interval are set. Accordingly, the correspondence between depth data and depth animations includes at least two depth intervals and corresponding depth animations for each interval. The submerged animation corresponding to the submerged depth is obtained as follows: the depth interval corresponding to the submerged depth is determined, and the submerged animation corresponding to the submerged depth is determined based on the depth animation of the corresponding depth interval. For example, assuming 0-100 meters underwater is the first depth interval, it corresponds to the first depth animation; 100-200 meters underwater is the second depth interval, it corresponds to the second depth animation; and 300-500 meters underwater is the third depth interval, it corresponds to the third depth animation. Accordingly, if the submerged depth is 150 meters, the depth interval corresponding to the submerged depth is determined to be the second depth interval; therefore, the second depth animation is used as the submerged animation corresponding to the submerged depth. Furthermore, to avoid hard transitions in the submerged animations, a decreasing transition fusion can be performed for adjacent depth intervals. For example, the adjacent intervals of the depth interval corresponding to the lurking depth are determined, and the depth animations of the adjacent intervals are combined for animation fusion processing to obtain the fused lurking animation.

[0086] In the second method, multiple depth values ​​are pre-set, and a depth animation corresponding to each depth value is set. Accordingly, the correspondence between depth data and depth animation includes: at least two depth values ​​and a depth animation corresponding to each depth value. The latent animation corresponding to the lurking depth is obtained as follows: two depth values ​​corresponding to the lurking depth are determined, and interpolation is performed on the two depth animations corresponding to the two depth values ​​to obtain the lurking animation. For example, assuming the first depth value is 100 meters, it corresponds to the first depth animation; the second depth value is 500 meters, it corresponds to the second depth animation. If the lurking depth is 300 meters, interpolation is performed on the first and second depth animations, and the resulting interpolated animation is used as the lurking animation.

[0087] Additionally, when the lurking depth is expressed as a percentage, the aforementioned depth range and depth value can be replaced with depth percentages, and corresponding depth animations can be set for each depth percentage. Specifically, when the depth percentage exceeds a preset percentage threshold, the object size and range of motion of the action object are further obtained. Based on the object size and range of motion, it is determined whether the object will touch the underwater area. If so, collision feature data is further included in the depth animation.

[0088] Furthermore, the correspondence between depth data and depth animation includes: a first proportional relationship between the motion speed of the animation within the depth animation and the depth data, and / or a second proportional relationship between the motion amplitude of the animation within the depth animation and the depth data. The first proportional relationship can be negative; for example, the larger the depth data value, the slower the motion speed (due to water pressure, the motion resistance is greater, hence the slower speed). The second proportional relationship can be positive or negative; for example, the larger the depth data value, the greater the motion amplitude of the animation (due to water pressure, greater resistance necessitates a larger amplitude motion to swim).

[0089] Furthermore, when acquiring the lurking animation corresponding to the lurking depth, it can be further achieved through the following method: acquiring water body feature data corresponding to the lurking depth, and determining the lurking animation based on the water body feature data. The water body feature data includes: water body attribute information, including: water flow velocity, water flow direction, water flow temperature, and water flow illumination information; and also includes: object attribute information of water-related objects, including: biological objects. Specifically, corresponding water body feature data can be pre-set for different depth ranges to determine the animation feature data of the lurking animation based on the water body feature data.

[0090] For example, water temperature, flow rate, and lighting conditions vary at different depths. Therefore, corresponding water feature data can be set based on depth data to determine the animation feature data for the lurking animation. For instance, the lighting feature data included in the animation feature data is related to water flow lighting information, while the motion amplitude feature data included in the animation feature data is related to water flow speed and direction information. Furthermore, the types of objects associated with water bodies differ in different water areas. These water-related objects can be various biological objects such as aquatic plants. Since biological objects possess their own biological attributes, these attributes can influence the animation feature data of the lurking animation.

[0091] In practice, animation playback can be achieved using the object animation model of the action object. Accordingly, the latency depth is obtained through the object animation model of the action object, and the latency animation corresponding to that depth is determined and played. Specifically, an object animation model is pre-set for the action object; this model is used to display the animation actions of the action object, and the correspondence between depth data and depth animation is stored in the object animation model of the action object.

[0092] The above embodiments store depth animation in the object animation model of the action object (such as a character object). By binding the animation data corresponding to the depth information to the character, fast playback of the animation is achieved, and it can flexibly adapt to scenes with different depths. Specifically, at least two or more extreme motion animations affected by depth are set, each bound to the depth information. The intermediate animation data is calculated through interpolation, thereby determining the corresponding animation data to play based on the input depth percentage information. For example, the character object's motion animation on the water surface is an easy swimming motion; the deeper the water, the more strenuous the swimming becomes, and the slower the swimming motion.

[0093] In summary, this method can dynamically obtain the submerged depth of an object after entering a water area and dynamically select the submerged animation to play based on the submerged depth. Therefore, it avoids the lack of realism caused by fixed animations. Furthermore, this method directly and quickly determines the submerged animation based on the submerged depth without relying on a physics engine to perform complex calculations. Therefore, it can improve the smoothness of animation playback while saving computing power and reducing system resource consumption. In particular, the use of interpolation or diminishing transition blending methods can avoid the problem of hard animation transitions.

[0094] Furthermore, in this embodiment, the correspondence between depth data and depth animation is stored in the object animation model of the action object. Therefore, animation playback can be achieved directly based on the object animation model of the action object without having to obtain relevant data from external storage space. This saves processing time and helps to improve playback speed.

[0095] Example 3

[0096] Figure 4 This diagram illustrates the structure of an animation display device for motion objects according to Embodiment 3 of the present invention, comprising:

[0097] The detection module 41 is adapted to calculate the lurking depth of the action object based on the lurking position information of the action object and the water surface information of the water body area when the action object is detected to have entered the water area.

[0098] The playback module 42 is adapted to obtain a latent animation corresponding to the latent depth based on the correspondence between depth data and depth animation, and to play the obtained latent animation.

[0099] Optionally, the correspondence between the depth data and the depth animation includes:

[0100] At least two depth intervals and depth animations corresponding to each depth interval; wherein the latent animation corresponding to the latent depth is obtained by: determining the depth interval corresponding to the latent depth, and determining the latent animation corresponding to the latent depth based on the depth animation of the depth interval corresponding to the latent depth; or,

[0101] The correspondence between the depth data and the depth animation includes: at least two depth values ​​and depth animations corresponding to each depth value; wherein, the latent animation corresponding to the latent depth is obtained by: determining two depth values ​​corresponding to the latent depth, and performing interpolation processing on the two depth animations corresponding to the two depth values ​​to obtain the latent animation.

[0102] Optionally, the correspondence between the depth data and the depth animation includes:

[0103] The motion speed of the animation action contained in the depth animation has a first proportional relationship with the depth data, and / or the motion amplitude of the animation action contained in the depth animation has a second proportional relationship with the depth data.

[0104] Optionally, the detection module is specifically adapted to:

[0105] Determine a horizontal grid corresponding to the first water surface information, emit a first ray between the moving object and the horizontal grid, and determine the lurking depth of the moving object based on the first ray; and / or

[0106] A bottom surface grid corresponding to the second water surface information is determined, a second ray is emitted between the action object and the bottom surface grid, and the lurking depth of the action object is determined based on the second ray.

[0107] Optionally, the playback module is specifically adapted to:

[0108] The lurking depth is obtained through the object animation model of the action object, and the lurking animation corresponding to the lurking depth is determined and played.

[0109] The object animation model of the action object is used to display the animated actions of the action object, and the correspondence between the depth data and the depth animation is stored in the object animation model of the action object.

[0110] Optionally, the detection module is specifically adapted to:

[0111] Determine the action collider corresponding to the action object, and the mesh collider corresponding to the water body region;

[0112] When a collision is detected between the action collider and the mesh collider, it is determined that the action object has entered the water area.

[0113] Optionally, the playback module is specifically adapted to:

[0114] Obtain water feature data corresponding to the lurking depth, and determine the lurking animation by combining the water feature data;

[0115] The water body feature data includes: water body attribute information, which includes: water flow velocity information, water flow direction information, water flow temperature information, and water flow illumination information; furthermore, the water body feature data also includes: object attribute information of water body associated objects; wherein, the water body associated objects include: biological objects.

[0116] The specific structure and working principle of each of the above modules can be found in the description of the corresponding part of the method embodiment, and will not be repeated here.

[0117] Another embodiment of this application provides a non-volatile computer storage medium storing at least one executable instruction that can execute the animation display method of the action object in any of the above method embodiments. Specifically, the executable instruction can be used to cause the processor to perform the corresponding operations in the above method embodiments.

[0118] Figure 5 A schematic diagram of an electronic device according to another embodiment of the present invention is shown. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.

[0119] like Figure 5As shown, the electronic device may include: a processor 502, a communications interface 506, a memory 504, and a communications bus 508.

[0120] in:

[0121] The processor 502, communication interface 506, and memory 504 communicate with each other via communication bus 508.

[0122] Communication interface 506 is used to communicate with other network elements such as clients or other servers.

[0123] The processor 502 is used to execute program 510, specifically to execute the relevant steps in the above-described embodiment of the animation display method for action objects.

[0124] Specifically, program 510 may include program code that includes computer operation instructions.

[0125] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0126] Memory 504 is used to store program 510. Memory 504 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0127] Specifically, program 510 can be used to cause processor 502 to perform the corresponding operations in the above method embodiments.

[0128] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used in conjunction with the teachings herein. The required structure for constructing such devices is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0129] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0130] Similarly, it should be understood that, in order to streamline this disclosure and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.

[0131] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0132] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments can be used in any combination.

[0133] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0134] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. A method for animating a motion object, comprising: in a case where a motion object is detected to enter a water body region, calculating a diving depth of the motion object according to diving position information of the motion object and water surface information of the water body region; acquiring a diving animation corresponding to the diving depth according to a correspondence between depth data and depth animations, and playing the acquired diving animation; wherein the correspondence between the depth data and the depth animations comprises: at least two depth intervals and depth animations corresponding to each depth interval; wherein the diving animation corresponding to the diving depth is obtained by determining a depth interval corresponding to the diving depth, and determining the diving animation corresponding to the diving depth according to the depth animation of the depth interval corresponding to the diving depth; or the correspondence between the depth data and the depth animations comprises: at least two depth values and depth animations corresponding to each depth value; wherein the diving animation corresponding to the diving depth is obtained by determining two depth values corresponding to the diving depth, and performing interpolation processing on two depth animations corresponding to the two depth values to obtain the diving animation; wherein the acquiring of the diving animation corresponding to the diving depth comprises: acquiring water body feature data corresponding to the diving depth, and determining the diving animation in combination with the water body feature data; wherein the water body feature data comprises water body attribute information, and the water body attribute information comprises water flow speed information, water flow direction information, water flow temperature information, and water flow illumination information; and the water body feature data further comprises object attribute information of a water body associated object; wherein the water body associated object comprises a biological object.

2. The method of claim 1, wherein, the correspondence between the depth data and the depth animations comprises: a first proportional relationship between an action speed of an animation action included in a depth animation and depth data, and / or a second proportional relationship between an action amplitude of the animation action included in the depth animation and the depth data.

3. The method of claim 1 or 2, wherein, the calculating of the diving depth of the motion object according to the diving position information of the motion object and the water surface information of the water body region comprises: determining a horizontal plane grid corresponding to first water surface information, emitting a first ray between the motion object and the horizontal plane grid, and determining the diving depth of the motion object according to the first ray; and / or determining a water bottom plane grid corresponding to second water surface information, emitting a second ray between the motion object and the water bottom plane grid, and determining the diving depth of the motion object according to the second ray.

4. The method of claim 1 or 2, wherein, the acquiring of the diving animation corresponding to the diving depth according to the correspondence between the depth data and the depth animations, and the playing of the acquired diving animation comprise: acquiring the diving depth through an object animation model of the motion object, determining and playing the diving animation corresponding to the diving depth. The object animation model of the action object is used to display the animated actions of the action object, and the correspondence between the depth data and the depth animation is stored in the object animation model of the action object.

5. The method of claim 1 or 2, wherein, The detection of the action object entering the water area includes: Determine the action collider corresponding to the action object, and the mesh collider corresponding to the water body region; When a collision is detected between the action collider and the mesh collider, it is determined that the action object has entered the water area.

6. An animation display device for a moving object, comprising: The detection module is adapted to calculate the lurking depth of an object when it is detected that the object has entered a water area, based on the object's lurking location information and the water surface information of the water area. The playback module is adapted to obtain a latent animation corresponding to the latent depth based on the correspondence between depth data and depth animation, and to play the obtained latent animation. The correspondence between the depth data and the depth animation includes: At least two depth intervals and depth animations corresponding to each depth interval; wherein the latent animation corresponding to the latent depth is obtained by: determining the depth interval corresponding to the latent depth, and determining the latent animation corresponding to the latent depth based on the depth animation of the depth interval corresponding to the latent depth; or, The correspondence between the depth data and the depth animation includes: at least two depth values ​​and depth animations corresponding to each depth value; wherein, the latent animation corresponding to the latent depth is obtained by: determining two depth values ​​corresponding to the latent depth, and performing interpolation processing on the two depth animations corresponding to the two depth values ​​to obtain the latent animation; The step of obtaining the lurking animation corresponding to the lurking depth includes: Obtain water feature data corresponding to the lurking depth, and determine the lurking animation by combining the water feature data; The water body feature data includes: water body attribute information, which includes: water flow velocity information, water flow direction information, water flow temperature information, and water flow illumination information; furthermore, the water body feature data also includes: object attribute information of water body associated objects; wherein, the water body associated objects include: biological objects.

7. An electronic device comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the animation display method of the motion object as described in any one of claims 1-5.

8. A computer storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the animation display method of an action object as described in any one of claims 1-5.