Why Three.js?

Scenaven draws the view with Three.js in the browser and runs VTK on the server. That is a deliberate choice. Viewers such as VU-VERSE take the other path: they compile a desktop stack (VTK, and often Qt) to WebAssembly so parsing and filtering can run inside the tab.

Scenaven · Three.js

Lightweight surface + fields in the browser. VTK stays on mesh-api.

Chosen approach
WASM · VU-VERSE

Port native VTK/Qt stack into the tab via WebAssembly. Open the VU-VERSE viewer.

Alternative pattern

Two ways to show a simulation on the web

Approach How it works Where you see it
WebAssembly Ship VTK into the browser and parse and filter there VU-VERSE, and similar browser ports
Server plus Three.js Keep VTK on the server, send surfaces and field values, draw with Three.js Scenaven
Emscripten Emscripten
WebAssembly WebAssembly
Three.js Three.js
VTK on the server VTK on the server
OpenUSD scene OpenUSD scene

Why Scenaven draws with Three.js

Large simulations stay on the server

Volumetric VTK and VTKHDF files are often gigabytes. Loading that grid into the browser runs into tab memory limits, stores the data twice (on the server and in the tab), and makes the first picture wait on a large download and parse.

Scenaven keeps the simulation on the server and sends the surface the view can draw, with the field values that belong on that surface.

One simulation for the view and for Python

A WebAssembly viewer either carries a second copy of VTK in the browser or rebuilds filters there. Scenaven already uses VTK on the server for conversion, clip, warp, extract, time, and Python.

The Three.js view reuses that work. A clip in the sidebar and a clip in Python use the simulation you loaded, so the picture and the script agree.

The viewer starts as a viewer

A VTK port in the browser ships a large program, often tens of megabytes, before any scene appears. Scenaven’s page is the 3D view, the scene description, and the controls. It loads as a web page, and the simulation work stays on the server you already run for cloud or on-prem.

The picture belongs in the browser

Camera, materials, color, and picking are what a browser 3D library is built for. That is most of what changes as you inspect a model.

Putting VTK and a desktop interface into the browser means rebuilding that desktop stack for the web, then carrying a large program that has to be rebuilt whenever those native pieces change. That fits a research demo or a direct port of a desktop app. Scenaven keeps VTK on the server and limits the browser to the view.

The same view in cloud and on-prem

Three.js is only the page you interact with. Conversion and filters stay on the server, whether that server stores files in the cloud or on a machine in your network. Compute and the view can be updated and scaled on their own. A single program that contains both the simulation engine and the interface is harder to run that way for each organization.

Python runs beside the data

Scripting in a WebAssembly-style setup often means a second Python inside the browser. Scenaven runs Python on the server, on the simulation already loaded. The script can see the same data as the view, and the volume never has to be copied into the tab. See Python session.

What Three.js is for

  • Camera: orbit, pan, and zoom
  • Scalar colormaps and the legend
  • Display style: surface, wireframe, or points
  • Picking, probes, and rubber-band extract
  • Time controls, which request each frame from the server

These need a fast view. They do not need VTK in the tab.

What stays on the server

Task Why it stays on the server
Reading the full volume Memory and time to first picture
Clip and warp They must use the simulation you loaded
Preparing many time steps That work is heavy and happens once for playback
Python It should run on the server session, with the same data as the view

When a WebAssembly viewer is the better fit

That approach fits when:

  • The dataset is small enough to live comfortably in the tab
  • You need the tool to work with no server at all
  • You are bringing an existing desktop application to the browser as-is

VU-VERSE is a browser VTK and Qt demo of that kind (educational and non-commercial).

Scenaven is aimed at engineering-scale simulation on cloud and on-prem, so the server keeps the data and Three.js keeps the view.

The path in practice

A VTKHDF file enters the server, filters run there, OpenUSD describes the scene, and Three.js draws it. You get interactive inspection without shipping VTK inside every browser tab.

Related topics