Difference between revisions of "Packaging:Minimap"

From Custom Map Makers Wiki
Jump to: navigation, search
(Creating a Minimap with the q3map2-generator)
(Creating a Minimap with the q3map2-generator)
Line 1: Line 1:
 
== Creating a Minimap with the q3map2-generator ==
 
== Creating a Minimap with the q3map2-generator ==
 +
You have to create a new Compiling stages, which starts with -minimap, then a -size and a -border [[File:Minimap.jpg|200px|thumb|right|Black-White Minimap]]
 +
Here are the commands for q3map2 you can use:
 +
* minimap ... filename.bsp: Creates a minimap of the BSP, by default writes to ../gfx/filename_mini.tga
 +
* black: Write the minimap as a black-on-transparency RGBA32 image
 +
* boost F: Sets the contrast boost value (higher values make a brighter image); contrast boost is somewhat similar to gamma, but continuous even at zero
 +
* border F: Sets the amount of border pixels relative to the total image size
 +
* gray: Write the minimap as a white-on-black GRAY8 image
 +
* keepaspect: Ensure the aspect ratio is kept (the minimap is then letterboxed to keep aspect)
 +
* minmax xmin ymin zmin xmax ymax zmax: Forces specific map dimensions (note: the minimap actually uses these dimensions, scaled to the target size while keeping aspect with    entering, and 1/64 of border appended to all sides)
 +
* nokeepaspect: Do not ensure the aspect ratio is kept (makes it easier to use the image in your code, but looks bad together with sharpening)
 +
* o filename.tga: Sets the output file name
 +
* random N: Sets the randomized supersampling count (cannot be combined with -samples)
 +
* samples N: Sets the ordered supersampling count (cannot be combined with -random)
 +
* sharpen F: Sets the sharpening coefficient
 +
* size N: Sets the width and height of the output image
 +
* white: Write the minimap as a white-on-transparency RGBA32 image
  
This version of the map compiler can generate minimaps as used by Nexuiz.
+
 
The specs of the minimap's texture mapping are:
+
''Example for a simple Black-White Minimap:''
* Let M be the rectangle of the world's mins/maxs coordinates. [[File:Minimap.jpg|200px|thumb|right|Black-White Minimap]]
+
-minimap -size 512 -sharpen 1 -border 0
* If keepaspect is set: let S be the smallest square completely covering M whose center matches the one of M. Otherwise, let S be M.
 
* Let S' be S scaled by factor 1/(1-2*border) around the center of S.
 
* The "mins" corner of S' corresponds to the top left corner of the image.
 
* The "maxs" corner of S' corresponds to the bottom right corner of the image.
 

Revision as of 20:09, 20 August 2011

Creating a Minimap with the q3map2-generator

You have to create a new Compiling stages, which starts with -minimap, then a -size and a -border
Black-White Minimap

Here are the commands for q3map2 you can use:

  • minimap ... filename.bsp: Creates a minimap of the BSP, by default writes to ../gfx/filename_mini.tga
  • black: Write the minimap as a black-on-transparency RGBA32 image
  • boost F: Sets the contrast boost value (higher values make a brighter image); contrast boost is somewhat similar to gamma, but continuous even at zero
  • border F: Sets the amount of border pixels relative to the total image size
  • gray: Write the minimap as a white-on-black GRAY8 image
  • keepaspect: Ensure the aspect ratio is kept (the minimap is then letterboxed to keep aspect)
  • minmax xmin ymin zmin xmax ymax zmax: Forces specific map dimensions (note: the minimap actually uses these dimensions, scaled to the target size while keeping aspect with entering, and 1/64 of border appended to all sides)
  • nokeepaspect: Do not ensure the aspect ratio is kept (makes it easier to use the image in your code, but looks bad together with sharpening)
  • o filename.tga: Sets the output file name
  • random N: Sets the randomized supersampling count (cannot be combined with -samples)
  • samples N: Sets the ordered supersampling count (cannot be combined with -random)
  • sharpen F: Sets the sharpening coefficient
  • size N: Sets the width and height of the output image
  • white: Write the minimap as a white-on-transparency RGBA32 image


Example for a simple Black-White Minimap:

-minimap -size 512 -sharpen 1 -border 0