
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
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.
- 01
Documented
Every value taken from a source is listed in the preset, with the source to check it.
- 02
Estimated
Whatever no source gives becomes an adjustable parameter, flagged as estimated in the panel.
- 03
Disputed
When sources disagree (Kashima’s shimaki, Hachiman’s end cuts, Ise’s lean), the sheet says so and follows the primary one.
- 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.

Log 02 / 06
The Edo rules 木割 · Kiwari
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.
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°) 半転び
| Type | Family | What sets it apart | Example |
|---|---|---|---|
| Shinmei 神明 | Shinmei | round straight kasagi, no shimaki | Shinmei shrines |
| Ise 伊勢 | Shinmei | pentagonal kasagi, bare hinoki | Uji-bashi bridge (2014) |
| Myōjin 明神 | Myōjin | curved kasagi and shimaki, through nuki | Meiji Jingū |
| Inari 稲荷 | Myōjin | ring capital on the pillars, black kasagi | Fushimi Inari |
| Ryōbu 両部 | Myōjin | four bracing posts | Itsukushima |
| Sannō 山王 | Myōjin | gable on the kasagi | Hiyoshi Taisha |
| Mihashira 三柱 | Special | three gates on a triangle | Konoshima |

v2 · crossedv3 · mitredLog 03 / 06
Wood, paint, bark 素材 · Sozai
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.

MetresRelative
v1v2



Failed: smooth grey, diagonal cracks.
Fig. 06Four of the five bark versions of the Kuroki, the log torii. The failures stay in the devlog.
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 firstThe 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.

NewWeatheredLog 04 / 06
Thirteen real gates 鳥居 · Torii
Gates that exist, with their published dimensions. The panel says what is documented and what is estimated.













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.

v1v2The 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 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.

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.

KiwariMeasured
Log 05 / 06
The details 細部 · Saibu
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.
total opening = (tangential − radial shrinkage) × π D
≈ 2 % × π D // air-dried sugi or hinoki
= 7.6 mm on a 120 mm log
v1v2- 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.
- 01
Kashima, 2014
“笠木、貫の上端と木口も銅板で葺き上げました”: the top and ends of the kasagi and nuki in copper. A clad end stays dry and no longer checks.
- 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.
- 03
Kehi
Black-lacquered copper on the great nuki (1986–87 repair) and four gilt crests across the shimaki, from photos.
- 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.

v1v2One 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ō
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.
Fig. 17 · Hizen
Fig. 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.
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- 01
Source it
A feature starts with research, not with code.
- 02
Measure
When the text runs out, a frontal photo gives ratios: a pillar head is the gauge.
- 03
Let go
Some forty searches on joints in wooden lintels, no source: nothing is modelled.
- 04
Look
An old flaw jumps out on a new preset: at Kasuga, the pillar heads poked through the shimaki.

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
