[Introduction | Features | Downloads | Usage | Implementation | Results and Conclusion | Future Work | References & Links]

My Little Creature Builder 


This is my project for CPSC533B (Algorithmic Animation). The goal of this project is to create a tool that allows users create their own moving creature of periodic motions by defining its body structures and attributes. This idea came from the two paper,  "Virtual Wind-up Toys"[1] and "Sensor-Actuator Networks"[2], and the SodaPlay mass-spring creature builder (

Back to Top


Back to Top


Back to Top


There are two modes in this program - edit mode and play mode. To toggle between the modes, just simply click the "PLAY MODE" or "EDIT MODE" button.

Edit Mode - construct the creature

There are three types of components of a creature:



HINT: to attach two links together with a joint, you must have a joint defined for each link. The best way to do this is to first create 2 links, then add a joint to each of them. Click "move joint" to move the joint to the desired corner or point on the edge of each link. Then click "move joint" again to exit the move joint mode. Move the 2 links together and the joint should be able to snap to each other. Only two joints in the same position are valid joints. All other joints are ignored in play mode.


HINT: to edit an actuator, you have to select a link and a joint. You can either select a link first, then the joint, or the other way around.  Due to a minor bug, sometimes the selected joint is not displayed correctly. You may click around until it is displayed correctly. In order for an actuator to be effective, it has to have a time = 0 angle value in its desired angle list. 

There are also some global variable to be edited:

Saving and loading

you can save and load the design by simply clicking the "save" and "load" buttons. It is recommended to save regularly while editing.

Back to Top

Play Mode - simulate the motion

After switching from Edit mode, the motion is paused. Click "PLAY" to play the motion. Click "PAUSE" to pause it again.

Camera can be moved in Play mode to allow viewing in different perspectives and following the creature if necessary. Click the up, down, left, right buttons to change the angle of the camera, and backward/forward buttons move backward and forward.

Back to Top


This program is implemented under Windows platform using VC++. Libraries used include MFC for the GUI, Windows GDI for 2D graphics display in Edit mode, OpenGL for 3D graphics display in Play mode, and Open Dynamic Engine (ODE) for the physics. 

The OpenGL 3D graphics display codes (drawstuff.cpp) are mostly sample codes copied from ODE sample codes, except the camera control. Stuffs in setup.cpp basically integrate drawstuff, and MFC together, while simulation.cpp is for executing the simulation using ODE.

In edit mode, by having a joint defined for each link, it will ease the job of tracking of which joint is valid and invalid. Also, snapping of joints can help user to align the joint into the correct position. 

By defining the actuators in lists of desired angle is sort of like having a pose graph of the creature [1] except that the times assigned for each desired angle can be more flexible.

To determine the torque generated by the actuators, the PD controller formula for torque is used, where qd is the desired angle between two links at the current time, and ks and kd are the spring and damper constants responsible for the proportional and derivative components of the torque. [1] A timer class is implemented to keep track of the time and do the time cycle. The current joint angles and angular velocities are converted from rotational matrices provided by ODE. The desired angles of the actuator are the desired joint angles. So, they have to be converted to be the desired rotation of the link associated with the actuator in order to be used by the PD controller.

By working with a 3D dynamic engine, I found it difficult to keep things within the vertical plane because sometimes when forces get too large, objects will fall off to the sides. I have done a little trick to keep the creature on the vertical plane. This is to set the depth of the blocks to a very very large number while displaying it as not as deep. It should be ok as long as everything are along the same plane.

Back to Top

Results and Conclusion

Simple creatures with reasonably "good" periodic motions (i.e. not out of control) can be created within several trials. But of course, the number of trials depends on the complexity of the creature. 

We can also create two different creates and observe the collision, add in environmental obstacles

Back to Top

Future Work

Different shapes - ODE can actually support different shapes including spheres and cylinders. Links can be created in these shapes to increase variety.

Different colors for links - This can probably help user to visualize and analyze the motion of the creature more easily, and hence, ease the job of creating a creature with the desired motion.

Real-time data display - Display the current desired angles of all actuators and the current angles of its associated joints. User can highlight the associated link by highlighting the actuator in the list. This can also help user to visualize and analyze the motion.

Real-time attribute editing - Allow user to edit attributes such as link mass, gravity and actuators' desired angles, and see real-time result. This will probably further ease the job of creating the desired motion.

Improve GUI - make the edit mode more user friendly and easy to use. Allow undo, copy and paste.

Sensors - they can also help creating desired motions and increase the fun. Sensors can be touch, angular, eye, or linear sensors. [2] The response of the sensors can be changing the desired angles of actuators. Touch sensors and angular sensors are mainly for better motion control. Linear sensors, in this program, can be used to detect if a specific object is nearby, which will be useful in the multi-creature play mode discussed in the following paragraph. Eye sensors can be used to follow objects if creatures can move around in the horizontal plane.

Multi-creatures play mode - Also 2 or more separate creatures being simulated in the play mode. Each creature should be able to be exported/imported. Then the two creatures can fight with each other.

3D simulation - Allow creatures to move freely over the 3D space instead of restricting it within the vertical plane. This will increase variety and may add more fun. However, this will make things much more complicated. It will need a much more complicated GUI to take care of the axis of rotations, and will be harder to create a creature with the desired motion.

Back to Top

References and Links


[1] M. van de Panne, R. Kim, and E. Fiume. Virtual Wind-Up Toys, Proceedings of Graphics Interface '94, May 1994, 208-215.

[2] M. van de Panne and E. Fiume. Sensor-actuator Networks, Proceedings of SIGGRAPH `93. In Computer Graphics Proceedings, ACM SIGGRAPH, 1993, 335-342.

Related links

SodaPlay -

Open Dynamic Engine (ODE) -

Back to Top