Build and Raytrace 3D Scenes
Overview
Render scenes using pathtracing. Build 3D scenes out of spheres, cubes, planes, disks, triangles, cones, curves, line segments, cylinders, ellipsoids, and 3D models in the 'Wavefront' OBJ file format or the PLY Polygon File Format. Supports several material types, textures, multicore rendering, and tone-mapping. Based on the "Ray Tracing in One Weekend" book series. Peter Shirley (2018) https://raytracing.github.io.
- Move EXR white-balance baking controls from the render functions to
sky_light_image(). Cache each adapted sky for use in stills and animations, reusing the generated sky when only the target white point changes. - Fix Windows
near/farmacro collisions in geometry and volume code. Remove unused preview state and signedness warnings in BVH construction and spline interpolation, and make haze-cut sorting bounds explicit. Correct RGB-to-HSV conversion to include blue when finding the maximum channel and initialize hue on every path. - Automatically select the NEE integrator for scenes containing native atmospheric skies or attached media, including clouds and instanced media, instead of requiring an explicit
integrator_type = "nee"selection. Recognize emitting media when deciding whether to add automatic ambient illumination.
Show all changes in 0.42.0Hide the rest of the changes in 0.42.0
- Fix Windows macro collisions in atmospheric lighting and preview test builds using X11. Emit the transform error-bound overloads needed by volume boundaries explicitly so optimized GCC builds load reliably.
- Select finite lights with a spatial light BVH in the NEE integrator, using distance, estimated power and emission direction. Retain the previous scattering context for matching MIS probabilities and mix in the original distribution to preserve support for textured and animated emitters.
- Accelerate eligible opaque NEE shadow connections with early-exit BVH traversal and reduced triangle intersection work. Select explicit emitters with matching MIS weights, avoiding full light-mixture PDF scans and supporting multiple and instanced lights. Preserve ordered visibility for media and alpha masks, and retain the directional-mixture estimator for atmospheric transport.
- Store BVH4 leaf primitive ranges in compact records, reducing BVH memory use.
- Reduce BVH traversal bookkeeping while preserving intersection order, and defer unused medium transforms in surface hit records.
- Split the interactive preview status bar into camera information and rendering flags on separate rows.
- Reuse rendering workers across samples and wake on task completion, removing fixed polling delays from beauty and denoising feature passes while retaining preview cancellation and R interrupt handling.
- Reduce the default Moon disk resolution to 256 pixels in
moon_light()and automatic sky lights, retaining the Moon renderer's 2x antialiasing. - Skip grid emission lookups for media with zero RGB emission and no temperature field, or with emission disabled by a zero scale.
- Keep interpolated camera-up vectors at keyframes to avoid brief roll wobbles when damping camera motion. Keyed positions and lookat targets are retained.
- Allow
sky_light()below a Sun elevation of -4.2 degrees. Prague contributes black sky and no solar haze, while enabled Moon, stars, and planets retain their light, atmospheric transmission, and Earth occlusion. - Add continuous local evolution to
cloud()withtand an independentanimation_seed. Broad and fine noise evolve smoothly while position remains controlled by x/y/z. Time zero preserves existing clouds exactly. - Expose sky model settings directly in
sky_light()andsky_light_image(). Both acceptaltitude,visibility, and other named settings instead of asky_argslist. Image resolution and Hosek settings belong tosky_light_image(); native atmospheric sampling usessampling_resolution. - Add
cloud(), a procedural cumulus/stratus volume centered at the origin, with standard position, rotation, and scale controls. The density field and its boundary transform together. Sky examples now use the exported constructor. - Correct the Z rotation matrix used by R-side group and animation transforms to match the positive-angle convention of direct objects and instances.
- Enable altitude-dependent lighting, finite haze, and deferred haze sampling by default in
sky_light(). Exposehazeandquery_altitudecontrols, and reduce horizon bands withhaze_filter, sampling one nearby atmospheric path per haze query. Reuse exact spectral queries and precompute transmission reconstruction withcache_spectra,transmission_table, andtransmission_table_max_mb. - Exclude haze from volume interiors by default with
haze_in_volumes = FALSE. Individual media also supporthazeandhaze_density_threshold; clouds default to haze off, with a density cutoff of 0.05 when enabled. - Add capsule terrain, trees, and cloud examples comparing altitude-dependent lighting and haze, with additional atmospheric controls described in the help.
- Fix Moon disk and legacy sky preparation in skymodelr so the upper limb remains visible after the center sets. Normalize the complete disk before horizon clipping, with continuous horizon attenuation and color.
- Add
sun_light()andmoon_light()scene elements using skymodelr positions, apparent sizes, Prague solar radiance, and detailed phase-dependent lunar textures. Dedicated disk sampling preserves detail independently of sky-map resolution, with consistent solid-angle PDFs and light-selection weights. Both lights use the public skymodelr disk generators for radiance and geometry. - Add image-based
infinite_light()scene elements, named light management, and additive sampling of multiple environments. Existing environment render arguments remain supported. - Add
sky_light()for native Prague location/time skies, with automatically sampled Sun and Moon disks. Addsky_light_image()for cached skymodelr EXRs shared across still renders, animation, and preview. - Make animation environment rotation use the same direction as still renders, and isolate its preview environment transform from geometry transforms.
- Preserve preview RGB colors when exporting snapshots through rayimage.
neenow traces surfaces and RGB participating media with null scattering and path-space MIS. Its images change;rtiowremains the default and legacy fog remains available inrtiowandbasic.- Add reusable homogeneous, dense-grid and uncompressed float NanoVDB medium descriptions, independent medium attachments, nested containment, anisotropic scattering, and RGB or normalized blackbody emission.
- Add volume transmittance alpha, alpha-aware adaptive sampling, color-only denoising for participating media, and consistent RGBA animation and snapshots.
- Correct NEE light PDFs, sampler dimension reuse, segment-based dielectric absorption, deterministic volume boundary intersections, and realistic-camera shutter-time preservation.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK, 1 FAILURE2026-06-08
- WARNING12 OK, 1 WARNING2026-06-07
- OK13 OK2026-05-02
Show 3 earlier changesHide 3 earlier changes
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 152 (64 internal)
- Examples that run
- 92%82 run in a plain check (81 of them under a condition) · 7 never run
- Exported functions with examples
- 94%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 83%
- Median days to close, 50 most recently updated closed issues
- 14
- Median days to close, 50 most recently updated closed PRs
- 7
Stars over time
Forks over time
Issues over time
PRs over time
Commits over time
11 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/tylermorganwall/rayrender on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-18 · The repository has a site deploy workflow
pkgdown site last built 2026-09-18
Show all practicesHide 1 practice
Dependencies
Installing rayrender adds 58 packages (37 with compiled code, 40 MB of source tarballs). Heaviest: stringi 11 MB, sp 4.3 MB, spacefillr 3.1 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.42.0Latest2026-09-16 · current release · diff ↗ ·
added 21 exports
add_camera, add_infinite_light, camera, cloud, get_camera, get_infinite_light, grid_medium, homogeneous_medium, infinite_light, list_cameras, list_infinite_lights, moon_light, nanovdb_medium, preview_camera, remove_camera, remove_infinite_light, set_active_camera, set_medium, sky_light, sky_light_image, sun_light - 0.41.32026-06-16 · diff ↗ ·
removed 2 exports
%>%, run_documentationadded 3 exports
has_denoiser, screen_line, screen_text - RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 0.38.102025-02-28 · diff ↗
- 0.38.8
- 0.34.32024-08-01 · diff ↗
- 0.34.2
- RR 4.4.0 released · 2024-04-24
- 0.32.22024-02-20 · diff ↗
- 0.31.2
- 0.29.62023-06-08 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 0.29.42023-01-27 · diff ↗
- 0.28.82022-10-27 · diff ↗
- 0.27.1
Show 12 earlier eventsHide 12 earlier events
- RR 4.2.0 released · 2022-04-22
- 0.23.6
- RR 4.1.0 released · 2021-05-18
- 0.21.22021-04-07 · diff ↗
- 0.21.12021-04-03 · diff ↗ ·
added 29 exports
bezier_curve, csg_box, csg_capsule, csg_combine, csg_cone, csg_cylinder, csg_ellipsoid, csg_elongate, csg_group, csg_object, csg_onion, csg_plane, csg_pyramid, csg_rotate, csg_round, csg_rounded_cone, csg_scale, csg_sphere, csg_torus, csg_translate, csg_triangle, generate_camera_motion, hair, mesh3d_model, path, ply_model, render_animation, render_preview, text3d - 0.14.0
- RR 4.0.0 released · 2020-04-24
- 0.9.1
- 0.6.0
- 0.4.2
- 0.4.02019-10-09
- RR 3.6.0 released · 2019-04-26
Package metadata
- First published
- 2019-10-09
- Total releases
- 20 / 7 yrs
- License
- GPL-3 OSI
- Copyright
- See inst/COPYRIGHTS in the package
- Minimum R
- ≥ 4.3.0
- Download size
- 1.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rayrender")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.