Mapdev:detail: Difference between revisions

From Spring
Jump to navigationJump to search
created page
 
Gajop (talk | contribs)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Details =
= Details =
Needs description here
{{FIXME}} Needs description here
{| class="wikitable" width="100%"
<center>
{| class="wikitable"
|+ Example
|+ Example
| (example image without) || (example image with)
| {{FIXME}} needs image || [[File:Mapdev-splat-without.jpg|330px]]
|-
! Example Detail Texture !! Ingame Result
|-
|-
! Without Details !! With Details
| colspan="2" | ''* Click on images for higher res''
|}
|}</center>
 
= Specification =
= Specification =
== Simple Detail Map ==
== mapinfo.lua ==
=== mapinfo.lua ===
<pre>
<code><pre>
local mapinfo = {
local mapinfo = {
   ...
   ...
Line 19: Line 22:
   },
   },
   ...
   ...
}</pre></code>
}</pre>
=== Image File ===
* Image Location: ./maps/
* 8 bit greyscale image, any resolution with power of two.


== Complex Detail Map ==
== Image File ==
{{infobox|title=Caution|icon=icon-caution.png|color=rgba(255,0,0,0.1)
{| class="wikitable" width="100%"
|body=requires clients to have GLSL-spec hardware}}
! width="15%" | File Location
 
| ./maps/
=== mapinfo.lua ===
|-
<code><pre>
! File Format
local mapinfo = {
| PNG, TGA, BMP, DDS {{new|99.0}}
  ...
|-
  resources = {
! Colour Depth
      ...
| 8bpp
      splatDistrTex = "splatDistributionTex.tga",
|-
      splatDetailTex = "splatDetailTex.tga",
! Channels
      ...
| RGB
  },
  ...
  splats = {
      texScales = {1.0, 1.0, 1.0, 1.0},
      texMults = {1.0, 1.0, 1.0, 1.0},
  },
  ...
}</pre></code>
 
==== texScales ====
{| class="wikitable"
|[[File:Map measure.png|512px|measuring stick]]
|-
|-
! texScales
! Resolution
| Any powers of two, eg. 256, 512, 1024...
|}
|}


==== texMults ====
[[Category:Map Dev]]
 
=== 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.
=== 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.
 
 
= 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...