What It Is

◆

Spectra turns a description of a scene — meshes, materials, lights, a camera — into a picture by following light the way it really travels: bouncing between surfaces, bleeding colour, passing through glass, scattering in smoke. That is path tracing, and it is what gives soft shadows, reflections and caustics without tricks.

It is not a program you start but an engine you build in. A user of the library needs two files — the header and the static library — and a few calls: create a scene, add meshes and lights, set the camera, render. It contains no third-party code and links against no third-party library.

The same path tracer source runs on the processor and on the graphics card, and the result is deterministic: the same scene, settings and seed give the same pixels on any number of threads — and the same picture on the processor and on the graphics card, bit for bit.

A Few Lines of C

◆
/* scene: one mesh, one material, a camera */
SpContext *ctx = spContextCreate(NULL);
SpScene   *scn = spSceneCreate(ctx);

SpMaterial mat;  spMaterialDefault(&mat);
int m = spSceneAddMaterial(scn, &mat);

SpMeshDesc mesh; spMeshDescDefault(&mesh);
mesh.positions = xyz;  mesh.vertex_count = n;
mesh.indices = idx;    mesh.triangle_count = t;
mesh.material = m;
spSceneAddMesh(scn, &mesh);

SpCamera cam;
SpVec3 eye = {0, 2, 8}, target = {0, 1, 0}, up = {0, 1, 0};
spCameraLookAt(&cam, eye, target, up, 40.0f);
spSceneSetCamera(scn, &cam);
spSceneCommit(scn);

/* render and save */
SpRenderSettings st; spRenderSettingsDefault(&st);
st.width = 1280; st.height = 720; st.samples = 128;
SpImage *img;
if (spRender(scn, &st, &img) == SP_OK) spImageSavePNG(img, NULL, "out.png");

What It Renders

◆

💎One material for everything

Base colour, metallic, roughness, specular, emission and opacity; glass from clear to frosted; clear coat; anisotropy for brushed metal; sheen for cloth; subsurface scattering for skin, wax and marble. Texture maps for colour, normals, roughness, metallic and emission. Each texture can carry its own placement: scale, turn and shift.

☀Lights and sky

Point, spot, sun and panel lamps with soft shadows; glowing surfaces that light the scene; and around it a plain background, an HDR environment map, or a computed sky with the sun in it.

🔥Smoke, cloud, fire

Volumes inside closed meshes: smoke, cloud, murky liquid and fire — evenly dense, or with the density given as a grid from a simulation. Distance fog and volumetric fog with light shafts.

🌲Instances

A mesh is stored once and placed any number of times, each with its own position, turn, scale and material. The forest below shows about ten million triangles from four thousand stored.

🎬Motion and focus

Motion blur for moving objects and a moving camera, and a camera with depth of field.

🔬Two integrators

Path for global illumination — light bounces, colour bleeding, caustics, glossy reflection. Direct for a fast picture with direct light, shadows, mirror reflection and refraction. Direct also lights smoke and fog with single scattering and follows light under the surface of wax and skin.

✨Clean pictures sooner

Adaptive sampling stops each pixel when it is clean, so the work goes where the noise is. A denoiser guided by albedo, normal and depth finishes the job; tone mapping and sRGB output are built in.

⚡Processor or graphics card

Runs on all processor cores, testing four bounding boxes and four triangles at once with SSE2 or NEON (the boxes also with AltiVec), or on an NVIDIA graphics card through CUDA — measured at about seven times a 24-thread processor in the same laptop. Both integrators run on either, and the graphics card is optional at every level.

🔄Sessions

Render in steps and look at the picture while it converges; move the camera and start over. This is how a host program shows a live preview. After a material is replaced or an object moved, a session can render again only the pixels the change reached and keep the rest — the same picture as starting afresh, bit for bit. A render can also be saved and continued later.

📦Model files

