Skip to content

Meshiest/heightmap2brz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heightmap2BRZ

This tool functions as an img2brz, img2text, and heightmap2brz

Download here

Example output GTAV Map Gui

Compiling

You need rust.

Run cargo build for the CLI, cargo build --bin heightmap_gui --features gui for the gui.

Usage

Compile or download from releases.

heightmap.exe --help for usage instructions:

USAGE:
    heightmap.exe [FLAGS] [OPTIONS] <INPUT>...

FLAGS:
        --cull         Automatically remove bottom level bricks and fully transparent bricks
        --glow         Make the heightmap glow at 0 intensity
        --greedy       Use greedy optimization
    -h, --help         Prints help information
        --hdmap        Using a high detail rgb color encoded heightmap
    -i, --img          Make the heightmap flat and render an image
        --lrgb         Use linear rgb input color instead of sRGB
        --micro        Render bricks as micro bricks
        --nocollide    Disable brick collision
        --smooth       Render bricks as smooth tiles
        --snap         Snap bricks to the brick grid
        --stud         Render bricks as stud cubes
        --text         Render the input image as TextDisplay component bricks
        --tile         Render bricks as tiles
    -V, --version      Prints version information

OPTIONS:
        --alpha-threshold <alphathreshold>    Text mode: alpha below this is transparent (default 128)
        --char-repeat <charrepeat>            Text mode: glyphs emitted per pixel (default 2)
    -c, --colormap <colormap>                 Input colormap image (PNG/JPG)
        --empty-char <emptychar>              Text mode: glyph for transparent pixels (default space)
        --fill-char <fillchar>                Text mode: glyph for opaque pixels (default █)
        --font <font>                         Text mode: font preset (monaspace, iosevka, orbitron; default monaspace)
        --line-height-world <lineheight>      Text mode: world units per pixel row / pixel size (default 1)
    -o, --output <output>                     Output file (BRDB, BRZ)
    -s, --size <size>                         Brick stud size (default 1)
    -v, --vertical <vertical>                 Vertical scale multiplier (default 1)

ARGS:
    <INPUT>...    Input heightmap image files (PNG/JPG)

Examples

An example command for generating the GTA V map would be:

heightmap example_maps/gta5_fixed2_height.png -c example_maps/gta5_fixed2_color.png -s 4 -v 20 --tile -o gta5.brz

To use stacked heightmap for increased resolution, simply provide more input files. See the stacked_N.png files in the example_maps directory for example stacked heightmaps.

heightmap ./example_maps/stacked_1.png ./example_maps/stacked_2.png ./example_maps/stacked_3.png ./example_maps/stacked_4.png --tile

To generate HD heightmaps for the --hdmap flag, check out Kmschr's GeoTIFF2Heightmap tool.

About

Generate Brickadia Save files from PNG heightmaps

Topics

Resources

Stars

5 stars

Watchers

2 watching

Forks

Contributors

Languages