CCG/Kind: Water2
Contents |
KIND: WATER2
Default location: C:\Program Files\Auran\TRS2004\World\Custom\Environment\
Note: New animated water in Trainz (kind water2) supercedes previous UTC water (kind water).
Therefore kind water is no longer supported by Trainz.
Where a 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 (following page).
The following example is of Calm Water. Choppy, Glassy and Rough water are described in the following sections.
Calm Water
config.txt Calm Water
kuid <kuid:56113:1226> trainz-build 2.5 category-class "E" category-region "00" category-era "2010s" username "Calmwater" kind "water2" description "This is a test water2." thumbnails { 0 { image "thumb.jpg" width 240 height 180 } }
Bump-mapping requires special settings and naming conventions in 3dsmax. Refer to Page 355 and the following download for information: http://www.auran.com/TRS2004/downloads/contentcreation/TRS_Max4_Plugin_Bump.zip
water2a.tga
256 x 256 pixel 32bit tga.
Typical Water2 Directory Structure
water.anim.txt Calm Water Note: // indicates start of creator notes only (comments on script)
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 animorldSize = 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 { animFFTindVec = -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 Calm Water Note: // Indicates start of creator notes only
version 1.00 // WaterManager config data WaterManager("WaterManagerGeneric") { WaterMaterial { materialColor = (0.20, 0.45, 0.45, 0.8); materialRI = 0.3; opacityTex = aterOpacity.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 aterGeometry { 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) aveFreq = 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) // aveFreq = 0.15; // MaxAmp = 0.25; }
Choppy Water
Notation (comments on the script) removed for clarity.
Config.txt Choppy Water
kuid <KUID2:###:#####:1> kind water2 username "Choppy water" description " " trainz-build 2.5 category-class "E" category-region "00" category-era "2010s"
water.anim.txt Choppy Water
version 1.00 DetailAnim { animSampleRate = 10; animPeriod = 5; animSpeed = 5.0; animSize = 128,128; animorldSize = 450.0; animMaxHeight = 1.0; animScaleNormXY = 4.0; FFT { animFFTindVec = -15.0,5.0; animPhillipsA = 1.0e-3; animFFTSeed = 0; } }
water.config.txt Choppy Water
version 1.00 WaterManager("WaterManagerGeneric") { WaterMaterial { materialColor = (0.20, 0.45, 0.45, 0.8); materialRI = 0.3; opacityTex = aterOpacity.texture; opacityAmount = 0.5; } } WaterGeometry { UVScrollVelocity = 0.0, 0.05; TileUVScale = 1.0, 1.0; GridSpacing = 10.0; TileGridSize = 2, 2; aveFreq = 0.0; MaxAmp = 0.0; }
Glassy Water
Notation (comments on the script)removed for clarity
Config.txt Glassy Water
kuid <KUID2:###:#####:1> kind water2 username "Glassy water" description "blah blah" trainz-build 2.9 category-class "E" category-region "00" category-era "2010s"
water.anim.txt Glassy Water
version 1.00 DetailAnim { animSampleRate = 1; animPeriod = 1; animSpeed = 1.0; animSize = 128,128; animorldSize = 450.0; animMaxHeight = 0.0; animScaleNormXY = 4.0; FFT { animFFTindVec = 0.0,0.0; animPhillipsA = 1.0e-3; animFFTSeed = 0; } }
water.config.txt Glassy Water
version 1.00 WaterManager("WaterManagerGeneric") { WaterMaterial { materialColor = (0.20, 0.45, 0.45, 0.8); materialRI = 0.3; opacityTex = aterOpacity.texture; opacityAmount = 0.5; } } WaterGeometry { UVScrollVelocity = 0.0, 0.05; TileUVScale = 1.0, 1.0; GridSpacing = 10.0; TileGridSize = 2, 2; aveFreq = 0.0; MaxAmp = 0.0; }
Rough Water
Notation (comments on the script) removed for clarity
config.txt Rough Water
kuid <KUID2:###:#####:1> kind water2 username "Rough water" description "blah blah" trainz-build 2.5 category-class "E" category-region "00" category-era "2010s"
water.anim.txt Rough Water
version 1.00 DetailAnim { animSampleRate = 10; animPeriod = 5; animSpeed = 5.0; animSize = 128,128; animorldSize = 450.0; animMaxHeight = 2.0; animScaleNormXY = 4.0; FFT { animFFTindVec = -12.0,4.0; animPhillipsA = 1.0e-3; animFFTSeed = 0; } }
water.config.txt Rough Water
version 1.00 WaterManager("WaterManagerGeneric") { WaterMaterial { materialColor = (0.20, 0.45, 0.45, 0.8); materialRI = 0.3; opacityTex = aterOpacity.texture; opacityAmount = 0.5; } } WaterGeometry { UVScrollVelocity = 0.0, 0.05; TileUVScale = 1.0, 1.0; GridSpacing = 10.0; TileGridSize = 2, 2; aveFreq = 0.0; MaxAmp = 0.0; }