Giter Site home page Giter Site logo

afcms / mineclone2_mapart Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 3.48 MB

Python3 CLI tool to generate WorldEdit shematics for the Minetest VoxeLibre (fka. MineClone2) game from images.

License: GNU General Public License v3.0

Lua 33.94% Python 66.06%
minetest minetest-mod minetest-tool worldedit

mineclone2_mapart's Introduction

MineClone2 MapArt

This is a python3 project you can use with the MineClone2 game for Minetest.

This project take an image and output a WorldEdit shematic featuring MineClone2 blocks that matched the colors of image the best.

Screenshot1

Screenshot2

Usage

Basic Use

First, clone this project on your computer:

git clone https://github.com/AFCMS/MineClone2_MapArt
cd ./MineClone2_MapArt

Make sure dependencies are installed:

pip install -r requirements.txt

Run the main script on an image:

python3 ./create_map.py path-to-image path-output

You will get a WorldEdit shematic at path-output.

Advanced Use

Regenerate generate_json_blocks/availlable_blocks.json and block_colors.json

These files may not be 100% up to date with MineClone2 master branch then you clone the repository, or you may want to use an old MineClone2 version.

In these cases, you will need to regenerate them:

First of all, you will need to update the list of survival-usable solid construction blocks:

Link the generate_json_blocks mod to the mods folder of your minetest installation. Then, create a world with the MineClone2 game, enable the mod on it and jaunch the game. The game should close after the media loading part. You should now notice that the availlable_blocks.json in the generate_json_blocks folder has changed.

Then, you should now calculate the average color of each texture of each availlable block:

Run the create_block_colors.py file with the path where MineClone2 is installed as param.

python3 create_block_colors.py /path-to-mineclone2

It should output something like that:

Finding files...
Files: 233

You should also notice that the block_colors.json file has been updated.

You can now convert images that will make use of the all new block_colors.json file.

mineclone2_mapart's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

mineclone2_mapart's Issues

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.