**Tutorial** - Ships/Weapons w/ multiple components
So far i have only completed this for ships but the actual model data in a weapon is in the same format as a ship so this should apply directly. The most obvious difference is the Hps - an HpMount for the base, presumably the same as a ships HpMount, an HpConnect for the base and an HpFire0X for the barrel i doubt these will prove too difficult to understand.
So here is the method for ships. I highly recommend downloading the version of the Battleaxe which has destructable parts as it will provide a good reference point. Get it here. It is also a good idea to look over HCls VMesh guide, which is here. There are 3 main steps to having a ship composed of separate components :
1. Correctly defining what vertexes/triangles from your model form the various components - This information is contained in the VMeshLibrary -> Name_of_ship.lodX.vms -> VMeshData node and the Name_of_ship/component.3db -> Multilevel -> LevelX - VmeshRef nodes.
2. Correctly positioning the components relative to the hull - This information is contained in the Cmpnd -> Cons -> Fix node (for moving parts i.e. weapon barrels it is the Rev node). This node also has alot of other information which so far i dont know anything about. It is involved in how components take damage and how they appear when a ship is destroyed.
3. Setting up the part as a destructable component - This information is contained in the ships entry in shiparch.ini
There are several features of game ships which seem redundant. Removing them all from a game ship seems to make absolutely no difference to how the ship/components behave. As i see no purpose for them i havnt included them, tho it is quite possible i have overlooked something. Things not included :
Components .sur and .3db files.
Components {Simple} entry in shiparch.ini (this points to the .3db file)
Harpoint 'DpName_of_component' on hull.
You can try removing all these things from a game ships and its components appear to behave exactly the same. The kusari blood dragon is a good ship to try it on because it has obvious components.
Also i have not included any LOD information. Setting up the various lod's is the same as for a one part ship. You must make 4 versions of the model, each witha different name i.e. ship.lod0, ship.lod1 etc. and export to 4 .cmps. Then you must import the different VMeshData segments from the 4 .cmps into the same file. Then you must correctly define all the various parts in each lod in its appropriate name_of_component.3db -> Multilevel -> level X node.
Step 1 - Correctly defining what vertexes/triangles form each component.
Create your model as normal in milkshape, remembering to assign a material to each component. Before you add the Hps decide what parts you want as separate components and regroup them - the main hull should still be the first group with the components after it. Game ships have 2 groups for destructable components, the fist of which is destroyed and the second remains so a hole isnt left in the hull. However the same effect can be achieved by hiding all you components in milshape and adding faces to the hull which will only be seen if a component is destroyed. In the Battleaxe they are just flat faces but you could easily added jagged edges with a burnt texture. It does not matter what you call the components in milkshape but you must know the order in which they come after the hull.
Add your Hps as normal. Note down which Hps are going to be associated with each component eg. in the Battleaxe the third group is the port wing and it has HpWeapon04 on it. Now export your model as a .cmp.
Edited by - Chips on 10/31/2004 8:17:06 AM
So here is the method for ships. I highly recommend downloading the version of the Battleaxe which has destructable parts as it will provide a good reference point. Get it here. It is also a good idea to look over HCls VMesh guide, which is here. There are 3 main steps to having a ship composed of separate components :
1. Correctly defining what vertexes/triangles from your model form the various components - This information is contained in the VMeshLibrary -> Name_of_ship.lodX.vms -> VMeshData node and the Name_of_ship/component.3db -> Multilevel -> LevelX - VmeshRef nodes.
2. Correctly positioning the components relative to the hull - This information is contained in the Cmpnd -> Cons -> Fix node (for moving parts i.e. weapon barrels it is the Rev node). This node also has alot of other information which so far i dont know anything about. It is involved in how components take damage and how they appear when a ship is destroyed.
3. Setting up the part as a destructable component - This information is contained in the ships entry in shiparch.ini
There are several features of game ships which seem redundant. Removing them all from a game ship seems to make absolutely no difference to how the ship/components behave. As i see no purpose for them i havnt included them, tho it is quite possible i have overlooked something. Things not included :
Components .sur and .3db files.
Components {Simple} entry in shiparch.ini (this points to the .3db file)
Harpoint 'DpName_of_component' on hull.
You can try removing all these things from a game ships and its components appear to behave exactly the same. The kusari blood dragon is a good ship to try it on because it has obvious components.
Also i have not included any LOD information. Setting up the various lod's is the same as for a one part ship. You must make 4 versions of the model, each witha different name i.e. ship.lod0, ship.lod1 etc. and export to 4 .cmps. Then you must import the different VMeshData segments from the 4 .cmps into the same file. Then you must correctly define all the various parts in each lod in its appropriate name_of_component.3db -> Multilevel -> level X node.
Step 1 - Correctly defining what vertexes/triangles form each component.
Create your model as normal in milkshape, remembering to assign a material to each component. Before you add the Hps decide what parts you want as separate components and regroup them - the main hull should still be the first group with the components after it. Game ships have 2 groups for destructable components, the fist of which is destroyed and the second remains so a hole isnt left in the hull. However the same effect can be achieved by hiding all you components in milshape and adding faces to the hull which will only be seen if a component is destroyed. In the Battleaxe they are just flat faces but you could easily added jagged edges with a burnt texture. It does not matter what you call the components in milkshape but you must know the order in which they come after the hull.
Add your Hps as normal. Note down which Hps are going to be associated with each component eg. in the Battleaxe the third group is the port wing and it has HpWeapon04 on it. Now export your model as a .cmp.
Edited by - Chips on 10/31/2004 8:17:06 AM