|
scimesh 0.3.2
Headless CPU-only 3D software renderer for scientific mesh visualization
|
Scimesh is a 3D renderer built for scientific mesh visualization, delivering publication-quality imagery entirely on the CPU.
Scientific compute environments are often constrained by the absence of graphical interfaces, specialized hardware, or complex driver stacks. Scimesh eliminates these bottlenecks by providing a zero-dependency, headless rendering pipeline—no OpenGL, no X11, and no GPU drivers required. Whether you are running complex visualization scripts on HPC clusters, inside isolated containers, or even on a modern macOS laptop where missing support for X11 makes traditional tools like rgl a challenge, Scimesh works reliably wherever your C++17 or R code runs.

The Stanford Dragon (871k triangles), rendered with scimesh's software rasterizer using smooth shading, three-point Blinn-Phong lighting, and 4x anti-aliasing. Render time 5.2 seconds on the author's mini PC (AMD Ryzen 7 8745H CPU). Source code: R | C++

A FreeSurfer reconstruction of a human brain surface based on an MRI scan (300k triangles), rendered with scimesh's software rasterizer using smooth shading, no anti-aliasing. Render time 1.8 seconds on the author's mini PC. Source code: R | C++
camera_fit_mesh, camera_fit_scene)The R layer gives access to all C++ layer features, and adds on top:
If you need colorbars in C++, have a look at scibar.
That's it — no manual source listing, include paths, or preprocessor defines needed.
The C++ core lives in src/core/. To use scimesh in a C++ project without CMake, add the source files and include paths to your build system. See `CPP_GETTING_STARTED.md` for details.
vignettes/scimesh.Rmd — comprehensive guide to the R package with examples for all major features.examples/R/ — runnable scripts demonstrating textured rendering, transparency, and neuroimaging visualization.?<function>, where you replace <function> with a function name. Like this: ?read_ply.example(<function>) to see a live demo that uses the function <function>. Like this: example(read_ply).cpp_getting_started.html — gentle introduction to the C++ renderer. Getting Started with scimesh C++examples/cpp/ — standalone programs covering textured OBJ, transparency, protein visualization, and whole-brain rendering.| Example | Language | Description |
|---|---|---|
examples/R/spot_cow/ | R | Textured OBJ mesh (Spot cow) with multi-light setup |
examples/R/transparency/ | R | Semi-transparent pial overlay on white matter |
examples/R/primitives/ | R | All geometric primitives demo |
examples/R/dragon/ | R | Stanford Dragon with SSAO, specular, and 4x AA |
examples/R/whole_brain_sulc/ | R | Whole-brain sulcal depth rendering |
examples/R/video_frames_orbit/ | R | Turntable video from orbit frames |
examples/cpp/spot_cow/ | C++ | Textured OBJ rendering with bilinear sampling |
examples/cpp/bunny/ | C++ | High-quality Stanford Bunny with SSAO, specular, and 4x AA |
examples/cpp/dragon/ | C++ | Stanford Dragon with SSAO, specular, and 4x AA |
examples/cpp/all_primitives/ | C++ | All geometric primitives demo |
examples/cpp/transparency/ | C++ | Multi-mesh alpha blending with FreeSurfer data |
examples/cpp/protein_data_bank_pdb_file/ | C++ | Protein ball-and-stick visualization from PDB files |
examples/cpp/whole_brain_sulc/ | C++ | Whole-brain sulcal depth rendering |
examples/cpp/whole_brain_sulc_fsaverage/ | C++ | Same on fsaverage template |
examples/cpp/whole_brain_annot/ | C++ | Cortical parcellation visualization |
examples/cpp/brain_video/ | C++ | Turntable brain animation via camera_orbit() |
examples/cpp/full_CLI_renderer/ | C++ | Self-contained CLI renderer with TOML config + CLI overrides |
Thanks heaps to the authors of these great software packages that scimesh is built upon:
cpp_tests/catch_amalgamated.{h,cpp}: catchorg/Catch2 — C++ test framework by Martin Hořeňovskýsrc/third_party/glm/: g-truc/glm — header-only C++ math library.src/third_party/tinyply.{h,cpp}: ddiakopoulos/tinyply — PLY file reader by Dimitri Diakopoulossrc/third_party/libfs.h: dfsp-spirit/libfs — FreeSurfer file format reader + OBJ mesh loader by Tim Schäfersrc/third_party/stl_reader.h: sreiter/stl_reader — STL file reader, maintained by Sebastian Reitersrc/third_party/stb_image.h, src/third_party/stb_image_write.h: nothings/stb — image loading/saving, maintained by Sean BarrettAnd of course, thanks to the authors of the dependencies of these packages, and their dependencies...
Detailed information on the licenses for all these packages (all MIT-compatible) can be found in the file THIRD_PARTY_LICENSES.md.
Note: This section is to give credit only. Users do not need to worry about installing these dependencies, they come vendored with scimesh already.
Please refer to README_DEVELOPMENT.md.
License: MIT
Author: Tim Schäfer