How to convert an AoM unit

TheMorpheus

Welcome to the real world
Joined
Nov 10, 2002
Messages
531
Location
Germany
This thread is for all unit modders, which want to convert a Age of Mytholoy unit.

I will and an step by step tutorial, how you could convert an unit from the Age of Mytholoy to Civ3.

At first you will need the following applications:
  • AoMed (special thanks to reyk)
  • 3D Modeling Program
  • Animator
  • Flicster (special thanks to Moeniir)
  • And of couse Age of Mytholoy
 
do you knwo of any free #D modeling, and animation programs- i would like to give a hand in putting out some AOM units, but I lack both fo those types of programs...
 
I think I could start with the tutorial very soon :)

The tutorial will be seperated into the following sections:
  • Convert a unit animation into a 3ds file
  • Extract the frames from the model
  • Change model details (texture, weapons, ...)
  • Create the unit animation
  • Convert the animation to the Civ3 format
 
Chapter 1: "Convert a unit animation into a 3ds file"

This chapter explains the steps to convert a AoM unit animation to
a 3ds file. You need a installation of "Age of Mythology" and the AoMed tool.
Install the AoMed tool (AoM of course too) and call the tool.

At first we have to extract all model files from the game. The models are located in the "bar" archive at "AgeofMythology\models\models.bar". The arcive contains all models of the game like units, buildings, weapons, ... and is ca. 270 MB large. You need ca. 300 MB space to extract the files, later you could delete the unnecessary files to safe disk space.
Press and select the "models.bar" file of your AoM installation.
Create a folder, where you want the extract the model files, note you need ca. 300 MB disk space!
Then press to choose the created folder.
The start the extract process by pressing . A log windows opens and you could see what happens, this could take a while and if the extraction is finished you will get a message in the log window.
Now you have much of encode stuff in your folder :). The "brg" files are the model files and now we have to convert them to the 3ds format.
First try to locate the model files of your unit. In this tutorial we want to convert the bad leader "Gargarensis". You could find all model file with the explorer by using this search expression "*gargarensis*.brg".
Create a folder named "gargarensis" and copy all brg files into this folder now press to convert an unit animation from the "brg" format to the "3ds" format. The tool requests now the texture.bar archiv, which is located at "AgeofMythology\textures\textures.bar". If your game was installed correct the tool already shows the correct location of the texture file. Press "OK" and the tool asks you for the location and file name of the new 3ds file. Change it if you want and save the file. Now you have converted you first AoM unit animation :D. The file contains all animation frames as single objects, if you open the file with a viewer you see all animation frames as once, looks nice :lol:. But if you hide the other frames you could see the first frame of your model.
 
Chapter 2: "Extract the frames from the model"

Now, we work with the OpenFX Designer application to split the animation to single models.
Start the OpenFX application and choose the designer, then select the menu selection "File->Open" and load your converted 3ds file.
You get a dialog with import settings, klick OK and the model will be imported.



Save the full model with "File->Save as" in the OpenFX file format.
Then open the "Skeleton Hierachy" window with "Edit->Hierachy Joints...".
You will get something like this:



