Tuesday, October 23, 2012

3DC to Railworks - Locomotive: Animation Part 2

3DC to Railworks - Locomotive: Animation Part 2
by Jerry "SMMDigital" Conaway


< PreviousIndexNext >


352. Like the throttle, DB, and reverser, the Sander is a simple back-and-forth lever, animated in one direction.

You may notice the light that comes on when the Sander lever is pushed into the "on" position. This is a simple thing to do. You simply make a "lit" version of the Sander light as a separately grouped part and hide it somewhere inside the console. After you animate the lever, animate the light by selecting it and moving it into position in front of the "off" part when the lever is about one or two frames into it's animation. Select both the Sander lever and the light when you export the animation.





353. The train-brake and the independent brake are animated (and exported) separately and in the same way.





354. The bell is a simple pull switch.


355. The cab windows are named and animated the SAME way for both the Exterior Model and the Cabview Model. With this setup, you could animate each window separately, but being that most of the time if one window is open, the other usually is too, I simply animated them both opening at the same time. After animating the driver side, do the conductor side also. I differentiated these from the exterior wipers by naming the "int********windows" when I exported the animation file.



356. Before starting the Wiper animation, I set the Animation Key length to seven frames. It only takes a half-to-three-quarters of a second for the wipers to wipe, so this short animation is alright. The animation for the wiper actuator itself is two key frames - the start position and the end position. You simply swing the end pivot, in this case 51 degrees, to get your movement.

357. The wiper blade itself is a separate piece, so it has to be animated separately. You simply click the blade part, click on each key frame, then match the blade position with the actuator arm position.








358. Do the same for each of the actuators and blades in the Wipers group. When you are ready to export, make sure you select all the arms and blades together.


359. In the beginning, we animated the engine start switch, so it's only logical that we animate the engine stop button. It's a simple three-frame push button.



360. I've decided to add flashing ditch-lights to the locomotive. All I have to do is go back into the Animation Master model and add an "unlit" lens in front of each "lit" lens. Then, I move the unlit lens into a resting position behind the lit lens and give each one a unique name.

361. To animate this part, we are going to have 1.6 seconds, or 15 key frames, of animation.

362. We are going to give the right-side front ditch light eight frames, equal to 3/4 second , in the "off" position, while the left side stays in it's original position. Then we will move it into it's "on" position behind the lit lens for the last eight key-frames.


363. Move over to the left lens, and leave it in the "on" position for the first five-key frames. Move it to it's "off" position behind the lit lens for the last five key frames. After you are finished with the front, go to the back ditch lights and animate those.

NOTE: You can vary length of your animations, up to 1.6 seconds, but be sure that both of your lights are in the ON position on the very last keyframe of the animation. If this condition is not satisfied, then when you turn the ditch lights "Off", one light will be on and one will be off in the game.


364. Export your ditch lights animations by choosing the two parts involved and using the IA exporter. Make sure you also export your locomotive as an IGS file to reflect any changes that have been made.


365. We begin making the physical aspects of our illuminated cab light by selecting the lens face of our fixed cab light and copying it just below the frame. After we copy it, paint it with a lens texture, using the "TrainBasicObjectDiffuse.fx" shader. I've given the lens a name that will differentiate it from the "on" lens.


366. The next step is to duplicate the off lens about 1/10th of an inch above the original lens. Give it a name to designate it as the "on" lens. The "on" lens should be given the Shader "AddATex".


367. Animating this light so that it will come on when the switch is flipped basically involves flipping the positions of the "on" and "off" light lenses. In the first animation frame, the "off" lens is in it's resting position. In the second frame, the "off" lens should be moved to the same position as the "on" lens.


368. Do exactly the opposite for the "on" lens by shifting it to the "off" lenses original position.


369. After you have finished with your animation positions, switch back to build mode, select both parts and export them as an animation, giving it a unique name to identify it as your cab light.


370. You will also need create, animate, and export a switch for the cab lights. Consult the manual for your particular locomotive for the type of switch you will be using.


Once you have completed making your animations, you need to export the whole cabview and exterior models as IGS files to ensure that your animations match the part names and positions. This shot shows the grouping in the Animation Master model of the cabview model and all of the sub-groups that are to be animated.

There is an issue with 3DC that tries to put a limit on how many groups you can export in a model to Railworks. You may see an error such as the one below pop up when you export the AM, but as of the publishing of this tutorial, I've never had any problems with models in Railworks that have thrown this error.


And this shot shows our exported animations, waiting in the work folder to be transferred over to the Railworks Source folder.

Here is a video link to what some of our raw animations for the locomotive look like. They don't actually repeat like this, they are just run in a loop for demonstration sake. video

For now, this is all we have to do to animate our locomotive. For your locomotive, you may have more (cab doors, hood doors, light shades, driver rods) or less to animate, and we may not even use all of animations that we have performed in this tutorial. These animations will be controlled by the Engine Blueprint and the Input Mappers, which we discuss later.

As far as project time scales are concerned, we are now officially half-way to having this locomotive ready for Railworks. However, the hardest parts are yet to come. In the next section, we will set up our both of our locomotive models (exterior and cabview) and their associated parts in the Railworks source folder. We will then begin to a long discussion about Blueprinting, which is the process that allows us to "wire" all of the different aspects of our locomotive so that it will perform in Railworks. Get out your pocket protectors and your slide-rules, because we will be dealing with precision measurements and data entry.


< PreviousIndexNext >


Published with permission from Jerry Conaway, 2012

No comments:

Post a Comment