Hello,
Recently I’ve been learning geometry nodes with the goal to create some tools for myself that would aid me in my work (environment design and concept art mostly). So I decided to put into practice what I learned so far and share the journey in hopes of learning something new and maybe helping other people by sharing the process with some insights that I have. So, I will describe the main idea and plan below.
Here are my experiments with the city generator built from scratch in geometry nodes.
Main goals and modules:
- Create a general proof of concept system:
a) Create main layout from the provided base plane mesh:- edges are main roads (created by insetting the initial mesh faces by a specified offset)
- set-up further divides the inset faces into smaller city blocks until they reach a specific size and
parcel to building floor area ratio (I can specify those parametricly). I chose the repeat and for
each element zone for this, it is not the fastest but allowed me to do the division recursively.
Maybe there is a simpler and better way of doing it, but I couldn’t come up with anything other. - the new city blocks are inset so between them are created new, narrower roads, which adds a
nice real world hierarchy to the road system I think - label the output city blocks (mesh islands) and put them into categories (medium, small, non
built) - the medium blocks will have buildings on their borders and in interiors, small only on the
borders. Non built - are edge cases that have weird shape or are too small and would lead to
weird behavior later on.
b) Basic buildings outlines creation:
- Convert the created city blocks into curves, offset their start and end points so that they are not
on the corners of the curves
- Subdivide those curves into random length that is a multiplication of the module width (for
example 3m). It will allow me to later on extrude the base of the building to create proxy mesh
for instancing designed and modeled in 3d kitbash facade elements.
- For each curve create building ID for later - Duplicate and offset the curves by the specified
building depth distance with some random variance, label them respectively front and back by
adding named attributes (booleans)
- Create and set position of side curves - add labels
In this way I can have pretty well defined all sides of the buildings that will later on help me instancing different elements on them depending on their orientation. Easier and more reliable than using normal comparison in my opinion.
c) Inside buildings:
- by subdividing parcels labeled as “medium” I can later on use basic shortest edge path set up
to create selections for the interior buildings
- I mark those edges for later with a named attribute
d) Create proxy meshes with the random floor number per building and a procedural rooftop:
pretty straight forward I think, but again I used a repeat zones and for each element zones for the
extrusion. The problem is - now they are nested withing groups within groups and that is pretty
heavy and slows down the whole set up. Maybe there is a faster and less computation intensive
way of doing it, but for the life of me I couldn’t come up with anything that would work on per
building scenario. It was important, because in this way I can also create procedural rooftops for
each building and place it at a proper height. Also I can specify different heights for different
buildings (for example buildings on the main wide roads can be bigger, while the rest can have
different height etc.) and add ID for textures or kitbash models to instance on faces of proxy mesh.
So this is the current stage of the whole project. Next I think I will try and work on optimizing it and test in edge case scenarios. Then divide it into a couple of smaller geometry nodes set ups responsible for each stage in more detail. In that way I possibly will have more creative control over each city block and buildings in it. After all I do not want the tool to dictate my designs (I hope haha).










































































