Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Raytracer
Index -> Programming, C++ -> C++ Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zero-impact




PostPosted: 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



raytracer.png
 Description:
 Filesize:  454.05 KB
 Viewed:  315 Time(s)

raytracer.png



RayTracer.rar
 Description:

Download
 Filename:  RayTracer.rar
 Filesize:  1.22 MB
 Downloaded:  1211 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
saltpro15




PostPosted: 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
andrew.




PostPosted: 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?
saltpro15




PostPosted: Tue Oct 20, 2009 3:46 pm   Post subject: RE:Raytracer

I can answer that. It rendered that picture in 11 seconds
zero-impact




PostPosted: 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.
andrew.




PostPosted: 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).
zero-impact




PostPosted: 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.
Tony




PostPosted: 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?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: 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.
andrew.




PostPosted: 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.
zero-impact




PostPosted: 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].
SNIPERDUDE




PostPosted: 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.
Vermette




PostPosted: 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.
zero-impact




PostPosted: 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



raytracerbig.png
 Description:
 Filesize:  1.23 MB
 Viewed:  329 Time(s)

raytracerbig.png


zero-impact




PostPosted: Sat Oct 24, 2009 9:39 pm   Post subject: Re: Raytracer

This sphere fractal takes 79s to render.


sphere fractal.png
 Description:
 Filesize:  211.78 KB
 Viewed:  295 Time(s)

sphere fractal.png


Display posts from previous:   
   Index -> Programming, C++ -> C++ Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 24 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: