Next.js and Three.js Tutorial: An Architecture Website with Interactive 3D
How to build the architecture-studio pattern in Next.js and Three.js: massing presets, facade material switching, and sun scenarios on a server-rendered page.

TL;DR: An architecture website earns its 3D when visitors can change the three things architects actually argue about: the building's massing, its facade material, and its light. Model those as data, keep the canvas inside one client component, and let the rest of the Next.js page stay server-rendered text that search engines can read. This is the pattern behind the design lab I built for Genç Group's construction division.
Why Architecture Is the Best Case for Web 3D
A photograph of a building is a claim. A model the visitor can rotate, re-clad, and re-light is evidence. Construction and real-estate buyers are comparing massing options, facade systems, and how a project sits in its light long before they ask for a price. Static renders answer none of that interactively, and video answers it only in the order the editor chose.
The catch: architecture pages also carry heavy SEO and trust content, project lists, locations, company history. The 3D must join that page, not replace it.
The Page Architecture: Server Content, One Client Studio
Split the page by rendering model, not by visual section:
- Server-rendered: headings, project text, specifications, FAQs, structured data. This is what Google indexes and what a visitor on a failing GPU still gets.
- One client component: the Three.js studio. It receives the project data as props and owns the canvas, the loaders, and the render loop.
- Page-level state: the selected massing, facade, and lighting scenario live in React state above the canvas, so the text next to the studio can describe the current selection. That description is indexable content the canvas alone could never provide.
In Next.js this means the studio component carries the "use client" boundary and is loaded with a dynamic import, while everything around it renders on the server. The integration mechanics are covered in using Three.js inside Next.js; this article is about the architecture layer on top.
Model the Building as Data, Not as Scenes
The mistake is building one scene per option: three massings times four facades times three light scenarios becomes 36 exports. The working approach is one model with named parts, plus a small preset table:
export interface ArchitecturePreset {
massing: "tower" | "podium" | "courtyard";
facade: "travertine" | "brushed-aluminum" | "low-e-glass";
sun: "morning" | "noon" | "evening";
}
const SUN_POSITIONS: Record<ArchitecturePreset["sun"], [number, number, number]> = {
morning: [22, 10, 6],
noon: [6, 30, 4],
evening: [-20, 8, -8],
};Massing switches toggle the visibility of pre-modelled volume groups. Facade switches swap materials on the facade meshes. Sun scenarios move one directional light and adjust its warmth. One model, one download, every combination available. This is exactly how the Genç Group design lab works: decision-makers switch volumetric massing, facade materiality, and lighting scenarios in real time from plain page controls.
Switching Facades at Runtime
Name facade meshes in the model (a facade userData flag or a name prefix) so the swap does not depend on fragile node paths:
import * as THREE from "three";
export function applyFacade(root: THREE.Object3D, material: THREE.Material) {
root.traverse((obj) => {
if (obj instanceof THREE.Mesh && obj.userData.part === "facade") {
obj.material = material;
}
});
}Keep a small material library built once at startup (stone, metal, glass with the right roughness and metalness values), and dispose of a material only when the whole studio unmounts, not on every switch.
Lighting Scenarios Are a Sales Tool, Not a Demo
Morning, noon, and evening presets do two jobs. They show the facade honestly, since materials like travertine and low-e glass read completely differently across a day. And they show the outdoor spaces, podium gardens, terraces, pool decks, in the light the buyer will actually use them. Set the light's position from the preset table, warm the colour temperature for evening, and lower ambient intensity so the change reads clearly. One directional light plus ambient is enough; a full sky simulation is cost without visible benefit at this scale.
Before/After and Construction Stages
Architecture pages have a second pattern worth stealing from the same project: transformation stages. Genç Group's construction pages show project stages and before/after comparisons, which in 3D terms is the same visibility-toggle trick as massing switches: model the stages as groups, show one at a time, and let a slider or stepper walk the visitor through them. The control is simple; the trust it creates is not, because the visitor operates the proof themselves.
SEO Around the Canvas
- The H1 and the project description must make sense with WebGL disabled. Write them for the building, not for the viewer.
- The text beside the studio should name the current options in words: facade materials, massing types, neighbourhood. Those words are what rank; the canvas is what converts.
- Give the studio a poster image with real alt text for slow connections and for the fallback path.
The general step-by-step version of this build is in how to build an interactive 3D website with Three.js. The shipped example is the Genç Group case study, and the service version is interactive 3D website development.
Building a project page your buyers can actually explore?
Message me the project on WhatsApp. I will map which massing, facade, and lighting options your buyers need to switch, and what the build involves.
Healix Medical: 5-Language International Patient Coordination Platform
Case study: 5-language patient coordination platform in Istanbul. 355 pages in the live sitemap, Arabic RTL, 33 contracted healthcare facilities.
QR Attendance System
QR attendance system built by Hamed Mohamed for 1,713 users (1,666 students, 40 academics, 7 admins) across 6 faculties: 98% latency reduction, 99.9% uptime.