Jump to content
Sign in to follow this  

[PYTHON] Maze Based Road Generator

Recommended Posts

Hi All,


I have my first success with generating objects using Python in Houdini and I thought I post a couple of images. The concept is that an ASCII based maze is generated internally with gaps and walls. The code converts gaps into roads and walls into grass. At each step in the maze neighbors are examined and a different tile type is used that fits requirement for that space in the maze.





Top View:



Camera View:



The Basic Tile Set: pieces that make up the final image.


Edited by Atom
  • Like 1

Share this post

Link to post
Share on other sites

I have added a simple python based maze solver to the road generator. The solution acts as "high" roads. The path along the solution ares the elevated road segments. There is some logic in place to detect when a hill or ramp is needed to connect to the other low road segments. I have pulled in some more of eRacoon's tiles to support the new features.





Camera Views:


The branch rate parameter for the generation algorithm controls how straight or curvy the resulting maze ends up. The usable range is in the value of -10 to 10.


Maze Branch Rate: 2



Maze Branch Rate: -6



Maze Branch Rate: 6



Revised Tile Set:


Edited by Atom

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this