Mapdev:detail

From Spring
Revision as of 06:02, 18 December 2012 by Enetheru (talk | contribs) (created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Details

Needs description here

Example
(example image without) (example image with)
Without Details With Details

Specification

Simple Detail Map

mapinfo.lua

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

Image File

  • Image Location: ./maps/
  • 8 bit greyscale image, any resolution with power of two.

Complex Detail Map

Caution
requires clients to have GLSL-spec hardware

mapinfo.lua

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},
   },
   ...
}

texScales

measuring stick
texScales

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.

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