Title: Computer Graphics Techniques and Applications
1Computer Graphics Techniques and Applications
- Chapter 4 - Surfacing a Model
- Dr Brett Stevens
- e-mail Brett.Stevens_at_port.ac.uk
- phone 023 9284 5482
- address West Wing, Eldon Building
- notes http//techfaculty.port.ac.uk/cgtap
2Last Two Weeks
- Polygon Modelling
- Spline Modelling
- Both include the shape of an object but not its
- Material
- Light source
- Viewpoint
3The Surface of an Object.
- Modelling defines the shape, that a surface
should fit to, but we still need to know which
way the surface points.
Normal Vectors specify this.
4The Surface has Materials
- Surfacing or Shading
- The application of a material to a surface.
- This Includes
- Self-illumination
- Transparency
- Diffuse and Specular Reflections
- Opacity
- Bump Maps
- Displacement Maps
5The Simplest Scene
- A self-luminous object.
- Not visually descriptive.
6Objects with External Lights
- An external light source, shows
- Colour (even if its black or white)
- Structure, through a pattern of shading.
7Reflection
- Shading is a by product of reflection.
Two end points on the reflection continuum
Diffuse (Perfectly Matt) Specular (Perfectly
Shinny)
A material is constructed by combining both 1
other factor
I Iaka IdkdCos(q) IsksCosn(a)
8Specular Diffuse Reflection
- Combination schemes.
- Phong Diffuse objects
- Blinn Specular objects
- The colour of each component can be adjusted,
along with the spread of the specular component.
9Texture Maps
- Rare to find a flat coloured surface.
- A texture map is a purely visual method of
varying the colour pattern of an object. - Its part of the material not something separate.
10Procedural Texture Maps
- Mathematically generated texture maps.
- Fully Scalable and editable.
- Not very detailed and requires some skill to
master.
11Bitmapped Texture Maps
- The u,v,w coordinates of a 2D bitmap are
projected onto the x,y,z coordinates of an
object. - Allows for fine control of an objects surface
appearance but requires additional 2D software.
12Global Lighting Algorithms
- Phong and Blinn only consider local reflections
from a light source. - Light bounces between objects as well.
- Ray-tracing follows the light from source to
eye (or the other way around). - Phong or Blinn still used on the object but
ray-tracing follows the unused reflections to
see if they do anything useful.
13Standard vs Ray-Tracing
3 Seconds
15 Seconds
14Transparency
The Petri-Dish was clearly clear.!
- Transparency can be added to the material like
the diffuse or specular component, either as a
uniform distribution or as a local map.
- Transparency affects the diffuse and specular
component
15Displacement Maps
- Actually alters the location and orientation of a
surfaces faces. - Useful for creating large, natural, shapes or
objects. - A procedural or bitmap can be used.
16Bump Maps
- Normal vector perturbation mapping
- Uses a Height map to simulate texture.
- Dont get confused with a texture map.!!!
- Part of the Material still.
17Normal Maps
- Normal Perturbation are pre-computed and stored
in RGB space. - Still look flat at glancing view angles to the
surface.
18Parallax Maps
- or Virtual Displacement Mapping
Includes depth cue information for
motion-parallax by offsetting pixels. The height
map used to calculate the displacement from the
viewpoint.
Parallax occlusion mapping
The future
Z-correct bump mapping
19Lighting
- Spotlights or omni-lights.
- The omnis intensity and colour can be altered.
- Same for spot light but it can also adjust its
light cone and falloff to narrow its beam. - Unlike real life, lights can exclude particular
objects.
- Lighting is complex and requires many more lights
than would seem logical.
20Cameras
- A camera can alter their visual properties
almost at will. The depth of field, and the
field of view can both be changed.
- Typically changed with a lens metaphor, although
- Manual editing is also possible.
21Rendering
- Rending is the process of calculating the diffuse
and specular colour, the transparency, the
ray-tracing, the bump or displacement mapping,
and clipping it all into the view volume of the
camera in order to create a 3D image of the
scene. - The rendering process also calculates whether the
final view will be Parallel or a perspective
projection.
22Polygons the Graphics Pipeline
Object coordinates ? world coordinates (world
space) ? the viewing volume (view space) ?
projected onto a 2D surface (projection space) ?
rasterised (converted to a pixel representation)
? the frame buffer.
23Render Effects
- Some effects can only be added during rendering
- The more objects, material effects, and lights
used, the slower the rending process.
24Stereoscopic Rendering
25Tutorial