Learn How to Make Procedural Building Generator in Houdini

Andrew Guan explained how he created his building generator, discussed his experience with Houdini, and shared some tips for beginner artists.

Introduction

Hey! I’m Andrew, a modeling artist based in Canada. I’ve been working in the industry since 2018, primarily in children’s animation with stints at studios like Bardel Entertainment and Mainframe Studios. Some shows I worked on are Remy and Boo, Unicorn Academy, and most recently the Sausage Party show coming out on Amazon Video. The last one is a bit of a departure, but I’m most passionate about contributing to enriching and uplifting stories for youth and young adults. I just want to be the annoying uncle bragging about working all of my niece’s future favorite movies and shows!

Houdini

I started playing around with Houdini over the summer under the guidance of my amazing mentor Fiona Wong. Over these past few months, she’s been my main Houdini resource, drip-feeding me spoonfuls of Pure Knowledge to piece my project together. Initially, my intention wasn’t to dive deeply into Houdini; it started mostly as a means to an end to make my environment workflow more efficient and to explore stages of the pipeline I don’t touch in my day-to-day such as foliage and FX. But with her help, guidance, and saintly patience, things have been coming together very promisingly!

Anyone working in children’s media will tell you that episodic work doesn’t land you feature work, and since my portfolio over the past couple of years has just mainly been tiny evening or weekend sketches/studies, I really wanted to push the envelope of what I could create now that I had so much time freed up. I had taken a year off from work to do a bit of skill development (which in hindsight lined up really well with the strikes) and I wanted to create a stupidly ambitious project that would make that time worthwhile– one with pigs in it.

Surprisingly, I really enjoyed the fluidity of working within Houdini and I ended up migrating my entire project from Maya into Houdini to explore more about the Solaris/USD workflow. It was daunting at first and there was definitely a huge learning curve (even now I’d hardly call myself proficient), but it’s been such a rewarding experience and I couldn’t recommend it enough. 

Building Generator

The building generator is a very good example of a simple idea snowballing thanks to feature creep and fun. My needs were originally actually quite simple- I just needed three or four traditional Chinese-style buildings to line up a street behind some bigger hero buildings to fill up a shot, nothing fancy. But thanks to the dopamine hits from troubleshooting problems and just generally really liking the workflow in Houdini, I kept on adding features to try and better control the art direction I’d want down the line. I think realistically other than showcasing the generator as a demo, most of the functionalities wouldn't really be used in my main scene as the buildings I actually need are relatively small and modest. It was hilarious rendering out the super long building in my demo though!

Demo scene mocked up for the generator, the camera never gets this close but the buildings were needed to create a busy street atmosphere in the background

I think people who are comfortable with Houdini would actually find that my project is relatively straightforward. At its core, I’m simply creating a box that has controls on its dimensions, and I’m assigning attributes to its faces to control what subnets are applied where. For the most part, it’s essentially layers and layers of assets scattering to specific points. 

For me though, as it was my first actual project in Houdini it was definitely a challenge from start to end. Coming from a regular Maya sub-d workflow background, planning the interactions between subnets was probably the most challenging aspect and I definitely slammed my head against my desk more than once or twice. It seems like there are a lot of ways to do the same things in Houdini, and I had the fortune of running headfirst into a lot of methods that… didn’t quite work well with each other.

For instance, placing windows that sit on the building would simply be scattering geometry to a point. Placing windows that are inset into the building would be another level of complexity as then you’re dealing with both how the window geometry gets scattered as well as adjusting the wall to have the extrusion going in. After that, if I add random rotations to my windows, I would have to figure out a way to apply the same random rotation of the window to the inset in the wall. Next, looking at the real world, if I had multiple window style variations, adjacent windows should share the same style. Adding another layer of complexity to that, if I had multiple variations for each window style I would then need to apply two different types of randomization: one for the window style, and one for the variant.

Once that’s done, logistically if I had a balcony then every balcony should have at least one door. Lastly, from an aesthetic standpoint, I needed enough size/shape variation between options to make sure that not everything looked the same, and if an asset type was large enough, it had to overwrite its neighbors instead of having assets crash. Thinking about these requirements individually, they seem relatively reasonable to do, but making sure they all interact and behave together properly was a lot of trial and error, and approaching things one step at a time. 

