HeadlinesBriefing favicon HeadlinesBriefing.com

Luz: A Zero‑Dependency C++20 Path Tracer with Blender Exporter

Hacker News •
×

Luz, a C++20 path tracer built from the ground up, eliminates third‑party libraries while delivering full Monte‑Carlo rendering, global illumination, and adaptive sampling. The project ships with a Blender‑to‑Luz exporter, enabling quick conversion of scene files and OBJ meshes. Users can tweak every render parameter via CLI or custom .luz files, making the tool highly configurable.

Luz incorporates packed‑mesh BVH acceleration with SAH construction and near‑first traversal, boosting performance on complex scenes. Its NFOR‑style denoiser supplies a companion image after rendering, while atmospheric scattering, depth‑of‑field, and tone‑mapping support realistic lighting. Rendering runs on multithreaded CPUs, and the tool outputs BMP or TIFF images for immediate inspection.

Building Luz is straightforward: a Makefile targets macOS and Linux, while CMake supports Windows with MSVC or MinGW. Release builds enable -O3, -march=native, and LTO for speed, though binaries may falter on older CPUs. Users can disable these flags with clean rebuilds, ensuring portability across platforms without sacrificing core rendering capabilities.

Luz ships a deterministic benchmark harness that reports render, denoise, and post‑process times, allowing developers to compare performance across CPUs. Sample commands render a bundled monkey scene in 300×300 pixels with 50 samples, outputting render.bmp. Test suites validate correctness, while the documentation guides Blender exporters and scene‑file syntax.