Skip to content
Built on the Blobscape engine

Published

One Scene, Four Ways

A fox trotting through tall grass while a wisp of light circles it, drawn at the same moment by four different things: a shader written with no engine, three.js meshes, Spark’s splats, and Blobscape. All four get the same pixel-art finish, so what you see is how each one makes a picture.

Plain shadernot timed yet

three.js meshesnot timed yet

Spark splatsnot timed yet

Blobscapenot timed yet

Still starting: Plain shader, three.js meshes, Spark splats, Blobscape.

Making the scene’s blobs…
Scene
Show

The speed on each picture is how many frames a second it could draw by itself here, before the shared finish. With all four drawing they share this device.

How bright the wisp shines. Three of the four light the meadow afresh every frame, so the light and its shadows go round with it. Spark’s splats had the light painted in when they were made.

What each one is

Four honest tries at one fox

Each one is built the way it would be if you asked for this scene with that tool, and each is given a fair go: none is held back to make another look good. They run on WebGPU or WebGL 2 for Blobscape and WebGL 2 for the rest.

Plain shader

No engine and no library: one fragment shader on a bare WebGL canvas. The fox is round bars and balls melted together, with joints worked out on the CPU each frame; the grass is one bent blade a square of a grid, and each pixel walks a ray through all of it.

Real time
Yes, on a fair graphics card. Every pixel asks about nine blades and the whole fox at every step of its ray, so it is the dearest of the four here.
What moves
The trot, the brush, the wind in the grass and the wisp, each as a formula typed out for this scene.
The light
Worked out afresh for every pixel. The fox and the stones cast soft shadows from the wisp; the grass does not, because that would mean a second walk through every blade.
Written as
471 lines, most of them one shader
Speed here
not timed yet
What you keep
A picture. The scene lives only in the shader’s formulas, so nothing can be saved as a model or opened in another tool.
Where it stops
A coat is the hard part: the surface is roughened and streaked, which reads as fur from here and would not close up. A second animal means writing this again from the first line.

three.js meshes

The fox is the library’s spheres, cones and tapered cylinders in a tree of groups, turned at the joints. Its coat is about eight thousand small cones stood on those shapes with the library’s surface sampler; the grass is one bent blade drawn several thousand times.

Real time
Yes, and quickly: this is what graphics cards are built for. Each blade is leaned by the wind on the CPU every frame.
What moves
Groups turned each frame. The coat rides its body part stiffly, so it creases where two parts meet at a joint.
The light
Live, with shadow maps from the moon and the wisp, so the fox, the stone and every blade shade each other.
Written as
510 lines of three.js
Speed here
not timed yet
What you keep
An ordinary three.js scene, which the library can save as a glTF model that most 3D tools open.
Where it stops
It is a fox of separate hard parts. A body that bends as one skin needs a modeled, weighted mesh from a 3D tool, and soft fur needs cards or shells and a good deal of care.

Spark splats

Spark draws splats; it does not make them. These are the blobs Blobscape made, fox, fur, grass and all, handed over as a file would be and moved by Spark’s own skinning.

Real time
Yes. Its sort runs a frame or more behind the view.
What moves
The same bones as Blobscape, through Spark’s skinning: the trot, the brush and the grass.
The light
Painted in once. The wisp travels, so its light is averaged over the whole lap: the fox, which the wisp never leaves, is lit evenly from every side, the meadow gets a faint ring, and nothing casts a shadow. The Wisp slider changes nothing.
Written as
118 lines, and the blobs made elsewhere
Speed here
not timed yet
What you keep
The splats it was handed, as they were. Spark reads the common splat files and writes .spz.
Where it stops
It needs splats from somewhere, and it has no lights: the wisp still goes round, but its light and its shadows stay where they were painted.

Blobscape

The turf, the stone and the sky are a description. The fox is the Creature page’s, asked for by name: a sculpted skin on fourteen bones under strands of fur, each strand a blob. The grass is three blobs a blade. All of it is one actor on one skeleton.

Real time
Yes, after a wait while the fox and the scene are made. Each frame moves, lights and sorts every blob.
What moves
Everything on a bone: the trot bends the skin and the fur with it, and the grass leans in the wind.
The light
The wisp is a live light on every blob. With WebGPU it casts shadows through a grid of what is in the way, worked out again each frame, so the fox’s and the stone’s shadows go round with it; with WebGL 2 the light is live and casts none. Moonlight is painted in as each thing is made: every blade of grass takes it by how it faces the moon, how deep it stands among the others and whether the stone is in the way, but the fox casts no moon shadow.
Written as
303 lines: a description, the Creature page’s fox by name, and the grass
Speed here
not timed yet
What you keep
One actor with its bones and moves, which the engine can save as a rigged splat file (.glb). The fox is the one from Splat Creatures, where it also bakes to sprite sheets, and the whole scene plays in Diorama.
Where it stops
The shadow grid is coarse beside a mesh’s shadow map, so shadows are soft and a thin thing casts little. Making the fox takes seconds, and it draws a little slower than the meshes do.