View topic - Please help my understand ray tracing

Please help my understand ray tracing

General questions related with the YafaRay Project, 3D computer graphics and about this site.

Please help my understand ray tracing

Post Tue Jun 22, 2010 12:06 am

I'm building a very simple ray tracer so I can learn a bit about computer graphics.

Instead of meshes of bunnies or statues I'm using a 2D elevation model array, a geographic dataset.

At the conceptual level I keep reading about ray tracing passing rays through a virtual screen. This makes sense. In my code I pass a ray through each pixel of a rectangular screen at a fixed distance from the 'eye' or camera, and I keep increasing the ray's length until it intersects my terrain model.

I don't understand why we have this 'virtual screen' analogy. Surely I can just start at my camera position, and create a bunch of rays at slightly different vertical and horizontal angles apart. The number of rays will define the screen pixels; the angle between each ray * the number of rays will determine the field of view.

What am I missing here? It seems to use a rectangular virtual screen just introduces distortion. It would be much better to use a cylindrical or spherical screen so that you can have large fields of view (180 degrees +) without the distortion you get from a flat screen. But then the problem is that all this needs to be displayed on a flat computer screen. Huh.

Basically, I need a primer on ray tracing, screens, virtual screens, 3D perspective, and projecting 3D scenes onto flat monitors. I guess all these issues are wrapped up, but I need to understand them better.

The example I've coded is simple as hell, but it's useful for clarifying the general concepts. I'd appreciate any tips, or clearing up of any misconceptions I might have sprouted above. Once I understand the concepts better I think I'll get better value out of Yafaray, Blender and the like.

Thank you so much!
Posts: 1
Joined: Mon Jun 21, 2010 11:57 pm

Re: Please help my understand ray tracing

Post Tue Jun 22, 2010 9:31 am

There are some links about raytracing in this thread.
User avatar
Posts: 899
Joined: Fri Sep 11, 2009 8:58 am
Location: Slovenia

Return to News & Discussion

Who is online

Users browsing this forum: No registered users and 1 guest