Products › BaseNode Packs › Modeling Tools › Tutorial: The refuge

The refuge

A radio relay hut on a mountain pass: a steel box on a concrete plinth, a window, a door, vents, a hipped roof with a mast, a round hatch, grooves. It starts as a box, and every step is one modelling tool more, in Geometry Nodes.

An orange steel hut on a concrete plinth: a dark window, a grey door outlined by a groove, nine square vents, a round white hatch, a groove under the eaves, a dark hipped roof with a pale fascia and a mast
Where we are going. Seven steps, each one a few lines more.

You will learn

Before you start

You need Blender 5, the Base Node add-on, and the Modeling Tools pack: it carries the three modules this tutorial uses. The steps are free to read and copy; the modules are not, and without the pack a step does not build.

ModuleWhat it givesWhat it stores
poly_bevelpoly_bevel: every edge of a closed mesh bevelled. chamfer_corners: the selected points cut off.bevel_face, bevel_edge, bevel_corner; chamfer_corner
poly_extrudepoly_extrude: faces inset, then pushed along their normals, one by one or as regions, turned, tapered.poly_front, poly_side, poly_layer
modelingboolean_cut: a mesh cut by another. panel_lines: a groove along edges. poly_solidify, not used here.bool_cut, bool_seam; panel_groove

This page assumes you have read Lunar ground, or know the basics of a .bn file: a graph, its nodes as calls, fields. Every block below is a complete .bn file, its code beside the nodes it builds. Two ways to try a step:

The pictures are rendered from these exact files by render.py.

Tools that leave notes

In a modelling package you select faces by hand, then run a tool on them. Geometry Nodes has no hand: a selection is a field, a rule that says yes or no for each face. Writing that rule is easy for the box (“the faces that look forward”), hard for what a tool just made (“the faces the last extrusion pushed out”).

So each tool of the pack writes it down. poly_extrude marks the faces it pushed out poly_front, and the faces of the walls it raised poly_side. The next tool reads poly_front back and works on those faces. That is the whole tutorial, seven times. The notes stay on the mesh until you remove them: a tool adds its own and keeps the ones before.

1. A box on a plinth

Two Cubes. The plinth is a plain slab. The box gets vertices: 13 along X, 9 along Y, 11 along Z, so its faces are 25 cm apart. A window will be a region of these faces, a vent one face: the grid is where the openings can go.

step1_box.bn: refuge, refuge_paint

An orange box on a grey concrete slab
Step 1. A box, a slab, sharp edges.

2. Edges and corners

Nothing made of steel has a sharp edge. One line, |> poly_bevel(width: 0.06), cuts every edge of the box 6 cm wide; another, |> chamfer_corners(width: 0.12), cuts the eight corners off the plinth.

step2_bevel.bn: refuge, refuge_paint

poly_bevel works face by face: it shrinks each face of the box by width, lays a strip along each edge between two faces, and closes each corner with a patch. Then it marks them: bevel_face on the faces, bevel_edge on the strips, bevel_corner on the patches.

For this one picture, the material paints the strips and the patches pale, so you can see them. The flat edges between two faces of the grid are bevelled too: they stay flat and you never see them, except here. What is left orange is bevel_face, the 25 cm faces, smaller now. Step 4 uses them.

The box covered in a pale grid, orange squares between the lines, its edges chamfered; the slab under it with its corners cut off
Step 2. The strips and the patches of poly_bevel, shown pale. The plinth has lost its corners.

3. A window and a door

Two calls to poly_extrude on the front wall. Each insets a region of faces from its border and pushes it in: a negative distance goes into the wall.

step3_openings.bn: refuge, refuge_paint

  1. The selection. n.y < -0.99 keeps the faces that look forward, along −Y. The bounds on p.x and p.z keep a rectangle of them.
  2. A region. individual: false takes the selected faces as one piece: the window is 4 × 4 faces with the strips between them, inset 8 cm from the border of the piece, not each face from its own.
  3. The note. front reads poly_front, the faces the extrusion pushed in: the glass. StoreNamedAttribute keeps it as glass.
  4. A clean slate. RemoveNamedAttribute takes away every note whose name starts with poly_ (pattern_mode: Wildcard).
  5. The door is the same, 4 × 8 faces, and keeps its front as door.

Why copy poly_front to glass, then remove it? Notes pile up: the door's poly_extrude would keep the window's poly_front and add its own, and door would take the window too. So keep what you need under your own name, then wipe the tools' notes before the next tool whose notes you read.

