Giter Club home page Giter Club logo

wfc-rs's Introduction

wfc-rs

Original Algorithm: https://github.com/mxgmn/WaveFunctionCollapse

Explanation for tiled model: https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/

Explanation for overlap model: https://www.gridbugs.org/wave-function-collapse/

Renderings

animated flowers

cargo run --release -- ./input/flowers.png --make-gif -o 80,40 overlap -t 3,3

animated rotated/reflected flowers

cargo run --release -- ./input/flowers.png -o 80,40 --make-gif --with-tile-variations overlap -t 3,3

animated city

cargo run --release -- ./input/smog-city.png --make-gif -o 80,40 overlap -t 4,4

animated village

cargo run --release -- ./input/village.png --make-gif -o 80,40 overlap -t 3,3

animated tile town

cargo run --release -- ./input/mini-world-meadows.png --make-gif -o 20,20 tile -t 16,16

Running

cargo run --release -- --help

wfc-rs 0.1.0
Brandon Stilson
Run wfc-rs

USAGE:
    wfc-rs [OPTIONS] --output-dimensions <OUTPUT_DIMENSIONS> <INPUT> <SUBCOMMAND>

ARGS:
    <INPUT>    Input location. If running in 'tiled set' mode, this is assumed to be a directory

OPTIONS:
    -h, --help
            Print help information

        --make-gif
            whether or not to make a gif (warning: very slow)

    -o, --output-dimensions <OUTPUT_DIMENSIONS>
            Output dimensions. If running in 'tiled' mode, then this is the tiles. If in
            'overlap' mode, then it is in pixels

    -V, --version
            Print version information

    -w, --with-tile-variations
            whether or not create all variations (rotations and reflections) of tiles

SUBCOMMANDS:
    help       Print this message or the help of the given subcommand(s)
    overlap
    tile

TODOs

  • directional weights
  • shannon entropy of cells
  • voxels

Attribution

wfc-rs's People

Contributors

bbstilson avatar

Stargazers

Geoffrey Mureithi avatar Jeff Lynn avatar Mahyar Mirrashed avatar Fichtelcoder avatar  avatar Rubens Brandão avatar Christian Legnitto avatar Jonathan Kelley avatar Mark Holmes avatar

Watchers

 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.