Metaheuristic Based Automatic 2-Dimensional Animation

Lasse Lingens
Master's Thesis, March 2020

Supervisors: Dr. Stéphane Magnenat, Dr. Fabio Zünd, Prof. Dr. Bob Sumner

Abstract

The Game Creator App is an application for tablets that keeps it focus on problem solving and creativity while exploring the popularity of video games. The app provides users with a visual programming language and integrates hand-made drawings created by the user as objects in their game.

This thesis addresses how to take such an user-created image representing a playable character, create a skeleton with joints from this shape, and animate this character to move in one direction. The only two requirements that the input image has to fulfil are a completely transparent background and a simply-connected and opaque foreground. The goal is to produce an animation of the character and a direction of movement, which does not require to resemble real world, i.e. realistic, movement associated with the character nor the expectations of the user how this character would move. We create a skeleton consisting of joints and bones based on the image and vary the angles of these joints over time to create an animation. We use pixel-wise filters to transform our input image to a skeleton and identify the joints and endings of bones. The bones are then built into a rigid body connected by revolute joints. The joints are controlled by a neural network that is optimized using an evolutionary algorithm with a target function to move the skeletal character in the direction “right”. The skeleton-state of the best controller in the last generation is taken at each simulated time step and saved. To transform the character into a triangular mesh, we use the ear clipping method. We further optimize the mesh by edge-flipping, edge-splitting and smoothing of the non-boundary vertices to form a mesh with triangles that are similar to each other. The influence of each bone on each vertex is calculated by taking the distance when walking through the mesh. By exporting the skeleton states, bone structure, weights and the triangular mesh into the glTF format, vertex skinning is applied and visualized. We further prepared a user study to measure the user experience and its applicability. We are able to produce reasonable animations with this method.

JavaScript has been disabled in your browser