The bounds sit between a line of the grid and the middle of a face, for instance p.x > -1.2 for a line at −1.25: the strip on the line stays out, the face next to it is in. The material reads glass and door with an Attribute node, the shader's way to read what the geometry stored.

The orange box with a square window of dark glass and a tall grey door, both set into the wall
Step 3. The window is 12 cm deep in the wall, the door 8 cm.

4. Vents, one face at a time

On the right wall, nine vents. The same tool, two differences: individual is left on, so each face is inset and pushed on its own; and the selection reads a note from step 2.

step4_vents.bn: refuge, refuge_paint

Nine small square vents, three by three, in the lower front corner of the right wall
Step 4. Nine faces, nine vents.

Try: take cell and out of grille. The strips and the patches join in: a grille of 25 vents, small and large.

5. A roof, extrusion after extrusion

Three extrusions of the top, each one on the front of the one before. That is where the notes pay: selection: front means “what the last tool pushed out”.

step5_roof.bn: refuge, refuge_paint

  1. The soffit. The top, as a region (n.z > 0.99, and high up, not the sills of the openings). distance: 0.0 pushes it nowhere and taper: 1.1 scales it to 110 %: the new sides are flat, a ledge that overhangs the walls. The notes of the openings and the vents are removed first, as in step 3.
  2. The fascia. That front pushed up 16 cm. Its sides are a band round the roof, kept as fascia. Removing poly_side alone before it keeps the soffit's front to push, and leaves out the soffit's sides.
  3. The roof. That front pushed up 55 cm and scaled to 40 %: four slopes and a flat top, kept as roof, again after removing the sides before it.

The same name, front, gives three different selections. A field is not a value: it is read again by each node that uses it, on the mesh that node is given. Each poly_extrude gets the mesh of the one before, with that one's poly_front: it pushed the whole front of the one before, so that front is now its own.

The mast is a plain Cylinder, standing in the roof; it joins the plinth for its material.

The hut now under a dark hipped roof with a pale band round its edge, a thin mast on top
Step 5. A soffit, a fascia, four slopes: three extrusions of the same top.

Try: on the third extrusion, set taper: 0.0 and distance: 1.0: the flat top shrinks to a point, a pyramid.

6. A boolean hatch

A round hatch in the right wall: a cylinder, laid on its side with half of its depth in the wall, taken away from the hut with boolean_cut.

step6_hatch.bn: refuge, refuge_paint

Blender's Mesh Boolean gives back one mesh and the edges where the two met, but not which faces came from the cutter. boolean_cut does. It marks those faces bool_cut, here the bottom of the hatch and its round wall, and the edges where they meet the hut's own faces bool_seam.

The material reads bool_cut as it is and paints the hatch like the fascia. No copy this time: nothing after it writes bool_cut again.

A round white hatch, sunk into the right wall above the vents
Step 6. The hatch, 64 cm across and 15 cm deep.

7. Grooves

Last tool, panel_lines: a groove 4 cm wide and 3 cm deep along the edges it is given. Its selection gathers three notes:

step7_grooves.bn: refuge, refuge_paint

A groove needs edges that close a panel: a loop, a seam, the border of a region. Where a line stops short, the groove narrows to nothing. panel_lines marks the walls of each groove panel_groove, and the material paints them almost black.

The finished hut: dark grooves round the door, round the hatch, and in two lines round the walls, under the eaves and at the foot
Step 7. The grooves catch shadow; a hut becomes a machine.

The knobs

Every tool has its inputs; the material its colours. A few to start with:

WhereInputWhat it does
refuge_paintpaint, door_color, steel, trimThe colours, on the group node in the material.
refuge_paintglowLight behind the glass. 0 by day.
poly_bevelwidth, segments, profileHow wide the bevel, in how many strips, from flat (0) through round (0.5) to square (1).
poly_extrudedistance, inset, taperHow far each opening goes, how wide its frame, how the roof narrows.
panel_lineswidth, depthThe size of the grooves.

Try: on step 7, set glow of refuge_paint to 4: someone is in. Then set depth of panel_lines to 0.06: the grooves hold more shadow.

To move an opening, change the bounds of its selection; keep them between a line of the grid and the middle of a face. A finer grid, more vertices on the Cube, lets you place them closer.

Take it to Blender

The finished refuge, in one file. Drag the card onto empty space in Blender's 3D Viewport and keep Instantiate the Example: a new object carries refuge. A click on the card downloads the file.

The steps before it, to start again from any of them:

The files, with the script that renders this page's pictures, are in examples/tutorials/refuge/.