Lect 2 Projections and Shading Flashcards

1
Q
  1. What is the window and how is it mapped onto a screen?
A
  • It’s rarely necessary to display the whole of a scene, so clipping takes place.
  • The actual part of the scene in world coordinates that is to be displayed is called a window.
  • On a screen, the picture inside this window is mapped onto the viewport – the available display area.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Describe the steps from world coordinates to **device coordinates. **
A
  1. Start with World Coordinates.
  2. Clip to Viewing Window
  3. Map to Viewport
  4. Convert to Device Coordinates.

Easy 2D to 2D.. 3D to 2D much harder!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3.

Display device (a screen) is 2D

How do we map 3D objects to 2D space?

A

• 2D to 2D is straight forward…

– 2D window to world.. and a viewport on the 2D surface. – Clip what won’t be shown in the 2D window, and map the remainder to the viewport.

• 3D to 2D is more complicated…
– Solution : Transform 3D objects on to a 2D plane using projections

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  1. What are the main Types of Viewing?
A
  • Classical (many)
         Orthographic
    
         One-, two-, and 3-point perspectives
  • Computer
              Orthographic
    
             Perspective
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  1. What are (COP) and (DOP)?
A

Center of Projection (COP)

– Point where all projectors meet

– Center of camera or eye lens

– Origin of synthetic camera frame

Direction of Projection (DOP)
– Direction of projectors when COP is moved to infinity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  1. Describe how perspective defines a scene.
A
  • Characterized by diminution of size of more distant objects
  • Classically, viewer is symmetrical with respect to the projection plane
  • One-, two-, and three- point perspectives depending on number of vanishing points
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  1. How is a 3D scene projected?
A

In 2D we have a window in world coordinates.

In 3D we have a view volume!

View volume in the world (a view volume is the 3D volume that contains everything visible from the point of view or direction)

– Projection onto the 2D projection plane
– A viewport to the view surface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  1. Model the 3D viewing Process. Highlight each stage.
A

• Process…

– 1… clip against the view volume,

– 2… project to 2D plane, or window,

– 3… map to viewport.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  1. Name the key terms used for **projections. **
A

• Projections: key terms…

– Projection from 3D to 2D is defined by straight projection rays (projectors) emanating from the ‘center of projection’ (COP), passing through each point of the object, and intersecting the ‘projection plane’ to form a projection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. What are the two types of projections in computing?
A

The two types of projections are:

  1. Perspective
  2. Parallel

The key factor is (COP)

if distance to the center of projection (COP) is finite then perspective

if distance is infinite: Parallel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  1. Perspective v Parallel
A

**• Perspective: **- visual effect is similar to human visual system…

– has ‘perspective foreshortening’ (size of object varies inversely with distance from the center of projection).

  • angles only remain intact for faces parallel to projection plane.

• Parallel:– less realistic view because of no foreshortening – however, parallel lines remain parallel.

– angles only remain intact for faces parallel to projection plane.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  1. Describe Two-point projection.
A

•** Two-point** perspective projection:

– This is often used in architectural, engineering and industrial design drawings.

Three-point is used less frequently as it adds little extra realism to that offered by two-point perspective projection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  1. Describe ParallelOrthographic Projections.
A

2 principle types of Parallel projection

Orthographic :

– direction of projection = normal to the projection plane.
– Useful because angle and distance measurements can be made…
– However, as only one face of an object is shown, it can be hard to create a mental image of the object, even with several views.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  1. Describe Oblique Parallel Projections.
A

• Oblique :
– direction of projection = normal to the projection plane.
– really a 3D system but a 2D view of an object with ‘forced depth’.
– E.g. instead of drawing the sides full size they are only drawn with half the depth creating ‘forced depth’ – adding an element of realism to the object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
  1. Describe how light helps us see.
A
  • The light that can be seen by the human eye is a mixture of all kinds of different lights scattered and reflected against the surroundings with different material properties.
  • Each different color is simply energy which can be represented by a wavelength. Colour is a wavelength visible to the eye.
  • Put simply, the colour that a material reflects is observed as that material’s colour. Also, the more light the material reflects the shinier it will appear to the viewer.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. What wavelengths of light does the human eye respond to?
A

• The visible spectrum is the portion of the electromagnetic spectrum that can be detected by the human eye. A typical human eye will respond to wavelengths from about 380nm to 750 nm.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
  1. How does light allow us to perceive colour?
A
  • Any colour that is reflected from an object is the colour we perceive.

• If an object absorbed all the light except for red then the object would appear to be red in a white light. So the reflectance spectrum of a “red” object would look like this:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  1. Why is shading needed?
A
  • When a 3D model is rendered with colour but no shading it is difficult or impossible to make out its depth and form.
  • In the real-world, the interaction of light on surfaces gives shading, which humans use as an important depth cue.
  • Light-material interactions cause each point to have a different color or shade.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
  1. What should be considered when shading?
