Mapdev:diffuse: Difference between revisions
From Spring
Jump to navigationJump to search
m →Diffuse: replaced image. |
m →Image File: using file info template. |
||
| Line 30: | Line 30: | ||
== Image File == | == Image File == | ||
{| class="wikitable" width="100%" | |||
! width="15%" | File Location | |||
<center> | | The diffuse texture is an intermediary file compiled into the SMF/SMT files using [[MapConv]] or [[MapConvNG]]. | ||
|- | |||
! File Format | |||
| Any that Mapconv programs support | |||
|- | |||
! Colour Depth | |||
| 8bpp | |||
|- | |||
! Channels | |||
| RGB | |||
|- | |||
! Resolution | |||
| <center> | |||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
!Spring Map Size<sup>*</sup> | !Spring Map Size<sup>*</sup> | ||
| Line 52: | Line 64: | ||
| 16 384 | | 16 384 | ||
|- | |- | ||
| style="text-align: left;font-style:italic" colspan=2 | | | style="text-align: left;font-style:italic" colspan=2 | * must be multiples of 2 | ||
|}</center> | |}</center> | ||
|} | |||
== Compression == | == Compression == | ||
Revision as of 14:05, 6 January 2013
Diffuse
The colour of the terrain, 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
| File Location | The diffuse texture is an intermediary file compiled into the SMF/SMT files using MapConv or MapConvNG. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| File Format | Any that Mapconv programs support | ||||||||||||||
| Colour Depth | 8bpp | ||||||||||||||
| Channels | RGB | ||||||||||||||
| Resolution |
| ||||||||||||||
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.

