Geometry Nodes Stylized Town Generator

Hi everyone.
I decided to jump into the geometry nodes hype :10cubes: :smiley:.
The theme is so vast and I’m just started learning. Greatly inspired by the great post by @sozap (Buildings and streets with some geometry nodes), that gave me the hint to understand it.

I’ve always liked to make repetitive architectural illustrations. For instance, in 2020 made this fantasy cubic city all by hand in 2.79 Blender version (no arrays, no geometry nodes, manual placement and duplication):

But now we have powerful geometry nodes. What about give it a try?
Soooo. The next is my third aproach to achieve some sort of a “decent town maker”. :thinking:

Disclaimer: this is not a tutorial

The idea is, through simple mesh (i.e. just an edge) you can model the side of a street.
First I modelled some housies, doors and windows. Super simple models to experiment. Housies have two shaders with random colorRamp nodes, one for facades, other for roofs.

Next, with the base model (some random mesh edges that gives the borders of street facades) I started the geometry nodes by moving those edges in Z -0.5, an Extrude Mesh same edges 1 meter tall.

After that, I placed points at the center of the generated faces through Mesh to Points, capturing their vector to later align instances to normals.

Next I placed Instance on Points aligned to faces. I instanced the full housies collection, making random selection of individual instances.

Next, using same center faces points and face normals, I randomly places instances of the doors collection, reducing creation probability to 80%, and randomizing its scale.

Next on, I Realize Instances and Separate Geometry in order to obtain faces where to distribute windows (selection where made through facade shader). I then Split Edges and Scale Elements.

The I “Distribute Points on Faces” and “Instance on Points” elements from “windows” collection, aligning them to faces’ normals. (I’m sure there’s a simplier, cleaner, neater method to do this).

Next on, I made another face selection (housies roofs’) with “Separate Geometry”, overscale them with “Scale Elements” and the “Extrude Mesh” to give the more roof apparence.

Finally I joined everything with “Join Geometry”.

Here’s some Eevee renders:

Tool in action:

townmaker1

:grin: :sunglasses:
So far so good, I think (for someone who’s never been into geometry nodes).


So what’s next? :thinking:

  • Improve workflow.
  • Improve window placement (maybe through specific face selection)
  • Make more complex models
  • Shaders
  • A street generator tool for this kind of model (that maybe can place fountains/benches/stairs/etc)

Please let me know what you think.
Thanks for viewing! :metal:

13 Likes

Really cool! Thanks for sharing your progress. Reminds me of the little towns from Francisco Fonseca

1 Like

Thanks, Dan! Oh, yeah, you’re right! I really love Franscisco’s art!

Hi everyone. I made some progress on the town generator project.
Here’s an update.


Some progress:

  1. I re-modelled the houses, and made some materials for separate geometry (1st floor, 2nd, floor, attic, roofs, door location, etc.)
  2. I re-modelled the doors and made 4 different types in the collection (but for some reason wich I don’t understand, instead of show randomly one of those models, it only show the first one).
  3. I re-modelled the windows and made 6 different types and sizes in the collection (some for the 1st and 2nd floors, and some for the attic, wich I select with a Random Value in the Instance on Points node).

The houses are generated randomly from a Instance on Points node.

From those houses’ geometry, I select faces from facade.door material. Separate edges, get the lower one with position attribute and place door instances.

For the windows, I select “1st” and “2nd floor” wall faces from materials, and place the first 3 windows models from the collection, aligned to the normal faces.

Lastly, I place the 3 last window models from the collection in the “attic” wall faces, the same method.

And that’s it. I generate the town extruding edges from a simple geometry.


Here some simple renders.

townmaker2


I still need to resolve why doors won’t place randomly from the collection.
Need to work on street design and the materials.
Also some good scene and renders.

Thanks for viewing.
Feedback will be much appreciated.

1 Like

“I still need to resolve why doors won’t place randomly from the collection.”

Looks like there’s no random value node in the doors generator node group:

Edit: nevermind, you’ve correctly connected random value node to the instance index. Not sure why that doesn’t work.

1 Like

:sweat_smile: I distribute the doors using a material named “facade.door”. But it’s only one face in the house model. If I use other faces selection it does indeed make a random door model selection.