Nová animace vody v TRS (druh water2) nahrazuje předchozí UTC vody (druh vody). Proto druh vody již není podporován TRS. V případě, že mapa UTC odkazuje na starý typ vody, který bude automaticky aktualizován na jedné z nových animovaných typů vody. V podstatě nové vodní systém se skládá z animovaného, bump-mapované, průhledné plochy. Animaci, proměnné jsou ovládány přes water.anim.txt. Velikost dlaždice a materiálové vlastnosti jsou řízeny ačkoli water.config.txt souboru.
Následující příklad je klidné vodě.
kuid:123456:1226; trainz-build 2.5 category-class "EW" category-region "CZ" category-era "2010s" username "Tutorials agent" kind "water2" description"To to je návod woater 2." thumbnails { 0 { image "thumb.jpg" width 240 height 180 } }
[divider icon=”code” style=”simple”]
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 =.0; // scale X,Y coordinates of the normal map for better interpolation FFT 450.0; // "Size" of one tile animMaxHeight = 0.4; // Max height of the wave animScaleNormXY = 4 { 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; } }
[divider icon=”code” style=”simple”]
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; }