Procedural Building Generation

Hey all,

I’ve created a procedural building generation algorithm for Rebirth, focused entirely on Unity’s strengths of visually creating things. This works perfectly for my project and I created it deliberately to be separate from my codebase to make distributing it a little easier.

I don’t have a video to show yet, but I’m planning on making one for a devblog this weekend, I’ll update this post with it once I do. I just wanted to get an idea if other people would be interested in this at all.

Essentially the way it works right now is this:

  1. You create your prefab rooms and corridors, keeping a few rules in mind and toggle some checkboxes for options. Things like the facing, whether its an entrance or not. (for example to mark the front door of a building). I’d go over that in a tutorial
  2. You create an empty game object and attach a script to it.
  3. You drag and drop the prefab rooms and corridors into it. Full of whatever props, scripts, game objects, etc, that you may want.
  4. You specify the maximum number of rooms to create for that building.

Once you launch the game, that empty object will be the center for the building. Then the asset takes care of using your prefabs to create a building that is connected together.

The beauty of this approach is that it is artist friendly, requires no tweaking of code at all. There’s is a small workflow to learn to get the buildings to look right, but its something that can be easily taught in a video.

Would people be interested in something like this? Is it worth it for me to package it up for the asset store?

Absolutely interested! I have been looking for this exact asset. Count me in!

sounds good to me :stuck_out_tongue:

Thanks for the feedback :slight_smile:

I’m still working on this as I found a couple of things I needed to fix over the weekend. I’m thinking the first version will be a bit rough around the edges, but this is the sort of project that will only grow over time. Since I’m using it for my own game, I plan on updating it as I need to for my own purposes. One of the things I was thinking about was improving the workflow, though what I’m likely to do is release it, then get feedback about how to best improve the workflow, and go from there. That way I have a big range of suggestions to work with.

I’m setting a deadline for myself to get the video out this week. I have it working ok now, as far as I can see. There’s still a lot of features I want to implement to make this thing into a beast, but the basic idea is working, now I’m just trying to pretty up my demo rooms for Rebirth so I can show a video that looks a little more appealing.

After that I’ll probably tweak the system a bit more (make it more random) and then release along with a tutorial video.

So I finally managed to make a quick video of some example buildings generated for Rebirth. Here’s a video showing (badly) the system in action.

Essentially the reason things are repeated in the video is because I haven’t created enough variations for each room/hallway. However this should at least give you an idea of how it works.

Is anyone still interested in this?

I think many of us are waiting to see exactly how it works. PCG is a pretty expansive subject, and simply saying that your tool does it is simple. How much of it is does, and how well it does it, is the question.

By your own admittance, the video above doesn’t show off the system well. So it’s really hard for us to judge it yet.

Correct. Not to be a downer - I am actually trying to come up with my own procedural building generator - but your video is showing your game project and what it is about. It is not showing your generator in action :slight_smile:
So if you actually happen to have a building generator up your sleeves I might be interested (though, from what I see, your buildings are meant for first-person and third-person games - not what mine will be used for).

The generator would work for pretty much any kind of buildings you want, first, third, or even RTS, and could actually be used to create all sorts of other things procedurally if you spend the time on it. You saw FPS usage of it because that’s what I need for my project but the way the system works it can be manipulated to work for different use cases, I believe.

The only thing missing in the video is variation which like I mention in it, is caused by lack of assets on my end. For my game project its time consuming to create a bunch of new assets just to show off variations, that isn’t what I do.

If people need more proof of the possibility for many variations and combinations though, that’s easy, but it won’t be flashy. I can just put together a bunch of differently textured planes. Is that enough, or is more needed?

The workflow of how it works is described in the OP.

To me exactly that would be the most interesting part to see. The workflow of assemling all the pieces inside the editor. Don’t know about the others, though.

Sure, I’ll see what I can do about putting a quick video together for that. It may be useful to my artists as well so I don’t mind.

Actually, I’d like to use this generator for my BottleCity game. Can you put it somewhere? Asset Store, this thread, for me no difference. If you don’t want to share it with world, you can even PM me. I badly need tool like this, as I suck at buildings (other things like furniture, etc. I can do fine) and all generators I’ve found are either paid or for 3ds Max.

//edit: Can your generator make multifloor buildings? Because I saw only one floor ones in the video…

Darkhog:

Multifloor buildings are one of the requirements for my game, so I’m tackling them eventually. Haven’t tried then yet, but the way the system works really should make them no different from single level ones.

I’m still improving the workflow for this so it won’t go on the asset store yet. Once I feel ok with the workflow, I might put it on there if people are really interested in it.

Of course people will be interested. They wouldn’t have to worry so much about making each building by hand, only do some preset rooms and that’s all. Also it would mean more income for you, should you make it paid resource.

Hey Rico,

Are you still working on putting this out on the Asset store? I’m interested