Alexander Miller CSC 474 Final Project
Animated Tegu Lizard
This project was inspired by my pet Argentine Black and White Tegu, Kai. I often take pictures and videos of him and have always been fascinated by his movements while walking, climbing, and swimming.
  • 3D Model - made in Blender
  • Skinned Animation using Dynamic bones + weights + key frames
  • Hand Crafted Texture
  • Shadows (amazingly inneficient)
  • Cartoon Environment
  • Multiple Moving Objects
  • Simple Camera Controls
  • The 3D Model:
    I used Blender to create the simple Tegu model. Blender is that easy to use if you have never done 3D modeling before, but there were a lot of great tutorials online. I ended up with a decent model that was completely rigged and had a working texture.

    Unfortunately, .obj files do not seem to easily support the same animation files we used in class (the skin weights and bone animation files). I was ultimately unable to use my rigging and animation done in Blender but was still able to use the 3D model.

    The texture was made in Microsoft Paint using samples from photos I have taken.
    Dynamic Skinned Animation:
    Trying to create bones, skinning weights, and animation quaternions proved to be the most challenging part of this project.

    I ended up creating two Java programs: one to create the weights file and one to create the bone animation file. For my model, I assumed a simple case of only 5 bones (one for torso, one for each leg).

    Weights Generation:
    I hardcoded approximate positions of 5 bones (torso, 4 legs). I loop through all of the vertices to create the weights for each bone. If vertex positions are roughly in a leg area, the weight to that leg bone is inversely proportional of the distance from the vertex to the bone. The closer a point on the leg is to the bone position, the more it will be affected by that bone. No vertices are affected by more than one leg bone, and not all vertices are affected by leg bones at all. They are all slightly affected by the torso bone. This allows for smoother transitions. In my project demo there was tearing between the vertices because not all points had weights summing to 1.0 and they were very roughly sorted by index position instead of 3D position.

    Bone Animation Generation:
    I hardcoded that the animation included 5 bones and 100 frames. Initially I had the torso animate forwards a set amount every frame update but I removed this motion to allow the game to better set the position of the object. (The model was having issues turning if I kept updating its position via the animation stack). The torso still bobs vertically slightly. Each of the four leg bones try to rotate in a roughly 180 degree arc backwards and forwards. After spending countless hours trying to fine tune this part, I decided to keep them at a more cartoonish movement and hope to try this again in the future with the correct rigging and animation data from blender instead. It was very challenging to make it look realistic (with only 5 bones) and adding more bones significantly added complexity to the equations.
    I quickly realized I am not the world's greatest artist. I decided to spice up the visual aesthetics by adding shadows. I read a lot about shadow mapping of hard and soft shadows and was unable to add them to the project in time. I did come up with a quick alternative but it is not efficient and only works on a single ground plane. It is much more of a fake shadow system and does not realistically use the direction of light or physics. I essentially created a mimic of each tegu, shaded it darker color with a separate shader. I then flattened these objects and had them follow the lizards. The nice thing about these shadow objects is that they do animate as well and have the same number of edge vertices as the original models (do not have to find solutions for hard shadowing degredations in quality). Overall I was quite happy with how they turned out but would rather incorporate real shadows in the future.
    Environment Art:
    I created a cartoon-styled floating island. The isaland is created by a deformed cube and a pyramid which I wrote myself. The objects have simple textures for colors and a simple outline.
    Things I would like to improve:
  • Import better model, rigging, animation data from Blender (more bones)
  • Improve Texture quality
  • Real Shadow Mapping
  • Better shaders
  • Inverse kinematic restrictions for the bones and mesh vertices
  • Controls to move a tegu with keyboard controls, mouse to look around
  • Different animation for turning than walking (whipping tail effect)
  • Billboarded Particles for clouds
  • Uneven terrain
  • Possible Game elements