top of page
Writer's pictureLingheng Tao

CG Tech Interview #1 Basics


This series of notes is intended to help prepare for technical interviews for computer graphics-related positions, such as Graphics Engineer, Rendering Engineer, or Technical Artist. Rather than providing detailed explanations of the concepts, I'll be listing key terms, concepts, and bullet points, with occasional brief elaborations sourced from Wikipedia or ChatGPT.


This section serves as a summary of all the basic concepts related to computer graphics.


Transform


Math Basics


  1. Vector arithematics: dot product, cross product, constructing a basis from a single vector

  2. Geometry: Triangle barycentric coordinates


Transform

  1. Homogeneous Coordinates: linear / affine transforms

  2. Rotations: based on XYZ space, quaternion, polar coordinates

  3. Normal Transform: the transpose of the inversed matrix


Rendering Pipeline


MVP Transform

  1. Model Transform: from Object space to World space, following SRT order (Scale, Rotation, Translate).

  2. View Transform: from World space to Camera space

  3. Project Transform: from Camera space to Clip space


Rendering Pipeline

  1. Application Stage: from CPU to GPU, wrap vertex information

  2. Vertex Stage: happening on Vertex Shader @ GPU, transforming the vertex space

  3. Rasterization Stage: happening between Vertex Shader and Fragment Shader. Interpolation happens.

  4. Fragment Stage: happening on Fragment Shader @ GPU, calculate the color, as well as blending opacity, test for alpha / stencil / depth.


Shading Models


Trivial Models

  1. NdotV

  2. NdotL


Emperical Models

  1. Phong Model: Diffuse + Ambient + Specular [ (R · V)^n ]. R is the reflected vector.

  2. Blinn-Phong Model: Diffuse + Ambient + Specular [ (N · H)^n ], H is the halfway vector, which is normalization of (L + V).


Light Sources

  1. Punctual Lights: hard shadow, no spatial volume, point / spotlights

  2. Area Lights: soft shadow, light source has a shape.

  3. Lambert Law: E = Icosθ/(r^2).


Signal & Sampling

Sampling Theorem

  1. Artifacts / Aliasing: sample rate too low to reconstruct the original signal

  2. Nyquist-Shannon Sampling Theorem: A signal whose frequencies do not exceed the Nyquist Limit (i.e. bandlimited to Nyquist Limit) can be reconstructed exactly from samples.


Anti-aliasing

  1. Filters / Convolutions

  2. Low Pass Filter: box, Gaussian - blur in essential

  3. High Pass Filter: edge detection in essential

  4. Antialiasing: super sampling, post-processing, temporal, or deep learning


Texture

Texture Looking Up

  1. Texture lookup: f(x,y,z) -> (u,v) -> (0,1)

  2. Addressing Mode: repeat, clamp, clamp to edge, mirror


Texture Sampling

  1. Magnification: interpolation (nearest, bilinear, bicubic)

  2. Minification: mipmap (guassian blurs of the original maps)


Spatial Data Structure

Geometry Queries

  1. Nearest Point: on a point, on a line, on a segment, on a triangle, on a 3D triangle, on a triangular mesh.

  2. Intersection: ray-sphere, ray-plane, ray-triangle, ray-mesh


Spatial Acceleration Data Structure

  1. Bounding Boxes: AABB, Ray-AABB intersection

  2. Bounding Volume Hierarchy: hierarchical bounding boxes.

  3. BVH Partitioning: Octree, KD Tree


Radiometry

Physics

  1. Photon Energy: Q [J]

  2. Radient Flux: Φ = dQ / dt [J/s = W]

  3. Irradiance: E(p) = dΦ / dA [W / m^2]

  4. Radiance: L(p, ω) = dE / (dω cosθ) [W/ (m^2 · sr)]


BRDF

  1. Bidirectional Reflectance Distributed Function: fr(p, ω_i → ω_o), ratio of reflected radiance and incident irradiance.


Light Transport Equation / Rendering Equation (LTE, RE)

  1. Lo(p, ω_o) = Le(p, ω_o) + ∫_{H^2} fr(p, ω_i → ω_o)Li(p, ω_i) cos θdω_i

  2. It means that for a query point p and a direction excident from p, ω_o, the radiance consists of 2 parts:

    1. Le(p, ω_o) : its own emittance

    2. ∫_{H^2} fr(p, ω_i → ω_o)Li(p, ω_i) cos θdω_i: all incoming radiance reflected by this point, calculated by BRDF


Path Tracing

for each pixel
	shoot several rays
	for each triangle
		if(ray hits triangle)
			keep closest hit

For more, see CG Tech Interview #2 Physically Based Rendering.


Color


11 views0 comments

Recent Posts

See All

Comments


bottom of page