Mapdev:diffuse: Difference between revisions
From Spring
Jump to navigationJump to search
m →Image File: minor formatting. |
m added images. |
||
| Line 1: | Line 1: | ||
= Diffuse = | = Diffuse = | ||
The colour of the terrain. The diffuse image texture is compiled with mapconv into the SMT/SMF files. In game, the color is then modified with the lighting values in mapinfo.lua | The colour of the terrain. The diffuse image texture is compiled with mapconv into the SMT/SMF files. In game, the color is then modified with the lighting values in mapinfo.lua | ||
{| class="wikitable" | <center> | ||
| || | {| class="wikitable" | ||
|+ Example | |||
| [[File:Mapdev-diffuse.png]] || [[File:Mapdev-diffuse-example.png]] | |||
|- | |- | ||
! Example Diffuse | ! Example Diffuse Map !! Ingame Result | ||
! Ingame Result | |}</center> | ||
|} | |||
= Specification = | = Specification = | ||
Revision as of 04:30, 19 December 2012
Diffuse
The colour of the terrain. The diffuse image texture is compiled with mapconv into the SMT/SMF files. In game, the color is then modified with the lighting values in mapinfo.lua
![]() |
|
| Example Diffuse Map | Ingame Result |
|---|
Specification
mapinfo.lua
The relevant sections of the mapinfo.lua file that effect the colour of the ground are in the Lighting subtable
local mapinfo = {
...
lighting = {
...
--// ground lighting
groundAmbientColor = {0.5, 0.5, 0.5},
groundDiffuseColor = {0.5, 0.5, 0.5},
groundSpecularColor = {0.1, 0.1, 0.1},
groundShadowDensity = 0.8,
...
},
...
}
Image File
- 8 bpp RGB
| Spring Map Size* | pixels = Spring Map Size * 512 |
|---|---|
| 2 | 1024 |
| 4 | 2048 |
| 6 | 3072 |
| ... | ... |
| 32 | 16 384 |
| * must be multiples of 2 | |
Compression
It's possible to reduce the size of the final map by using a repeating pattern in your texture image. mapconv auto detects that pattern and saves each unique tile that you've used as DDS inside the mapfile.

