Mapdev:diffuse: Difference between revisions
From Spring
Jump to navigationJump to search
m 1 cat |
m clarified a few points. |
||
| Line 32: | Line 32: | ||
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
! width="15%" | File Location | ! width="15%" | File Location | ||
| The diffuse texture is | | The diffuse texture is chopped into 32x32 pixel tiles compressed using DXT1 and compiled into the smt using [[MapConv]] or [[MapConvNG]]. | ||
|- | |- | ||
! File Format | ! File Format | ||
| Line 41: | Line 41: | ||
|- | |- | ||
! Channels | ! Channels | ||
| | | RGBA | ||
|- | |- | ||
! Resolution | ! Resolution | ||
| Line 69: | Line 69: | ||
== Compression == | == Compression == | ||
The DXT1 compression is lossy, but in a consistent manner. all 32x32 tiles will have exactly the same size. To reduce the number of tiles saved in tile file(SMT) you can align graphical elements to a 32x32 pixel grid. MapConv can detect that a tile is repeated and reference it only once. This means that any repetition of the diffuse image, so long as it is aligned to a 32x32 pixel grid will result in a reduction in size. | |||
* Use tiled textures that are multiples of 32x32 in dimensions. | |||
* Place features like geovents and metal spots on a 32x32 grid. | |||
* Repeat as much as possible on a 32x32 pixel grid. | |||
[[Category:Map Dev]] | [[Category:Map Dev]] | ||
Revision as of 13:29, 9 October 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 chopped into 32x32 pixel tiles compressed using DXT1 and compiled into the smt using MapConv or MapConvNG. | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| File Format | Any that Mapconv programs support | ||||||||||||||
| Colour Depth | 8bpp | ||||||||||||||
| Channels | RGBA | ||||||||||||||
| Resolution |
| ||||||||||||||
Compression
The DXT1 compression is lossy, but in a consistent manner. all 32x32 tiles will have exactly the same size. To reduce the number of tiles saved in tile file(SMT) you can align graphical elements to a 32x32 pixel grid. MapConv can detect that a tile is repeated and reference it only once. This means that any repetition of the diffuse image, so long as it is aligned to a 32x32 pixel grid will result in a reduction in size.
- Use tiled textures that are multiples of 32x32 in dimensions.
- Place features like geovents and metal spots on a 32x32 grid.
- Repeat as much as possible on a 32x32 pixel grid.

