CCG/Example: Water2
From TrainzOnline
< CCG
Contents |
Water2
Directory Structure
A typical asset of this kind has the following File\Directory Structure:
Required Files
config.txt - The config file for the asset.
thumb.jpg - The thumbnail image for this asset. A 240x180 jpeg.
water.anim.txt - Contains the animation variables for the water asset.
water.bmp, wateropacity.texture.txt - The texture files applied to the water. See the section on Texture.txt files on Page 96 for more information.
water.config.txt - Contains the tile size and material properties for the water asset.
Config.txt File Listing
kuid <kuid:56113:1226>
trainz-build 2.9
category-class "EW"
category-region "00"
category-era "2010s"
username "TestWater"
kind "water2"
description "This is a test water2 kind written for the 2006 CCG."
thumbnails
{
0
{
image "thumb.jpg"
width 240
height 180
}
}
Anim.txt File Listing
water.anim.txt
version .00
// Water DetailAnim configuration file
// Is used from DefaultWater.config.txt
DetailAnim
{
AnimName = WaterAnimationPN; //Perlin noise
animation.AnimSampleRate = 0; // Sample rate (samples per sec)
AnimPeriod = 3; // Looping period in sec.
AnimSpeed = .0; // Speed of waves
AnimSize = 2,2; // Bump map dimensions
//AnimSize = 32,32; // Bump map dimensions
AnimWorldSize = 0.0; // "Size" of one tile
AnimMaxHeight = .0; // Max height of the wave
AnimScaleNormXY = .0; // scale X,Y coordinates of the normal map for better interpolation
Perlin
{
AnimPerlinFreq = .0;
AnimPerlinSpeed = 0.0;
AnimPerlinOctaves = 3.0;
}
FFT
{
AnimFFTWindVec = -.0,.0; // Direction and speed of the wind affecting length of the waves
AnimPhillipsA = .0e-3; // Phillips spectrum constant affecting heights of the waves
AnimFFTSeed = 0; // Reduce height of waves in direction perpendicular to wind
(CosMin <= cos(dir) <= CosMax)
//acrossCosMax // Default -. (disabled) (.0 same direction, 0.0 - perpendicular, -.0 opposite)
//acrossCosMim // Default .
//acrossRatio // Default .0
// Reduce height of waves in direction opposite to wind
//oppositeCos // Default -. (disabled) (.0 same direction, -.0 opposite direction)
//oppositeRatio // Default .0
}
}
Water.Config.txt File Listing
water.config.txt
version .00
// WaterManager config data
WaterManager("WaterManagerGeneric")
{
WaterMaterial
{
materialColor = (0.20, 0., 0., 0.);
materialRI = 0.3;
opacityTex = WaterOpacity.texture;
opacityAmount = 0.;
}
// 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.0;
TileUVScale = .0, .0;
GridSpacing = 0.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.;
MaxAmp = 0.0;//0.2;
// Mesh animation
// TileGridSize = 3, 3; // Number of vertices in one tile (use more if MaxAmp > 0)
// WaveFreq = 0.;
// MaxAmp = 0.2;
}
Download this asset
This asset is available for download from the TRS2006 website at:
http://files.auran.com/TRS2006/Downloads/Example_Download.zip
