Esacode

Docs / Blocks / Simulation

3D view (worker, ray-traced)

EsaSim's own path tracer on the worker: photorealistic pictures and videos of 3D models and their animations, on any GPU, a Tenstorrent card or the CPU, streamed to the page as they are made.

Runs on a worker (Python) Simulation Version 1.5 Code you can open and adapt

How it works

Connect 3D files (GLB or glTF, also OBJ, STL, PLY): a model, or a simulation's animation saved as an animated GLB. EsaSim's own path tracer renders them on the worker: light bounces as in reality, with soft shadows, reflections, clear coat, thin glass and depth of field, on the same stage as the 3D views (the same lights, floor and camera).

It runs on what the worker has: any GPU (NVIDIA, AMD, Intel, Apple, through WebGPU: Vulkan, DirectX 12 or Metal), a Tenstorrent card, or the CPU (slowly). Nothing to install: the block brings its Python packages. Follow the views keeps the run going and renders what a 3D view (WebGPU) on the page shows: its model, camera and shape.

Wire Live telemetry to an Images view (Live picture = fill the view) to see each picture as it is made: a quarter, a half, then full size.

Inputs

InputTakesWhat it is
3D files
scene
Files
glb, gltf, bin, png, jpg, jpeg, obj, mtl, stl, ply
GLB or glTF (with its .bin and textures), OBJ (with its .mtl), STL, PLY Takes several connections.

Outputs

OutputGivesWhat it is
Frames
frames
Files
png, jpg, exr
One picture per frame: frame_00001.png … (a still: the picture)
Video
video
Files
mp4, webm, gif
The frames as a video
Live telemetry
telemetry
Live telemetryWhat the block sends while it runs, for views such as Chart or 3D view.

Settings

SettingDefaultWhat it does
Quality
quality
standard Samples per pixel (noise) and light bounces: draft 16, standard 64, high 256, final 1024, denoised. Each step is about four times slower.
One of: draft, standard, high, final
Antialiasing
aa
smooth The edges: smooth (a filter two pixels wide, as a camera), sharp (one pixel) or off (aliased, stair-stepped). The view's gear panel can change it while following the views
One of: smooth, sharp, off
Denoise
denoise
on Smooths the noise left by the samples, keeping edges and textures. Off: the raw samples
Lighting
look
studio studio: soft boxes over a seamless backdrop; sky: daylight sun and a physical sky; sunset: low warm sun; night: moonlight and a cool rim light
One of: studio, sky, sunset, night
Sun height (degrees)
sun
35 sky: how high the sun stands (sunset puts it at 7)
From 1 to 90
Materials
materials
enhanced enhanced: from their names, paint gets a clear coat, glass becomes glass, chrome a mirror, rubber matte, metal brushed; as authored: the file's materials unchanged
One of: enhanced, as authored
Camera
camera
auto auto: three-quarter, framing the whole motion; orbit: one turn around it (a turntable for a still model); follow: keeps the moving object in view
One of: auto, three-quarter, orbit, follow, front, side, top
Field of view (degrees)
fov
35
From 5 to 120
Depth of field
dof
off Focus on the model, the rest softly blurred, as a real lens
Floor
floor
on The floor of the EsaSim stage, the same as the 3D views'
Seamless backdrop (studio)
backdrop
off Studio, with a fixed camera: the floor curves up into a wall behind the model, as in a photo studio. Off: the plain floor of the EsaSim stage, the same as the 3D views, to compare them.
Render
what
animation animation: the file's animation (or a turntable with Camera = orbit); one picture: the frame at From (s)
One of: animation, one picture
From (s)
start
0
From 0
To (s, 0 = the end)
end
0
From 0
Turntable length (s)
turntable
8 Camera = orbit on a model that does not move: the length of one turn
From 1 to 120
Only these files
only
empty Names or patterns, separated by commas (ToyCar, *Sofa*): render only those of the files connected; empty: all
Follow the views
follow
off After the first render the run goes on, and renders the model the page asks for as one picture: a click in a Model list (that model, from the stage's camera), Render this view in the 3D view (WebGPU) (the model and the camera shown). A newer request stops the one going on. Stop the run to end.
Several files
several
one render each
One of: one render each, side by side
Width (pixels)
width
1920
From 64 to 7680
Height (pixels)
height
1080
From 64 to 4320
Frames per second
fps
30
From 1 to 120
Device
device
auto auto: the GPU when the worker has one (any kind, through WebGPU), otherwise the CPU at a preview size; GPU: stop if there is none; Tenstorrent: a Tenstorrent card (TT-NN)
One of: auto, GPU, CPU, Tenstorrent
Tenstorrent card
tt_device
0 Which card (device id), with Device = Tenstorrent
From 0 to 31
Tenstorrent Python
tt_python
empty The python of your tt-metal environment, which has TT-NN; empty: found in TT_METAL_HOME, ~/tt-metal/python_env, ~/.tenstorrent-venv, or this Python
Frames
frames_format
png none: only the video
One of: png, jpg, none
Video
video
mp4 MP4 is H.264 at a high quality, which Premiere, Final Cut and PowerPoint open
One of: mp4, webm, gif, none
Stream frames while rendering
live
on

Where it runs

On one of your computers with the EsaSim worker: Any worker, NVIDIA GPU, AMD GPU, Intel GPU, Apple GPU (Metal), Tenstorrent. The worker installs the Python packages it needs when they are missing: numpy</code>, <code>pillow</code>, <code>wgpu.

In its code, settings are ctx.params["key"], inputs ctx.inputs["id"] and outputs ctx.output("id", "name.ext"); see Custom blocks.

More in Simulation