External libraries used:
- tinyxml2 (tinyxml2.h, tinyxml2.cpp are provided in the homework files.)
- lodepng (lodepng.h, lodepng.cpp are provided in the homework files.)
- Eigen (Can be obtained from http://eigen.tuxfamily.org/)
- jpeglib
Command to compile:
g++ -I /usr/include/eigen3/ -std=c++11 -O3 main.cpp RayTracer.cpp ray.cpp shape.cpp light.cpp tinyxml2.cpp lodepng.cpp BVH.cpp texture.cpp -o RayTracer -ljpeg
Computer specs:
Intel Core i7-2630QM CPU @ 2.00 GHz, 6 GB RAM
Running the ray tracer:
./RayTracer command should be fed by the relative path of the input file, e. g.,
./RayTracer demo.xml
Related articles:
1. http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=4634627
2. https://cseweb.ucsd.edu/~ravir/papers/singlescat/scattering.pdf
Term project's topic was to choose a model to simulate participating media (e. g., fog, haze, smoke) and implement it in ray tracer.
A very simple input file and executable for it is given in the ling below:
https://drive.google.com/drive/folders/0ByiItrg43ou-OVNmcHdVN08xLWs?usp=sharing
Far-away objects should be seen less clear than near objects due to participating media.
There is one point light in the scene.
Anti-Aliasing: MSAA w/ 25 samples
Render Time: 92m 14s
In previous assignments, it was not possible to render a point light even it directly sees the camera (Because a point light has no volume). In the image left, a point light seen as if it had a volume thanks to the participating media's aerial glow effect.
There is one point light in the scene.
Anti-Aliasing: MSAA w/ 16 samples
Render Time: 113m 56s
Spot lights forms a light cone due to the participating media.
There is one spot light in the scene.
Render Time: 13m 4s
Note:
sigma_a = (0.1, 0.1, 0.1)
sigma_s = (0.3, 0.3, 0.3)
Spot light radiates only white light, also the surface absorbs and reflects all the spectrum equally. The color is due to fact that in this scene participating media scatters each color channel differently.
There is one spot light in the scene.
Render Time: 11m 27s
Note:
sigma_a = (0.07, 0.07, 0.07)
sigma_s = (0.1471, 0.2930, 0.3000)
Volumetric shadows with basic geometry.
There is one spot light in the scene.
Anti-Aliasing: MSAA w/ 36 samples
Render Time: 497m 58s
Volumetric shadows with complex geometry.
There is one spot light in the scene.
Anti-Aliasing: MSAA w/ 36 samples
Render Time: 650m 42s
Hiç yorum yok:
Yorum Gönder