Original Article Date: Oct 10, 2001
Here ya have it.....the long awaited "Part 5" of Sean's series on the complex world of animation! (Actually...this stuff is getting easier all the time thanks to Sean's efforts!) Note: The contents of this article is based upon MicroStation /J.
We've seen how we can use a several actors to create a fairly complex animation. The only problem with the method we used in Animation in V7 Part 4 - The Sequel was that it becomes a complicated set-up when we have to try and animate many actors as well as their KeyFrames. Guess you'll be happy to know that there is an easier way! In this tute, we're going to look at animating a plane so that the propellers turn as the plane moves.Download and open 84_Plane_Animation.dgn and ensure that 84_Plane.dgn is referenced to it. You may notice that the elements of the plane reside in Plane.dgn and that it's been set up into three Graphic Groups: one for each propeller and one for the main body. The Plane_Animation.dgn is an empty design file that we'll use to create the animation.The first thing to do is to create the required actors. Using the Element Selection tool, pick the left propeller and then select the Create Actor tool from the Animation Actors tool box. Enter a name of Prop1 and ensure that the Move, Rotate and Scale boxes are ticked as shown below.
Identify the center of the cones front face for the axis of movement and repeat this procedure for the second propeller. In that case, be sure to call the actor Prop2
Now that we have the props ready, we can go ahead and create the actor for the body of the plane. Using the same tool and procedure, name this actor Plane and define the axis for movement at the end of the construction line that projects out of the plane's nose:
Now that we've defined the actors we can animate them to our hearts content!Let's get started by animating the propellers. Select the Script Actor tool and double-click the Prop1 actor. You should be presented with the following dialog:
To define the number of frames for the scene, enter 100 in the End Frame field. Next, we then need to instruct the script to spin the propeller 70 degrees per frame. To do this, just enter 70*frame in the X-Rotation field. You can do the same thing for Prop2.To define the script for the body of the plane, double-click the plane actor. The plane needs to be scripted to move forward 0.5 units along the x-axis while spinning 5 degrees per frame. Enter the appropriate values for these actions as shown in the dialog below:
At this point is where things started to get a bit ugly in the previous tutorial. You may recall that to make Ergoman move - we had to make each actor move forward separately. You're gonna kill me after this...but that was all a lie! (Good practise though!!)A cool thing we can do with MicroStation's animation is attach actors to other actors. So in this case we're going to attach the propeller actors to the plane actor by selecting the Attach Actor tool.MicroStation will respond with Identify Actor to Attach in which you will double-click on Prop1. The next prompt asks you to Identify Actor to Attach to, so double-click on Plane. You'll notice that an actor-tree has been formed with the Plane as the base and Prop1 as the first "arm". You can repeat the same process for Prop2 so that the completed actor tree appears the same as below:
At this point we have effectively set the propellers up so that they spin with the forward movement of the plane. You can go ahead and test the animation in wireframe...your results should look something like the animation below
From here the sky is the limit....have a play and see what you can come up with! Till the next time - when we'll take a closer look at how to produce rendered images in MicroStation.
AskInga Article #84