Procedural Generation - Study

Hi all!

Im feeling kind of shy to post stuff in here to be honest, my name is Gregorio Montesinos, im a web fronted developer at day and a lvl 0 ninja coder at night, im trying to develop a tool to help on the creation of buildings, roads and scenery in a procedural way, similar to how houdini handle stuff but inside the engine, being able to add static meshes to procedural meshes and let calculation do the rest for you with parameters, holes for windows and doors, details of the building or even use spline mesh components to create and handle more details, i still need to work a lot on this as is an early prototype and im just creating it to learn more about programing and UE4 of course.

Ill try to use this post to share with you my work with this, if you have any question about it just ask.

This is the main voronoi graph structure, green big lines are the base cells inside of there is a second pass, im going to use three passes as it seem the best way to get the shape that im looking for. Its a component based on SplineComponent but its a graph, so it can hold outgoing and incoming vertices, intersections and stuff like that.

Here you can see one cell only, triangulated and converted into procedural mesh component, im just using the borders with an equidistance so you can see the second pass, there is no random factor in the points that i generate here so the voronoi its a perfect grid.

The same but with some randomness on the cells

Every cell is an actor attached to the main object and i have some parameters to tweak them, but as this is just an early prototype its kind of ugly.

Moar cells

I hope you like this :slight_smile:
Regards and sorry for my english!
gOroº

ooooo this is awesome!

I think procedural stuff is going to be very important as games get bigger, since it’s getting harder and harder to make good details. This stuff helps so much.

Good Luck on this! :smiley:

cool
procedural is the best way for stuff like this :slight_smile:

one thing I’d recommend as you’re developing this is to drop the voronoi - it’s tempting to use it because it makes randomish shapes but it’s very quickly identifiable…and as you make road intersections you’ll be dealing with weird angles etc
I’d start with just a grid plan and work out the major features - it’s simple and in the end you’ll get a system that produces a usable set of assets, then move on to other shapes… voronoi, user defined etc

Heey!

Thats totally right, but i dont care about the shapes and the angles right now, my main focus is the graph, a cell with another voronoi inside for example is not a big issue at all but once you start to share edges and stuff like that everything becomes a mess and i want to focus on a nice graph structure to move forward, since all the process that i want to implement are in separate actors that they act as a single actors or child actors with different behaviors, so i can work on different parts of the project without caring about others.

I can use 0 randomness on the cells to get the grid that you are talking about, so ill probably do that, because it can be easier to find issues if everything its grid based.

btw my idea with all of this is to share all the code but i dont want to share a ****** stuff, so once i get to the point that i want im going to start it again in a cleaner way.

Thanks guys!

PD: Since im using boost graph with bundle properties, is there a way to use the graph that UE4 comes with to do this kind of stuff? just guessing btw

Wow that’s awesome Sr., keep up with the hard work!

I did something similar to this, as it’s the workflow I’ve used in Houdini for city generation. (I’m aware of Houdini engine, but I don’t like the rebuild lag, I’d rather adjust sliders in Houdini and export an obj or fbx). Nice work.