Tim Spicuzza

Animation Work

 

 

            Kevin and I were responsible for the animation’s flocking behavior and opponent matching for the battle scenes.  At the start of the quarter, we worked primarily in independent research, and as a result, we took two very different approaches; Kevin towards a heavily modified boids algorithm, and myself towards a globally controlled hierarchical structure of characters.  Unfortunately, due to logistical issues, my behavioral control scheme was scrapped in favor of Kevin’s more quickly evolving design.  As such, the majority of my coding work on the animation was invested into the hierarchical behavioral control scheme that was not used in the final project.  It was hoped that, at completion, the control scheme would serve a dual purpose.  First, it would improve computational efficiency of updating character positions.  Second, it would provide an easy method of controlling both individual and group behavior.


            The backbone of the behavioral design is the hierarchical structure.  The main storage of the entire scene is a top level list of pointers to objects which have independent control.  At the start, each army is an individual entity, so the top level point list points to exactly two objects.  These armies have lists of pointers to the battalions they contain, which in turn have pointers to the soldiers contained within them.  By calling Move( ) on the armies (each object has a goal direction, and that goal direction is used as the goal direction of all sub-objects), the movement is computed and passed down through the hierarchy to the soldiers, moving each internal unit in the same fashion without performing individual computation.

 

            At the beginning of each frame of computation, the distances between relevant top level characters are computed, and if there is a small enough potential target, battalions and soldiers will break out of the armies (pointer to the object is removed from the lower level structure and added to the list of pointers at the top level), at which point their behaviors are handled individually.  Reassigning characters to move in the larger units is a simple matter of reattaching the pointer to the larger unit and removing it from the top level list.  This can occur when incomplete battalions pass near characters not otherwise occupied.

 

            Ultimately, to obtain any benefit from this structure would require the use of the C++ API, so much time was spent in both writing the hierarchical code in isolation as well as attempting to connect it to the API.  Unfortunately, this effort failed, as assumptions that were made about storage and access of Maya objects did not allow a connection to be made easily.  Adjustments began, but by that time, certain realizations were becoming clear.

 

            First, in the time I’d spent on the API, Kevin had been working in MEL on a straight flocking design with no global control, and it had already captured most of the desired behavioral constraints.  After reviewing his design decisions, it was decided that, while attempting to work my hierarchical design around his flocking was technically feasible, it would have required significant interfacing and intense debugging.  Additionally, after reviewing the computation time improvements as pertained to the shots selected for the final animation, the hierarchical structure would provide computation boosts in only one scene for approximately 60 frames.  As such, it was decided my time would be better spent in efforts to help move along Kevin’s development, with efforts toward decision making and state management.  At this point, I focused my efforts into MEL and designed some conceptual models to be integrated into Kevin’s existing flocking.

 

            Additionally, in early MEL testing, I had a heavy hand in representation storage, scene generation and proof of concept scripts, and later, in decision making and state change transitions.

            Near the end of flocking work, I integrated early death animation into Chris’ existing code structure, and worked intensively on ironing out bugs in the interface between his design and the flocking behavior, discovering and isolating several major issues along the way.

 

 

Code for Hierarchical Structure: