Discovery Gaming Community

Full Version: Making weapon models
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok, first software that you will need:

1. Milkshape
2. UTF editor (best version is 2.0.0.2 or newer -thanks to Cannon things are simpler with that versions)
3. Makewire

This tutorial also contains tutorial on how to make wireframes and is part of this...better explanations about wireframes may be found there. Wireframes are important for weapons as they make weapons selectable from in game HUD and don't try to make weapon without it. All weapons have it, vanilla and custom, so if you plan to submit weapon model it MUST have wireframe.

So lets start....i will leave modeling to you. I assume you know that part. However few guide lines must be followed when creating a weapon model. First is poly count...keep it low as possible...especially for capital ship turrets...average capital ship has about 10k polys, average turret has 150. Capital ships have up to 20 turret slots...so 20 times 150 give you 3000 polys only for turrets....that is poly count of transport or gunboat...imagine if your model would have more...
There are cases when turret can have more polys...when weapon is mounted in small numbers....like battleship heavy turrets....you can't mount more then 4 so they can have a bit more polys then some ordinary turret.
Second thing is size...i will also leave this to you to determine...turrets are usually designed for certain ships so it must fit all of them...
Third thing is MAT file....use vanilla textures and link your models to existing textures. Do not create separate MAT file for every weapon model. Exceptions for that are when you adding new texture for weapons that go on ships that are not part of vanilla scheme and dont use vanilla textures...in our case those are colonial ships and coalition ships...

______________________________________________________________________________

Prepare the model. Model must contain two groups. One group must contain word base and other must contain word barrel. Its self explanatory what must be named what. Base group is first one. Words barrel and base are crucial as games recognizes them and adds animations to model.
[Image: groupss.th.png]

Model must be placed in coordinate system in that way that 0,0,0 show the place where your barrel will turn...usually at the connection of base and barrel.
[Image: startkc.th.png]

Once model is prepared export it with usual settings in cmp exporter. Set model type to weapon. Set number of groups to two. Group quantities to 1 for both groups. Name your model with recognizable name and export it.
[Image: exporting.th.png]

Next step is to prepare wireframe. Press ctrl+A (select all) and got to Tools-> Convex tool. Apply convex tool.
[Image: convex.th.png]

Delete selected weapon model so that only mesh is the one convex tool created.
[Image: deletemodel.th.png]

Again, select all and regroup.
[Image: groupwire.th.png]

Rename that single group to same name your weapon is called and add to the end _wire.
[Image: renamewire.th.png]

Export wireframe with same setting as the model. Name the exported wireframe same as weapon and add wireframe at the end.
[Image: exportwire.th.png]

Close Milkshape. Open UTF editor. Open both model and wireframe. In wireframe model, expand node VMeshLibrary, expand node named ...._wire and export VMeshData as vmeshdata.dat.
[Image: utfexportvmeshdata.th.png]

In weapon model expand VMeshLibrary, and create node named same as first (and only node) in wireframe model. (thanks to Cannon you can simply drag and drop nodes from wireframe to model). If you are using older version of UTF see wireframe tutorial for better explanation.
[Image: createwirenode.th.png]

Now, go to START button, RUN, type cmd and press enter. Type location of exported vmeshdata.dat (same folder where weapon and wireframe files are) and type following line (this is example used in tutorial): make_wire vmeshdata.dat col_cannon_wire.lod0.vms vwiredata.dat. You will replace red part with node name from your wireframe model.
[Image: makewire.th.png]
vwiredata.dat will be created.

Now expand both nodes that end with .3db. Create new node named VMeshWire in both. Then in both VMeshWire nodes create subnode and name it VWireData . In both, import newly created vwiredata.dat. Reimport vmeshdata.dat to wire node in VMeshLibrary.
[Image: importwiremesh.th.png]

That is it for creating wireframe of the weapon. Next is fixing the LOD so that weapons are visible in all situations. That is very easy with Cannons newest UTF editor.
You will notice that both 3db nodes have part called MultiLevel. That node and its subnode we dont need...what we need is subnode called VMeshPart and its subnode VMeshRef. So simply select VMeshPart subnode and drag it to 3db node. Then delete MultiLevel node and all of its subnodes. Look at the pictures below how it looked at the start and how it must look when its done.

[Image: fixlod.th.png][Image: fixlod2.th.png]

If you are using older versions of UTF editor then you need to export both VMeshRef nodes, create new VMeshPart nodes, create their subnodes with name VMeshRef and import exported data. Then delete MultiLevel node and its subnodes.

With that you can save your model. Next is adding hardpoints to the model. Open Hard point editor and add HpConnect to the base (Root). Position of this will determine where weapon will be attached to the ship. Set it to revolute and for turrets make angle 180/ -180, for weapons 45/ -45 degrees.
Add HpFire01 to ...._barrel and position it on the end of the barrel. Set it fixed.

Save model.

Adding hitbox to turret is simple....use vanilla one that fits best and resize it with Model tool. Save both models after that and test it in game. Writing codes for weapons is matter of different tutorial.


Making weapons is rather simple and fast...once you get the hang off you can do several in an hour or two....