** Tutorial ** - Making a new ship from scratch
Tools:
-milkshape (3d modeling prog, needed to export ships to FL)
-milkshape to cmp converter (converts a 3d model into a .cmp file that fl uses as the ship model)
-bini.exe (you will need to edit some ini files, most of which are compressed. This file uncompresses them)
-utf_edit.exe (creates .mat file which fl uses as ship texture file. Utf edit also used for editing hardpoints)
-3d modeling prog of your choice (not needed if you model directly into milkshape)Here are some free ones:
Blender from blender3d.org
Doga from http://www.doga.co.jp/english/download/index.html
**bini is here
utf editor is here
CMP converter is here
Milkshape (demo)can be dloaded from here. The demo is time restricted to 30 days though.
Ship mesh(skip this set if you already have your ship mesh):
-Since there are so many 3d programs out there, this intro to 3d modeling of a ship will be based on milkshape. The general guidelines given later, though, will apply to any 3d program.
-Ships and all 3d models are based on triangles. Combinations of triangles that make up the surface of the ship. Triangles themselves are made of 3 vertexes (vertices), joined by 3 edges, and have 2 faces. 1 face is texturable and shows up as white in the flat shaded/smooth shaded view. The other is black and cannot be textured. Never have any triangles with the black side visible once your ship is done.
-In milkshape, triangles can be easily made and joined together. To start, use the vertex tool to create 3 vertices. join them by using the face tool and clicking each of the 3 in order. If you have a triangle whose texturable face is on the wrong side, in the face menu hit "reverse vertex order". The side the texturable face is on is determined by how you join the 3 vertices (counterclockwise/clockwise)
-for your second triangle, you can just add 1 vertex and join it to 2 existing vertices. You now have 2 joined triangles.
-all 3d models are created with triangles on the fundamental level. What the ship looks like is determined by the size/shape/orientation of the triangles, how they're joined together, and how many there are. From here on, follow the general guidelines. Additional help for Milkshape can be obtained by going through a few of the tutorials on Milkshape's site.
General guidelines:
-leave no quadrilaterals/polygons on your ship. It must all be triangles. It you want to fix, for instance, a quadrilateral, join two opposite vertices together to form a new edge. Note that the surface may look slightly different depending on which 2 you join, leaving it either concave or convex.
-no holes in the model. The surface of the ship must be continuous.
-polycount is how many triangles/polygons you have on the ship. A good polycount is about 5000. However, I've worked with ships up to 12000 with no noticeable drop in game performance.
-Ship creation is 30% modeling skill, 68% imagination, and 2% chaos and insanity.
Ship in Milkshape:
-import your ship into milkshape if it's not there already
-texture entire ship using only 1 square (preferrably tga)graphic with dimensions that are some power of 2. Name that texture something different than any group on your model (groups discussed in a bit)
-create 2d triangles and place them at where you want hardpoints to be. (these act as markers for the cmp exporter, which automatically installs hardpoints on the average point between the 3 triangle verices, and orients that hardpoint as if it was on the ship surface closest to that point)
-note that when you can create 1 triangle and use ctrl-d to duplicate until you have the amount you need, ctrl-d is also good because each of the triangles will be put into their own group automatically
-milkshape lets you give names to groups in your model. Each 2d triangle must now be named after the hardpoint it is meant to be. They can be Hp/Fixed/* or Hp/Revolute/*, depending on whether or not you want them to be able to turn. The * is replaced by some hardpoint name: hardpoint names look like HpWeapon01, HpEngine01, etc. Ie: If you have 3 HpWeapons, they must be 01, 02, and 03. (For listing of hardpoint names, use utf_edit and open up one of fl's original ships and look around. Hardpoints can be such things such as weapon mount points, lights, where ship is mounted upon landing, contrail starting points, etc.) It doesn't really matter if you use / or the vertical-looking thing.
-size the ship and its triangles so that the entire ship cannot be seen even when 2d viewing windows are zoomed out to max extent. This is roughly the right size; you can adjust later after you have seen it in game.
-turn ship and triangles upside down
-make sure the front of the ship faces down in the view from the top
-your ship can be listed in the groups list as either a single entity or a bunch of parts. Make sure the first group shown in the groups menu is a ship/ship-part and not a hardpoint triangle. Name that first group the name of your ship. Cmp exporter probably uses this first group to name the ship for freelancer.
-once you are good to go, use cmp export and save the .cmp file somewhere you can find.
continued...
Edited by - Imagine on 20-10-2003 04:15:09
Edited by - Stinger on 2/14/2004 7:58:46 AM