Simple Ray tracing

Started by
4 comments, last by Monder 20 years ago
I've been reading the stuff on ray tracing here. I understand how it all works but I was wondering how you generate the primary rays in the first place? Do you just do several per pixel that fire in certain directions or is it something more complicated? [edited by - Monder on March 21, 2004 11:32:57 AM]
Advertisement
    /o  /|,oc¯ |-o ¯\|`o    \o 


You can imagine the | being the screen. Just fire w*h pixels.


--
You're Welcome,
Rick Wong
- sitting in his chair doing the most time-consuming thing..

[edited by - Pipo DeClown on March 21, 2004 12:52:10 PM]
So just fire a single ray through every pixel perpendicular to the screen?
No, the rays should not be perpendicular to the screen but instead originate from the same eyepoint or center (denoted c in Pipo''s drawing).
a ray is taken from the viewer''s eye, (which is an estimated position using calculated field of view), projected to each pixel on the screen, and then into the world. This is not always enough detail, sometimes multiple rays are traced for each pixel and then averaged together.
"I never let schooling interfere with my education" - Mark Twain
Ahh ok thanks, I get it now.

This topic is closed to new replies.

Advertisement