Mapdev:grass
From Spring
Grass
Formerly Feature Maps. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.
| (grass distribution image) | (in game screenshot of result) |
| Example Grass Disribution | In Game Result |
|---|
Specification
mapinfo.lua
local mapinfo = {
...
resources = {
...
grassBladeTex = "",
grassShadingTex = "",
...
},
...
grass = {
bladeWaveScale = 1.0,
bladeWidth = 0.32,
bladeHeight = 4.0,
bladeAngle = 1.57,
bladeColor = {0.59, 0.81, 0.57},
},
...
}
Blade Wave Scale
Blade Height
Blade Angle
Blade Color
does nothing when blade texture is set.
Distribution Image
- 8 bpp RGB
| Spring Map Size* | pixels = Spring Map Size * 64 |
|---|---|
| 2 | 128 |
| 4 | 256 |
| 6 | 284 |
| ... | ... |
| 32 | 2048 |
| * must be multiples of 2 | |
Shading Image
- 8 bpp RGB, any resolution, will be stretched over the whole terain
| Example | Result |
|---|
Blade Texture
| Example | Result |
|---|