The command-line tool that comes with the library renders glTF 2.0 and Wavefront OBJ models, with PNG, JPEG and WebP textures and HDR and OpenEXR environment maps read by its own decoders. glTF files may carry compressed geometry (EXT_meshopt_compression) and WebP textures (EXT_texture_webp); a texture keeps its own placement (KHR_texture_transform), so a normal map can repeat differently from the colour.

🎨Baking to textures

Instead of what a camera sees, the light on a mesh is baked into a picture laid out by its texture coordinates — a whole UDIM set tile by tile, or several meshes side by side in one atlas.

🌐Rendering elsewhere

spectra-server renders scenes sent to it over the network — for machines without a graphics card of their own. Only programs that know the key get in, and everything after that is encrypted. Pictures come back losslessly compressed, and a changed scene travels as just its changes: moving one object in a 61 MB scene sends 38 bytes.

🖥Several machines, one picture

One picture is split into bands of rows and rendered by several machines at once — render servers and the computer itself; an animation goes a whole frame to a machine. Faster machines take more, a machine that fails drops out and its work goes to the others, and nobody waits for the slowest. The result is the picture one machine makes, bit for bit, with every buffer. Programs manage the machines through a small library of their own, spectra-cluster.

💇Hair, toon and finer detail

A hair material for curves, with the light that goes through a strand; toon shading with outlines; displacement that cuts a mesh finer where the camera sees it larger. For models textured in tiles, UDIM texture sets.

💡Light that is hard to find

Light portals for rooms lit through their windows, a tree of lights for scenes with thousands of lamps, and scrambled Sobol points for less noise from the same samples. Manifold next-event estimation finds the light of lamps through clear glass at once, and path guiding teaches the paths where the light comes from (on the processor for now).

🎛Ready for compositing

Cryptomatte with the names of meshes and materials, deep pixels in OpenEXR deep files, motion vectors, and light path expressions, buffers for any part of the light (these on the processor for now). Scenes render in a working space of linear Rec. 709 or ACEScg, and pictures say their own space.

Rendered With Spectra

◆
Four balls: matte, wax with light travelling under the surface, velvet with sheen, and brushed steel
Matte, wax, velvet, brushed steel
A cloud, a glass ball of juice, a ball of fire and a chrome ball reflecting the sun, under an evening sky
Cloud, juice, fire and chrome
A red ball flying past and a spinning bar blurred by motion, a blue ball standing still, and a column of smoke
Motion blur and smoke
A forest of thousands of round green trees made from two stored meshes
5000 instances
The Cornell box: red and green walls, a ceiling lamp, a tall block and a glass ball
The Cornell box
A row of pillars in fog with shafts of light between them
Volumetric fog with light shafts
Red, gold and glass balls in a dark studio under two panel lamps
Panel lamps in a studio
The three balls on a checkered floor lit by the computed sky
Under the computed sky
The same scene rendered with the direct integrator
The direct integrator
The same hair model in dark brown, copper and blond on a grey floor under the sky
Hair in three colours
A polished gold ring on a table gathering a lamp's light into a curve
The curve of light inside a gold ring
A white beam enters a glass prism and leaves as a fan of colours, with a mirror behind it and a glass ball in front
A beam split by a prism

Documentation

◆

📖Manual

Rendering with the tools: sample scenes, models, lights, cameras, the render server and several machines at once.

Open

🔧SDK guide

Building Spectra into your own program: linking, scenes, materials, sessions, several machines and every function.

Open

All languages

System Requirements

◆
  • Tested on: Windows x64, built with Visual Studio 2022 and with MinGW gcc; Linux x64 with gcc (no graphics card); the next version also macOS on Apple silicon with Apple clang.
  • Processor: any 64-bit processor; all cores are used.
  • Graphics card (optional): an NVIDIA card with CUDA. A build that includes the graphics-card kernel still runs on machines without one.
  • To use it: a C or C++ compiler; the header spectra.h and the static library are all a program needs.

Status

◆

