Home 3D Art Showcase & Critiques

Semi-Procedural Dungeon Generation - Deusira

polycounter lvl 6
Offline / Send Message
Ali_Youssef polycounter lvl 6

My friend and I have decided to start working on a little game project called Deusira during our last year at uni, and we’d like to start showing off some of the procedural generation that we’ve done so far.


The game will be a first-person dungeon-crawler, that’s why we decided not to make the dungeon completely procedural (hence the “semi-procedural” in the title), that will allow us to add more detail and architecture variation manually.


The generator works by creating room “bases”, which will give the main shape of the room by placing architecture placeholder modules and spawning volumes manually, the modules then change their meshes and textures randomly, this gives me (the artist) more freedom for creating the rooms than writing rules for their generation.

I can then add and remove “possible” sections of the room, I’ll go more into detail on this a bit later.


The method obviously has its weaknesses, but we felt that it serves our needs perfectly, which is give enough variation that the rooms don’t feel too repeated, and at the same time give enough control to make the rooms interesting, which is a hard balance to nail.

After the rooms get randomized, we spawn them via a dungeon-room-spawning-algorithm-thing blueprint (you can probably tell I’m not the one who did this part).

Here’s what the room spawning looks like:




The way this works is, I place an architecture piece on the level, (which is actually a blueprint actor), and I have quite a bit of parameters to play around with.

Most importantly, I can choose which meshes this actor can be, the probability of each mesh, whether the mesh can be deleted, the probability of its deletion, whether it depends on any other mesh (if the other mesh gets deleted, so does this one), incompatibility with other meshes (if the other mesh exists, this one won’t).
We categorize all the placed meshes via seeds (seeds for spawning, deleting, and incompatibility), to treat them as groups, rather than individual modules.
For example if I have 3 sections of different columns, I want all the columns in each section to be of the same type, but each with a different variation for their damage level, texture, rotation etc..

Here’s a fly-through in the same room with different variations, which shows how much it changes with each iteration:



Obviously, the assets and the lighting are still extremely WIP and so are the rooms, I’ll be adding more interesting rooms, I think you can see here that most rooms are square-ish, and of course once we add some props and more vfx they won’t look as empty.


We also made a foliage generator (also not done, but what the hell I’ll show what I want), I’ve always wanted to procedurally place foliage (grass) based on texture information.

We didn’t quite do that, but the result is pretty much what I had in mind, basically spawn grass in tile cracks and around cobblestone.



What I did was place splines on the floor modules and then the programmer did some magic and it spawns grass now.

But of course we can’t spawn the grass randomly, as in one tile has grass and the other one doesn’t.

Our generator generates spheres randomly in the room, the radius of which determines the size and density of the grass meshes, which gives a natural “reproduction” of the foliage. In other words, the further the single grass instance is from the sphere center, the smaller its size is, and the less number of instances will be spawned.




I’ll be adding some more meshes here and there, and we’ll be upgrading the generator to include ivy on the walls and so on.


And finally, I’ll talk a little about the lighting.

Through testing we discovered that changing the position of a single torch alone will dramatically change the feel of the room, and the more the light is blocked (dynamically-changing walls), the more different the rooms feel, with absolutely minimal actual changes.

You can see what I mean here



The room is recognizable immediately by the arch right in the middle of it, but change the lit torch positions randomly, and cover some of the light with columns and walls, and it’ll just “feel” a bit different with each variation.

Currently we only have warm and cool torch colours, what we actually have in mind is to change the light (and colour) dynamically for gameplay purposes, for the idea that the rooms will feel more dynamic and alive. Hopefully we’ll share some of those ideas soon.



We do have a prop spawner blueprint as well, but we’d like to polish it up a bit before showcasing that. also we have about 0 prop models ready, but that’s not the point.

We hope to make this thread a dev diary once the project picks up pace, so stay tuned if you’re interested, we’d absolutely love your attention and feedback !

Thanks guys, love this community.
Also, sorry for breaking the "More art, less words" mantra.

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    This is great, there's loads of potential as a tool for increasing productivity as well as it being a procedural level generator. 

    I prototyped something similar myself (think space hulk) but got distracted by building a tool for scene export so I could make the room tiles in proper software and then started mucking around with A.I so it's nice to see someone take it a bit further.. 


  • Ali_Youssef
    Options
    Offline / Send Message
    Ali_Youssef polycounter lvl 6
    Thank you !
    It does indeed save some time, however I've found out that I tend to be a bit of a feature creep, especially when someone else is coding the tool. (I think that's apparent by how unnecessary the foliage is at this point of development).

    We'll hopefully still be adding to it, especially with filling up the rooms with stuff, so I hope it'll get more useful exponentially, right now it only looks like a mesh randomizer (which it kind of is), but I feel like I kind of underused it doing this showcase tbh..
Sign In or Register to comment.