Where should the ray origin be put in perspective camera ray tracing?

The following gives a picture of the ray tracing in the perspective camera setting: http://www.cs.cornell.edu/courses/cs4620/2011fa/lectures/06raytracingWeb.pdf

and says that the $e$ is the ray origin, which is the same for all rays. However, I don't understand how is $e$ supposed to be selected. Can it be the zero vector? Or perhaps it's supposed to be the camera center?

  • You add a link but you don't say how it relates to your question. Please edit your question to explain fully what you understand and what you don't. – Dan Hulme Aug 6 at 19:20

I don't get what you don't understand. All rays originate from the camera so It's basically the start of the camera's pyramid or more technically the viewing frustum.

enter image description here

Depends on the system you are using. Maybe your camera is fixed at the origin and only the world rotates/moves. In this case, usually the camera is fixed at the origin looking in either the +Z or -Z direction depending on if it's left or right handed coordinates system. So the ray origins will be fixed at (0,0,0).

If your camera moves, however, the ray origins also move to where you place the camera.

  • I'm given camera center point, so should I use it as $e$? – mavavilj Aug 6 at 20:03
  • What exactly do you mean by the camera center? Cameras aren't usually defined using a center point. Maybe it's the eye position, check the diagram (it's the left most point from where all lines are emerging) – gallickgunner Aug 6 at 20:12
  • It's the center where the camera originates. The it also gives me $up$ vector, which points upwards from the camera, also an angle and a direction (where the camera points). – mavavilj Aug 6 at 20:14
  • Yes then that's the camera's eye position, I haven't ever heard of it called by the name camera's center. Rays will originate from that point. Camera's are usually defined by 3 basis vectors, Side, Up and Look_at (X, Y, Z) respectively. The 4th vector is the Eye. Together these 4 vectors can make up the camera's view matrix. – gallickgunner Aug 6 at 20:18

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.