- 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/)
Command to compile:
g++ -I /usr/include/eigen3/ -std=c++11 -O3 main.cpp RayTracer.cpp Vec3d.cpp Ray.cpp shape.cpp tinyxml2.cpp lodepng.cpp BVH.cpp -o RayTracer
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.,
795_input_set_02/horse.xml
This week's task was to implement reflection and refraction, more specifically, implementation of Snell's Law, Schlick's approximation to Fresnel equations and Beer's Law.
File Name: cornellbox_glass.xml
Render Time: 9.088 seconds
File Name: glass_plates.xml
Render Time: 12.981 seconds
Comments: Although refraction and transmission phenomena looks to be implemented correctly, the image looks as if we are looking at the scene at a slightly different angle than the original output. The problem seems to be related with the camera model implementation.
File Name: horse_and_glass_mug.xml
Render Time: ~1 minute 28 seconds
File Name: killeroo_glass.xml
Render Time: 44.333 seconds
Comments: When I run the .xml file provided as it is, the image looks like we are looking at the scene from just outside of the green wall (was discussed in the class.). To better understand the problem, I took all the box meshes out except the one under the dino (with mesh id's 3, 4, 5, 6, 7), and added the walls one by one.
File Name: killeroo_glass.xml
Render Time: ~45 seconds
Comments: Green wall added (mesh id 3).
File Name: killeroo_glass.xml
Render Time: ~45 seconds
Comments: Blue wall added (mesh id 4).
When the other walls are added, the image is created as if the camera outside the box. The problem seems to be related with triangle intersection routine (Especially when the triangle is at the back of the camera.) but I have not solved it yet.
Render Time: 30.315 seconds
Comments: As in killeroo_glass.xml, meshes with id's 5, 6, and 7 are excluded.
File Name: killeroo_mirror.xml
Render Time: 28.262 seconds
Comments: As in killeroo_glass.xml, meshes with id's 5, 6, and 7 are excluded.
Hiç yorum yok:
Yorum Gönder