Commit graph

41 commits

Author SHA1 Message Date
e64b9403ac Log some extra spaces when logging scene objects 2014-08-03 17:38:22 -07:00
a0fbecf483 Log all objects before starting the render 2014-08-03 17:25:25 -07:00
556e13ae74 I was a little to hasty with this clean up
I actually need this check to get the closest shape for intersection.
2014-08-03 13:05:22 -07:00
4cbe9df324 Legacy code clean up for t values
Intersection methods push values into the t vector in ascending order, so no need to check them in TraceRay.
2014-08-03 12:46:14 -07:00
6dcb9dd37f The problem was this one subtraction. Seriously. 2014-08-02 23:46:02 -07:00
5390600cdd TODO: what does this (apparently) random conditional do? 2014-08-02 15:32:27 -07:00
8ea832c090 Disable specular calculations for now.
Just to simplify things while I'm figuring out the lighting model...
2014-08-02 15:23:22 -07:00
79c951030d Move Stats to its own module
Move Stats to its own module and pass it around to the intersection methods to keep track of how many tests and successful intersections there are.
2014-08-02 15:21:14 -07:00
b60e27824b Forgot declaration of shadowRay <- shadow_ray 2014-08-02 14:33:50 -07:00
8de737decd Little bit of code clean up in TraceRay 2014-08-02 14:30:40 -07:00
f8ec140f8e Do some logging in Scene 2014-08-02 00:28:02 -07:00
f5f47f5a9a Print number of objects in the scene before rendering 2014-07-22 21:40:25 -07:00
5a8d634590 Update Scene a bit for new code style and namespaces in Object and Sphere 2014-07-20 16:54:10 -07:00
0d2011931c Account all types of rays -- print them at the end 2014-07-20 14:21:12 -07:00
c65c6a3cfd Use shared_ptr for Scene::mCamera
Makes memory management a bit easier...
2014-07-20 12:37:31 -07:00
3ec5b20f16 Rename Scene::camera -> mCamera 2014-07-19 20:57:12 -07:00
68d0083ba8 Object::get_material returns a pointer instead of a reference 2014-07-19 14:09:47 -07:00
25b246d3ed Use the PerspectiveCamera to generate primary rays. 2014-07-16 23:32:44 -07:00
a41817217a Blend specular color with reflected color 2013-09-21 17:14:47 -07:00
d5f640871c Comment about lambert shading 2013-09-21 17:06:49 -07:00
daeb052003 Don't acknowledge intersections closer than t=1e-2.
This avoids intersections with the shape itself.
2013-09-21 17:04:54 -07:00
6c1e8c7ffb Add min_weight property to Scene 2013-09-21 17:01:11 -07:00
482896cfa1 First pass at doing reflections -- splotchy... 2013-09-21 16:45:30 -07:00
58f3cdd304 Add default values for trace_ray depth and weight arguments 2013-09-21 16:45:10 -07:00
90530b74ef Return Black if max depth exceeded 2013-09-21 15:42:11 -07:00
16a37f6fb3 Shadows! 2013-09-13 18:56:07 -07:00
529b1978a6 Use diffuse parameters to compute shading 2013-09-13 18:39:23 -07:00
438b0734a4 Use ambient light in lighting calculations 2013-09-13 18:25:22 -07:00
3b7f672ab3 Add get_ambient() to Scene 2013-09-13 18:25:09 -07:00
cae8b21068 Clean up shapes and lights lists 2013-09-13 14:15:55 -07:00
fcd2781cc7 Add ambient property to Scene 2013-09-13 14:15:34 -07:00
55ef253c10 New lighting object tree: AmbientLight -> PointLight 2013-09-13 14:14:03 -07:00
cc126a153e Add ray count and duration stats 2013-09-12 09:10:22 -07:00
a3bdc01d45 Compact some normalization and stuff 2013-09-11 22:11:56 -07:00
e76bf0f444 Lambert shading! 2013-09-11 22:03:50 -07:00
8a1934f957 Reorder some code -- just some formatting 2013-09-11 10:35:03 -07:00
247e205827 Return material color if there was a ray intersection 2013-09-11 10:33:56 -07:00
3a5c6cddf9 Add max_depth parameter 2013-09-11 10:33:20 -07:00
6bb7689ac0 Add lights to the scene 2013-09-10 21:49:01 -07:00
72c0d1475e Yay! 2013-09-10 21:04:56 -07:00
568e3f4c55 Update scene module for C++ 2013-09-10 16:28:38 -07:00