Unity Model Explode Experiment

Agnes Chan


In developing the application that would eventually be called OsteoScope, one of our primary goals was to visualize an animal cranium in an “exploded” view. I wanted to create an interactive experience with the application (as opposed to a linear animation), and after consulting with my supervisory committee and other professors, we decided to explore using the Unity 3D Gaming Engine to build the application, due to its open-source development platform and advanced realtime 3D render capabilities.

Having no prior experience with Unity and programming in general, I took the opportunity through a point assignment for the Biomedical Communications course MSC2011, Advanced Media Design, to familiarize myself with Unity’s interface and learned the basics of JavaScript scripting. As a learning experiment, I created a basic web application to manipulate a spherical puzzle I modelled using Cinema 4D. I wrote the script for the explode function, while the orbit and zoom scripts were modified from pre-existing scripts.

This application is a simplified component of what I wanted to eventually integrate into the more final OsteoScope project. As a strategy for tackling a complex application with multiple aspects, my New Media professor Michael Corrin suggested that I approached the project in a components format, learning and building each function independently of each other, and integrating at a later stage. This approach enables a complex project to be more manageable, especially for a novice developer like myself.

The next step was to improve the function of the explode script, such that the pieces do not move inward beyond the starting position, and to create a simple GUI with buttons to trigger these functions without keyboard input.

Explode Experiment, Version 1 (7 January 2013)

Note: A browser that supports the Unity Web Player is required. If the instructions do not load, hit “R” or refresh the page.

This is the first version of the experiment. I was able to achieve the basic function of exploding and “un-exploding” the sphere puzzle. However, an obvious problem with this version is that the pieces of the puzzle will un-explode beyond the original position. This was the main issue to be addressed in the second version.

Explode Experiment, Version 2 (31 January 2013)

Note: A browser that supports the Unity Web Player is required. If the instructions do not load, hit “R” or refresh the page.

In this version, I was able to establish the original position of the puzzle pieces as the “minimum” position, so that the pieces do not appear to implode into the model. The complete list of fixes in this version are as follows:

  • Reprogrammed mouse input to eliminate the requirement of a 3-button mouse
  • Set lower limit on “explode” function to the starting position
  • Set maximum “explode” distance
  • Modified speed of functions
  • Implemented ability to reset model and hide text