A high performance rasteriser for digital image correlation uncertainty quantification.
Riley is a high performance software rasteriser written in Zig for digital image correlation uncertainty quantification (DIC UQ). It synthesises deformed speckle images from finite element simulations, with higher order surface elements (tri3, tri6, quad4, quad8, and quad9), realistic camera models and distortion as well as texture/nodal/analytic shaders, and mixed scenes.
Riley's Zig core uses comptime specialisation and SIMD with @Vector to keep its rendering path fast and direct. It also uses hierarchical offline parallelisation allowing scaling over cameras and timesteps to be rendered. Riley is available as a Zig library and executable, a C compatible ABI, and the riley-raster Python package which provides python bindings to the compiled Zig library.
Riley uses Zig 0.16.0. Clone the repository, then build and run the smallest demo:
zig build demo0-quickstart -Doptimize=ReleaseFastRenders are written to out/. Run the combined test suite with:
zig build test-verif-basicInstall the published package:
python -m pip install riley-raster
python -m riley demo0_quickstartPython renders are written below out_riley_py/. For development from a checkout, install it in editable mode:
python -m pip install -e .The Zig test suites are intentionally separated by purpose. The focused verification suite requires the production f64 and SIMD configuration; run zig build --help for the complete target list and configuration options.
| Command | Purpose |
|---|---|
zig build test-verif-basic |
Fast combination of focused analytic verification and basic regression tests. |
zig build test-verif |
Analytic verification of the solver, silhouettes, depth buffer, and camera distortion. |
zig build test-basic |
Basic regression suite. |
zig build test-full -Doptimize=ReleaseSafe |
Full regression suite. |
Run the packaged Python test suite with:
python -m pytest --pyargs riley.pytests -sor:
python -m riley testThe python tests include parity analysis between the Zig demo output when the repository assets and Zig compiler are available; they skip when installed from a clean PyPI package.
Riley provides a series of capability demos in Zig and Python. For example, render the rabbits demo with:
zig build demo2a-rabbits-mono -Doptimize=ReleaseFastThe equivalent Python demo is:
python -m riley demo2a_rabbits_monoBrowse the complete Zig demo directory or Python demo directory. The image links below are absolute GitHub URLs so they render both on GitHub and on PyPI.
The rabbit scene combines all supported element types and the principal shader families in a single render.
A representative stereo DIC UQ render of a plate with a hole in tension.
| Camera 0 | Camera 1 |
|---|---|
![]() |
![]() |
Stereo calibration target renders using the DIC UQ camera setup.
| Camera 0 | Camera 1 |
|---|---|
![]() |
![]() |
The main Zig entry point for the rendering pipeline is the raster(...) family in ./src/riley/zig/riley.zig.
Useful top-level locations:
src/: Zig demos, tests, benchmarks and the core Riley sourcesrc/riley/zig/: core Zig raster pipeling implementationsrc/riley/cython/: Cython->Python bindings for Rileysrc/riley/python/: Python utilities for setup and mesh manipulationsrc/riley/pydemos/: packaged Python demossrc/riley/pytests/: packaged Python testsgold/: gold reference renders for regression testingout/: Zig render and benchmark outputout_riley_py/: Python render outputdev/README.md: detailed developer testing and benchmark notes
For a mathematical and architectural overview, see the engrXiv preprint: Riley: A computational framework for higher-order finite element image synthesis applied to digital image correlation uncertainty quantification.
Riley provides a C-compatible API for use from other languages. The Python bindings use this interface through Cython, but it can also be called from C or from any language with a C FFI.
The public C ABI is intentionally fixed to the production Riley build with: precision=f64, SIMD=on. The extern types and functions live in src/riley/zig/c-riley.zig.
If you have found Riley useful you can cite it using:
Fletcher, L., Hirst, J., and Bielajewa, W. (2026). Riley: A computational framework for higher-order finite element image synthesis applied to digital image correlation uncertainty quantification. engrXiv preprint. https://engrxiv.org/preprint/view/7300
@article{fletcher2026riley,
title = {Riley: A computational framework for higher-order finite element image synthesis applied to digital image correlation uncertainty quantification},
author = {Fletcher, Lloyd and Hirst, Joel and Bielajewa, Wiera},
year = {2026},
journal = {engrXiv},
note = {Preprint},
url = {https://engrxiv.org/preprint/view/7300}
}- Lloyd Fletcher (ScepticalRabbit), UK Atomic Energy Authority
- Joel Hirst (JoelPhys), UK Atomic Energy Authority
- Wiera Bielajewa (WieraB), UK Atomic Energy Authority
- James Panayis (james-panayis), UK Atomic Energy Authority
- Megan Sampson (meganasampson), UK Atomic Energy Authority
Named in memory of Riley, and for Feebee, her sister and bondmate. Without your love and support, this project would never have happened.