Version 1.23. 1.0 was the first release: from it on, the programming interface only grows. The processor and graphics-card renderers work, give the same pictures bit for bit, and are covered by over 9,200 automatic checks on Windows, and the tools, the render server and rendering on several machines by over nine hundred more.

Linux builds and passes its tests. The next version also builds on macOS: a universal library that passes its tests on Apple silicon, its x86_64 part built and linked but not yet run. The MorphOS build is cross-compiled with every release, since 1.7 together with the library for several machines (there only the program's own machine, no network yet), and its test programs build too — but none of it has run on MorphOS yet. Spectra is commercial, closed-source software; binary builds of the library are available under a separate licence agreement — get in touch.

Change history

◆
  • 1.22 – 1.23 · 2026-11-04 A hair material for curves, with the light that goes through a strand, and displacement cut finer where the camera sees the mesh larger.
  • 1.15 – 1.21 · 2026-11-03 Scrambled Sobol points, a tree of lights, light portals, path guiding and caustics through glass found at once (manifold next-event estimation); also light path expressions and renders saved to be continued later.
  • 1.8 – 1.14 · 2026-10-29 Cryptomatte with names, colour spaces (linear Rec. 709 or ACEScg), deep pixels in OpenEXR, toon shading with outlines, UDIM texture sets and motion vectors.
  • 1.5 – 1.7 · 2026-10-28 Programs manage several machines through a library of their own, an animation goes a frame to a machine, nobody waits for the slowest machine, and pictures from servers bring every buffer. The MorphOS build now includes that library (its own machine only); it still has not run on MorphOS.
  • 1.1 – 1.4 · 2026-10-28 One picture rendered by several machines at once, bit for bit as on one; sessions that keep the pixels a change of the scene did not reach; lossy WebP pictures; the processor tests four triangles at once.
  • 1.0 · 2026-10-28 The first release: the programming interface reviewed (from now on it only grows), version numbers in the header, and the manual and SDK guide brought up to date in all eight languages.
  • 0.98 – 0.99 · 2026-10-28 WebP textures (EXT_texture_webp, lossless) and compressed glTF geometry (EXT_meshopt_compression) in the tools.
  • 0.95 – 0.97 · 2026-10-28 The direct integrator on the graphics card too, the same picture on the processor and the graphics card bit for bit, and box tests in vector instructions for about 10% faster processor renders.
  • 0.92 – 0.94 · 2026-10-27 The render server's conversation encrypted, its pictures compressed and changed scenes sent as just their changes; OpenEXR environment maps in the tool.
  • 0.89 – 0.91 · 2026-10-27 Faster processor renders with wider trees, a key for the render server, and subsurface scattering with less noise.
  • 0.72 – 0.88 · 2026-10-27 Motion in steps (moving lamps, meshes that change shape), volumes with priorities, subsurface scattering in the direct integrator, baking whole UDIM sets and compressed OpenEXR files.
  • 0.71 · 2026-10-26 A window to watch a render in, and the GPU kernel compiled to machine code.
  • 0.51 – 0.70 · 2026-10-15 Baking, ambient occlusion, object-number and position passes, thin films, more kinds of camera, stereo pictures and volumes that glow with heat.
  • 0.27 – 0.50 · 2026-10-12 Shader node graphs (28 kinds of node), normal and bump maps, camera kinds, subdivision surfaces, OpenEXR output, light split into passes, light linking and pixel filters.
  • 0.15 – 0.26 · 2026-10-11 Caustics from mirrors, the sun and the sky, sessions that follow a changing scene, a render server, curves for hair and fur, displacement and pattern textures.
  • 0.11 – 0.14 · 2026-10-10 Glass that splits light into colours, a prism as the start-up scene, and light traced from the lamps for caustics.
  • 0.2 – 0.10 · 2026-10-09 Progressive rendering, the NVIDIA GPU backend, image-based lighting, the Principled material, a physical sky with the sun, volumes, motion blur and adaptive sampling.
  • 0.1 · 2026-10-09 First version: a processor renderer covering what Artheon Titler's built-in ray tracer does.