A

Need to consider:

  • Light sources
  • Material properites (how shiny? How dull is it?)
  • Location of viewer (positioning very important)
  • Surface orientation (what way is the object facing?)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
  1. How is illumination used for shading objects?
A
  • Illumination: calculates intensity at a particular point on a surface.
  • Shading: uses these calculated intensities to shade the whole surface or the whole scene.
21
Q
  1. Name the four key lighting types in a scene.
A

• Light can be sent into a scene in a number of ways:

a) a point source that illuminates in all directions and
b) a directional or parallel light source that shines in a particular direction but doesn’t emanate from any particular location
c) a spotlight illumination that is limited to a small cone- shaped region of the scene
d) ambient light, a constant which is everywhere in the scene

22
Q
  1. What is a point light?
A
  • The point light source emits rays in radial directions from its source.

A point light source is a fair approximation to a local light source such as a light bulb.
For many scenes a point light gives the best approximation to lighting conditions.

23
Q
  1. What is a directional light?
A

All of the rays from a directional light source have a common direction and no point of origin. It is as if the light source was infinitely far away from the surface that it is illuminating.

For outdoor scenes, the sun is so far away that its illumination is simulated as a directional light source with all rays arriving at the scene in a parallel direction.

24
Q
  1. What is a spotlight?
A

A spotlight is a point source whose intensity falls off away from a given direction.

The beam of the spotlight is normally assumed to have a graduated edge so that the illumination is at its maximum inside a cone, falling to zero intensity outside a cone.

25
Q
  1. What is ambient light?
A

Even though an object in a scene is not directly lit it will still be visible. This is because light is reflected indirectly from nearby objects.

Ambient light does not model a ‘true’ light source – it’s a hack consisting of a constant value that mimics indirect lighting.

26
Q
  1. How is a pixel colour determined?
A
  • To determine a pixels colour we need to combine the effects of the lights with the surface properties of the polygon visible in that pixel.
27
Q
  1. What are the basic steps to calulating pixel colours?
A
  • Calculate each primary color separately
  • Start with global ambient light
  • Add reflections from each light source
  • Clamp to [0, 1]
  • Reflection decomposed into:

– Ambient reflection
– Diffuse reflection
– Specular reflection

• Based on ambient, diffuse, and specular lighting and material properties.

28
Q
  1. How is a pixel colour calculated? Give the equation.
A

Take the r,g,b.

29
Q
  1. Why Shade?
A
  • Human vision uses shading as a cue to form, position, and depth
  • Total handling of light is very expensive
  • Shading models can give us a good approximation of what would “really” happen, much less expensively
  • Average and approximate
30
Q
  1. Discuss modelling a smooth sphere.
A
  • To model a sphere so that it looks smooth by increasing or decreasing the number of facets is very impractical.
  • Although the outlines of these spheres don’t look particularly circular, they differ in appearance, yet both have the same number of facets.
  • We need to fool the eye by showing continuity in shading.
31
Q
  1. State the three levels at which shading can be applied to polygon based systems.
A

• There are three levels at which shading can be applied in polygon based systems:

  1. Flat Shading
  2. Gouraud Shading (Interpolation Shading)
  3. Phong Shading (Interpolation Shading)

They provide increasing realism at higher computational cost.

32
Q
  1. Describe Flat Shading.
A

Flat Shading:

– Each polygon is shaded uniformly over its surface.

– Illumination is calculated at a single point for each polygon.

– Usually only diffuse and ambient components are used.

33
Q
  1. Describe Interpolation Shading and 3 key stages.
A

• Interpolation Shading:
– A more accurate way to render a shaded polygon is to compute an independent shade value at each point.

– This is done quickly by interpolation:

  1. Compute a shade value at each vertex
  2. Interpolate to find the shade value at the boundary
  3. Interpolate to find the shade values in the middle
34
Q
  1. What is Gouraud shading?
A
  • Invented by Gouraud in 1971
  • To simulate smooth shading across a polygon, interpolate the light intensity (colour) across polygons.
  • Fast, supported by graphics accelerator cards.
  • Can’t model specular components accurately, since we do not have the normal vector at each point on a polygon.
35
Q
  1. How is Gouraud shading implemented?
A
  • Calculate the intensity of light at each vertex.
  • Interpolate the RGB values between the vertical vertices along each edge.
  • This gives us the RGB components for the left and right edges of each scan line (pixel row).
  • We then display each row of pixels by horizontally interpolating the RGB values between that row’s left and right edges.
36
Q
  1. What is Phong Shading?
A
  • Introduced by Phong in 1975 and used by OpenGL.
  • Phong shading linearly interpolates a normal vector across the surface of the polygon from the polygon’s vertex normals.
  • The surface normal is interpolated and normalized at each pixel and then used to obtain the final pixel color.
  • Phong shading is more computationally expensive than Gouraud shading since the reflection model must be computed at each pixel instead of at each vertex.
  • It is slower but provides more accurate modelling of specular highlights.
