DEVELOPMENT OF PROCEDURAL ANIMATION GENERATION ALGORITHMS FOR GENERATED OBJECTS IN UNITY ENGINE
10.02.2026 10:07
[1. Information systems and technologies]
Author: Tymur Katasonov, student, Taras Shevchenko National University of Kyiv, Kyiv;
Vasyl Tereshchenko, Professor, Doctor of Sciences, Taras Shevchenko National University of Kyiv, Kyiv
Abstract. This work presents a procedural animation generation system for user-drawn objects. The system provides automated creation of natural, physically plausible animations for various object types based on their structural characteristics.
1. Introduction
Problem statement. The paper explores a procedural generative approach to object animation.
Topical relevance. Procedural generation of content is one of the most promising areas in contemporary computer graphics and game development. According to research [1], procedural content generation significantly reduces development time while ensuring content uniqueness. In the context of interactive apps, especially ones that operate with user-generated content, animation automatization becomes crucial for delivering quality user experience and optimizing the development process.
Analysis of existing approaches and methods. Modern approaches to automated animation generation can be classified into several primary categories:
● Physics-based methods [2] rely on simulating physical properties of objects. However, such methods require significant computational resources and intricate parameter tuning.
● Machine learning-based methods [3] demonstrate high-quality results but require extensive training data and are not always suitable for real-time applications.
● Procedural methods [4] provide a good balance between quality and performance by using mathematical functions for motion generation.
Brief overview of the proposed approach. The core idea lies in using a modular architecture that enables the creation of specialised animation generators for various object types. The mathematical framework is based on parameterized sinusoidal functions, which ensure natural movement while maintaining minimal computational complexity.
2. Solution approach
Problem statement. Процедурна Procedural animation generation is an essential component of modern graphics systems, particularly in the context of automatically generated or user-generated (user-drawn) content. The core challenge involves creating natural, physically realistic animations for a diverse range of object types without manual animator intervention.
Algorithm.
1. Object structure analysis: Object type identification (sun, tree, quadruped creature), corresponding MotionProvider selection.
2. Bone identification: Skeletal structure analysis, determination of animated elements and types of animation to apply (position, rotation, scale).
3. Animation parameters generation: Amplitude and frequency calculation, phase shift determination.
4. Animation curve creation: Timestamps generation, animation value calculation based on sinusoidal functions.
5. Animation application: Binding of animation curves to bones of the object, Unity Animation System integration.
2.1. Algorithm for tree-like objects (TreeMotionProvider)
The tree animation algorithm simulates natural movements under wind influence:
1. Identification of trunk bones (lower, middle, upper sections) and crown.
2. Generation of oscillatory movements using sinusoidal functions:
a. Amplitude depends on bone position (higher amplitude for upper sections).
b. Frequency is shared across all elements to ensure coherent motion.
c. Phase offset may vary for natural movement.
3. Application of angular animation to imitate trunk swaying and crown fluctuation.
2.2. Algorithm for Sun-like Objects (SunMotionProvider)
The algorithm for sun-like objects simulates radiating motion:
1. Identification of the central bone and rays.
2. Application of angular and scale animations to the central part and rays.
2.3. Algorithm for Quadrupeds (FourLegMotionProvider)
The algorithm simulates natural movements of quadruped animals:
1. Identification of main anatomical parts (head, body, limbs, tail).
2. Generation of oscillatory movements for the head, simulating "nodding".
3. For limbs - generation of cyclic movements accounting for physical joint constraints. The animation imitates walking.
3. Algorithm implementation
The system architecture is based on the following key components:
1. DoodleObject – the central class representing an animated object with pre-generated mesh and skeleton. Responsible for applying animations to its bones based on the determined object type.
2. IMotionProvider – an interface defining the contract for different animation generators. Contains the ‘generate’ method, which receives an array of transforms (skeleton bones) and returns a list of property animations..
3. Specialized MotionProvider’s - implementations of the IMotionProvider interface for different object types:
a. TreeMotionProvider - generates animations for tree-like structures
b. SunMotionProvider - generates animations for sun-like objects
c. FourLegMotionProvider - generates animations for quadrupeds
The animation algorithm consists of the following steps:
1. The system receives a pre-generated object skeleton.
2. Based on object classification (tree, sun, quadruped creature, etc.), an appropriate MotionProvider is selected.
3. The MotionProvider analyzes the skeleton structure, identifying key bones for animation.
4. Animation data is generated: property values (position, angle, scale) at different time points.
5. Animation curves are created for smooth transitions between keyframes.
6. Animation data is applied to the corresponding object bones.
Figure 2 presents an example of the animation flow for the quadruped object shown in Figure 1.
Figure 3 depicts a code snippet for generating angular animation of the front left leg. Other legs, head, and tail are animated in a similar manner.
Fig. 3. Code example for creating angular animation of the left front leg.
4. Conclusions
The developed procedural animation generation system provides:
1. Flexibility – the ability to add new object types by creating corresponding MotionProviders.
2. Efficiency – real-time animation generation with minimal overhead.
3. Scalability – the architecture allows easy system expansion with new object types and animations.
The system has been successfully used for animating generated objects of various types, eliminating the need for manual animation of each object.
The practical significance of this work lies in the ability to automate the animation process in interactive applications, which significantly reduces development time and improves user experience. The results can be applied in educational, entertainment, and professional graphics applications.
Literature
1. Hendrikx, M., Meijer, S., Van Der Velden, J., & Iosup, A. (2013). Procedural content generation for games: A survey. ACM Transactions on Multimedia Computing, Communications, and Applications, pp. 1-22.
2. Barzel, R., Hughes, J. F., & Wood, D. N. (1996). Plausible motion simulation for computer graphics animation. Computer Animation and Simulation, 96, pp. 183-197.
3. Zhang, H., Starke, S., Komura, T., & Saito, J. (2018). Mode-adaptive neural networks for quadruped motion control. ACM Transactions on Graphics, 37(4), pp. 1-11.
4. Perlin, K., & Goldberg, A. (1996). Improv: A system for scripting interactive actors in virtual worlds. Proceedings of SIGGRAPH, 96, pp. 205-216.