User Tools

Site Tools


arma:modeling:bigship

This is an old revision of the document!


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

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

arma/modeling/bigship.1278147393.txt.gz · Last modified: 2010-07-03 08:56 (external edit)