View Full Version : How to convert an AoM unit


TheMorpheus
Mar 23, 2004, 10:04 AM
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 (http://www.civfanatics.net/uploads6/aomed06b.zip) (special thanks to reyk)
3D Modeling Program
Animator
Flicster (http://forums.civfanatics.com/showthread.php?s=&threadid=10208) (special thanks to Moeniir)
And of couse Age of Mytholoy

Xen
Mar 23, 2004, 02:27 PM
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...

TheMorpheus
Mar 23, 2004, 04:07 PM
I'm using OpenFX, it's a toolkit with 3d designer and animator. I will create the tutorial with this tool.
You could find it at OpenFX (http://www.openfx.org/).

Kindred72
Mar 25, 2004, 05:42 PM
This is nice, but, it's not much of a tutorial. Perhaps you could go into a little detail.

TheMorpheus
Mar 30, 2004, 02:46 PM
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

TheMorpheus
Mar 31, 2004, 09:36 AM
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.
http://www.civfanatics.net/uploads7/AoMed.gif
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 http://www.civfanatics.net/uploads7/AoM_input.gif 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 http://www.civfanatics.net/uploads7/AoM_folder.gif to choose the created folder.
The start the extract process by pressing http://www.civfanatics.net/uploads7/AoM_read.gif. 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 http://www.civfanatics.net/uploads7/AoM_direct.gif 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.
http://www.civfanatics.net/uploads7/AoM_model1.gif

TheMorpheus
Mar 31, 2004, 09:37 AM
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.

http://www.civfanatics.net/uploads7/AoM_openfx.gif

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:

http://www.civfanatics.net/uploads7/AoM_openfx_hierachy.gif

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).

http://www.civfanatics.net/uploads7/AoM_openfx_single.gif

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.

TheMorpheus
Mar 31, 2004, 09:37 AM
Chapter 3: "Change model details (texture, weapons, ...)"

The weapon of the Gargarensis is a trident weapon.
http://www.civfanatics.net/uploads7/AoM_model_weapon.gif

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:
http://www.civfanatics.net/uploads7/AoM_openfx_head.gif

Now, we select the horn by using the "Object" tool. Click on the top vertex of the horn and the horn will be selected:
http://www.civfanatics.net/uploads7/AoM_openfx_horn_sel.gif

Now, we could change the color of the horn. Select "Attributes->Material Settings..." from the main menu and you will get the material dialog.
http://www.civfanatics.net/uploads7/AoM_horn_material.gif

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.
http://www.civfanatics.net/uploads7/AoM_horn_texture.gif

And that's the result of our operations:
http://www.civfanatics.net/uploads7/AoM_horn_blue.gif

TheMorpheus
Mar 31, 2004, 09:37 AM
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 (http://forums.civfanatics.com/showthread.php?s=&threadid=84833) to learn more about lights, cameras, models and all the other stuff.

Here you could download the Template (http://www.civfanatics.net/uploads7/template.zip).

If you load the template into the animator you see the lights and the 8 cameras in the working views.
http://www.civfanatics.net/uploads7/OpenFX_env.gif

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:
http://www.civfanatics.net/uploads7/AoM_anim_pos.gif

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.
http://www.civfanatics.net/uploads7/AoM_anim1.gif

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!
http://www.civfanatics.net/uploads7/AoM_anim2.gif

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.
http://www.civfanatics.net/uploads7/AoM_anim3.gif

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.
http://www.civfanatics.net/uploads7/AoM_anim_result.gif

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, ...

TheMorpheus
Mar 31, 2004, 09:38 AM
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.

TheMorpheus
Mar 31, 2004, 09:40 AM
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 (http://forums.civfanatics.com/showthread.php?s=&threadid=84833).

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.

TheMorpheus
Apr 01, 2004, 01:28 PM
The next chapters are following.....;)

TheMorpheus
Apr 05, 2004, 03:47 PM
So the second chapter is done, please let me know if anything is unclear or should be described more detailed.

Xen
Apr 13, 2004, 12:23 PM
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?

Xen
Apr 13, 2004, 12:24 PM
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

TheMorpheus
Apr 14, 2004, 07:45 PM
Ok, a little update of the tutorial.

TheMorpheus
Apr 18, 2004, 02:01 PM
The tutorial is finished, happy modding :D

Mobzilla
Apr 28, 2004, 04:56 PM
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?

Mobzilla
Apr 28, 2004, 06:07 PM
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.

Mobzilla
Apr 29, 2004, 12:55 PM
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?

Mobzilla
Apr 29, 2004, 01:31 PM
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?

Mobzilla
Apr 29, 2004, 01:33 PM
sorry, I hate double posts...

TheMorpheus
Apr 29, 2004, 04:28 PM
Somethimes it happens that the texture maps are not linked to the texture files. To repair that use "Attributes->Maps->Edit Map..." from the main menu.
Now you could select the several maps with the combobox and link them to the tga file by using the explorer icon in the dialog and browse to the texture file and select it.
Make sure that the slider on the right side is set to 100% otherwise the texture is transparent ;)

Here a sample of the correct settings:
http://www.civfanatics.net/uploads7/AoM_texture.gif

Mobzilla
Apr 29, 2004, 04:54 PM
yup, that is what I did. i just wanted to make sure that would work.

I did run into another problem. I wanted to do an anubite unit, but the extensions for the anubite unit are .grn instead of .brg. OpenFX won't open them. Have you ran into that? Do you know a way around?

Mobzilla
Apr 30, 2004, 02:29 PM
I have at the point of exporting all the gifs with flc2gif. That works fine. and so far it has been fun and I like what I see. But when I try to paste the gif into the pcx in PSP8, I am having to fix the outline of each one by trimming the purple (there was some kind of mix between the pink background and the colors in the unit). When I view in flicster, it looks like it has a very small purple haze around it. Is this normal? Does everyone have to edit each frame (12 for this unit) for all 8 angles for each .flc file? (around 500 frames per unit!!!). Sorry for all the questions, it is my first unit.

TheMorpheus
Apr 30, 2004, 04:42 PM
Don't worry ;)

To your first question, the AoMed can't convert some special units like the anubite warrior. That's bad, because I wanted to make it by myself for the Stargate mod. Perphaps may a later version of the AoMed convert them.

To your second question. I had same problem, I solved it by an palette trick. I use some magenta colors as shadow light magenta is a light shadow and dark magenta a dark shadow and so on. The last few colors of the palette are the shadows. The last color is the transparent background, then comes a color used to seperate the frames and then colors for the shadow.

Mobzilla
Apr 30, 2004, 11:19 PM
I'm glad you found a way around the palette issue. Could you describe what you did a little more? I'm not sure exactly what you mean. Thanks.

TheMorpheus
May 01, 2004, 05:17 PM
When you import the converted GIF's in your paint program, so you have to change the palette to a defined standard palette, which includes the civ color, all colors you need for your unit, the shadows and so on.

Here an example of a storyboard frame:
http://www.civfanatics.net/uploads7/OpenFX_palette.gif
If you load the picture in your paint program you could see the palette of this frame and you will find the magenta shadow colors at the end of the palette.

Kenta'arka
May 02, 2004, 09:09 AM
Originally posted by TheMorpheus
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.

Hmm, why not render it as bmps and using SBB to create the Storyboard? Isn't that easier than pasting the frames manually into the Storyboard?

Mobzilla
May 02, 2004, 04:30 PM
Wow, that sounds great. I haven't used that tool, but I think I'll give it a shot now.

TheMorpheus
May 06, 2004, 01:04 PM
Sounds good, Kenta'arka, could you give us more informations about the SBB?

Kenta'arka
May 06, 2004, 01:48 PM
Story Board Builder (http://forums.civfanatics.com/showthread.php?s=&threadid=42092)

Steph wrote a manual too, download it, and take a look, it's really simple.

Mobzilla
May 10, 2004, 05:59 PM
Back to the anubite warrior unit in the .grn format - I found a tool that is supposed to be able to open it up. TheMorpheus, you can get it here if you are interested: http://www.radgametools.com/gradown.htm

TheMorpheus
May 11, 2004, 03:25 AM
Thanks for the hint Mobzilla, but the GrannySDK is no freeware :cry:

Mobzilla
May 11, 2004, 11:24 AM
Oh, I thought maybe the viewer would be enough. But it doesn't look like it can export. Bummer. :(

Mallek
May 26, 2004, 03:27 AM
Hello Morpheus can you help me i've all the programmes required to convert units from aomed except i don't have a file convertor where did you get yours from. :confused:

TheMorpheus
May 26, 2004, 03:56 PM
In the first post you will find a link to the AomEd file conversion tool, with this tool you be able to convert unit models from the AoM format (brg) into the 3ds format. The format could be used for many 3D programs. One of this 3D programs is OpenFX (www.openfx.org). With this programs you could create your own units from AoM (additional you need a paint program and the Filcster tool, which you can find in the first post)

The tutorial beginns with "Convert a unit animation into a 3ds file", here you will learn, how you have to use the AomEd tool.

Mallek
May 28, 2004, 08:06 AM
Thankyou Very much. But as they say in california I couldn't find my butt with both my hands :confused: :goodjob:

Mallek
May 28, 2004, 01:40 PM
I starting to feel like I could be come quite annoying on this thread.

Any way what paint programme should I use or wil Steph's SBB surfice :confused:

TheMorpheus
May 28, 2004, 06:41 PM
Don't worry ;)

You could use every paint tool, which could handle a 256 color palette. One good program ist the JASC PaintShop Pro.
The SBB tool helps you the create the story board for the unit, but sometimes you need the paint program to fix some design problems.

Mallek
May 28, 2004, 08:10 PM
are there any good paint shop programmes that are freeware that you would recomend :wavey: :spear:

Failing that I could do the leg work for the units and you could finish what iI can't do? :confused:

TheMorpheus
May 29, 2004, 08:49 AM
Try, to start with an unit and I will help you as many as you need so that you learn all the things in practice. If there is a problem, I could finish the unit within this forum so that you and all furture unit creators a able to create units.
So we extend the tutorial and we work as a team :)

I will look for a good freeware paint program, if I find one I will add a link.

Mallek
May 29, 2004, 01:41 PM
As always I am in your debt. I will get started on the manscorpion if I can cause not only is it good for my mod, I have seen many requests for a giant scorpion or man scorpion in the past on this web site. :goodjob: :thanx:

Lets get cracking :whipped:

Mallek
May 30, 2004, 12:07 PM
@ Morpheus , I have found the anubite warrior to excract , It is under Special e guadian.brg :king:

Mallek
May 30, 2004, 11:28 PM
To make a default.flc do I use the same frame 20 times or just 1 frame once? :confused:

TheMorpheus
Jun 28, 2004, 04:48 PM
Sorry for the delay, you could create a 1 frame "Animation" for a still animation or a 20 frame animaition for the same, but you only waste space with 20 times of the same picture ;)

Mallek
Jul 04, 2004, 09:28 AM
Thankyou for your quick reply lol.

I'll get in touch when I have it all ready.

Thanks again :goodjob:

Peter21Pan
Jul 19, 2004, 02:10 PM
TheMorpheus.

I am trying to create a new unit from AOM. I have extraced the files and changed both the frost giant files and the gargensis files into 3ds files in their own seperate folders. When I tried to open these files in OpenFx Designer the screens in this program were blank. I dont know what I did wrong. can you help please.

Mallek
Jul 24, 2004, 04:27 AM
Are you sure you have converted the files into 3ds or have you just extracted the complete brg. file.

The file converter is located in the first post of the tutorial. I suggest that you make sure you have all of the required applications and go through the tutorial step by step and try to do one unit at a time.

If you have more probs perhaps morpheus can help when he has a minute. :king:

Mallek
Jul 30, 2004, 02:07 AM
Morpheus my OpenFx program has died and wont work properly so I can't finnish my models, and I can fihure out why please help :confused:

TheMorpheus
Jul 30, 2004, 06:41 PM
What's the problem in detail?

You could send me the animation, model and texture files and I will see if I could fix the problem, so that you could finish you units. Sometimes OpenFX has problems with the textures if they are in JPEG format. I'm working with TGA textures and that works fine.

Mallek
Aug 01, 2004, 05:47 AM
when I try and open up the file to seperate the frames it says ''The instruction at 0000000000002 referenced memory at 0000000000002 The memory could not read from,

click ok to terminate programme'' :confused:

Then when you click o.k. or just close the box openfx crashes. :crazyeye:

QFred
Aug 08, 2004, 04:59 AM
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?

I had that problem too!!!! But I know how to fix it!!!! ;)

1º: Press 'Direct file conversion'
2º: Go to the file where are all the models taked from 'models.bar' or 'models2.bar' all choose the one you want to convert to 3DS Format;

IMPORTANT: The files you have to convert are: walk, attack, bored, death, flail, idle and the weapon (they are .brg or .grn)
Only one at a time!!!;

3º: Go now to the folder of the unit and start to convert, one at the time, the data files(brg, grn) to 3D Studio Animation files (3ds);
4º: After you convert all of them (unless you have any 3D files Program, like OpenFX, Rhinoceros...) you'll have to change their names puting a '.3ds' at the end of the file name to change the file type...

I know all this because it happened with me!!!! :cool: :cool:

The Morpheus is the best, his site is great.
He's another god in my pantheon. :worship: :worship:

:goodjob: