Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgmb/ray
A simple raytracer. YAML goes in, PNG comes out.
https://github.com/cgmb/ray
Last synced: 27 days ago
JSON representation
A simple raytracer. YAML goes in, PNG comes out.
- Host: GitHub
- URL: https://github.com/cgmb/ray
- Owner: cgmb
- License: mit
- Created: 2014-03-27T04:58:33.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-06-14T22:53:54.000Z (over 7 years ago)
- Last Synced: 2023-08-01T13:23:47.051Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 927 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ray
A simple raytracer. YAML goes in, PNG comes out.# Example Output
![a green and rough metalic sphere floating over a checkerboard, casting two shadows](examples/sphere_checkerboard.png)
![Boba Fett in front of a funhouse mirror](examples/smooth_mesh.png)
![a glass sphere in front of a black-and-white patterned sphere and a dark (mirrored) sphere, casting shadows onto a blue square](examples/nonphoto_refract.png)## Implemented features
- Object types: spheres, triangle mesh
- Shadows
- Reflections (recursive)
- Refractions (recursive)
- Input format: (from file, yaml)
- Output format: (to file, png)
- Multithreaded rendering## To Build
The 3rdparty dependency, libyaml-cpp, must be built seperately. Navigate to
the 3rdparty directory and run the build script. It was tested to build
correctly on the lab computers. Hopefully it just works for you. If not, the
most likely cause of failure is missing boost headers. If so, installing boost
should fix the problem.With the 3rdparty libraries built, make will build the main software.
```
cd 3rdparty;
./build.sh
cd ..
make
```## To Run
The 'run' script is used to setup the environment for the main program.
e.g.
./run ./ray [options]For a list of options, use "--help".
Most of the program's function is controlled through the input scene file. The
scene is specified in the YAML data format, and the format should be easy to
pick up from an example, but a specification is available from "--help scene".