Interpreter

Once a scene is defined in a text file such as scene.txt, it can be interpreted and rendered using the interpreter.jl script. This script is designed to read the scene file, parse its contents, and execute the rendering process based on the specified parameters.

Parameters available are:

ParameterKeyword(s)Default ValueDescription
Image Width--width, -W640Width of the output image
Image Height--height, -Hround(width / camera.a_ratio)Height of the output image
Output Image--output, -ooutput.pngOutput image file name
Output PFM--pfm_output, -poutput.pfmOutput PFM file name
Renderer--renderer, -rpath_tracerRendering algorithm
Antialiasing--antialiasing, -a2Antialiasing level
Rays per Hit--n_rays3Rays fired at each intersection
Max Ray Depth--depth3Maximum ray recursion depth
Russian Roulette--russian2Russian roulette level
Overriden Variables-v [var1 1.0...]NoneOverride scene variables

The name of the scene file must be provided as the first argument when running the script. All other parameters are optional and will use their default values if not specified.

The final usage of the script is:

julia -t auto interpreter.jl scene.txt

Another example of usage with custom parameters:

julia -t 4 .\interpreter.jl .\scenes\tree.txt -W 900 -H 1600 -a 4 --n_rays 4 --depth 3 -o .\Images\tree_path_1600x900_4_4_3_2.png -p .\Images\tree_path_900x1600_4_4_3_2.pfm