Guide to Ultimate Mod  |  Tutorial

 

This guide will take you through, step by step, how a functional ship (except for phasers) can be added to BOTF. It is exactly as I have done it, but I shall dispense of the description and tutorials of model creation, making UV maps, Photoshop work etc, you'll have to figure that stuff out for yourself. I shall also refrain of boring you with the long tales of trial and error, frustration and dead ends, suffice it to say it took a long time to reach this solution, so for the sake of preserving the hitherto undiscovered country of BOTF modding, here's how it was done:

(see resources at the bottom for a list of programs used and useful weblinks)

Step One: SHIP CREATION

botftut_01.jpg (123657 bytes)

Create a low poly 3D model of your ship in your favourite 3D program. Here I am using Lightwave, which I used for all the models. The example shown is the raw model of the Akira which was used in this mod. Keep the model to an approximate 300 poly count if possible. You need to decide here what name you're going to give to the model. For the Akira I was going to use the eventual name aki_a.HOB. So, I assigned one surface to the whole model named aki_a. I gave it a white colour, but did do not assign any smoothing for now.

 

Step Two: UV Coordinates

The ships in BOTF use one texture (swapped three times at different resolutions) with its polys ordered to UV coordinates (for the _a.Hob, palettized textures are used for the _b.hob and _c.hob, but we won't be bothering with that). Use Lightwave (or 3D Studio Max or whatever program you're using) to strip the model into UV coordinates for the texturing. Alternatively, check out a program called Unwrap 3D to perform this function. It's a very useful program and well worth the relatively cheap cost.

botftut_02.jpg (114079 bytes)

The above image is of my Akira opened in Unwrap 3D for UV mapping. Ensure first that the ship is facing the right way before you start (as shown above), the last thing you want to see after you convert is your new ship flying at a Ferengi Outpost sideways...  From here I executed the following commands.

1. Select > ALL

2. 2D Tools > UV Mapping > Planar > Two Sided

botftut_03.jpg (22649 bytes)

3. I chose the default settings in this options box.

This was the result:

botftut_04.jpg (130420 bytes)

In the UV Editor window at the bottom the polys have been sorted into a planar top/bottom view. It's important at this stage to plan ahead and think about the desired texture you're going to use and how it will be structured. For more info on UV mapping management you'll have to consult the various Unwrap 3D exercises and tutorials.

4 . From hereon continue sorting and arranging the polys until you have a reasonably organized mapping space. This was the final arrangement I came up with for the Akira: The eventual goal is to create a texture image to superimpose over the polys as arranged in the grid (mapping space).

botftut_05.jpg (155524 bytes)

5. From here choose File > Export > UV Map. A Bitmap with the outlines of the polys in the above arrangement will be exported for texturing.

 

Step Three: Texturing

botftut_06.jpg (134531 bytes)

