Holomatix

Log In / Register


Purchase
Using Animations in Blaze 3D
Overview

To view the animations within this project, publish it using Blaze 3D Studio. When you view the Blaze 3D presentation, you will notice that there are two different types of simple animations:

  1. If you click the open/close button – the 3D phone model opens and closes.

    This is achieved by a rotation animation.

  2. If you rotate the phone, it rotates about an imaginary central axis. If you watch carefully, you will see that this axis differs depending on whether the phone is in an open or closed state. More specifically:
- when the phone is open, it seems to rotate about the hinge
- when the phone is closed, it seems to rotate about the ‘middle’ half of the  phone

    This is achieved by a translation animation.

How to include animations in a 3D model

The 3D modeller should set up the animations in the 3D model using a the 3D modelling package.

For this specific project, we have included both a 3DS Max model and a Maya model of this phone, so modellers can see how the animation was done in the respective package.

How to determine if a 3D model contains any animations

  • Open the .bla file in Blaze. (samsung_e720_3d.bla) This may take a little while to load as it has to import the 3D model’s geometry and textures.

  • Once opened, you will see the 3D model in the Preview Pane.

  • On the left hand side in the Project Explorer you will see that the Blaze 3D Project file consists: 
i.      Environment
ii.      Materials
iii.      Textures
iv.      Object Definitions
v.      Scene

  • We are interested in looking for any animations. So expand the Scene section (by clicking the + icon).

  • Animations are identified by a little movie-strip icon, seen in the image below:

Exploring available 3D object animations

Figure 3:
Exploring available 3D object animations

  • This project contains two animations:
o   ObjectcentreAnim: This animation is linked to the ‘body’ object, and refers to what we identified above as the ‘translation animation’

o   ObjectopenAnim: This animation is linked to the ‘flip’ object, and refers to what we identified above as the ‘rotation animation’.

How to preview what an animation does in Blaze 3D Studio

To see what the body animation, called ObjectcentreAnim, does - right-click on the word ‘ObjectcentreAnim’ and choose either:

o   Play Anim Forward
o   Play Anim Backward
In the context menu that appears. If you choose play animation forward and do not notice any movement, then that could be because it has already played that. So instead, choose play animation backward.

Similarly, you can preview the ObjectopenAnim and play it forward. You will notice how the flip object moves away from the body of the phone to an open state.

Using the animations within your Flash file

We have now established that there are two animations available for use in this 3D model.

Step 1: Define the animations


If you look at Frame 20 of the Macromedia .fla file included in this project, you will notice that two variables were set up to define these two animations.
//animation to open/close the 3D phone model
flip = _root.renderWindow.body.flip.ObjectopenAnim;
//animation to change the 'center' rotation point 
body = _root.renderWindow.body.ObjectcentreAnim;

Step 2: Using the animations


To see how the animations were played, open the Macromedia .fla file of this project:

o   Look at the 3d control panel layer
o   Click on a frame between 45 and 59 of Layer 25
o   Click on the open/close button

The main lines used to play the animations discussed in Step 1 above are:
_root.body.play(0, 10);
_root.flip.play(0, 10);

These commands are preceded with _root. because the body and flip variables were defined in a parent section of the Flash file. The first parameter is a value between 0 and 1. For this particular 3D model:

0 – is the value for the 3D model to be in the closed state
1 – is the value for the 3D model to be in the open state

The second parameter refers to the number of frames over which the animation should play. We are thus playing our animation over 10 frames.
 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.