Difference between revisions of "Packaging:Minimap"

From Custom Map Makers Wiki
Jump to: navigation, search
m (added category)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Creating a Minimap with the q3map2-generator ==
+
'''Note:''' Urban Terror creates a minimap automatically.<br/>
 +
You can find it in the same location as your BSP file and you need to add it to your PK3.
 +
== Creating a minimap with q3map2 ==
 +
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.
+
-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.
+
[[Category:Packaging]]
* 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.
 

Latest revision as of 07:23, 21 August 2011

Note: Urban Terror creates a minimap automatically.
You can find it in the same location as your BSP file and you need to add it to your PK3.

Creating a minimap with q3map2

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