Ray Tracing Flashcards
What is the process of quantization?
Reducing the colours down of the original object to just the ones that you’ve got available.
How could you store a 2D pixel in an array?
image[rows][cols][channels]
(channels = 3 for RGB)
What is the equation for all points on a 3D line?
p = o + dt
What do the values in the equation p = o + dt stand for?
p is the point(s) along the line
o is the origin of the line (3D point)
d is the direction (3D vector) of the line
t is a scalar from minus infinity to infinity
What is the equation for a 3D sphere?
(p - c_s)^2 = r^2
What do the values in the equation for a 3D sphere stand for?
c_s is the origin of the sphere (3D point)
p is any point on the sphere surface (3D point)
r is a scalar, radius of the sphere
What happens if the discriminant b^2 - 4ac is negative?
There are no solutions (ray missies sphere)
What happens if the discriminant is positive?
There are two solutions and we should take the smallest positive t as it’s the closest point on the sphere being hit.
What is ray tracing?
A method for producing realistic images from 3D models.
What does anti-aliased images do in terms of rays?
Multiple rays are generated at each pixel and their colours averaged.
What is perspective projection in ray tracing?
A ray originates at the centre of projection in the direction of the pixel centre and is intersected against the detailed scene geometry to find the intersection point.
What is orthographic projection?
Ray originates at each pixel centre in the direction of the view plane normal.
Define view reference point (VRP):
A 3D coordinate defining the position of the centre of the image plane.
Define view up vector (VUV):
a 3D vector defining the up direction (y-axis) of the camera in a world space.
Define Look at:
a 3D point defining where exactly the camera is pointing.
Define view plane normal (VPN):
a 3D vector defining the direction the camera looks in world space (z-axis).
If the Look at is defined, what is the equation to calculate the VPN?
VPN = LookAt - VRP
Define view right vector (VRC):
a 3D vector defining the direction the right (x-axis) of the camera in world space.
What is the equation calculating the VRV?
VRV = VPN x VUV
What is the equation calculating the VUV?
VUV = VRV x VPN
Define surface normal:
The surface normal at a point is the vector perpendicular to the plane that is tangential to the surface at that point.