Alexandre Bordereau
The great torii of Itsukushima generated by the add-on, half Cycles render, half wireframe

Lab · Blender add-on · Japanese architecture

Torii Generator

Historically accurate torii, built the way shrine carpenters build them. Nineteen documented types, thirteen real gates, procedural materials that age. Nothing invented.

Software
Blender 4.5
Types
19
Real gates
13
Version
0.4.2
Reading
10 min

Most torii you find in 3D are “a red gate”. Real ones are a family of distinct forms, with centuries of written rules: the Edo carpentry manuals give the pillar diameter as a fraction of the span, how far the tie beam projects, the line on which the ends of the top beam fall. A gate at Fushimi Inari is not a gate at Ise, and neither looks like the granite torii of Saga.

I wanted a Blender add-on that encodes those rules, with a single constraint: only torii that exist. Every type, every ratio and every colour points to a source. Whatever no source documents becomes a parameter, flagged as estimated.

Log 01 / 06

Nothing invented 典拠 · Tenkyo

Day 1 · Research

Starting point: zero lines of code, and one constraint. Only torii that exist.

Research came before any geometry: the JAANUS dictionary, Japanese Wikipedia, transcribed Edo carpentry manuals, a 2025 paper from the Architectural Institute of Japan comparing thirty-six Edo and medieval carpentry manuals (木割書), and the conservation report on the great torii of Itsukushima.

Out of it came one sheet per type: kasagi section, whether there is a shimaki, how far the nuki projects, wedges, bases, pillar lean, material. And a table of proportions, each with its source.

19
Historical types, from Shinmei to shime-bashira.
13
Real gates, with their published dimensions.
0
Textures to download: everything is procedural.
  1. 01

    Documented

    Every value taken from a source is listed in the preset, with the source to check it.

  2. 02

    Estimated

    Whatever no source gives becomes an adjustable parameter, flagged as estimated in the panel.

  3. 03

    Disputed

    When sources disagree (Kashima’s shimaki, Hachiman’s end cuts, Ise’s lean), the sheet says so and follows the primary one.

  4. 04

    Dropped

    No source, no feature. Visible pegs, mortar on stone torii, nails on the copper roofing: dropped.

The geometry sweeps 2D profiles along stations: an origin, a frame, a scale, and a shear for oblique cuts. Every vertex keeps its coordinates within the member, along the fibre and across it. The materials will need them for the wood grain.

Ten first torii in grey, in a row
Fig. 01First pass, day 1: ten configurations in Workbench, before the table of types.

Log 02 / 06

The Edo rules 木割 · Kiwari

Day 2 · Proportions

A single number, the span between the pillars. Everything else follows from it.

I rewrote the builder on the kiwari of the Edo manuals. The pillar diameter is 0.11 times the span; the lintels are measured in multiples of that diameter; the nuki projects a third of the span; the kasagi ends fall on a line rising from the nuki ends.

Changing the span resizes every member correctly. Changing the type swaps in that type’s documented features. Every ratio stays a named parameter you can override.

KiwariDefault proportions, S = span
D        = 0.11 S, diameter at the base       匠明
kasagi   = 0.40 D deep, 1.0 D wide            新撰大匠雛形大全
shimaki  = 0.60 D deep
nuki     = 0.80 D × 1/3 D, top at 1.0 S
project. = 1/3 S beyond the pillar axis       五間割
sori     = 0.2 D at the tips
ends     = slope 0.3 from the nuki underside  襷墨
lean     = head moved in by 0.5 D (~2.6°)     半転び
The nineteen torii types in grey, in four rows
Fig. 02The nineteen types at the same span. A solver iterates until the requested height and the end lines agree.
TypeFamilyWhat sets it apartExample
Shinmei 神明Shinmeiround straight kasagi, no shimakiShinmei shrines
Ise 伊勢Shinmeipentagonal kasagi, bare hinokiUji-bashi bridge (2014)
Myōjin 明神Myōjincurved kasagi and shimaki, through nukiMeiji Jingū
Inari 稲荷Myōjinring capital on the pillars, black kasagiFushimi Inari
Ryōbu 両部Myōjinfour bracing postsItsukushima
Sannō 山王Myōjingable on the kasagiHiyoshi Taisha
Mihashira 三柱Specialthree gates on a triangleKonoshima
Seven of the nineteen types. Each sheet carries its real examples and its sources.
Sannō ridge with mitred raftersSannō ridge with crossed raftersv2 · crossedv3 · mitred
Fig. 03The Sannō ridge. v2 crossed the rafters like 千木: wrong. v3 mitres them on the axis, under a short 烏頭.

Log 03 / 06

Wood, paint, bark 素材 · Sozai

Procedural materials

No image textures. Everything is computed in shader nodes, from the geometry.

The materials read what the generator writes on every vertex: its position within the member, a random value per member, later how far the checks have opened. So the hinoki has true 3D growth rings, computed in each member’s own frame.

