CA
  
You are currently viewing the Canada version of the site.
Would you like to switch to your local site?
17 MIN READ TIME

HOUDINI 18.5 AND HOUDINI ENGINE | UNREAL ENGINE 5.0.3

GENERATE A PROCEDURAL MAZE IN HOUDINI

Adapting the disjoint data set algorithm and VEX

WATCH THE VIDEO

https://bit.ly/3Dworld-292

Jingtian Li AUTHOR

A professor at the University of the Incarnate Word specialising in 3D art, rigging, programming, and indie game development. bit.ly/3xL2fhw

Houdini has been gaining increasing popularity in the game industry for its powerful VFX and procedural modelling capabilities. Although learning the software is difficult, the reward is also tremendous. While it is important to learn the nodes and functionalities of this gigantic software, another very important aspect is often overlooked by beginners – data structure and algorithm.

This computer science-related topic might seem alien, but the nature of Houdini is visual scripting; building procedural logic to generate assets is no different from developing a piece of software, and algorithms play a big role in the process. This article introduces a simple yet powerful data structure called disjoint data set. With its ‘find set’ and ‘union set’ operations, a working maze can be quickly generated.

Another powerful tool Houdini provides is VEX, a scripting language to allow quick implementation of a procedure. VEX coding is used heavily in this tutorial to quickly achieve results. Readers are expected to have a basic understanding of the language, as well as the basics of Houdini.

Please note that Houdini Apprentice will not work fully as it disallows the creation of a Houdini digital asset.

DOWNLOAD YOUR RESOURCES For all the assets you need go to https://bit.ly/3Dworld-292

Uniformed sizes A fundamental technique for procedural level generation is to use uniformed sizes. The length, width and height of the pieces should be the same or can be combined to achieve the same size with a bigger piece. This way, it is easy to place structures without worrying about gaps or overlapping. This tutorial uses 200 as the base size.

01 PREPARE THE TESTING ASSETS

Create a set of testing models in Blender first. Here, the models include two walls, two floors, two columns, and some random set dressing assets. Suzanne has been created to represent an object to be placed at the dead ends.

The floors are squares with an edge length of two metres. The wall is two metres tall and two metres long. The columns are two metres high with an arbitrary radius slightly bigger than the thickness of the wall. The other assets are of an arbitrary size. Export them individually as FBX files.

02 C REATE THE CURVE BASE

Make a new file in Houdini, and create a new geometry node. Name it ‘main’. Inside the main geometry node, create a curve node, and name it ‘base_shape’. In the viewport, hit enter, click to add new points, and keep on adding until a floor plane for the maze is established. Make sure to zoom out enough so your floor plane is bigger than the two-metre base size of the assets. Make sure to click on the first point created to close the curve, and a face should appear. This shape marks the outer range of the floor of the maze.

03 FLOOR BOUNDING BOX

Create a Transform node, name it ‘flatten’, and connect base_ shape to it. In the properties panel, set the second slot of the Scale attribute to 0 (scale Y), this should flatten the face. Add a Divide node to triangulate the geometry. Finally, add a Bound node, set the Bounding Type to Rectangle, and name it ‘get_floor_bound’. The resulting geometry should be a flattened bounding box of the floor.

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for $1.39
SUBSCRIBE NOW
30 day trial, then just $13.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
3D World
December 2022
VIEW IN STORE

Other Articles in this Issue


WELCOME
WELCOME
COVER ARTIST Piotr Krynski SOFTWARE Blender, Character Creator,
ARTIST SHOWCASE
The Gallery
The best digital art from the CG community
Technlque focus
Incredible 3D artists take us behind their artwork
Technlque focus
Incredible 3D artists take us behind their artwork
FEATURES
TURNING HAWKINS UPSIDE DOWN
Trevor Hogg gets entangled with the visual effects created by Scanline VFX for Season 4 of Stranger Things
MAKING A REAL BOY
MPC explores what it took to rework a classic Disney animated film in the digital realm
THE PIPELINE
LEARN TO CREATE CHARACTER-DRIVEN IMAGES IN BLENDER
Practical tips and tutorials from pro artists to improve your CG skills
CREATE HIGH-END MOTION GRAPHICS
Discover how to produce impressive 3D motion graphics with director and designer JM Blay
ARTIST Q&A
HOW DO YOU ORGANISE SCENES IN NOMAD SCULPT?
Practical tips and tutorials from pro artists to improve your CG skills
HOW CAN I ADD VOLUMETRIC LIGHTING TO MY SCENE IN BLENDER?
This classroom scene is perfect for volumetric lighting,
STEP BY STEP CREATE VOLUMETRIC LIGHTING EFFECTS
01 SET UP YOUR SCENE Volumetric effects are
HOW DO I USE CRYPTOMATTE PASSES IN NUKE?
Mike Griggs replies It is common to accidentally
STEP BY STEP WORK WITH NUKE’S CRYPTOMATTE NODE
01 GET THE FILES INTO NUKE This tutorial
WHAT’S THE “MAGIC NUMBER” ERROR I GET WITH MY SCRIPTS?
Antony Ward replies There’s nothing more frustrating than
HOW CAN I CREATE ASPHALT MATERIAL USING SUBSTANCE DESIGNER?
Pietro Chiovaro replies I will show you my
THE HUB
What is the future of 3D visualisation?
We explore the increasing popularity of game engines for visualising real and virtual worlds
MultiScatter
PRICE £170/$200 | COMPANY iCube 3D | WEBSITE icube3d.com/multiscatter.html
Forester
PRICE £400/$460 | COMPANY 3DQUAKERS | WEBSITE www.3dquakers.com/forester-for-cinema-4d
Chaos Scatter
PRICE V-Ray with Scatter: £358.80 /annually Corona with Scatter: £240 /annually | COMPANY Chaos | WEBSITE www.chaos.com
Forest
PRICE £234/$330 annually | COMPANY iToo Software | WEBSITE www.itoosoft.com/forestpack
CONCLUSION
There are a plethora of scattering tools available
REVIEWS
SCATTERING TOOLS
The scattering of objects has long been an essential requirement for many 3D artists. We put some of the market leaders through their paces
Arnold 7.1
AUTHOR PROFILE Paul Hatton After graduating with a
Gaea 1.3
FEATURES Combine node for merging terrain Wizard node
Helium 3D Motion Design Plugin
FEATURES Import 3D models Volume render 3D
Cycles X
FEATURES Completely reworked architecture Vastly improved rendering times
FStormRender 1.5
FEATURES FStorm Scatter Scene converter from V-Ray, Corona
Chat
X
Pocketmags Support