Windows and doors all have a slight random rotation, and the holes had to align

Building the generator, I had to work big to small, implementing the main structures first before slowly introducing subnets that allowed me to control and break the silhouette. Conversely, thinking of the systems and what relies on what, I had to work backward determining what I wanted, figuring out what systems it would rely on, and then all the steps in between. It started out incredibly barebone without any fancy geometry, just with color-coded geometry to check things were randomizing properly. Once the building itself was capable of being procedural, all the fancy schmancy components were just different applications of scattering geometry to points.

Started from the bottom, now we are here

Parameters

I’ve been very lucky with my approach to this project and in a lot of ways I managed to side-step the elephant in the room which is dealing with UVs. My current workflow is to prep the UVs for pre-modeled assets prior to import, do a quick unwrap at the start of the pipe for the assets I do build in Houdini, and for anything where it fails, I have the luxury of just using a triplanar workflow as these buildings are background assets. 

In the end, my generator’s functionalities are:

  • Adjustable width, depth, and height
  • Selectable wall styles for each floor individually
  • Option to toggle between just windows or balconies for each floor individually
  • Mix of selectable and randomized window styles
  • Toggle for a brick overlay
  • Slider to control the wear and tear of the roof shingles
  • Multiple styles for the main roof
  • Bend controls for each roof individually, including range/intensity of bend, and weighting on both sides
  • Exposed lattice controls to deform the roof and main building independently
  • Randomized prop scatters for each floor
  • Randomized lantern scatter for each floor
  • Randomized door seed, with a second door being introduced beyond 5 units wide
  • Shrink and stretch controls for the roof, adjustable in both height and width

There’s a part of me that wants to just keep adding functionality to this building since it’s really fun to work on, but in the end, it’s such an insignificant part of the whole scene that it’d be a matter of diminishing returns. Though knowing me, you might see a V2 or a V3 down the line!

I’ve been working on this tool on and off for the past couple of months and it’s actually still not done! Or rather, it’s still not complete. The main part of this project is the environment reel/animated short so until I’m through building assets for it and have all the shape language and design finalized and set in stone, this tool will basically be susceptible to any changes I make. 

I actually tweaked a lot between iterations. Earlier on, I got so preoccupied with implementing functions and getting things to work that I didn’t notice I was straying away from real-world references. Even though I knew I was heading in a stylized direction, I was starting to lose a lot of the iconic elements to the language I needed. An example would be the tiling on the roof. The specific look I needed was the shingles being stacked linearly, with longer shingles running in between. However, when building the system, I wasn’t careful enough and originally set up the shingles to be staggered. Beyond that, it was mostly trying to force myself to think beyond a linear A to B mindset, think outside of the box, and think of creative solutions to problems.

Earlier render test

My favorite solution was using the weighting on my scatter randomization to inversely affect clean versus damaged shingles! I set one to match my controller, while the other was the inverse and it worked great as a quick solution if I ever needed to play around with damage.

When you have a broken sense of humor

Tips for Artists

If you’re thinking of learning Houdini, just do it! I haven’t used it for very long, but (other than the cook times) it’s genuinely the most fun software package I’ve ever used. I think it feels a bit like Minecraft in a way. 

Even before I got more comfortable and familiar with nodes and functions that exist, I was able to do similar things sheerly by throwing things at the wall until they stuck. It’s just so fluid, adaptable, and quick that even if you don’t know the best way, there’s usually still a way. 

If you ask someone who knows and uses Houdini professionally, they’ll probably give you very solid advice about learning the fundamentals of VEX, VOP, and familiarizing yourself with the specific contexts that you’ll be using for your discipline. 

I’ve been recommended SideFX’s beginner tutorials (which are great), CG Wiki, Adrien Lambert, and Nine Between.

Prop scattering generating dates

Personally, I’m not the sharpest tool in the shed and I learn the most when my systems don’t work the way I expect them to. The process of understanding the outcome, thinking more thoroughly about the desired outcome, and troubleshooting (and understanding) what it takes to make that happen are when I start to understand concepts more deeply. 

All that aside, I genuinely think the most important thing is to just have fun! I loved doing goofy things and just seeing how they would turn out.

Andrew Guan, Modeling Artist

Interview conducted by Arti Burton

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more