Computer Science Canada

Raytracer

Author:  zero-impact [ Tue Oct 20, 2009 2:50 pm ]
Post subject:  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! Smile

Author:  saltpro15 [ Tue Oct 20, 2009 3:08 pm ]
Post subject:  RE:Raytracer

Should've spent that time talking to the girlfriend Wink

But nice job! +karma and bits

Author:  andrew. [ Tue Oct 20, 2009 3:38 pm ]
Post subject:  RE:Raytracer

I'm not in Windows right now, so I'm just wondering how fast is it (in FPS) on average?

Author:  saltpro15 [ Tue Oct 20, 2009 3:46 pm ]
Post subject:  RE:Raytracer

I can answer that. It rendered that picture in 11 seconds

Author:  zero-impact [ Tue Oct 20, 2009 4:24 pm ]
Post subject:  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.

Author:  andrew. [ Tue Oct 20, 2009 5:19 pm ]
Post subject:  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 Very Happy).

Author:  zero-impact [ Tue Oct 20, 2009 6:07 pm ]
Post subject:  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.

Author:  Tony [ Tue Oct 20, 2009 6:21 pm ]
Post subject:  Re: RE:Raytracer

zero-impact @ Tue Oct 20, 2009 6:07 pm wrote:
Although I still have never been taught vectors

Shouldn't that be covered in, at least, physics?

Author:  TheGuardian001 [ Tue Oct 20, 2009 7:11 pm ]
Post subject:  Re: RE:Raytracer

Tony @ Tue Oct 20, 2009 6:21 pm wrote:
zero-impact @ Tue Oct 20, 2009 6:07 pm wrote:
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.

Author:  andrew. [ Tue Oct 20, 2009 7:31 pm ]
Post subject:  RE:Raytracer

It's bundled with calculus where I live. And yes Tony, it is kind of covered in physics. Just the basics though.

Author:  zero-impact [ Tue Oct 20, 2009 7:51 pm ]
Post subject:  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].

Author:  SNIPERDUDE [ Tue Oct 20, 2009 8:28 pm ]
Post subject:  RE:Raytracer

I wished vectors was better taught (in more depth) when I was in school. Taught myself as did many here it seems.

Author:  Vermette [ Wed Oct 21, 2009 8:33 am ]
Post subject:  Re: Raytracer

Calculus? I had vectors covered in at least three separate classes, 12 and OAC physics and OAC Algebra.... oh right new curriculum.

Author:  zero-impact [ Wed Oct 21, 2009 1:16 pm ]
Post subject:  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

Author:  zero-impact [ Sat Oct 24, 2009 9:39 pm ]
Post subject:  Re: Raytracer

This sphere fractal takes 79s to render.

Author:  SNIPERDUDE [ Sat Oct 24, 2009 11:19 pm ]
Post subject:  RE:Raytracer

Very nice job!

Author:  Forumer [ Wed Oct 28, 2009 12:40 pm ]
Post subject:  RE:Raytracer

anyone mind uploading this in zip?

Author:  zero-impact [ Wed Oct 28, 2009 9:13 pm ]
Post subject:  Re: Raytracer

sure thing.

Author:  Forumer [ Thu Feb 04, 2010 9:38 am ]
Post subject:  RE:Raytracer

thanks!

Author:  Turing_Gamer [ Thu Feb 04, 2010 12:44 pm ]
Post subject:  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

Author:  Insectoid [ Thu Feb 04, 2010 4:28 pm ]
Post subject:  RE:Raytracer

Haha late response much Forumer, only 3 months after your initial request. I dunno if this is worth my Necromancer Magic card...

Author:  DemonWasp [ Thu Feb 04, 2010 8:46 pm ]
Post subject:  RE:Raytracer

@Turing_Gamer: What CPU / OS is the computer you're using running? It worked fine for me on Windows 7 / x86_64.

Author:  BigBear [ Thu Feb 04, 2010 9:02 pm ]
Post subject:  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.

Author:  zero-impact [ Mon Feb 15, 2010 3:44 pm ]
Post subject:  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.


: