Mapdev:water
Water
The 'water' engine feature can be used for more than just water, it can be Lava, Slime, and completely invisible for maps in space.
| FIXME: need to place an image here |
Specification
mapinfo.lua
local mapinfo = {
...
tidalStrength = 0,
voidWater = false,
...
water = {
damage = 0.0,
repeatX = 0.0,
repeatY = 0.0,
absorb = {0.0, 0.0, 0.0},
baseColor = {0.0, 0.0, 0.0},
minColor = {0.0, 0.0, 0.0},
ambientFactor = 1.0,
diffuseFactor = 1.0,
specularFactor = 1.0,
specularPower = 20.0,
planeColor = {0.0, 0.4, 0.0},
surfaceColor = {0.75, 0.8, 0.85},
surfaceAlpha = 0.55,
diffuseColor = {1.0, 1.0, 1.0},
specularColor = {0.5, 0.5, 0.5},
fresnelMin = 0.2,
fresnelMax = 0.8,
fresnelPower = 4.0,
reflectionDistortion = 1.0,
blurBase = 2.0,
blurExponent = 1.5,
perlinStartFreq = 8.0,
perlinLacunarity = 3.0,
perlinAmplitude = 0.9,
windSpeed = 1.0, --// does nothing yet
shoreWaves = true,
forceRendering = false,
--// undefined == load them from resources.lua!
--texture = "",
--foamTexture = "",
--normalTexture = "",
--caustics = {
-- "",
-- "",
--},
},
...
}
Void Water
FIXME: discussion on void water and use cases
| FIXME: need to place an image here |
Tidal Strength
FIXME: Discussion on resourcing again.
repeatX and repeatY
Shading
Shore Waves
FIXME: so much to put in here that i cant test and such because my hardware doesn't support it :|
The Water Plane
The water plane is always y = 0, anything underneath the water plane is underwater. The terrain is positioned above and below the water plane using its minHeight and maxHeight values(see Mapdev:height).
To derive the exact value of grey on the heightmap that will be at the water plane use:
FIXME: equation
To derive the maxHeight given a grey value and a minheight use:
FIXME: equation
To derive the minHeight given a grey value and a maxheight use:
FIXME: equation
To derive the maxHeight and minHeight given a grey value and a total height use:
FIXME: equation
Forum Discussions
- chockolate rain map discussion apparrently has soemthing in it i wanted to keep for later.. cant remember though...
- water height