A Path tracer back
Board:
Board index
Raytracing
General Development
My First...
(L) [2012/08/13] [tby Torwgia] [A Path tracer] Wayback!Trying out making a Path Tracer after reading around a bit. I think I might have messed up a bit so far. There "should" be two spheres(one red, one blue) on top of a plane.
Lets see if I can fix it. Please excuse the jpg quality, I haven't gotten used to using convert yet.
[IMG #1 Image]
[IMG #1]:
(L) [2012/08/14] [tby Torwgia] [A Path tracer] Wayback!Made more progress last night before bed.
[IMG #1 Image]
1024 samples
Turns out I had forgotten to normalize a the direction vector for my rays as the camera was generating them.  oops haha.
I think the next thing on the list to due is triangles and some sort of jittering of the produced rays.
[IMG #1]:
(L) [2012/08/14] [tby raider] [A Path tracer] Wayback!Quite strange sharp "shadows" on the walls. They should not be there in that kind of scene. Seams to me you've overlooked one more bug.
(L) [2012/08/15] [tby Torwgia] [A Path tracer] Wayback!hmm, I think that might be caused from my poor use of convert to make the ppm's I am output into jpgs for the internet... Maybe I should switch over pngs?
(L) [2012/08/15] [tby raider] [A Path tracer] Wayback!Render the scene with one light only placed in the middle of the floor and make it white, not colored. Let's see how will it look like.
(L) [2012/08/16] [tby Torwgia] [A Path tracer] Wayback!Here is a single white light in the center of the screen.
[IMG #1 Image]
128 samples per pixel
I added in a simple jitter to rays as they leave the camera. It seems to improve the image quality
Heres the same 3 colored sphere picture with the new jittered rays
[IMG #2 Image]
i think this one is 1024 samples per pixel
I also switched over to png's with convert.
$ convert <the ppm> <the png>
This change seems to be better?
Next on my list is to move over to all triangles. No more of this infinite plane and sphere nonsense. Next update will be that!
[IMG #1]:
![[IMG:#0]](images/ed6659bda7c8d8196da7142822fbe2a96bf82328716cfbf0b47d479c5c267676.jpg)
[IMG #2]:
(L) [2012/08/16] [tby raider] [A Path tracer] Wayback!Hm... No, it's not correct. What are the lighter circular areas on the left and right walls? That's also visible on the single light scene.
(L) [2012/08/16] [tby raider] [A Path tracer] Wayback!I don't see you code, so cant say exactly, but seeing what I see I suspect that the lighter areas are the areas where dot product of -eye vector (direction from the intersection point to to eye) and the normal vector is positive, and darker areas are where dot(-eye, n) < 0.
When you calculate angles like cos(theta) via dot product, are you sure you use normalized vectors? Seams to me like that could be that simple bug.
(L) [2012/08/17] [tby Torwgia] [A Path tracer] Wayback!I will check that tonight after work! Thanks for the help.
(L) [2012/08/18] [tby Torwgia] [A Path tracer] Wayback!I think I transposed the color of the object versus it's emitted color when I was reading some of the papers. I changed that and am now waiting on a image with 1024 samples to finish.
I was wondering if anyone had some suggestions for some papers to read on multithreading this thing.  I tried using std::async to get a bunch of futures, but I think I ran out of thread handles because it threw an exception.
Anyway, I will update you all when that image finishes and I am done eating! Thanks for the help so far!
back