Jump to content

MapRenderer

From fCraft Wiki
Revision as of 10:25, 25 August 2012 by F (talk | contribs)
MapRender usage

MapRenderer is a utility, bundled with fCraft 0.630+, that can render images from map files.

Usage

MapRenderer [options] "MapFileOrDirectory"

Examples

Rendering a single map

MapRenderer "SomeMap.fcm"
Draws contents of SomeMap.fcm with all default parameters, saves it to SomeMap.png.

Batch rendering

MapRenderer -r "maps/"
Finds all map files in "C:/maps", including files in subdirectories, and renders them with default settings. Images are saved into each map's respective directory. Image filenames are based on mapfile names, with file extension change to ".png"

Moving out rendered images

MapRenderer -r -o "images/" "maps/"
Same as above, but all images are placed into "images/" directory.

Filtering

MapRenderer -f=builder* "maps/"
Looks for mapfile names that start with "builder", draws them with default settings.

Rendering options

MapRenderer --noshadows -q=90 e=JPEG "SomeMap.fcm"
Draws contents of SomeMap.fcm, without shadows, and saves results to SomeMap.jpg at 90% quality.

Options

Options have alternative short (one-letter) and a long (whole word) forms. You can use either form: -a=90 is same as --angle=90

One-letter flags can be combined: -gswl is same as -g -s -w -l

-a, --angle=DEGREES

Angle (orientation) from which the map is drawn. May be -90, 0, 90, 180, or 270. Default is 0.

-f, --filter=PATTERN

Optional: Pattern to filter input filenames, e.g. *.dat or builder*. Applicable only when a directory name is given as input.

-i, --importer=FORMAT

Optional: Converter used for importing/loading maps. Available formats:
  • Auto - default; tries to determine file type automatically
  • Classic (.dat or .mine) - Minecraft Classic and SurvivalTest maps
  • D3 (.map)
  • FCMv2 (.fcm) - used by fCraft prior to version 0.500
  • FCMv3 (.fcm) - used in fCraft 0.500-0.630
  • FCMv4 (.fcm) - planned format for future versions of fCraft
  • Indev (.mclevel) - from Minecraft Indev maps
  • JTE (.gz)
  • MCSharp (.lvl) - MCSharp, FemtoCraft, MCZall, MCLawl, MCForge, etc
  • MinerCPP (.dat) - MinerCPP and LuaCraft
  • Myne (directory-based) - Myne, MyneCraft, Hyvebuild, and iCraft
  • Opticraft (.save)

-e, --export=FORMAT

Image format to use for exporting. Supported formats: PNG (default), BMP, GIF, JPEG, TIFF.

-m, --mode=MODE

Rendering mode. May be "normal" (default), "cut" (cuts out a quarter of the map, revealing inside), "peeled" (strips the outer-most layer of blocks), "chunk" (renders only a specified region of the map).

-g, --nogradient

Disables altitude-based gradient/shading on terrain.

-s, --noshadows

Disables rendering of shadows.

-o, --output=PATH

Optional: Path to save images to. If not specified, images will be saved to the maps' directory.

-y, --overwrite

Disables asking for confirmation to overwrite existing files.

-q, --quality=PERCENTAGE

Sets JPEG compression quality. Between 0 and 100. Default is 80. Applicable only when exporting images to .jpg or .jpeg.

-r, --recursive

Optional: Look through all subdirectories for map files. Applicable only when a directory name is given as input.

--region=x1,y1,z1,x2,y2,z2

Region of the map to render. Should be given in following format: "region=x1,y1,z1,x2,y2,z2". By fCraft's conventions, x/y are horizontal coordinates (width/length), and z is the vertical coordinate (height). Applicable only when rendering mode is set to "chunk".

-w, --seethroughwater

Makes all water see-through, instead of mostly opaque.

-l, --seethroughlava

Makes all lava partially see-through, instead of opaque.

-u, --uncropped

Does not crop the finished map image, leaving some empty space around the edges.

-?, -h, --help

Prints usage information and a list of options.