
-----------------------------------
zero-impact
Tue Oct 20, 2009 2:50 pm

Raytracer
-----------------------------------
Hi everybody, for the last week or so I have been working on this little ray tracer as a personal interest project. I'm not going to post the code quite yet, but here is a sample image and the .exe
Tell me what you think! :)

-----------------------------------
saltpro15
Tue Oct 20, 2009 3:08 pm

RE:Raytracer
-----------------------------------
Should've spent that time talking to the girlfriend ;)

But nice job! +karma and bits

-----------------------------------
andrew.
Tue Oct 20, 2009 3:38 pm

RE:Raytracer
-----------------------------------
I'm not in Windows right now, so I'm just wondering how fast is it (in FPS) on average?

-----------------------------------
saltpro15
Tue Oct 20, 2009 3:46 pm

RE:Raytracer
-----------------------------------
I can answer that.   It rendered that picture in 11 seconds

-----------------------------------
zero-impact
Tue Oct 20, 2009 4:24 pm

RE:Raytracer
-----------------------------------
Yes, as of now there are no optimizations at all. So it takes about 11 seconds to render that scene at 1280x720.

On a more simple scene it can get about 5 fps.

-----------------------------------
andrew.
Tue Oct 20, 2009 5:19 pm

RE:Raytracer
-----------------------------------
That's quite cool though still. Even if it took 2 minutes to process one image, it's pretty impressive especially because you did it yourself. Also, I'm sure the math involved is fairly complex as well. Being able to program this is an amazing feat (well to me it is :D).

-----------------------------------
zero-impact
Tue Oct 20, 2009 6:07 pm

RE:Raytracer
-----------------------------------
Well, I'm a grade 12 student taking all the math courses. Although I still have never been taught vectors which is the only concept I really had to teach myself a lot about.

-----------------------------------
Tony
Tue Oct 20, 2009 6:21 pm

Re: RE:Raytracer
-----------------------------------
Although I still have never been taught vectors
Shouldn't that be covered in, at least, physics?

-----------------------------------
TheGuardian001
Tue Oct 20, 2009 7:11 pm

Re: RE:Raytracer
-----------------------------------
Although I still have never been taught vectors
Shouldn't that be covered in, at least, physics?
Where I live it's bundled in with Gr 12 Calculus.

-----------------------------------
andrew.
Tue Oct 20, 2009 7:31 pm

RE:Raytracer
-----------------------------------
It's bundled with calculus where I live. And yes Tony, it is kind of covered in physics. Just the basics though.

-----------------------------------
zero-impact
Tue Oct 20, 2009 7:51 pm

RE:Raytracer
-----------------------------------
Well, yes it is covered in gr 10 and gr 11 physics, but not to the extent needed to develop a ray tracer.

The vectors I have used in my physics classes were very simple things like 27m[20degrees N of E].

-----------------------------------
SNIPERDUDE
Tue Oct 20, 2009 8:28 pm

RE:Raytracer
-----------------------------------
I wished vectors was better taught (in more depth) when I was in school.  Taught myself as did many here it seems.

-----------------------------------
Vermette
Wed Oct 21, 2009 8:33 am

Re: Raytracer
-----------------------------------
Calculus?  I had vectors covered in at least three separate classes, 12 and OAC physics and OAC Algebra.... oh right new curriculum.

-----------------------------------
zero-impact
Wed Oct 21, 2009 1:16 pm

Re: Raytracer
-----------------------------------
Here is an image that really pushes it to its limit.

301 reflective spheres and 3 reflective planes.

Took ~8mins to render at 1920x1080, using one core of a P8600 2.40GHz

-----------------------------------
zero-impact
Sat Oct 24, 2009 9:39 pm

Re: Raytracer
-----------------------------------
This sphere fractal takes 79s to render.

-----------------------------------
SNIPERDUDE
Sat Oct 24, 2009 11:19 pm

RE:Raytracer
-----------------------------------
Very nice job!

-----------------------------------
Forumer
Wed Oct 28, 2009 12:40 pm

RE:Raytracer
-----------------------------------
anyone mind uploading this in zip?

-----------------------------------
zero-impact
Wed Oct 28, 2009 9:13 pm

Re: Raytracer
-----------------------------------
sure thing.

-----------------------------------
Forumer
Thu Feb 04, 2010 9:38 am

RE:Raytracer
-----------------------------------
thanks!

-----------------------------------
Turing_Gamer
Thu Feb 04, 2010 12:44 pm

Re: Raytracer
-----------------------------------
Lol trying to run on school comp but it doesn't work...
Do I need the C program or just run it?

Note I know only the very basics of C

-----------------------------------
Insectoid
Thu Feb 04, 2010 4:28 pm

RE:Raytracer
-----------------------------------
Haha late response much Forumer, only 3 months after your initial request. I dunno if this is worth my Necromancer Magic card...

-----------------------------------
DemonWasp
Thu Feb 04, 2010 8:46 pm

RE:Raytracer
-----------------------------------
@Turing_Gamer: What CPU / OS is the computer you're using running? It worked fine for me on Windows 7 / x86_64.

-----------------------------------
BigBear
Thu Feb 04, 2010 9:02 pm

RE:Raytracer
-----------------------------------
Calculus here is called Calculus and Vectors

Vectors is taught in 3U and  4U physics.

I am in physics and Calculus now so I am not sure how indepth they go into Vectors.

-----------------------------------
zero-impact
Mon Feb 15, 2010 3:44 pm

RE:Raytracer
-----------------------------------
Like I mentioned before. The vector math required to write a raytracer is not covered in the Ontario physics course, however the calculus and vectors class that i am taking this semester does.
