Archived

This topic is now archived and is closed to further replies.

skow

A good raytracer tutorial?

Recommended Posts

skow    248
I''m looking for a good opengl raytracing tutorial. Google isn''t helping me out too much, anyone know a good one? Thanks

Share this post


Link to post
Share on other sites
Tree Penguin    262
As far as i was able to find tuts on ray tracing, there where only pages describing the technique:

1. For every lightmap texel you trace a to every other lightmap texel, adjusting the light values when an object is in the way (and decreasing intensity by distance).

2. This is more like raycasting. Cast a number of rays from each texel and see where it ends up and what''s in it''s way. With this you''d create a lightmap for each texel of a size like 64x64 which looks like a fisheye lens picture) This method is a lot faster but not as realistic.

Then you''re told to do that a number of times so you''ll get realistic diffuse lighting.

Well, i thought i''d try it out. I am building a rendering engine using the first technique and it actually isn''t as hard as you''d think, if you''re into math . Only making it fast (realtime or not like 5 minutes for a frame ) is pretty hard.

Anyway, good luck, i''ll post a link to a page describing the ray tracing technique this evening, when i have acces to the computer i saved the link at .

Share this post


Link to post
Share on other sites
RandomError    122
Tree Penguin

That sounds more like radiosity to me, which is a global illumination method not a raytracer in the classical sense.

OP

Unfortunately there is a lack of good raytracing tutorials online for OpenGL or otherwise (note that OpenGL does not actually have anything to do with the raytracing apart from diaplying the rendered scene and perhaps your scene in 3D before rendering). Your best best will be to buy a book. I can recommend ''Computer Graphics using OpenGL'' 2nd Ed. by F.S. Hill, this has a good introduction to raytracing in it.

HTH

RandomError

Share this post


Link to post
Share on other sites
overnhet    122
Search the Graphics Programming and Theory, you''ll find heaps of posts about the basics of raytracing, more advanced topics, intersection tests...

Share this post


Link to post
Share on other sites
skow    248
Yeah, I''m looking to do raytrasing not radiosity.

I''m not looking to try and do it real time or anything like that. I guess if i could figure out the best way to draw each pixel of the screen I can do the rest using the raytracing math.

Thanks.

Share this post


Link to post
Share on other sites
tj963    234
The actual algorithm is really simple. It''s when you start adding more privitives and more advance features and speedups that it gets complicated. Check out

http://www.cfxweb.net/~lyc/tomtrace.html

tj963

Share this post


Link to post
Share on other sites