User Tools

Site Tools


arma3:terrain:clutter

This is an old revision of the document!


ArmA 3 Clutter

Clutter is the randomly placed small vegetation like grass, etc that is not part of the terrain (WRP). Rather, it is defined by the underlying texture, which in turn is mapped to the terrain by the texture mask and Layers.cfg. To define clutter you first need to have your ground textures setup.

Overview

Major differences between objects and clutter is that AI is aware of object, they are not aware of clutter. Its basically all eye candy for human player. Clutter does not have working geometry so bullets, vehicles, players, AI etc can pass through them easily. Clutter objects must be small so the passing through doesnt look silly.

Clutter is first setup at layers.cfg file, then its specified on the terrain config.cpp which actually controls what clutter models in what density is placed on which terrain types.

See also cfgSurfaces and cfgSurfaceCharacters.

Class Clutter

Class clutter is a config.cpp entry which must be located in cfgWorlds/tag_MyAddon/ class.

Example class clutter

class clutter
{
	class tag_YourClutterName: DefaultClutter
	{
		// Determines the affection of the clutter to the wind (0 - stone, 1 - common grass)
		affectedByWind = 0;
		// Path to your clutter model
		model = "path\to\your\tag_clutter.p3d";
		// If colored by the ground, desired color relative to the ground
		relativeColor[] = {1, 1, 1, 1}; //not used in any A3 Clutter configs
		// Maximal scale for random clutter scaling
		scaleMax = 1.0;
		// Minimal scale for random clutter scaling
		scaleMin = 0.5;
		// Use default lighting (0 = disable, 1 = enable). This should be enabled if your clutter uses the "Grass" pixel or vertex shader, otherwise it should be disabled
		swLighting = 1;
	};
};

cfgWorlds/tag_MyAddon/

Config.cpp entries for cfgWorlds/tag_MyAddon/

Float: Max coef for clutter coloring at far distance (must be >=1, large coef means we can colorize more)

clutterColoringFarCoef = "5.0f"; //value used by Tanoa

Float: Speed of far clutter coloration (1 = linear, 2 = quadratic, etc.)

clutterColoringFarSpeed = "2.0f"; //value used by Tanoa

Float: Distance (in m) when clutterColoringFarCoef when we start to interpolate to clutterColoringFarCoef

clutterColoringFarStart = "20.0f"; //value used by Tanoa

Integer: How far clutter is visible

clutterDist = 100; //value used by Tanoa

Integer: Controls density of clutters (size of square where single clutter is present)

clutterGrid = 0.8; //value used by Tanoa

Integer: Maximal size of clutters (for clipping)

clutterRadius = 1; //value used by Tanoa

Float: Coefficient for clutter radius to check against roadways (0 = check only center, 1 = check whole radius)

clutterRoadwayCheckRadiusCoef = "0.8f"; //value used by Tanoa

Float: Distance where ground detail texture is fully visible (begin fading out)

fullDetailDist = 5; //value used by Tanoa

Integer: Where ground detail texture is no longer visible (end fading out)

noDetailDist = 50; //value used by Tanoa
arma3/terrain/clutter.1507472159.txt.gz · Last modified: 2017-10-08 14:15 by snakeman