Code Monkey home page Code Monkey logo

heightmap2brs's Introduction

Heightmap2BRS

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
    -h, --help       Prints help information
        --hdmap      Using a high detail rgb color encoded heightmap
        --lrgb       Use linear rgb input color instead of sRGB
        --micro      Render bricks as micro bricks
        --nocollide  Disable brick collision
        --old        Use old unoptimized heightmap code
        --snap       Snap bricks to the brick grid
        --tile       Render bricks as tiles
        --stud       Render bricks as stud cubes
    -i  --img        Make heightmap flat (use as img2brick)
    -V, --version    Prints version information

OPTIONS:
    -c, --colormap <colormap>    Input colormap PNG image
    -o, --output <output>        Output BRS file
    -s, --size <size>            Brick stud size (default 1)
    -v, --vertical <vertical>    Vertical scale multiplier (default 1)
    --owner <owner>              Set the owner name (default Generator)
    --owner_id <owner_id>        Set the owner id (default a1b16aca-9627-4a16-a160-67fa9adbb7b6)

ARGS:
    <INPUT>...    Input heightmap PNG images

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.brs

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.

heightmap2brs's People

Contributors

kmschr avatar meshiest avatar mraware avatar qoh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

heightmap2brs's Issues

Vertical Snapping Option

Add an option to snap the top of the generated bricks to the stud-grid, instead of the microshift-grid.

This is to make simplification of the terrain easier and making aligning things, like bridges, easier between differing heights.

16-bit png support

It'd be nice to be able to output heightmaps with a large vertical range smoothly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.