WikiWeb3D

Vivaldi Gallery: a walkable 3D music museum for The Four Seasons in the browser

A 1,408 m² virtual museum built with Blender, glTF and Three.js, with baked global illumination, collision-aware walking and 20 recordings of Vivaldi's Four Seasons. Version 1.0.0.

Updated

SpringSummerAutumnWinterentranceshop10 m22 × 64 m = 1,408 m²
Floor plan of the virtual museum. Drawn from the repository’s layout.json at build time. Season rooms run from the entrance (left) to Winter at the back; green bars are the 12 movement paintings, grey boxes are benches, desks and the shop that the walking code treats as obstacles, and the dashed line is the walkable boundary.

MHP Build · Release 1.0.0, 10 November 2026 · Code MIT, media under separate licences · Code: mhpbuild/Vivaldi-Gallery

Abstract

We describe Vivaldi Gallery, an independent, noncommercial web application in which visitors walk through a virtual museum and listen to Antonio Vivaldi’s The Four Seasons. The building is modelled in Blender, lit with path-traced global illumination baked into a single 6144 × 6144 texture atlas, and exported as a Meshopt-compressed glTF model of 17.87 MiB that Three.js renders in real time. The hall measures 22 × 64 m (1,408 m²) and holds four season rooms, 12 movement paintings and four interpretation desks. Twenty recordings, about 98 minutes in total, are streamed on demand. Movement uses keyboard, pointer or touch controls with axis-separated collision against the exhibits. The release passes lint, type checking, 12 unit tests and a production build, and was checked at four viewport sizes. This is a hobby project shared for learning; no field performance score is claimed.

1. Introduction

Music is usually presented on the web as a list of tracks. A gallery gives it a place: each movement hangs on a wall, and the visitor chooses what to hear by walking to it. Vivaldi Gallery explores how far that idea can go with open web technology alone, using a static site, a single 3D model and no server.

The work has three engineering questions. How can offline, physically based lighting be carried into a real-time browser scene? How can a large model and two hours of audio stay usable on an ordinary connection? And how can free walking stay inside the building without a physics engine?

2. Space and layout

The museum is described once, in src/layout.json, and both the Blender builder and the web application read it. The figure at the top of this page is drawn from that file. The four rooms follow the order of the concertos, from the entrance to the back of the hall:

Season Concerto Key Room centre (z, m)
Spring RV 269 E major 24
Summer RV 315 G minor 8
Autumn RV 293 F major −8
Winter RV 297 F minor −24

Each room has its own silk-wall colour and three paintings, one per movement. The paintings are a single wide triptych texture per season, split into three panels through UV coordinates. Because geometry, arrival points and collision boxes come from the same JSON, the 3D model and the walking rules cannot drift apart.

3. Rendering pipeline

The scene is authored in an editable master file, Vivaldi-Four-Seasons-Museum.blend. A scripted pipeline in Blender 5.2 turns it into the web asset:

  1. Build (build_vivaldi.py): generate the hall, rooms, frames, desks and shop from the layout, and render an architectural preview.
  2. Bake (bake_vivaldi.py): bake diffuse lighting with Cycles, including direct and indirect light, into one 6144 × 6144 atlas with an 8-pixel margin.
  3. Denoise and export (denoise_vivaldi.py): denoise the atlas in the compositor, then export a binary glTF with the EXT_meshopt_compression extension and JPEG textures at quality 92.

Baking moves the cost of global illumination from the visitor’s device to build time. In the browser each surface only samples its precomputed light, so soft shadows and bounced colour appear without real-time ray tracing. Cycles renders and the browser view still use different pipelines, so they are not expected to match pixel for pixel.

Payload. The final model is 17.87 MiB and the separately loaded Three.js chunk is about 158 kB gzip. Progress feedback is shown while the model loads. The 20 recordings total 123 MiB, but audio uses preload="none", so none of it is fetched until a visitor plays a track.

4. Navigation and collision

Each frame, the input gives a forward component f and a strafe component r, the camera yaw ψ and the frame time Δt. The step length is