37
Q
  1. How is Phong shading implemented?
A

• Compute a normal for each vertex of the polygon.

  • Using bi-linear interpolation compute a normal for each pixel.
  • For each pixel normal, compute an intensity for each pixel of the polygon.
  • Paint pixel to the corresponding shade.

• In some modern hardware, variants of this algorithm are called “pixel shading.” It usually means that the lighting calculations can be done per-pixel, and that the lighting variables are interpolated across the polygon.

38
Q
  1. What are the effects on light when it hits a surface?
A

Light incident at a surface = light reflected + light scattered + light absorbed + light transmited

When light hits an opaque surface some is absorbed, the rest is reflected (some can be transmitted/scattered too)
• The reflected light is what we see
• Reflection is not simple and varies with material
– the surface’s micro structure define the details of reflection
– variations produce anything from bright specular reflection (mirrors) to dull male finish (chalk)

39
Q
  1. What is a surface normal?
A
  • A surface normal to a flat surface is a vector that is perpendicular to that surface.
  • In 3D graphics, a normal is an imaginary line that is perpendicular to the surface of a polygon.
  • The normal is ofen used to determine a surface’s orientation toward a light source.
  • For a polygon (such as a triangle) a surface normal can be calculated as the vector cross product of two edges of the polygon.
40
Q

40 What is the difference between local and global illumination?

A
  • In general, light leaves some light source, is reflected from many surfaces and then finally reflected to our eyes, or through an image plane of a camera.
  • The light that goes directly from the light source and is reflected from the surface is called a local illumination model and the shading of any surface is independent from the shading of all other surfaces.
  • A global illumination model adds to the local model the light that is reflected from other surfaces to the current surface. A global illumination model is more comprehensive, more physically correct, and produces more realistic images. It is also more computationally expensive.
41
Q
  1. Describe a Local Illumination Model.
A
  • Only the interaction between the light source and the point on the surface being shaded is considered.
  • Light that takes an indirect path to the surface is not considered.
  • This means that each object is lit individually, regardless of what objects surround it.
  • Most real-time graphics rendering systems use local illumination.
42
Q

42 What is ambient reflection with relation to local illumination?

A
  • When there are no lights in a scene the picture will be blank.
  • By including a small fraction of the surface colour we can simulate the effect of light reflected from around the scene.
  • Ambient reflection is a gross approximation of multiple reflections from indirect light sources.
  • By itself, ambient reflection produces very little realism.
43
Q
  1. Describe depth cueing with regards to **Local Illumination. **
A
  • Mimmicks the way the human visual system uses depth cueing in the real world.
  • Light is attenuated as it travels away from its source.
  • In theory, light intensity should be attenuated using an inverse square law. In practice, a linear fall-off looks much more realistic.
  • Fade distances can be set.
44
Q
  1. Give detailes of Diffuse lighting in local illumination.
A

• Diffuse lighting is the most significant component of an illumination model.
• Light reflected from a diffuse surface is scattered in all directions.
Perfect diffuser: follows Lambert’s Cosine Law and surface looks the same from all directions
• To model the effect we assume that a polygon is most brightly illuminated when the incident light strikes the surface at right angles.
• Illumination falls to zero when the beam of light is parallel to the surface.

45
Q
  1. What is Lambert’s Cosine Law?
A

• The reflected energy from a small surface area in a particular direction is proportional to cosine of the angle between that direction and the surface normal.

  • An ideal diffuse surface is, at the microscopic level a very rough surface (e.g chalk, cardboard).
  • Because of the microscopic variations in the surface, an incoming ray of light is equally likely to be reflected in any direction.
46
Q
  1. Describe specular reflection.
A
  • Specular reflection is the direct reflection of light by a surface.
  • Most light is reflected in a narrow range of angles.
  • Shiny surfaces reflect almost all incident light and therefore have bright specular highlights or hot spots.
  • Specular highlights take the colour of the light, not the surface.
  • For a perfect mirror the angle of reflection is equal to the angle of incidence.
47
Q
  1. How is Phong Illumination used?
A

• The Phong illuminationmodel is widely used for real- time computer graphics to approximate specular reflection. (It’sNOTthe same asPhong shading.)

  • This is an empirical model, which is not based on physics, but physical observation.
  • Phong observed that for very shiny surfaces the specular highlight was small and the intensity fell off rapidly, while for duller surfaces it was larger and fell off more slowly.
  • The model consists of three reflection components: the diffuse component, the specular component and the ambient component.
48
Q
  1. Evaluate the use of shading.
A
  • The primary objective of shading is for efficiency of computation rather than for accurate physical simulation.
  • As mentioned by Phong: “We do not expect to be able to display the object exactly as it would appear in reality, with texture, overcast shadows, etc. We hope only to display an image that approximates the real object closely enough to provide a certain degree of realism.
49
Q
A