Select the frame, which you want the extract and klick the deselect button (the second button). Close the "Skeleton Hierachy" window and delete the rest of the model, now you could save the frame in a single file (don't forget the frame number in the file name).



Load the full animation model and make the same with the next frames. I know it's stupid, perhaps someone has a better idea to split the frames.
 
Chapter 3: "Change model details (texture, weapons, ...)"

The weapon of the Gargarensis is a trident weapon.


The weapon is stored in a seperate 3D file "weapon trident.brg" and could be converted to 3ds with the AoMed tool and imported into OpenFX like described above.
We don't attach the weapon to each frame model, we put the unit model and the weapon model during the animation together.

Now we have to add the Civ-color to the unit. There are two possible ways, you could change the texture with a paint tool or you could change the object color of some parts of the 3D model.
The first way is simple, so I will describe the second way.

We will use the horn of the Gargarensis for the civ color. Load the frame model and deselect the model with "Select->Deselect All"
Now we zoom to the head of the model by using the "Zoom" tool, which is located in the toolbar.
Click into one work window, press the left button and hold it. Then you could zoom or unzoom by moving the mouse. The position where you have pressed the left button will be the center of the zoom effect. The model must be visible in all three work windows or the parts outside of one windoe will be hidden! If you have to move your view point use the "Pan" tool of the toolbar. With this tool you could move the view point to you model to center you view to the important part of the model.
As result you should see something like that:


Now, we select the horn by using the "Object" tool. Click on the top vertex of the horn and the horn will be selected:


Now, we could change the color of the horn. Select "Attributes->Material Settings..." from the main menu and you will get the material dialog.


To change the color click into the color control and you get a dialog to choose a new color. I think the other settings are clear, you could experiment with the settings and render a preview to see are the effects.
So, to horn has a new color, but it has still a texture, we have to drop it to see the color for the rendered object. Switch to the folder "Maps" of the material dialog and press "Drop" to drop the texture.


And that's the result of our operations:
 
Chapter 4 "Create the unit animation"

Now, it's time to animate your unit. We are using a template for the animation environment it inculdes 5 lights, a ground and 8 cameras. Please look at the Create units with OpenFX thread to learn more about lights, cameras, models and all the other stuff.

Here you could download the Template.

If you load the template into the animator you see the lights and the 8 cameras in the working views.


At first we set the animation lenght to the count of our model frames. Select "Frame->Set Animation lenght..." from the main menu and enter the frame count.
You could see that the keyframer shows the extented animation length. If you don't see the keyframer, select "View->Show keyframer".
Now add the first frame of the model by using the "Insert" button fro the toolbar. Choose the model type and the open the first frame model. The model was added somewhere in the work sheet. Use "Edit->Select actor..." and choose the model, it's the last in the list. Perhaps you could see the selected model in the working windows.
Execute a double click on the rectangle of the "position" section of the keyframer and a dialog will be opened:


Set X/Y/Z to 0/0/1 and you should see your model in the camera view. You could use the "Zoom" and "Pan" tool from the toolbar to zoom and center the working views to you model.


The line horizontal line in the "REAR" and "SIDE" view is the ground. You could use the "Move" tool from the toolbar to lift the unit so that the unit feet are exact in the ground. Do modify only the Z-position of the unit, you could use the position dialog to recenter the unit on X/Y if necessary.

Now move the "Costume" keyframer line to the first frame, by click on the rectangle of the costume keyframer and move to the left. If you get a signal and nothing happens you have the wrong tool active. If you want use the keyframer the "Actor" tool must be selected on the toolbar and your model must be selected!


The costume keyframer defines for which frames a model is visible and our first frame model should be visible only on the first frame.
Now, we could add the next frame model. Click in the free section of the costume keyframer to add a new model on this time frame. This is only possible because the "life" time of out frame models are don't overlap each other. If you want to add additional models like a weapon add the new model with the "Insert" tool like we done it first.
We add all frame models to the same costume keyframer to have automatic the same settings for the position and size.
After adding the new frame model move it to the second from position of the costume keyframer, then add the next frame until all frame model are added to the animation.

We are nearly finished with the animation, we only have to adujst the light settings. The template is made for space ship animations and has no shadow setting for the center light. Double click on the center light and choose the light type "normal" to add the shadow. The lights are possible to dark for the scene, to test this we render the first frame. The render a single frame or the full animation use the "render" button of the toolbar.


Don't change the output resolution or you get deformation effects! You could setup the output path to the single image rendering and the output path for animations. The movie file type should be FLC/FLI. The default is the render of the current frame, to render the full animation or parts of it select "a range of frames".
Simply press "Render" to render the the first frame.


In this sample I think the light settings are ok, how you handle light you could learn in the OpenFX thread.

To render the unit animation select the frame range in the render setup and render the animation. You get a preview, close it and the renderer and you are back in the animator.
Select the next camera by click to the camera in the "TOP" view and press "C" to use that camere. You see the changed view in the camera window. Now you could render the next direction animation. Render all 8 directions and you will have 8 FLC files. Don't forget the type the file name in the movie name text field or you over write the previous animation. One tip add the direction to the name like modelW, modelSW, modelN, ...
 
Chapter 5: "Convert the animation to the Civ3 format"

The OpenFX renderer writes the standard FLC format. To add the frames to the Flicster storyboard we need each frame as an image. Ok you could render frame after frame, but this needs much time. We convert the standard FLC animation to a set of GIF images by using the Fil2Gif tool program, which is a part of the OpenFX toolkit. Start the fli2gif.exe, open the animation file and save the gifs. The tool adds to your typed file name the frame number.
Now you could use a paint program to insert the rendered frames to the storyboard.
 
Note:
If there any questions on the tutorial, just post it to this thread, I will try to answer it.

General questions to OpenFX post to the thread Create units with OpenFX.

I hope this thread and the OpenFX thead could be used to help unit creators by their work and to help new creators at the starts.
 
I plan to do this eventually, if all goes well, however, could you please complete the tutorial, so that when I get around to doing this, my units will not be forever stuck in limbo?
 
perhaps it would be more approprieat to say I'm going to try my hand at this actually, I'm not very good with computers or technical programs
 
First off - great tutorial. I'm looking forward to converting a few units.

The problem I'm having is that I am getting an error in AoMed. I can extract the models.bar file just fine, but it won't load the texture.bar file. It says "no known conversion for file type 'bar' ". Am I doing something wrong?
 
Nevermind, I figured it out. I'll post again if I run into any problems. And I'll post the finished unit if I don't run into any more problems.
 
I've taken a unit and converted it to 3ds. I've split all the frames out into separate files. The issue is that the colors didn't come with the conversion, so when I render the unit is dark grey with no color. I go in and map the *.tga files and it looks ok, but you don't mention anything about that in your tutorial. Did I miss something?
 
Top Bottom