A method, apparatus and system for generating animations for sports tactics demonstrations.
By acquiring the target trajectory specified by the user, capturing keyframes and synchronizing data, and combining it with easing interpolation algorithms, the problem of low trajectory path freedom in existing technologies is solved, enabling the generation of animations for more complex tactical demonstrations and improving the realism and smoothness of movement.
Patent Information
- Application Number
- CN202411798146.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-12-09
AI Technical Summary
Current sports tactical demonstration animation generation methods suffer from low trajectory path freedom, making it unable to effectively support the generation of complex tactical demonstration animations, and lacking in motion realism and smoothness.
By acquiring the target movement trajectory specified by the user, keyframes are captured and data is synchronized. The keyframe coordinates are updated using a synchronization mechanism. Combined with the easing interpolation algorithm, the smooth transition and coordination of the target movement are ensured, thereby improving the freedom and fluency of the trajectory path.
It significantly improves the freedom and smoothness of movement trajectories, enhances the realism and visual effects of tactical demonstration animations, and supports more complex tactical demonstration needs.
Smart Images

Figure CN119784901B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sports technology and digital demonstration, and in particular to a method, apparatus, system, electronic device, and computer storage medium for generating animations of sports tactics demonstrations. Background Technology
[0002] In sports teaching and tactical training, traditional tactical demonstrations typically rely on paper icons, whiteboard drawings, hand gestures, and match replays. Especially in football, coaches often draw the static positions of players and the ball on a tactical board and manually trace player movement paths to demonstrate tactical intentions and help players understand the execution process. However, this traditional method cannot dynamically display the real-time movement trajectories of players and the ball, making it difficult to accurately understand tactical ideas and action details. Furthermore, it cannot adjust tactics in real-time according to actual scenarios and needs, resulting in inefficient tactical demonstrations.
[0003] Based on this, existing technology designs a graphical teaching tactics board that allows coaches to set the starting and ending positions of players or balls in a graphical interface and generate corresponding straight paths. By opening Bézier curve control points in the path, coaches can fine-tune the movement route. After the coach completes the trajectory setting, the system will generate the movement animation of the players or balls according to the set path, thereby dynamically adjusting the tactics according to the actual scenario and needs.
[0004] However, improper keyframe mapping between animation generation and path can easily lead to animations that do not conform to physical laws, or exhibit stuttering and discontinuity, thus affecting the realism and smoothness of motion in the demonstration animation. Therefore, to ensure the realism of motion in the demonstration animation, existing technologies typically only provide a small number of Bézier curve points for users to adjust the path. Consequently, existing technologies suffer from low trajectory path freedom in sports tactical demonstration animation generation, failing to effectively support the generation of complex tactical demonstration animations. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide a method for generating animations of sports tactics demonstrations.
[0006] A method for generating animations of sports tactics demonstrations, comprising the following steps:
[0007] S1: Obtain the movement trajectory of several targets specified by the user;
[0008] S2: Based on a preset pixel interval, capture keyframes of the movement trajectories of several targets to obtain the keyframe coordinates of several targets.
[0009] S3: Use a synchronization mechanism to synchronize the coordinates of several target keyframes to obtain synchronized coordinates of several target keyframes.
[0010] S4: Update pixel positions based on the synchronized coordinates of several target keyframes to obtain several sets of target pixel coordinates;
[0011] S5: Render animations based on the pixel coordinates of several targets to obtain a tactical movement demonstration animation.
[0012] The animation generation method for sports tactical demonstrations described in this invention, compared with the prior art, achieves the generation of animations for multi-target movement trajectories specified by the user by synchronizing the target keyframe coordinates after keyframe capture, thereby increasing the degree of freedom of trajectory paths and effectively supporting the user's needs for more complex tactical demonstrations.
[0013] Furthermore, the target's movement trajectory is obtained as follows:
[0014]
[0015] In the formula, The path trajectory for the target; Represents the coordinates of the starting and ending points of the straight line trajectory; This represents the set of trajectory coordinates generated when the user drags or moves the target.
[0016] in, This indicates the number of user-specified coordinates obtained. If , it means the path to the current target is a straight line; when If , it means that the path to the current target is not a straight line;
[0017] The specific calculation method for keyframe capture is as follows:
[0018]
[0019] In the formula, These are the keyframe coordinates corresponding to the current target; Indicates the first in the straight line trajectory Keyframe coordinates; The first nonlinear trajectory Keyframe coordinates; The coordinates of the latest keyframe being traversed; Preset pixel interval; This indicates the total number of keyframe coordinates for the current target.
[0020] Accordingly, this invention enables the generation of diverse paths by specifying the number of coordinates, thereby significantly improving the freedom of motion trajectories and allowing users to design more complex trajectories that better meet tactical requirements based on actual needs. Simultaneously, this invention employs uniform preset pixel intervals for keyframe capture, ensuring smooth and natural speed transitions during target movement, thus improving the fluency of subsequent generated demonstration animations.
[0021] Furthermore, the specific representation of the data synchronization is as follows:
[0022]
[0023] In the formula, The coordinates of the target keyframe for synchronization; The maximum number of keyframes among the coordinates of the target keyframes; This represents the number of keyframes corresponding to the current target. This represents the number of target keyframe coordinates corresponding to the current target's easing region. The set of easing keyframes for the current target; This is the set of endpoint easing keyframes for the current target; The set of keyframes for synchronous completion.
[0024] This invention eliminates timing misalignment caused by inconsistent keyframe counts by using the target with the longest trajectory as a benchmark to ensure that the movement paths of other targets remain synchronized with the target with the longest path. Furthermore, this invention introduces easing keyframes at the start and end points of other targets to control the acceleration and deceleration of the targets at the start and end of their movements, making the target movement more natural and smooth. Accordingly, this invention, through its synchronization mechanism, effectively ensures the coordination of multi-target animation, significantly improving the quality and smoothness of tactical demonstration animations.
[0025] Furthermore, the number of target keyframe coordinates corresponding to the easing region The specific calculation is expressed as follows:
[0026]
[0027] In the formula, The minimum value weighting coefficient for the easing region;
[0028] The set of easing keyframes for the current target The specific calculation is as follows:
[0029]
[0030] In the formula, This represents the coordinates of the current target keyframe to the coordinates of the previous target keyframe. A set of easing interpolation keyframes between; Coordinates of the previous target keyframe The direction vector pointing to the current target keyframe coordinates; The easing interpolation interval for the easing entry is specifically calculated as follows:
[0031]
[0032] In the formula, The initial minimum pixel spacing of the buffer region is specifically calculated as follows:
[0033]
[0034] The preset pixel interval; The total number of easing interpolation keyframes used to ease in the coordinates from the previous target keyframe to the current target keyframe is calculated as follows:
[0035]
[0036] In the formula, The weighting coefficient for buffering is calculated as follows:
[0037]
[0038] W is the sum of the weighting coefficients; M is the total number of keyframes for easing interpolation, and its specific calculation is as follows:
[0039]
[0040] In the formula, For constraint terms;
[0041] The set of endpoint easing keyframes of the current target The specific calculation is expressed as follows:
[0042]
[0043] In the formula, The easing interpolation interval is used to gradually reduce the interval, thereby characterizing the change in the current target's velocity from uniform to slow. The specific calculation is expressed as follows:
[0044]
[0045] In the formula, The total number of easing interpolation keyframes from the coordinates of the previous target keyframe to the coordinates of the current target keyframe is calculated as follows:
[0046]
[0047] In the formula, The weighting coefficient for buffering is calculated as follows:
[0048]
[0049] The set of keyframes for synchronization completion The specific calculation is expressed as follows:
[0050]
[0051] In the formula, The total number of keyframes for synchronous completion.
[0052] This invention adjusts Weighting coefficients are used to ensure that the length of the current target's easing region and the number of keyframes for the current target do not exceed the maximum number of keyframes for the target along the maximum path. Simultaneously, this invention is based on easing interpolation intervals. By controlling the speed of the current target, a smooth transition and realism in the target's movement can be ensured, which significantly improves the fluidity and realism of the generated animation, avoids abrupt changes in the target's movement, and enhances the overall visual performance of the animation.
[0053] An animation generation device for sports tactical demonstrations, characterized in that it includes a target path trajectory acquisition unit, a keyframe capture unit, a data synchronization unit, a pixel coordinate update unit, and an animation rendering unit;
[0054] The target path trajectory acquisition unit is used to acquire the movement trajectories of several targets specified by the user.
[0055] The keyframe capture unit is used to capture keyframes of the movement trajectory of several targets according to a preset pixel interval, and obtain the keyframe coordinates of several targets.
[0056] The data synchronization unit is used to synchronize the coordinates of several target keyframes using a synchronization mechanism to obtain synchronized coordinates of several target keyframes.
[0057] The pixel coordinate update unit is used to update the pixel position based on the synchronized coordinates of several target keyframes to obtain several sets of target pixel coordinates.
[0058] The animation rendering unit is used to perform animation rendering based on a set of pixel coordinates of several targets to obtain a tactical movement demonstration animation.
[0059] Furthermore, the target's movement trajectory is obtained as follows:
[0060]
[0061] In the formula, The path trajectory for the target; Represents the coordinates of the starting and ending points of the straight line trajectory; This represents the set of trajectory coordinates generated when the user drags or moves the target.
[0062] in, This indicates the number of user-specified coordinates obtained. If , it means the path to the current target is a straight line; when If , it means that the path to the current target is not a straight line;
[0063] The specific calculation method for keyframe capture is as follows:
[0064]
[0065] In the formula, These are the keyframe coordinates corresponding to the current target; Indicates the first in the straight line trajectory Keyframe coordinates; The first nonlinear trajectory Keyframe coordinates; The coordinates of the latest keyframe being traversed; Preset pixel interval; This indicates the total number of keyframe coordinates for the current target.
[0066] Furthermore, the specific representation of the data synchronization is as follows:
[0067]
[0068] In the formula, The coordinates of the target keyframe for synchronization; The maximum number of keyframes among the coordinates of the target keyframes; This represents the number of keyframes corresponding to the current target. The number of target keyframe coordinates corresponding to the current target's easing region is calculated as follows:
[0069]
[0070] In the formula, The minimum value weighting coefficient for the easing region;
[0071] The set of easing keyframes for the current target is calculated as follows:
[0072]
[0073] In the formula, This represents the coordinates of the current target keyframe to the coordinates of the previous target keyframe. A set of easing interpolation keyframes between; Coordinates of the previous target keyframe The direction vector pointing to the current target keyframe coordinates; The easing interpolation interval for the easing entry is specifically calculated as follows:
[0074]
[0075] In the formula, The initial minimum pixel spacing of the buffer region is specifically calculated as follows:
[0076]
[0077] The preset pixel interval; The total number of easing interpolation keyframes used to ease in the coordinates from the previous target keyframe to the current target keyframe is calculated as follows:
[0078]
[0079] In the formula, The weighting coefficient for buffering is calculated as follows:
[0080]
[0081] W is the sum of the weighting coefficients; M is the total number of keyframes for easing interpolation, and its specific calculation is as follows:
[0082]
[0083] In the formula, For constraint terms;
[0084] The set of endpoint easing keyframes for the current target is calculated as follows:
[0085]
[0086] In the formula, The easing interpolation interval is used to gradually reduce the interval, thereby characterizing the change in the current target's velocity from uniform to slow. The specific calculation is expressed as follows:
[0087]
[0088] In the formula, The total number of easing interpolation keyframes from the coordinates of the previous target keyframe to the coordinates of the current target keyframe is calculated as follows:
[0089]
[0090] In the formula, The weighting coefficient for buffering is calculated as follows:
[0091]
[0092] The set of keyframes for synchronous completion is specifically calculated as follows:
[0093]
[0094] In the formula, The total number of keyframes for synchronous completion.
[0095] An animation generation system for sports tactics demonstrations includes a client, an animation generation device, and a server.
[0096] The client is used to display several targets and provide an interactive interface, allowing users to operate on the targets through the interactive interface, generate the movement trajectories of several targets specified by the user, and send them to the animation generation device; the client also includes displaying animations for users to watch.
[0097] The animation generation device is used to receive the movement trajectories of several targets specified by the user, and sequentially perform keyframe capture, data synchronization, pixel position update and animation rendering to obtain a motion tactical demonstration animation, and transmit it to the server.
[0098] The server is used to store and manage the sports tactics demonstration animation, and to transmit the sports tactics demonstration animation to the client for playback according to the client's playback request;
[0099] The animation generation device is the same as the sports tactical demonstration animation generation device described above.
[0100] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0101] Figure 1 This is a simplified structural diagram of the animation generation device for sports tactics demonstrations according to the present invention.
[0102] Figure 2 This is a simplified flowchart illustrating the animation generation method for sports tactical demonstrations described in this invention.
[0103] Figure 3This is a simplified schematic diagram illustrating the easing interpolation described in this invention. Detailed Implementation
[0104] To address the limitations of existing technologies in generating sports tactical demonstration animations, which suffer from low trajectory path freedom and inability to effectively support complex tactical demonstration animations, this invention acquires the path trajectories of several user-specified targets. Based on a preset pixel interval, keyframes are captured from these target trajectories to obtain keyframe coordinates. A synchronization mechanism is then employed to synchronize these keyframe coordinates, resulting in synchronized target keyframe coordinates. Based on these synchronized keyframe coordinates, pixel positions are continuously updated to obtain several sets of target pixel coordinates, which are then rendered to produce the tactical demonstration animation. Therefore, this invention improves the freedom of trajectory path freedom by refining keyframes and supporting different trajectory paths based on user-defined trajectory capture. Simultaneously, the data synchronization mechanism enhances the smoothness and realism of target movement, effectively improving the presentation effect of tactical instruction.
[0105] Based on the above design, this invention proposes an animation generation method for sports tactical demonstrations, and an animation generation device for sports tactical demonstrations based on this method.
[0106] Please also refer to Figure 1 and Figure 2 , Figure 1 This is a simplified structural diagram of the animation generation device for sports tactics demonstrations described in this invention. Figure 2 This is a simplified flowchart illustrating the animation generation method for sports tactical demonstrations described in this invention.
[0107] The animation generation device for the sports tactical demonstration includes a target path trajectory acquisition unit 1, a keyframe capture unit 2, a data synchronization unit 3, a pixel coordinate update unit 4, and an animation rendering unit 5.
[0108] The target path trajectory acquisition unit 1 is used to perform step S1: acquire the movement trajectory of several targets specified by the user.
[0109] Specifically, the target's movement trajectory is obtained as follows:
[0110]
[0111] In the formula, The path trajectory of the target is represented as a set of coordinate points corresponding to the player, ball, or item object, used to describe the movement trajectory of the user-specified target; This indicates the coordinates of the start and end points of a straight line trajectory. It is used when the path of the target specified by the user only contains the two coordinates of the start and end points. This represents the set of trajectory coordinates generated when the user drags or moves the target. and These correspond to the starting point and ending point of the trajectory, respectively.
[0112] in, This indicates the number of user-specified coordinates obtained. If the user only specifies one coordinate, it is assumed that the user has fixed the position of their target (player, ball, or prop, etc.) and does not involve any movement trajectory. Therefore, no further keyframe capture, synchronization, or position update is required. The target can be selected as a texture or dynamic image according to the user's needs. This invention does not specifically limit the selection of the target.
[0113] Therefore, users can choose between simple straight-line trajectories or complex drag trajectories according to different needs, to meet the tactical demonstration requirements of different scenarios.
[0114] The keyframe capture unit 2 is used to perform step S2: according to a preset pixel interval, to capture keyframes of the movement trajectories of several targets and obtain the keyframe coordinates of several targets.
[0115] Specifically, the calculation for keyframe capture is as follows:
[0116]
[0117] In the formula, These are the keyframe coordinates corresponding to the current target, representing the relative position coordinates of the target in the current time frame. They are used for subsequent animation generation to ensure that the target's position is updated correctly in each frame, guaranteeing the smoothness and accuracy of the motion trajectory. Indicates the first in the straight line trajectory Keyframe coordinates; The first nonlinear trajectory The coordinates of the first keyframe are specifically determined by judging the first keyframe of the current trajectory. The coordinates and the latest keyframe coordinates Is the distance greater than or equal to the preset pixel interval? Obtain, its The initial value is 1, which is the starting coordinate of the trajectory; The preset pixel interval is used to control the density of keyframe sampling and can be dynamically set according to the user's specific hardware configuration. The total number of keyframe coordinates representing the current target is determined by the path length of the trajectory and the preset pixel interval. Obtained through calculation.
[0118] Among them, when When the path to the current target is a straight line, the algorithm will proceed according to the preset pixel intervals based on the start and end points. Uniformly insert keyframe coordinates ;
[0119] when When the path to the current target is not a straight line, the trajectory coordinates of the current target are traversed. With the latest or most recent keyframe coordinates Is the distance greater than or equal to If so, record the current target's trajectory coordinates as the new keyframe coordinates. If not, continue to determine the coordinates of the next trajectory. .
[0120] Accordingly, the present invention captures keyframes of the target at fixed pixel intervals to ensure that the obtained keyframe coordinates can smoothly display the target's motion trajectory and reduce the phenomenon of stuttering or discontinuity caused by too few or too many keyframes, thereby improving the smoothness and continuity of the target's motion trajectory and better supporting diverse motion paths and complex tactical scenarios.
[0121] The data synchronization unit 3 is used to perform step S3: using a synchronization mechanism to synchronize the coordinates of several target keyframes, thereby obtaining synchronized coordinates of several target keyframes.
[0122] Specifically, the synchronization mechanism for synchronizing keyframe coordinates is represented as follows:
[0123]
[0124] In the formula, A set of keyframe coordinates for the target to be synchronized; The set of keyframe coordinates corresponding to the current target The first in Keyframe coordinates of each target; The set of keyframes for synchronous completion is used to represent the target stopping motion, and the specific calculation is as follows:
[0125]
[0126] In the formula, The total number of keyframes for synchronous completion is specifically calculated as follows: ;in, The maximum number of keyframes among several target keyframe coordinates; This represents the number of keyframes corresponding to the current target.
[0127] In another embodiment, the synchronization mechanism specifically represents the data synchronization of the target keyframe coordinates as follows:
[0128] The maximum number of keyframes among several target keyframe coordinates is used as the baseline data volume. ;
[0129] Get the number of keyframes corresponding to the current target ;
[0130] Synchronize the current target keyframe coordinates to obtain the synchronized target keyframe coordinates. The specific calculation is expressed as follows:
[0131]
[0132] In the formula, The set of keyframe coordinates corresponding to the current target The first in Keyframe coordinates of the target This is the set of easing keyframes for the current target, used to represent the easing trajectory of the current target. The specific calculation is as follows:
[0133]
[0134] In the formula, This represents the coordinates of the current target keyframe to the coordinates of the previous target keyframe. The set of easing interpolation keyframes between, i.e. ; Coordinates of the previous target keyframe Pointing to the current target keyframe coordinates The direction vector is used to calculate the direction of the keyframe in the easing interpolation, and the specific calculation is as follows:
[0135]
[0136] The The easing interpolation interval is used to gradually increase the interval, thereby characterizing the change in the current target's velocity from slow to uniform. For specific effects, please refer to [reference needed]. Figure 3 , Figure 3 This is a simplified example diagram of the easing interpolation described in this invention. The specific calculation is shown below:
[0137]
[0138] In the formula, The initial minimum pixel interval of the buffer region is used to represent the initial slowest speed, specifically calculated as follows: ; The preset pixel interval is used to represent the normal speed; The total number of easing interpolation keyframes used to ease in the motion from the previous target keyframe coordinates to the current target keyframe coordinates is used to dynamically control the interpolation density of each easing interval, ensuring a smooth transition from slow to uniform motion. The specific calculation is as follows:
[0139]
[0140] In the formula, The weighting coefficient for easing in gradually decreases according to the easing progress and is used to control the interpolation density of each easing interval. The specific calculation is expressed as follows:
[0141]
[0142] W is the sum of the weighting coefficients, specifically calculated as follows: M represents the total number of keyframes for easing interpolation, used to limit the maximum number of interpolations within the easing region to avoid exceeding the maximum number of frames. Its specific calculation is as follows:
[0143]
[0144] In the formula, These are constraints used to ensure To avoid exceeding the maximum number of keyframes;
[0145] This represents the number of target keyframe coordinates corresponding to the current target's easing region. It is used to determine the interpolation density and magnitude of the target in the easing region, and its specific calculation is as follows:
[0146]
[0147] In the formula, This is the minimum weighting coefficient for the easing region, with a default value of 10%, used to ensure that the easing region occupies at least 10% of the target keyframe coordinates. Percentage.
[0148] This represents the set of endpoint easing keyframes for the current target, used to represent the easing trajectory of the current target. The specific calculation is as follows:
[0149]
[0150] In the formula, The easing interpolation interval is used to gradually reduce the interval, thereby characterizing the change in the current target's velocity from uniform to slow. The specific calculation is expressed as follows:
[0151]
[0152] In the formula, The total number of easing interpolation keyframes from the coordinates of the previous target keyframe to the coordinates of the current target keyframe is calculated as follows:
[0153]
[0154] In the formula, The weighting coefficient for the easing phase gradually increases according to the easing progress and is used to control the interpolation density of each easing interval. The specific calculation is as follows:
[0155]
[0156] The set of keyframes for synchronous completion is used to represent the target stopping motion, and the specific calculation is as follows:
[0157]
[0158] In the formula, The total number of keyframes for synchronous completion is specifically calculated as follows: .
[0159] Accordingly, this invention uses the maximum number of keyframes as the standardized core benchmark data volume to ensure that the keyframes of all targets are calculated uniformly in multi-target scenarios, so that each target can follow the same standard during synchronization, ensuring that the keyframe coordinates of all targets are aligned on the time axis, so that each target has position data in the same time frame, thereby avoiding the synchronization inconsistency problem caused by the difference in the number of target keyframe coordinates.
[0160] Meanwhile, this invention introduces a keyframe density adjustment mechanism for the easing interpolation algorithm. By dynamically calculating the number of interpolations within the easing region and combining a gradually increasing acceleration and a gradually decreasing deceleration process, it accurately simulates the target's easing in and easing out motion states. This ensures that the target's transition in complex motion trajectories is natural and smooth, avoiding common phenomena such as sudden changes or unevenness in motion speed. This effectively improves the realism and coherence of the target's motion, allowing the target to maintain a natural and realistic motion trajectory. Consequently, it enhances the animation realism and visual smoothness in complex tactical demonstrations and multi-target animations.
[0161] The pixel coordinate update unit 4 is used to perform step S4: update the pixel position according to the synchronized coordinates of several target keyframes to obtain a group of pixel coordinates of several targets.
[0162] Specifically, based on a preset time frame, the coordinates of several synchronized target keyframes are mapped onto a specified canvas to obtain a set of pixel coordinates for several targets.
[0163] The canvas is the background for the video display, and by default it is a top view of the sports venue or other relevant background image, which serves as a coordinate reference system when rendering the target.
[0164] Since the reference frame for keyframe coordinates is usually inconsistent with the reference frame for canvas coordinates, keyframe coordinates are usually obtained based on the user's screen as the reference frame. Therefore, it is necessary to dynamically map keyframe coordinates to canvas coordinates through time frame mapping and coordinate transformation mechanisms. This ensures that the target's position can be updated correctly in each time frame and the motion trajectory can be accurately presented to ensure the alignment of the target with the scene.
[0165] Since coordinate mapping is a conventional technique in graphics rendering, and the specific calculation parameters, such as canvas size, vary depending on different needs, this invention does not specifically limit the implementation method of coordinate mapping.
[0166] The animation rendering unit 5 is used to perform step S5: to perform animation rendering based on the pixel coordinates of several targets to obtain a motion tactical demonstration animation.
[0167] Specifically, the geometric centers of several targets are mapped to their corresponding pixel coordinate groups to obtain rendering coordinates. All targets are then rendered frame by frame onto the canvas according to these rendering coordinates to obtain a demonstration animation of movement tactics.
[0168] The geometric center of the target represents the target's position reference, which is the center point of the target image or the dynamic image by default.
[0169] The frame-by-frame rendering means that in each frame, the target's image or dynamic image will be drawn to a specified position on the canvas according to the corresponding pixel coordinates (i.e., the target's position in the current frame), so as to ensure that the target's position and trajectory are consistent during the movement, forming a smooth and continuous motion effect.
[0170] Compared to existing technologies, this invention introduces a multi-target path synchronization and easing interpolation mechanism, which, while ensuring the degrees of freedom of multi-target motion trajectories, further enhances the coordination between targets, enabling the motion trajectories of multiple targets to be smoothly connected in complex tactical scenarios. Especially when multiple targets are involved and their motion trajectory lengths differ significantly, it ensures that the motion of each target conforms to a predetermined rhythm, enhancing the naturalness and realism of the animation.
[0171] Furthermore, this invention employs a preset pixel interval combined with a dynamic easing interpolation mechanism. By performing easing interpolation calculations in the easing region of targets along shorter paths, it achieves a smooth connection between the start and end points of targets along shorter paths, avoiding abrupt motion changes and thus improving the smoothness of the animation. Accordingly, this invention, through the combination of user-specified target trajectory, keyframe capture, and synchronization mechanisms, ensures the visual effects and realism of the animation, thereby meeting the requirements of high-precision and highly interactive tactical demonstrations.
[0172] Based on the same inventive concept, this application also provides an electronic device, which can be a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). This device includes one or more processors and a memory, wherein the processor is used to execute a program to implement the animation generation method for sports tactical demonstrations according to embodiments of the present invention; the memory is used to store computer programs executable by the processor.
[0173] Based on the same inventive concept, this application also provides a computer-readable storage medium corresponding to the aforementioned embodiment of an animation generation method for sports tactical demonstrations. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the animation generation method for sports tactical demonstrations described in any of the above embodiments.
[0174] This application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0175] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A method for generating animations for sports tactical demonstrations, characterized in that, Includes the following steps: S1. Obtain the movement trajectory of several targets specified by the user; S2. Based on a preset pixel interval, capture keyframes of the movement trajectories of several targets to obtain the keyframe coordinates of several targets. S3. A synchronization mechanism is used to synchronize the coordinates of several target keyframes, thereby obtaining synchronized coordinates of several target keyframes; wherein, the specific representation of the data synchronization is as follows: In the formula, The coordinates of the target keyframe for synchronization; The maximum number of keyframes among the coordinates of the target keyframes; This represents the number of keyframes corresponding to the current target. This represents the number of target keyframe coordinates corresponding to the current target's easing region. The set of easing keyframes for the current target; This is the set of endpoint easing keyframes for the current target; The set of keyframes for synchronous completion; The number of target keyframe coordinates corresponding to the easing region The specific calculation is expressed as follows: In the formula, The minimum value weighting coefficient for the easing region; The set of easing keyframes for the current target The specific calculation is as follows: In the formula, This represents the coordinates of the current target keyframe to the coordinates of the previous target keyframe. A set of easing interpolation keyframes between; Coordinates of the previous target keyframe The direction vector pointing to the current target keyframe coordinates; The easing interpolation interval for the easing entry is specifically calculated as follows: In the formula, The initial minimum pixel spacing of the buffer region is specifically calculated as follows: The preset pixel interval; The total number of easing interpolation keyframes used to ease in the coordinates from the previous target keyframe to the current target keyframe is calculated as follows: In the formula, The weighting coefficient for buffering is calculated as follows: W is the sum of the weighting coefficients, specifically calculated as follows: M represents the total number of keyframes for easing interpolation, and its specific calculation is as follows: In the formula, For constraint terms; The set of endpoint easing keyframes of the current target The specific calculation is expressed as follows: In the formula, The easing interpolation interval is used to gradually reduce the interval, thereby characterizing the change in the current target's velocity from uniform to slow. The specific calculation is expressed as follows: In the formula, The total number of easing interpolation keyframes from the coordinates of the previous target keyframe to the coordinates of the current target keyframe is calculated as follows: In the formula, The weighting coefficient for buffering is calculated as follows: The set of keyframes for synchronization completion The specific calculation is expressed as follows: In the formula, The total number of keyframes for synchronous completion; Represents the coordinates corresponding to the endpoint of the straight line trajectory; S4. Update the pixel position based on the synchronized target keyframe coordinates to obtain several sets of target pixel coordinates; S5. Render the animation based on the pixel coordinates of several targets to obtain a tactical movement demonstration animation.
2. The animation generation method for sports tactical demonstrations according to claim 1, characterized in that, The target's movement trajectory is obtained as follows: In the formula, The path trajectory for the target; Represents the coordinates of the starting and ending points of the straight line trajectory; This represents the set of trajectory coordinates generated when the user drags or moves the target. in, This indicates the number of user-specified coordinates obtained. If , it means the path to the current target is a straight line; when If , it means that the path to the current target is not a straight line; The specific calculation method for keyframe capture is as follows: In the formula, These are the keyframe coordinates corresponding to the current target; Indicates the first in the straight line trajectory Keyframe coordinates; The first nonlinear trajectory Keyframe coordinates; The coordinates of the latest keyframe being traversed; Preset pixel interval; This indicates the total number of keyframe coordinates for the current target.
3. An animation generation device for sports tactical demonstrations, characterized in that, It includes a target path trajectory acquisition unit, a keyframe capture unit, a data synchronization unit, a pixel coordinate update unit, and an animation rendering unit; The target path trajectory acquisition unit is used to acquire the movement trajectories of several targets specified by the user. The keyframe capture unit is used to capture keyframes of the movement trajectory of several targets according to a preset pixel interval, and obtain the keyframe coordinates of several targets. The data synchronization unit is used to synchronize the coordinates of several target keyframes using a synchronization mechanism to obtain synchronized coordinates of several target keyframes; wherein, the specific representation of the data synchronization is as follows: In the formula, The coordinates of the target keyframe for synchronization; The maximum number of keyframes among the coordinates of the target keyframes; This represents the number of keyframes corresponding to the current target. The number of target keyframe coordinates corresponding to the current target's easing region is calculated as follows: In the formula, The minimum value weighting coefficient for the easing region; The set of easing keyframes for the current target is calculated as follows: In the formula, This represents the coordinates of the current target keyframe to the coordinates of the previous target keyframe. A set of easing interpolation keyframes between; Coordinates of the previous target keyframe The direction vector pointing to the current target keyframe coordinates; The easing interpolation interval for the easing entry is specifically calculated as follows: In the formula, The initial minimum pixel spacing of the buffer region is specifically calculated as follows: The preset pixel interval; The total number of easing interpolation keyframes used to ease in the coordinates from the previous target keyframe to the current target keyframe is calculated as follows: In the formula, The weighting coefficient for buffering is calculated as follows: W is the sum of the weighting coefficients, specifically calculated as follows: M represents the total number of keyframes for easing interpolation, and its specific calculation is as follows: In the formula, For constraint terms; The set of endpoint easing keyframes for the current target is calculated as follows: In the formula, The easing interpolation interval is used to gradually reduce the interval, thereby characterizing the change in the current target's velocity from uniform to slow. The specific calculation is expressed as follows: In the formula, The total number of easing interpolation keyframes from the coordinates of the previous target keyframe to the coordinates of the current target keyframe is calculated as follows: In the formula, The weighting coefficient for buffering is calculated as follows: The set of keyframes for synchronous completion is specifically calculated as follows: In the formula, The total number of keyframes for synchronous completion; Represents the coordinates corresponding to the endpoint of the straight line trajectory; The pixel coordinate update unit is used to update the pixel position based on the synchronized coordinates of several target keyframes to obtain several sets of target pixel coordinates. The animation rendering unit is used to perform animation rendering based on a set of pixel coordinates of several targets to obtain a tactical movement demonstration animation.
4. The animation generation device for sports tactical demonstration according to claim 3, characterized in that, The target's movement trajectory is obtained as follows: In the formula, The path trajectory for the target; Represents the coordinates of the starting and ending points of the straight line trajectory; This represents the set of trajectory coordinates generated when the user drags or moves the target. in, This indicates the number of user-specified coordinates obtained. If , it means the path to the current target is a straight line; when If , it means that the path to the current target is not a straight line; The specific calculation method for keyframe capture is as follows: In the formula, These are the keyframe coordinates corresponding to the current target; Indicates the first in the straight line trajectory Keyframe coordinates; The first nonlinear trajectory Keyframe coordinates; The coordinates of the latest keyframe being traversed; Preset pixel interval; This indicates the total number of keyframe coordinates for the current target.
5. An animation generation system for sports tactical demonstrations, characterized in that, Includes client-side components, animation generation devices, and server-side components; The client is used to display several targets and provide an interactive interface, allowing users to operate on the targets through the interactive interface, generate the movement trajectories of several targets specified by the user, and send them to the animation generation device; the client also includes displaying animations for users to watch. The animation generation device is used to receive the movement trajectories of several targets specified by the user, and sequentially perform keyframe capture, data synchronization, pixel position update and animation rendering to obtain a motion tactical demonstration animation, and transmit it to the server. The server is used to store and manage the sports tactics demonstration animation, and to transmit the sports tactics demonstration animation to the client for playback according to the client's playback request; The animation generation device is the animation generation device for sports tactical demonstration as described in any one of claims 3 or 4.
6. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements an animation generation method for a sports tactical demonstration as described in any one of claims 1 or 2.
7. A computer-readable storage medium storing computer-executable instructions, characterized in that, When the computer-executable instructions are executed by the processor, they implement the animation generation method for sports tactical demonstrations as described in any one of claims 1 or 2.
Citation Information
Patent Citations
Systems and methods for authoring cross-browser HTML 5 motion path animation
CN110235181A
Animation playing method and device, equipment and medium
CN115496842A