User Tools

Site Tools


arma:modeling:bigship

Table of Contents

Making Big Ships

Making big ships beyond 50m was problematic in OFP because there was the 50m geometry limit, geometrys just didn't work on objects (p3d models) larger than 50m. ArmA still has this same limitation, so any big ship you're going to make, you need to build it in 50m x 50m pieces.

Create the pieces as you like and when you prepare the config, do it like this. First a model.cfg:

class CfgSkeletons
{
	class Default;
	class NimitzBones: Default
	{
		isDiscrete=1;
		skeletonInherit="";
		skeletonBones[]=
		{
			"nm_alt",""
		};
	};
};
 
class CfgModels
{
	class Default
	{
		sections[] = {""};
		sectionsInherit="";
	};
	class Ship;
	class bridge: Ship
	{
		skeletonName="NimitzBones";
		sectionsInherit="";
		sections[]={ "clan","clan_sign","zasleh" };
	};
	class USS_Nimitzback1 : bridge{};
	class USS_Nimitzback : bridge{};
	class USS_Nimitzfront1 : bridge{};
	class USS_Nimitzfront : bridge{};
	class USS_Nimitzlata : bridge{};
};

And then a config.cpp:

class CfgVehicles
{
	class All;
	class Static:All
	{
		class UserActions;
	};
	class building: Static{}; 
	class uss_nimitzbase : building
	{
            	vehicleClass="Ship";
		unitInfoType = "UnitInfoShip";
		nameSound = "ship";
		cost = 10000000;
		accuracy = 1000;
		side = 1;
		icon = "";
		armor = 30000;
		scope = 1;
		class EventHandlers
		{
			killed = "(_this select 0) exec ""\hwk_uss_Nimitz\script\fire.sqs""";
		};
	};
 
	class uss_nimitzback : building
	{
            	vehicleClass="Ship";
		unitInfoType = "UnitInfoShip";
		nameSound = "ship";
		cost = 10000000;
		accuracy = 1000;
		side = 1;
		icon = "\hwk_uss_Nimitz\icon.paa";
		model = "\hwk_uss_Nimitz\USS_Nimitzback";
		armor = 30000;
		scope = 2;
		displayName = "USS Nimitz";
		destrType = "DestructEngine";
		mapSize = 360;
 
		class EventHandlers
		{
			init = "_this execVM ""\hwk_uss_Nimitz\script\build.sqf"";";
		};
	};
...
};

The above config is just an example, not complete usable config!

As you see the model is setup as house class object. Next is the build.sqf script that createVehicle's the 50m ship blocks together. The key there is to take the initial mission editor placed object and set it and the rest of the objects into 0.2 elevation.

Roadway LODs

Even if you create a static object (building or static ship for example) with a Roadway LOD (for walking on) and you don't exceed the (approx) 50mx50mx50m limit for object size, you may STILL find the Roadway lod gets “holes” in it that you can fall through.

After trail and error, I've found that limiting the p3d file to these LODs;

  • Resolution LOD
  • Geometry LOD
  • Roadway LOD
  • Pathway LOD

Significantly reduces the chance of this problem. More specifically

  • Don't include a Memory LOD unless you really really have to.
  • Don't leave the Geometry LOD empty, fill it with a tiny box with weight at a minimum.

I found the Memory LOD being present causes the highest risk.

Obviously not suitable for every project, but what I did when I needed a memory LOD was to make 2 p3d's. 1 placed for walking on, the other placed exactly the same spot containing no Roadway LOD, but containing the required memory LOD. Anyway, thought it may help a rare few people experimenting on such stuff.

Also another VERY important fact to be aware of. The problem may not manifest itself until you place the object on terrain in just some random certain spot. Its almost like standard BIS terrain is broken into an invisible grid, and if your addon happens to be place *just* so it overlaps one of these invisible lines, boom, the problem appears. Move it 5 meters to the left or something, and bingo! Problem disappears.

You can't really have empty Resolution LODs either, the Roadway breaks up again if you do. Solution, just place a tiny box anywhere in 0.0 resolution lod, such that it will never be seen/out of sight.

Notes

Yes, you can make ship models very large, and they will *generally* work, but you can not rely on them.

Depending where you place them on a map seems to vary the result you get, but in the end, the Geometry LOD will be broken somewhere along its length. Most of large ArmA ships use a large single Geometry LOD, simply because the ship floats better that way instead of the via the LandContact point method.

Generally this means ship vs ship collisions work OK, but if you were to zip around the outside of my ships in a Zodiac, you'd find a point somewhere on the hull of the ship where you could drive right through the hull. Similar for Fire LODs, so their size should be reduced to have less chance a missile or shell will pass straight through the ship.

Roadway geometry is the most important to manage, and little change from OFP. You have to be sure you limit its size (I suggest 50x50x50) per addon because as an addon maker you need to guarantee a player can walk around without falling through a deck or platform. Hence the Heli Deck ship addons should be a separate, smaller addon attached to the main ship.

For further discussion, check PMC Tactical forum making big ships topic. PMC would like to thank [APS]Gnat for providing this information.

arma/modeling/bigship.txt · Last modified: 2016-11-15 11:11 by snakeman