Giter VIP home page Giter VIP logo

cartographer's Introduction

Cartographer

A web-based tool for converting images into Minecraft map-art, formatted in a variety of ways (most commonly in the litematica format). These schematics can then be used as a blueprint for building map-art in Minecraft.

About

There are already some good implementations/alternatives to this tool out in the wild, most notably being mapartcraft, however I found their interfaces very clunky to work in and hard to iterate fluidly on a map-art idea. I also wanted to add features that were missing and add support for outputting in alternative data formats such as .litematic files for the excellent Litematica mod.

Some features of this tool:

  • Clean, fluid interface for working with the loaded image
    • Live preview
    • Interactive selection/crop box
    • Image manipulation tools (saturation, brightness)
  • Perform all generation entirely on the browser
  • Various output formats (.schematic files, .json, .nbt) that don't need to be converted via third party tools
  • Allow selecting multiple blocks in the color palette and balance equally between them when generating the block space. This allows for a better distribution in accordance with the material quantities available in the users world. For example, if the user has 10 cobblestone and 10 stone, and they need 20 blocks of either, they shouldn't need to mine an additional 10 of one type but rather should be able to use both their cobblestone and their stone to complete the map.
  • Various staircasing algorithms
  • Material list view

Components

  • @cartographer/litematica - A set of utilities for generating Litematica compatible schematics
  • @cartographer/generation - Contains the core block generation algorithm as well as transformers to convert the generated map to other formats like litematica and nbt.
  • @cartographer/pixels - Contains block palette data and tools for working with image data. Essentially conversion tools for 'pixels' where a pixel could be an image pixel or a MC block
  • @cartographer/block-palettes - Curated block-palette data

JSON output format

Internally the generation algorithm produces a relatively simple data-structure which represents all blocks in their appropriate positions in 3D space. This intermediate data structure is then converted into whatever target output format is requested. The tool accepts exporting this data structure as standard JSON which allows you to build your own tools and translation algorithms for target formats not natively supported by Cartographer.

This data structure looks as follows:

[
  {
    "id": "minecraft:birch_log",
    "properties": {"axis": "y"},
    "hue": 1,
    "x": 0,
    "y": 1,
    "z": 0
  }
]

Acknowledgements

The block palette data was taken directly from rebane2001/mapartcraft and converted to the format used internally by cartographer. This conversion was done using this script.

Roadmap/Features

  • Add support for uploading custom block palettes.
  • Ability to manually edit the generated map-art to tweak/fix things
  • Deal with infection blocks like grass or nylium

Authors

cartographer's People

Contributors

julienvincent avatar nicholaswrobinson avatar

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.