Raytracing package for the generation of photorealistic images in Julia.
Julia version required: ≥ v1.6 (tested on julia 1.6 and julia 1.7)
Note: we refer to stable documentation for the latest tag, and dev documentation for the current code in the master branch.
The main purpose of this package is to generate photorealistic images given an input scene.
The input scene is composed by a list of shapes (spheres, planes, ...) of various materials (for now diffusive or reflective) with different colors, each one with in a particular position in the 3D space. The observer is represented by a camera, that can do a perspective or an orthogonal projection. The camera will see the scene through a screen, characterized by its aspect ratio, distance from the camera and resolution. The image can be rendered with different backwards ray tracing algorithms: a path tracer (the default renderer), a point-light tracer, a flat renderer and an on-off renderer; this process can be parallelized using multiple threads. Each of these aspects can be managed, tuned and modified using the low-level API of the package (see below).
There are two main steps in the image generation. We offer high-level API and a CLI tool (see below) for these steps.
-
The generation of an HDR (high dynamic range) image in the PFM format. In this step, the scene is loaded along with the informations about the observer (position, orientation, type of the camera, ...) and the choosen renderer. Then the image is rendered using the choosen algorithm.
-
The conversion of this image to an LDR (low dynamic range) image, such as jpg or png, using a tone mapping process.
Scenes can be defined using SceneLang (see below).
We provide:
-
A package with both high-level and low-level API. It's possible to use the package's features directly from the REPL or in more complex scripts. See quickstart.
-
A CLI tool. Thanks to the simple usage and the extended help messages, it makes possible the use of this package's high-level features to those who do not know Julia lang. See quickstart.
SceneLang is a Domain-Specific Language (DSL) used to describe a 3D scene that can be rendered by Raytracer. See quickstart.
Being a DSL, SceneLang lacks some of the basic features of general purpose languages: there are no functions or custom types or even flexible arithmetic operations. SceneLang is made only to construct scenes to be rendered.
There is also a syntax highlighting Visual Studio Code extension.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
See contributing instructions here.
The code is released under an MIT license. See the file LICENSE.md.