Start up your favourite 2D image editing prog (here I'm using Adobe Photoshop) and open the bitmap of the UV Coordinates you just exported. I won't go into deatil about 'how' the textures are created, but a simple way is to copy/paste existing images of the ship onto the bitmap, texture details such as you might find on this image (reduced in size)

Once the texture is complete save it as a Targa file (TGA extension), and name it the same as your surface name, ie aki_a.TGA.

The graphics engine in the game uses the GIF format for the textures. So now you need to convert your TGA into a GIF. This is not however as simple as saving them from Photoshop as GIFs. You need to load an existing GIF file from the game and transfer your TGA onto that GIF. If you do not the graphics engine will have no palette information with which to draw your texture.

For the Akira texture image I had to transplant it onto the canvas (and hence palette) of the BOTF file hm2_b.gif (Nebula Class Strike Cruiser). If you're wondering about why this works and how, don't worry for now. But the colour and palette information of my Akira was a close match to the existing colours of that image (which are stored in the game's palette.lst file). So basically I am hijacking the Nebula palette for my Akira texture. Anyway, I next opened the hm2_b.gif file into Photoshop alongside my Akira image, I selected all of the Akira and dragged it onto the Nebula Canvas. I then saved the Nebula image (with my Akira layer pasted on top) with the name of aki_a.gif. Make a copy of it (Ctrl-C then Ctrl-V) and give the copy its original Nebula name of hm2_b.gif. For now hold on to your TGA texture and the two GIF versions and place them and your model files into one folder, called 'Akira' or whatever.

 

Step Four: Finalising the Model

 Now you need to import the texture into Unwrap 3D and apply it to your surface. This is done by:

1. In Unwrap double click your surface name (aki_a) under Materials. Select Maps > Diffuse > Bitmaps > Properties > Change.

2. Now browse your hard drive for the Targa (TGA) format texture (Unwrap does not support GIFs) you created and load it into Unwrap. The texture is now applied to the model.

3. Save the model as aki_a.3ds (3D Studio Max format)

botftut_08.jpg (201419 bytes)

 

Step Five: Binary Separation

So far so good, the easy stuff is behind you. Now the part that eluded everyone for so long. BOTF uses a rather antiquated graphics engine which did not support Z-Buffering. Basically Z-Buffering is a drawing system that firstly computes the distance from the eyepoint to each pixel on a visible surface, then draws the visual scene according to an order based on distance. Each pixel is drawn only if it is closer to the eyepoint than the last pixel drawn in that position on the screen (if it is farther away, the pixel is discarded). This ensures that the closest surface always draws on top. It is a resource intensive system (or at least it was in 1998/99 when BOTF was being developed). So instead they utilized the more complex (but far more resource efficient) system of databases, and database beads (nodes) which are defined by specific drawing priorities, which are structured by 'Binary Separation Planes'. Binary Separating Planes are virtual planes that help determine the drawing order of elements in the database hierarchy. In short, Nodes that are on the same side of a Binary Separation Plane as the eyepoint are drawn on top of nodes on the opposite side of the plane. If you are to attempt Binary Separation of models successfully, it is important to understand about BSPs and Database Hierarchies, otherwise you will become rapidly confused from hereon.

1. Open Multigens Creator and import your 3DS model.

2. Click Manoeuvre Button > then Scale, to scale up the model to usable dimensions

3. Click View > View/Grid Controls

4. Select Draw Mode = SOLID, and Draw Order = BSP

botftut_09.jpg (119598 bytes)

This is an image of the Akira opened into Creator. The top half of the window is the rendered object (graphics view) the bottom half the hierarchy view (where we will be able to view the node data of the database). Also notice the drop down list on the taskbar that currently says 'Object'. This is the current modelling mode.

You will notice at once that the geometry of the Akira has changed. That is because we have disabled Z-Buffering and switched to BSP draw order. Because we do not yet have a node hierarchy or BSPs to order the polys, the geometry has become disorganized and confused, because the system has not yet yet been told, for instance, that the nacelles are BEHIND the saucer and should not be rendered until the eyepoint reaches a position beyond that of the saucer. Basically it looks suddenly transparent/translucent. If you attempted to convert this model now to HOB and put it in the game, you'll have a transparent ghost ship. So we have to make this baby solid for the BSP rendering system.

5. First lets tell Creator that we want to assign a GIF file to this model as the texture. Right now it will still be looking at aki_a.TGA. On the taskbar the third button from the far right is 'Current Texture'. Click it. Now go to Edit > Replace Pattern. Under File Types select GIF and locate the aki_a.GIF texture. Load it into Creator.

botftut_10.jpg (185478 bytes)

In the Akira folder folder you'll notice a new file has appeared called 'aki_a.gif.attr'. This is an attributes file for the GIF that Creator will use.

Right, there are multiple ways to separate a model into a database. A clean and efficient way to do it is to sort the polygons of the model into logical groups based on position, such as front, top, back, bottom and so forth. Much will depend on the geometry of the model you created. A quick, but not always cleaner way to do it is to slice the object up into several pieces for automatic separation.

6. Drag (and Left-Click) the mouse over the entire object to select it all. Locate the ModGeom (Modify Geometry) button on the left hand side of the graphic view. Click Slice.

This function slices the model in two in accordance to the position of the tracking plane (the large grid you see in the graphics view). You can at this point continue to manipulate the position of the tracking plane for more precise slices in customized positions by repositioning it. This can be done by going to View > View/Grid Controls > Offset and inputting new coordinates data. You will also need to adjust the orientation of the grid by going to the Tracking Plane Menu on the taskbar and changing the axis.

7. Next Select All again, go to the ModGeom button and select the Cookie Cutter tool. The Cookie Cutter will perform a series of further cuts along the lines of the grid, so wherever your model is position according to the grid, that's where it will be cut: The larger the scale of the model (hence the more gridlines that intersect it) the greater the number of cuts (but, this will create more BSPs, and the model will be greater in file size). The trick is to find a happy medium, the lower the number of cuts and eventual BSPs, the better. 

8. In the Hierarchy View in the bottom half of the window click the top level parent group node, (which should be named 'aki_a') Now Shift-Centre Click with the mouse and that will open up a series of Object nodes (do not click any further or you'll open up the lower level child-nodes for polygon faces and vertices, we do not need to bother with them for this operation - if you need to collapse the hierarchy, just Alt-Centre Mouse click). 

9. You should have a long line of green nodes named 'o1_01' onwards. Drag the mouse over the whole line, only selecting these Object nodes. On the taskbar go to BSP > Separate Selected.

Viola, the model separates into a database, ordering the geometry for a BSP/Fixed List rendering system. It should appear solid now, if you've done your work properly. If there are problems, such as the model not separating properly or there are missing polygons, you may have to go back to the drawing board and reorder the geometry. It would be a good idea to test the separation of your raw model before creating the UVs and texture, just to be on the safe side.

botftut_11.jpg (231727 bytes)

Notice the new separation planes intersecting the model? Don't worry they won't show up when it's time for rendering, they will remain invisible.

 

Step Six: Smoothing and Saving

Next apply some smoothing characteristics to the model, otherwise it will look facetted.

1.  Drag the mouse over the model to select it  and go to Attributes > Calculate Shading. For this Akira model I deemed the suitable values should be thus:

botftut_12.jpg (26419 bytes)

For now just worry about the key elements here, which are A) The Angular Tolerance, which I set to 45 degrees, and B) the shading itself which must be set to Lit Gouraud.

At this stage I would have added the hardpoints (which define the preset positions for phaser fire and damage hitpoints etc). But seeing as all attempts to make these elements function in-game with the new ships have failed, there is no point discussing it for now.

This is about it as far as the basics of Creator is concerned. So now save the model as aki_a.FLT (Open Flight format, which is the Multigens standard).

 

Step Seven: Converting the Model

Provided at the end of the tutorial is a download link to the converter tools necessary to convert your Open Flight model into the Hob format.

To use these Conversion filters the way I successfully used them you will need to be competent working from the DOS prompt

1. Install the Converter files into the Akira folder. You should now have 24 objects (for the conversion) plus your FLT model file, a TGA and 2 GIF files, and an Attributes file. Have this folder open and visible in the background, as you would have working with Windows Explorer.

The filters used in the conversion do sometimes behave strangely, so you may well be forced to make a number of attempts. One thing it does not seem to grasp well is working with absolute paths, and often requires switches to specify the folder and subfolder you're working from. So for those unfamiliar or uncomfortable working in DOS I am for now just going to describe how to make this work working primarily from the default C: root folder.

2. For Windows users go to Start > Programs > Accessories > Command Prompt (I'm using Win2000, for other OS's you may have to locate the DOS prompt in another way).

3. Type in CD\ to clear the current path (retain the active window of the Akira folder in the background)

4. Now, with both windows open left click and drag the converter tool flttohot.exe into the the DOS prompt. You should now see this line:

    C: ~.../akira/flttohot.exe

5. Now enter a Space, and drag the aki_a.flt into the prompt. You should see the line below. Complete the command by entering the scale value.

    C: ~.../akira/flttohot.exe       C: ~.../akira/aki_a.flt -s10Scale

botftut_13.jpg (134717 bytes)

You will now have a new file, called aki_a.HOT, which stands for Hierarchical Object Text, basically being the Text version of the model file. Right click on this file and select Open With Notepad (or some other text editor of your choice). Examine some of the data within and the header information.

botftut_14.jpg (48585 bytes)

You see that the Scale is set to 10.00000. This can be altered at any time before the final conversion to Hob to determine the relative scale of the ship, depending on how big it started out in Creator. This figure of 10 should be approximate to the size of an Ambassador, but if I need to upscale it or downscale it later I can just amend the figure in the text file and reconvert. Also notice lower down that the model has been correctly assigned to to the name: aki_a.gif

6. Next, due to the oddities of working with paths and the extra commands you have to write, it's easier to work from the C: directory. Copy the aki_a.FLT file, the aki_a.HOT file, and the texture files into the C: root directory.

7. Now drag the tool RegisObj.exe into DOS, and type in objects.lst

    C: ~.../akira/RegisObj.exe objects.lst

An objects.lst file has been created in C:

8. Now drag the RegisTex.exe tool into DOS, and type in texture.lst

    C: ~.../akira/RegisTex.exe texture.lst

At this point I usually resigister the ID of the object, which isn't really necessary I don't think, but I still do it. Input the following line:

9. 

        C: ~.../akira/RegisObj objects.lst -s

The -s extension refers to the GIF format. Now you'll be asked to enter an Object ID (aki_a)

    Please enter Object ID --> aki_a
    Please enter Object Description --> Can not open input file objects.flt

Do not worry about the Object Description.

10.  Revert to the RegisTex tool.

    C: ~.../akira/RegisTex.exe objects.lst -s -otexture.lst -i

11.

    C: ~.../akira/RegisTex.exe aki_a.flt -s

12. Now it's time to register the colour. Drag the regiscol.exe tool into DOS.

    C: ~.../akira/regiscol.exe color.lst

The object colour should now be registered.

13. This is the final stage, conversion to HOB (Hierarchical Object Binary). If the object is quite large it would be best to ensure enough memory is available to allocate to the conversion operation - shut down unnecessary programs. Drag the hottohob.exe tool into DOS.

    C: ~.../akira/hottohob.exe aki_a.HOT -ttexture.lst -ccolor.lst

You should now have your HOB object.

 

Step Eight: Final Editing

It is now necessary to open the HOB in a hex editor to program the correct location in the texture list to read from. Remember earlier we hijacked the Nebula texture canvas to implant our new Akira texture, well the texture name (hm2_b.GIF) had an ID in the texture list of 5D. So we now have to tell the Akira to look at 5D in the texture list (hm2_b.GIF), even though it was originally registered to aki_a.

This is what the first few lines of the HOB look like in a hex editor. I've inputted the value 5D into Character 128 on line 80h. This will now accordingly tell the HOB to read texture 5D (my hijacked hm2_b.GIF) from the texture list. Of course, if we are going to replace the Nebula's _b GIF in the game, the Nebula with have the incorrect Akira texture, so we have amend the hm2_a.HOB and tell it to ignore the _b.GIF entirely, and only use the higher resolution hm2_a.GIF.

The above image is of the Nebula hob (hm2_a.HOB). Notice the highlighted area which says 5C 00 00 00 5C 00 00 00 5E 00 00 00. Originally it was 5C 00 00 00 5D 00 00 00 5E 00 00 0, but changing 5D to 5C means it will read from only the hm2_a.GIF, ultimately freeing up the 5D slot for new textures.

Now, just make two more copies of the aki_a.hob and rename them aki_b.hob and aki_c.hob.

 

Step Nine: The Shiplist

Now we have to tell the shiplist.sst file that we want to introduce the Akira. I used the Galaxy-X Heavy Cruiser I slot for the Akira. After making the necessary changes (and of course creating the 5 new ship icon pics of the Akira all named i_aki etc), this is how the shiplist now looks.

This is the Akira data block in the code, controlling everything to do with this ship, its powers and strengths, all stats and the names for files to be tied to it. The blue highlighted area is the important thing to note: a three character identifier. in this case aki. This will tie everything for this ship to the files named aki.

Also, you will have to edit the shipdesc file as well, otherwise when this ship comes up it will still contain the description for the Galaxy-X.

 

Step Ten: The End

If you have followed this example, you should be left with the following files (including the amended hm2_a.HOB file):

aki_a.hob

aki_b.hob

aki_c.hob

hm2_b.gif

hm2_a.HOB
shipdesc.sst

shiplist.sst

So in this example, to add this Akira to the game, these are the only files you need to add to the stbof.res archive. Happy playing.


The above tutorial skims the surface on a number of complicated issues, such as modelling, mesh editing and so forth, that I cannot (sanely) cover in great detail for the complete novice. If you have any questions you think I can answer in a single sentence, by all means email them to me. If you want a long winded account on all things Multigens Creator or Lightwave, then forget it, I don't have the time. Some things you have to figure out for yourself, as I had to with a lot of this stuff, and remember both Jig and I were going blind, we had no tutorials at all.

 

Resources:

Lightwave

Unwrap 3D

Multigens Creator

UltraEdit

 ** Download Hob Conversion Filters **

 

 

Guide to Ultimate Mod