First version: perfectly parallel lines, a layered look. Fix: the heart of the wood drifts along the fibre, and the ring spacing varies. Cathedral figures on sawn beams, straight grain on turned pillars.

The same torii with straight grainMeiji Jingū torii in hinoki with cathedral figures on the pillarsMetresRelative
Fig. 04Meiji Jingū, 1.2 m pillars. The heart offset was in metres: cathedrals on the pillars. A per-vertex size attribute makes it relative to the member, like the ring drift and waviness.
Paint flaking in plates along the fibrePaint flaking in rectangular patchesv1v2
Fig. 05The flaking. v1: rectangular patches. v2: the film breaks into plates stretched along the fibre, with fine cracks and greyed wood where plates have fallen. No two repaints share the same tint.
v1v3v4v5

Failed: smooth grey, diagonal cracks.

Fig. 06Four of the five bark versions of the Kuroki, the log torii. The failures stay in the devlog.

{ "fr": "Formule", "en": "Formula" }Bark v5
phase = arc / 3 cm + noise(arc · 9, height · 1.6) · 4   // the noise stretches along the trunk
// + a second family of furrows at 1.7 cm, mixed with the first

The weathering masks are shared by every material, from vermilion to granite: rain streaks, ground splash, grime in the cavities, moss on sheltered faces, and a tide line with algae and barnacles for gates standing in water. Four settings per object drive them: age, dirt, moss, tide.

The same torii weathered, flaking paint, grime and moss at the footA new vermilion torii on gravelNewWeathered
Fig. 07Same gate, same light: age, dirt and moss at zero, then at 0.85, 0.8 and 0.55. The materials read those values from each object’s properties: a hundred Fushimi gates cost a single material.

Log 04 / 06

Thirteen real gates 鳥居 · Torii

Presets

Gates that exist, with their published dimensions. The panel says what is documented and what is estimated.

ItsukushimaMeiji JingūHeian JingūFushimi InariIseKashimaKehiKasugaYasukuniŌmiwaKonoshimaNonomiyaGyoen

1875 · Ryōbu, camphor pillars, 16.6 m.

Fig. 08The thirteen presets, rendered by the add-on under the same light and with the same relative framing. From 2.85 m to 32.2 m tall.

Itsukushima comes almost entirely from a 2011 conservation report: pillars from camphor logs, ends painted in yellow ochre (黄土), a cypress-bark roof on the kasagi, and a kasagi and shimaki built as gravel-filled boxes. The roof took two versions: a thin board first, then a real roof, with its overhang, its eave boards and its copper ridge.

Itsukushima roof with overhang and copper ridgeItsukushima roof as a thin boardv1v2
Fig. 09The cypress-bark roof (檜皮葺) on the Itsukushima kasagi, before and after.

The plaques are those of the real gate: sea side “嚴嶋神社”, shrine side “伊都岐島神社”, in the hand of Prince Arisugawa Taruhito in 1875, rehung in 2022 after the restoration (Chūgoku Shimbun).

The 嚴嶋神社 plaque in gilt letters on the vermilion torii
Fig. 10

The plaque text (神額) is a real mesh: a Blender text object converted, one character per line for vertical writing, in the system Mincho font, with thickened strokes, in gilt relief. The gold leaf is laid in 109 mm squares, the traditional 3 寸 6 分, and wears.

v1 had two flaws. The plaque, taller than the opening, sank into the shimaki and hid the first character. And the frame corners were black: stiles and rails overlapped, and grime gathered in what the shader took for a cavity.

The Itsukushima torii standing in the sea, in low sun
Fig. 11Itsukushima in the add-on’s preview scene, “water” ground at 1.8 m. The first attempt was rendered from below the surface: the camera, at eye level, was under water.

Kasuga needed photos. The texts stop at sixteen hinoki planks around a core, bound with iron. The rest I read off two Wikimedia Commons photos: four hoops per pillar, two iron rings where the festival sakaki are raised, a kasagi fully clad in sheet metal, pillar heads capped in metal.

The published dimensions disagree: 6.75 or 7.75 m tall, a 5.2 m span according to travel sites. On frontal photos, the height is about 1.5 times the span and 7 times the diameter. That fits 6.75 m and 98 cm, not 5.2 m: the span becomes 4.5 m, flagged as estimated.

Kasuga torii with proportions measured on photosKasuga torii with lintels too deepKiwariMeasured
Fig. 12Pillars twice as massive as in the manuals: computed as multiples of the diameter, the lintels became huge. Measured again on the photo, using the pillar heads as a gauge.
A tunnel of forty vermilion and black torii
Fig. 13Rows (千本鳥居): count, spacing and disorder, the way donated gates really stand. Forty Fushimi gates, a single object, a single set of materials.

Log 05 / 06

The details 細部 · Saibu

v0.4 · Close-ups

Up close, a torii reads through its accidents: the checks in the wood, the copper, the folded paper.

A pillar that keeps the heart of the trunk shrinks about twice as much around the rings as across them while drying. It has to split, and physics gives the total width of the checks.

