This will be a brief breakdown of my experiments with making a rough roof generator to be used at the grey-boxing stage of a game project I'm working on with my partner Maito Jobbe-Duval. She's an art director with an art and theatre background and has designed lots of spaces for the theatre company Punchdrunk. Our collaboration is, at this stage, intended as way for the two of us to expand our portfolio, she in Level design and Art Direction, me in Programming and Technical Art, and for the two of us to hopefully get a demo together to publish and have something out there in the world. More about the specifics of the game in future posts but for now, rooves, roofs, whatever...
The asset is designed to be used at the blockout/greyboxing stages in the Unreal Engine, a key scene in the game plays out on the rooftops and our game is top-down view so I thought it would be a good thing to have at this stage to do some rough play tests and to help generate some concept art.
Generating 'Hip-rooves' seems to be a bit better documented than generating the gable roof that is more prevalent in the architecture in our game. This resource "Procedural Venice" was great to read through. To some extent the gable roof is much simpler but I found a few challenges thrown up when trying to use irregular shaped building blocks and bevelled corners.
I started off using Blender and Geometry Nodes as I've really enjoyed using it recently on the project for Shezad Dawood. I had intended to use the Altermesh plugin for unreal after having a very brief experiment with it - and it does seem great - however I've switched to Houdini, mainly because it supports Unreal's brushes system and not just Static Meshes (like Altermesh), and we're keen to do the block out in Unreal as far as possible at this stage.
Then I'm adding a new plane, bisected along the apex and using the original "Top Plane" geo extruded and a boolean op to create this which will become the roof.
Then I'm extruding the apex of the roof based on the new geometry's proximity to the apex edge.
In it's current iteration it has some limitations, none-parallel edges generate irregular none-flat roof planes and I'd also like to be able to offset the apex along it's opposite axis
It's a little tricky to negotiate the feature list of this, what is necessary and what is just a nice to have?
This is as far as I got with geometry nodes before switching to Houdini which I think makes sense to have in a separate post...