KIND Water2

From TrainzOnline
Jump to: navigation, search

Note: New animated water in TRS (kind water2) supercedes previous UTC water (kind water). Therefore kind water is no longer supported by TRS. Where a UTC map refers to an old kind water asset it will automatically be updated to one of the new animated water assets. Essentially the new water system comprises of an animated, bump-mapped, transparent surface. The animation variables are controlled through the water.anim.txt. The tile size and material properties are controlled though the water.config.txt file.

Contents

KIND Hierarchy

Parent Classes

Child Classes

  • none.

Supported Tags

TBD

Example Config.txt

The following example is of Calm Water.

config.txt:

kuid <kuid:56113:1226>
trainz-build 2.5
category-class "EW"
category-region "AU"
category-era "2010s"
username "CalmWater"
kind "water2"
description "This is a test water2."
thumbnails
{
  0
  {
    image "thumb.jpg"
    width 240
    height 180
  }
}

water.anim.txt:

version 1.00
// Water DetailAnim configuration file
// Is used from DefaultWater.config.txt
DetailAnim
{
  animSampleRate = 10; // Sample rate (samples per sec)
  animPeriod = 5; // Looping period in sec.
  animSpeed = 2.0; // Speed of waves
  animSize = 128,128; // Bump map dimentions
  animWorldSize = 450.0; // "Size" of one tile
  animMaxHeight = 0.4; // Max height of the wave
  animScaleNormXY = 4.0; // scale X,Y coordinates of the normal map for better interpolation
  FFT
  {
    animFFTWindVec = -15.0,5.0; // Direction and speed of the wind affecting length of the waves
    animPhillipsA = 1.0e-3; // Phillips spectrum constant affecting heights of the waves
    animFFTSeed = 0;
  }
}

water.config.txt

// WaterManager config data
WaterManager("WaterManagerGeneric")
{
  WaterMaterial
  {
    materialColor = (0.20, 0.45, 0.45, 0.8);
    materialRI = 0.3;
    opacityTex = WaterOpacity.texture;
    opacityAmount = 0.5;
  }
// Compiled DetailAnim or text ConfigData file ‘water.anim.txt’
// This is now loaded manually by Trainz so Trainz can cache the anim file in a separate folder.
// DetailAnimFile = water.anim;
}
// WaterGeometry config data
WaterGeometry
{
  UVScrollVelocity = 0.0, 0.05;
  TileUVScale = 1.0, 1.0;
  GridSpacing = 10.0; // "Size" of one cell of the grid (is used if MaxAmp > 0)
  TileGridSize = 2, 2; // Number of vertices in one tile (use more if MaxAmp > 0)
  WaveFreq = 0.0; //0.15;
  MaxAmp = 0.0; //0.25;
// Mesh animation
// TileGridSize = 3, 3; // Number of vertices in one tile (use more if MaxAmp > 0)
// WaveFreq = 0.15;
// MaxAmp = 0.25;
}

Categories

Personal tools