Each check is a groove opening in the pillar profile, tapering at both ends, drifting a little and following the spiral of the grain. Closed, it lies flat on the surface: the point count stays the same and the sweep works as is.

{ "fr": "Formule", "en": "Formula" }Drying checks (干割れ)
total opening = (tangential − radial shrinkage) × π D
              ≈ 2 % × π D               // air-dried sugi or hinoki
              = 7.6 mm on a 120 mm log
Check with worn lips and torn paintSharp black check on a vermilion pillarv1v2
Fig. 14v1: a black line, as if drawn in marker. Physically right, 6 mm over 10 cm of depth lets no light in. But in a photo, the lips are what make a check readable. v2: worn lips, bare grimy wood inside, paint torn along them.
3,4
Checks per end on a sugi member that keeps its heart.
0,6
Without the heart. That is why kasagi are cut heart-free.
13×
Less split length in all: under a millimetre, nothing to model.

The metal fittings (金具) followed the same method, gate by gate. What the sources confirm is modelled; what they contradict is removed, even when it was planned.

  1. 01

    Kashima, 2014

    “笠木、貫の上端と木口も銅板で葺き上げました”: the top and ends of the kasagi and nuki in copper. A clad end stays dry and no longer checks.

  2. 02

    Itsukushima

    A lacquered, gilt sun and moon on the shimaki ends, per the technical report. The tourist office puts them on the kasagi: the disagreement is noted in the preset.

  3. 03

    Kehi

    Black-lacquered copper on the great nuki (1986–87 repair) and four gilt crests across the shimaki, from photos.

  4. 04

    Contradicted

    Coppersmiths fix the sheet with hidden clips and “don’t show the nails”. No source shows a peg on a torii. Both were dropped.

Domed gilt sun on the shimaki endFlat gilt sun with a hub, on the shimaki endv1v2
Fig. 15The Itsukushima sun. v1, with its hub, looked like a bolt washer. v2 is domed like a 日輪. Its size and design are estimated.

One last detail: the shide. The sheet is folded in two and divided into four columns; two cuts come down from the top, the middle one up from the bottom, each two thirds of the way. You hold the first column and fold each of the next ones towards you.

Following those folds one by one, the geometry falls into place: every fold drops the rest by a third. Each column is a strip of paper following its folds in 3D, and the translucent washi lets the layers beneath show through.

吉田流白川流伊勢流

Yoshida: every fold towards the front, a flat staircase.

Fig. 16The three schools, after the 『神社有職故実』 and step-by-step photos.

Log 06 / 06

The workshop 工房 · Kōbō

Method and rendering

One rule, a short loop, and a render mode to show the structure.

For the devlog, I added a render mode: the same shot rendered twice, then assembled. On the left the real materials, on the right the torii in clay with its edges drawn by Freestyle, the two blended across 30% of the width. That mode opens this page, with a boundary that follows the pointer on top.

v1, outdoors, didn’t work: the clay came out almost white in the sun, and a 64-sided pillar turned into a mass of lines. v2 moved to a studio, on a backdrop that curves up into a wall.

Hizen stone torii, half real, half wireframeFig. 17 · Hizen
Joints between the drums of a stone pillarFig. 18 · [object Object]

Stone torii are built of several stones: pillars in drums, lintels in three lengths, nuki ends set in separately. Each stone is swept by the stations of the whole member, with a slight chamfer: the curve stays continuous, the joint reads as a fine groove. The wireframe half shows the cuts.

Everything runs headless, in a short loop: find the source, code, render, look at the render. Every step leaves a numbered image in the devlog, failures included. Sixty-nine images in two days.

ShellDevlog renders
blender -b -P tools/render_test.py -- out.png preset=ITSUKUSHIMA
blender -b -P tools/render_test.py -- out.png type=HIZEN studio=1 split=0.5 blend=0.3
  1. 01

    Source it

    A feature starts with research, not with code.

  2. 02

    Measure

    When the text runs out, a frontal photo gives ratios: a pillar head is the gauge.

  3. 03

    Let go

    Some forty searches on joints in wooden lintels, no source: nothing is modelled.

  4. 04

    Look

    An old flaw jumps out on a new preset: at Kasuga, the pillar heads poked through the shimaki.

Animation: the Itsukushima torii turning around
Fig. 19Turntable of the Itsukushima preset, v0.2.

What comes next is written down: a roadmap of fifty items, each backed by a source. The real red pigments, each ageing by its own chemistry; the torii in the water at Hakone and Lake Biwa; a sun computed from the shrine’s coordinates; rain, snow; a kiwari layout drawn in the 3D view. Always the same rule: nothing invented.

Project
Personal
Compatibility
Blender 4.5 LTS · Cycles
Sources
JAANUS, Edo manuals, conservation reports, shrine websites
License
Proprietary, all rights reserved
  • Python
  • bpy
  • Shader nodes
  • Freestyle
  • Headless rendering