raytracer 1.0.0
|
raytracer is a C++ code that you can use to generate simple photorealistic images using spheres and planes. Secondly, it can be also used to convert a image from pfm
to png
or jpeg
format.
Note that raytracer since v1.0.0 works only on Linux machines.
If you want to generate animations, we also recommend:
If you're willing to use conda
, or if you already do, all the above dependencies can be installed via
Or you can use your distribution package manager to install them.
If all the dependencies have been met,
Next, follow the instructions below in order to compile raytracer in your own directory.
You will find tests and executable files in build
directory. Note that the executable main file is raytracer
.
To check if tests are passing do
If tests are not passing feel free to open an issue.
A help menu will be displayed by typing (the command-line interface is built using Taywee/args)
raytracer can generate images using 3 algorithms:
examples
directory there are input files defining different scenes.>Note that the file examples/demo.txt
contains instructions on how to write a correct input file.
The following command
will generate the image below (which is defined in the input file examples/demo.txt
)
Thanks to ffmpeg
and a couple of cli options it is possibile to generate simple animations; the scripts demo_animation.sh
and generate-image.sh
facilitates this, and by launching
will produce
Feel free to tweak the scripts to your own liking.
raytracer can also convert images from HDR to LDR format (only png
and jpeg
are supported): use the convertpfm2png
command as in the following example:
If you wish to contribute or you have just found any bug, please open an issue or a pull request on our GitHub repository. Thank you!
raytracer is licensed under the terms of the GNU General Public License v3.0 and is available for free. See the file LICENCE.md.