Week 4 - Models and Illumination Flashcards
How are continuous objects modelled?
Using polygonal approximations - a number of connected polygons (faces): a mesh
When rendering opaque objects, why is only the outer boundary/surface important?
Since only the outer boundary/surface interacts with light
What is a mesh?
A number of connected polygons/faces
What are the two main types of mesh?
Triangle mesh and quadrangle mesh
What does a polygon mesh consist of?
A set of vertices (3D points described by (x, y, z) coordinates)
A set of edges (line segments connecting two vertices)
A set of faces (polygons)
When are two edges chained?
If they share one vertex
What are surface normals?
Vectors perpendicular to the surface
What 3 conditions must a polygon mesh satisfy?
The intersection of two faces is either empty or a vertex or an edge
Manifold meshes - every edge must be shared by exactly two faces (except for the border edges)
The faces must have consistent normals (defining the same outward direction)
What is a Mobius strip?
A shape with inconsistent normals
How are smooth surfaces approximated?
By a discrete set of points, connected by edges
Typically meshes have more polygons in high curvature areas
What methods can you use to define a triangle mesh using OpenGL?
glBegin/glEnd and glVertex, using one of GL_TRIANGLES (plots each triangle separately), GL_TRIANGLE_STRIP (plots in a line, avoids repeating vertices), or GL_TRIANGLE_FAN (plots in a circle, avoids repeating vertices)
What does explicit representation of a triangle mesh mean?
Each triangle is encoded by its three vertices
What does redundant representation of a triangle mesh mean?
Each vertex is shared by three triangles
How many float variables are required for redundant triangle mesh representation?
3 x 3 x n = 9n floats for n faces
What are VBOs?
Vertex Buffer Objects - arrays for object models that can remain in GPU memory
What is shared vertex/indexed face set representation?
Array of coordinates of all vertices (3m floats for m vertices) and an array of triangles with indices into the vertex list (3n integers for n faces)
It gives less redundancy than explicit representation
Name 3 properties of polygon models per-vertex.
Coordinate (x, y, z)
Colour (r, g, b)
Normal (nx, ny, nz)
Name 4 light and material properties.
Light source
Colour
Reflectivity
Transparency
How can meshes be made to look solid?
By filling the triangles with colour
How can you get rid of the polygonal edges when filling a mesh with colour?
Interpolate the colour across every face
Name 4 types of light sources.
Point lights (very small candle flame)
Directed lights (sun, assumed at infinite distance)
Spot lights (torch etc)
Distributed lights
What attenuation does directed light have?
No attenuation
What is light attenuation?
The reduction in its intensity as it travels through a medium due to absorption or scattering of photons
What attenuation does a point light source have and why?
Quadratic attenuation -> 1/d^2 because it is a sphere (A = 4pid^2)