1/71
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
ray tracing
rendering model that uses rays emitted by scene objects to identify visibility, lighting, and shading
pipeline rendering
an object-oriented approach to rendering that iterates through scene objects and calculates the shading of each
bayer filter
filters RGB to identify how much light passes through some section of a scene
gamma correction
adjusting stored pixel values to account for display intensity differences
ray tracing PROS
intuitive for visibility
allows for easy shading, refraction/reflection, multiple light sources, etc.
realistic
ray tracing CONS
slow
not good for some complex reflections/lighting effects
ray tracing algorithm
compute ray through current pixel
check for intersection
trace shadow rays to all ights
compute illumination/shading
if reflective, trace reflection ray
if transparent, trace transmission/refraction ray
combine into pixel value
repeat
specular light
reflected light that produces the highlights we see on shiny objects
diffuse light
light scattered uniformly in all directions —> preserves surface color
diffuse light is view ___
independent
specular light is view ___
dependent
ray equation
r(t) = pr + tdr
plane equation
p \dot n = d
solving for t in ray-plane intersection
t = (d - pr \dot n) / (dr \dot n)
sphere equation
|| p - O ||2 - r2 = 0
solving for t in ray-triangle intersection
t = ( (a-p) \dot n ) / (d \dot n)
where a is any point on plane
Algorithm for using barycentric coordinates in ray-triangle intersection
Compute u and v
u = b - a
v = c - a
Set up the initial matrix
[ u v -dr ] [beta \\ gamma \\ alpha] = [pr - a]
calculate the determinant (DET) of the first matrix above
Use Cramer’s rule to solve for beta, gamma
gamma = det(u, pr - a, -dr) / DET
beta = det(pr - a, v, -dr) / DET
t = det(u, v, pr - a) / DET
radiant energy (Q)
energy of electromagnetic radiation
radiant flux/power
radiant energy per unit time
irradiance (E)
radiant flux received by a surface per unit area
E = P/4pir2
irradiance for a sphere
inversely, distance, angle of incidence, cosine
irradiance is…
____ proportional to square of ___
affected by ____ as demonstrated by the ___ rule
radiance (L)
radiant flux emitted, reflected, transmitted, or received by a surface, per unit solid angle per unit projected area
I = P/4pi
radiant intensity
E = I cos theta / r2
irradiance from a point light
Ld = kdE
how to compute diffuse shading with irradiance
Ls = ksE max(0, cos alpha)p
how to compute specular shading with irradiance
La = kaIa
how to compute ambient light shading with radiant intensity
away, black, greater, 0, 1, || l - P ||
when tracing shadows…
start the ray slightly ___ from the surface to avoid spots
if the point light is not visible, return ___ color
start tmin slightly ___ than ___
if the shadow ray is normalized, set tmax to ___
else set tmax to __
increasing samples
random sampling
jittered samples
adaptive sampling
methods for anti-aliasing
random sampling
sampling at non-uniform places in a pixel to reduce aliasing
jittered samples
diving the pixel into a grid and sampling random spots within the grid cells
repeat spp times:
xoffset = RandomReal();
yoffset = RandomReal();
ray = camera->GetRay(x + xoffset, y + yoffset);
ray_color += RayColor(ray);
// end loop
ray_color/spp;
how to anti-alias using random sampling in code
same, opposite
when a ray intersects with a reflective surface, we compute reflection ray at the ___ angle in the ___ direction
dielectrics
materials that do not conduct electricity (e.g. glass)
snell’s law
describes how light bends as it moves through mediums (e.g. air to glass)
fresnel equations; use the cosine rules to convert snell’s law and solve for t. if the value under the square root is negative, there is total internal reflection
how to determine total internal reflection
R(theta) = R0 + (1 - R0)(1 - cos theta)5 with R0 = ((nt - n)/(nt + n))2
schlick approximation
schlick approximation
determines how much light is reflected
Beer’s law
shows exponential decay in light intensity through a medium
I(s) = I0as
Beer’s law
manifold tri-mesh
a mesh where every mesh is shared by exactly 2 triangles and can be laid flat
manifold tri-mesh with boundaries
a mesh where every edge is used by either one or two triangles and every vertex connects to a single-edge connected set of triangles (e.g. all triangles are connected)
counter-clockwise
how triangles should be oriented
indexed triangle set
stores each triangle once; uses vertex and position arrays to store vertices and coordinates, respectively t
triangle strips
created by reusing the 2nd and 3rd vertices when defining a new triangle
triangle fan
created by using the first triangle vertex as the origin for all new triangles
triangle neighbor structure
extension of triangle set; uses a triangle object to point to 3 neighboring vertices and a vertex object to point to a neighboring triangle
create empty mesh object
add mesh vertices
add mesh faces
process for building an OpenMesh cylinder
mesh→request_face_normals()
for each face
create new FaceNormal object face_normal
mesh→set_normal(*fit, face_normal)
process for computing face normals
quick rejection
if a ray does not hit within a bound, move on. else, check if it has an object
axis-aligned bounding boxes
boxes aligned with x, y, z coordinates, framing objects
uniform spatial subdivision
using grids to break down a scene; if cells are empty, we do not check for ray-intersection
allocate a grid as a single block of pointers with one for each cell
if a cell is empty, pointer = 0
if a cell has objects in it, point to a list of the objects
uniform grid set-up
mailboxing
storing a ray hit into a different cell with the ray id for later consideration
BVH trees
hierarchical bounding boxes
KD trees
similar to BVH tree, but driven by heuristics
binary space partitioning trees
allows your to determine visibility ordering of scene objects without changing the viewpoint by using non-axis-aligned splitting planes
modeling: object space → world space
camera: world space → camera space
vertex shading
projection: camera space → canonical view volume
clipping
rasterization
screen space
fragment shading
z-buffer
transformations in the graphics pipeline
focal length
distance between the eye and view plane
far plane
bounds the max distance that an object can be seen from the eye
world space → camera space
vertex shading is performed at the ___ transformation
MvpMorthPMcamMmod
matrix transformations in the graphics pipeline from world to screen space
Gouraud shading
computing the shading at each pixel during rasterization, then linearly interpolating the colors of the remaining pixelsp
phong shading
shading each pixel and then interpolating the vertex normals
camera space → projection space
clipping occurs in the ___ stage
clipping
process by which primitives outside the camera are either discarded or altered
glossy reflections
translucency
depth of field
motion blue
soft shadows
global illumination
monte carlo ray tracing allows for the implementation of…
monte carlo ray tracing
sends multiple rays over some distribution and takes their intersections
depth of field
the distance between the nearest and farthest objects in focus
Scale shadow ray contribution by cosine of angle between surface normal and direction to specific light sample.
Move light emitter farther from hit point --> less energy (flux) arrives at surface point
Weight each sample by 1/d² where d is the distance to the sample
Recall that angled emitters causes less energy to meet certain hit points
To account: scale emitter's energy by dot product of (emitters normal) and (normalized direction to point) aka the area of the light source
steps to compute light from area light
bidirectional reflection distribution function (BRDF)
reflectance as a function of viewer and light source directions with respect to normal; shows how much light goes in each direction as it leaves a surface