Mapdev:detail: Difference between revisions

From Spring
Jump to navigationJump to search
m →Image File: used template.
Gajop (talk | contribs)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Details =
= Details =
Needs description here
{{FIXME}} Needs description here
<center>
<center>
{| class="wikitable"
{| class="wikitable"
|+ Example
|+ Example
| [[File:Mapdev-splat-without.jpg|330px]] || [[File:Mapdev-splat-with.jpg|330px]]
| {{FIXME}} needs image || [[File:Mapdev-splat-without.jpg|330px]]
|-
|-
! Default Single Detail Map !! Multiple Detail Maps
! Example Detail Texture !! Ingame Result
|-
|-
| colspan="2" | ''* Click on images for higher res''
| colspan="2" | ''* Click on images for higher res''
Line 12: Line 12:


= Specification =
= Specification =
== Simple Detail Map ==
== mapinfo.lua ==
=== mapinfo.lua ===
<pre>
<code><pre>
local mapinfo = {
local mapinfo = {
   ...
   ...
Line 23: Line 22:
   },
   },
   ...
   ...
}</pre></code>
}</pre>
=== Image File ===
 
== Image File ==
{| class="wikitable" width="100%"
{| class="wikitable" width="100%"
! width="15%" | File Location
! width="15%" | File Location
Line 30: Line 30:
|-
|-
! File Format
! File Format
| PNG, TGA, BMP
| PNG, TGA, BMP, DDS {{new|99.0}}
|-
|-
! Colour Depth
! Colour Depth
Line 39: Line 39:
|-
|-
! Resolution
! Resolution
| Any however we recommend powers of two.
| Any powers of two, eg. 256, 512, 1024...
|}
|}


== Complex Detail Map ==
[[Category:Map Dev]]
{{infobox|title=Caution|icon=icon-caution.png|color=rgba(255,0,0,0.1)
|body=requires clients to have GLSL-spec hardware}}
 
=== mapinfo.lua ===
<code><pre>
local mapinfo = {
  ...
  resources = {
      ...
      splatDistrTex = "splatDistributionTex.tga",
      splatDetailTex = "splatDetailTex.tga",
      ...
  },
  ...
  splats = {
      texScales = {1.0, 1.0, 1.0, 1.0},
      texMults = {1.0, 1.0, 1.0, 1.0},
  },
  ...
}</pre></code>
 
==== texScales ====
<center>
{| class="wikitable"
|[[File:Map measure.png|512px|measuring stick]]
|-
! texScales
|}</center>
 
==== texMults ====
 
=== Distribution Image ===
* Image Location: ./maps/
* 8bit RGBA, any resolution, will be scaled over the whole terrain
The RGBA Channels are individual greyscale distribution maps which define which detail textures to splat onto the ground. The intensity of the splatted textures is multipled by the pixel values for the corresponding channels.
<center>
{| class="wikitable"
|+ Example
| [[File:Mapdev-ddist.gif]] || [[File:Mapdev-ddist.png]]
|-
! Detail Distribution maps !! Combined Result
|}</center>
 
=== Detail Image ===
* Image Location: ./maps/
* 8bit RGBA, resolutions power of two, 512 or 1024 works best for good detail levels.
Each Channel represents a seperate greyscale image. The ground colour is multiplied by the pixel values of the channel. The intensity of the effect is also controlled per channel using the splattexmults, low numbers = less effect.
<center>
{| class="wikitable"
|+ Example
| [[File:Mapdev-details.gif]] || [[File:Mapdev-details.png]]
|-
! Individual Detail Textures !! Combined Result
|}</center>
 
 
= Forum Discussion =
* [http://springrts.com/phpbb/viewtopic.php?f=56&t=21565 Detail texture resource thread]
* [http://springrts.com/phpbb/viewtopic.php?f=13&t=22564  Detail texture splatting is ready!]
 
[[Category:Mapdev]]
[[Category:Development]]

Latest revision as of 16:38, 18 December 2018

Details

FIXME: Needs description here

Example
FIXME: needs image
Example Detail Texture Ingame Result
* Click on images for higher res

Specification

mapinfo.lua

local mapinfo = {
   ...
   resources = {
      ...
      detailTex = "",
      ...
   },
   ...
}

Image File

File Location ./maps/
File Format PNG, TGA, BMP, DDS New in version 99.0
Colour Depth 8bpp
Channels RGB
Resolution Any powers of two, eg. 256, 512, 1024...