Git Product home page Git Product logo

blender_maze's Introduction

hero

NX_Labyrinthe

Blender addon to generate maze

GPLv3 license

The generated maze is "perfect"1, all cell could be visited and there is a way to throught it!

Installation

Download ZIP archive for your blender version:

Blender 3.0

Blender 3.1

In Blender preferences:

  • remove older version if needed
  • install addon from Preferences > Add-ons > Install...
  • activate the addon

Features

  • Choose X and Y cells number
  • Set cell size
  • Choose an orientation and this level of influence on the result
  • Add wall, height and thickness
  • Add corner, radius and number of segments
  • Add exits, create random entry and exit
  • Update maze after this creation, wall, corner and exits
  • Save maze in plein text
  • Resolve maze

Exemples

In Object Mode NX_Labyrinthe is located in the Sidebar (N) > NX_Tools

Create maze

initial_ui

For your first try start with a little number of cells (under 10 or 15).
Set a size of cell. The final length of the maze depends of this 2 options.
Set wall height and thickness or let empty to generate only edges.
To creae Entrance and Exit, select Exits

Press Create Labyrinthe to generate maze in your scene

Maze of 15x15 cells, with wall height and thickness:

maze_15x15

Maze corner with Radius set to 0.05 and Segments to 4:

maze_corner

Update maze

The maze must be recreated if you want to change the number of cells or the Orientation.
In this case, click on New maze to generate a new maze with these settings. For the other options, Cell Size, Wall, Corner and Exits, you can update the current maze without changing it.

About the number of cells

As the addon uses Geometry Node to remove the edges and create the final maze, there seems to be a limit beyond which it's really hard and extremely slow to go!
I guess it depends on the hardware capabilities of the PC.
The best result I can get with my laptop and its 16 GB of RAM (16 GB more with the Swap partition...) was a maze of 100x100 cells. If your archieve a better result I will very happy to see that! ๐Ÿ™‚

maze_100_100

More about maze algorithm in Python

The initial code was found on this site (https://allophysique.com), in this article : Python Labyrinthe

A big thank to this anonymous author!

Footnotes

  1. "A perfect maze is a maze where any two cells can be joined by a unique path" (Labirinthe.pdf) โ†ฉ

blender_maze's People

Contributors

franck-demongin 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.