v=s min⁡(Δt, 0.05)max⁡ ⁣(1, ∥(f,r)∥),s={4.8with Shift2.7otherwisev = s\,\frac{\min(\Delta t,\ 0.05)}{\max\!\big(1,\ \lVert (f, r) \rVert\big)}, \qquad s = \begin{cases} 4.8 & \text{with Shift} \\ 2.7 & \text{otherwise} \end{cases}

in metres per second, and the displacement is the input rotated by the yaw:

Δx=v (−sin⁡ψ f+cos⁡ψ r),Δz=v (−cos⁡ψ f−sin⁡ψ r).\Delta x = v\,(-\sin\psi\, f + \cos\psi\, r), \qquad \Delta z = v\,(-\cos\psi\, f - \sin\psi\, r).

Dividing by the input length keeps diagonal movement from being faster. Capping Δt at 0.05 s stops a dropped frame from teleporting the visitor through a wall. The new position is first clamped to the walkable boundary, then each axis is tested against the obstacle boxes separately. If moving along x would enter an obstacle, x is kept; the same is then done for z. This lets the visitor slide along a bench instead of stopping dead.

Controls cover WASD and arrow keys, pointer drag to look, on-screen direction buttons for phones, and Enter or Space on those buttons. Text fields, sliders and open dialogs suppress walking keys, and reduced-motion settings turn off camera travel animation.

5. Catalogue and audio

The catalogue (src/catalog.json) lists 12 main movements and 8 additional interpretations, about 98 minutes in total: Spring 5, Summer 6, Autumn 4 and Winter 5 recordings. Clicking a painting plays its movement. Visitors can search, filter by season, download recordings with their licence references, and play their own audio files locally through browser object URLs; those files are never uploaded.

All recordings come from Classicals.de and are used unedited, each with a SHA-256 checksum in public/audio/vivaldi/checksums.json. Their licences differ from the code:

Component Licence
Application code, Blender scripts, tests, documentation MIT
Recordings 01–12 (John Harrison, Robert Turizziani, WSU Chamber Players) CC BY-SA 4.0
Recordings 13–20 (Gregor Quendel) CC BY-NC 4.0, noncommercial only
Original models, procedural textures and illustrations CC BY 4.0
Two historical Vivaldi portraits Public domain

6. Verification

The checks below were run locally on 10 November 2026 and are recorded in the repository’s VERIFICATION.md.

  • npm run lint, npm run typecheck and npm run build passed. npm test ran 12 tests with 0 failures, covering cart totals, walking and collision, season arrivals, the 20-track catalogue, MP3 signatures and attribution, and the model’s exhibit metadata.
  • Layouts were checked at 1440 × 900, 1024 × 768, 768 × 1024 and 390 × 844. Document width matched the viewport at every size, and the final pass logged no console errors or warnings.
  • Holding W in the Winter room moved the camera from (0.000, 1.720, −18.000) to (−0.949, 1.720, −19.518). On a phone, holding the forward button moved it from (0.000, 2.150, 31.000) to (0.000, 1.720, 29.245).
  • Clicking the Spring II painting loaded /audio/vivaldi/02.mp3 and started playback. A simulated checkout of Rp145,000 completed without any payment or personal details.

7. Limitations

  • No field performance measurement is claimed; load time depends on the visitor’s connection and the 18 MiB model.
  • WebGL failure and invalid-file recovery are implemented but were not forced during the final check.
  • The seasonal illustrations were made with AI assistance. They are not historical works, and the instrument model is an interpretation rather than a scan.
  • Web fonts are loaded from Google Fonts, an external service.
  • The shop and every transaction are simulated. There is no payment backend.
  • This is an independent fan project. It is not affiliated with or endorsed by any musician, rights holder or institution mentioned.

8. Reproducibility and code

The code, Blender scenes and assets are in mhpbuild/Vivaldi-Gallery. Useful starting points on this site are the layout file, the navigation code and the bake script. With Node.js 24 (or 22.18+):

git clone --depth 1 https://github.com/mhpbuild/Vivaldi-Gallery.git && cd Vivaldi-Gallery
npm ci
npm run lint && npm run typecheck && npm test && npm run build
npm run dev   # http://127.0.0.1:5174/

To rebuild the model with Blender 5.2 or later:

blender --background --factory-startup --python blender/build_vivaldi.py -- --render-preview
blender --background --factory-startup --python blender/bake_vivaldi.py
blender --background --factory-startup --python blender/denoise_vivaldi.py

The clone is large because it includes the recordings and Blender scenes. Git LFS is not needed.

References

  1. A. Vivaldi, Il cimento dell’armonia e dell’inventione, Op. 8, Nos. 1–4 (The Four Seasons, RV 269, 315, 293, 297), Amsterdam: Michel-Charles Le Cène (1725).
  2. Khronos Group, glTF 2.0 Specification, registry.khronos.org.
  3. Khronos Group, EXT_meshopt_compression glTF extension, github.com/KhronosGroup/glTF.
  4. Blender Foundation, Cycles render engine, Blender manual, docs.blender.org.
  5. three.js authors, three.js, threejs.org.
  6. Classicals.de, “Vivaldi: The Four Seasons,” source of the recordings, classicals.de.