Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
-
date post
20-Dec-2015 -
Category
Documents
-
view
229 -
download
2
Transcript of Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
![Page 1: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/1.jpg)
Coordinate Systems
X
Y
Z
Coordinate Systems
(conventional Cartesianreference system)
X
YZ
![Page 2: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/2.jpg)
Transformations Transformation occurs
about the origin of the coordinate system’s axis
TranslateScale
Rotate
![Page 3: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/3.jpg)
Order of Transformations Make a Difference
Translate along X 1;
Rotate about Z 45
Rotate about Z 45; Translate along X 1
Box centered atorigin
![Page 4: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/4.jpg)
Hierarchy of Coordinate Systems
Also called:– Scene graphs
– Tree structures
Local coordinate system
![Page 5: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/5.jpg)
The Camera
Projection Plane
View Volume
Near ClippingPlane Far Clipping
Plane
![Page 6: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/6.jpg)
The CameraParallel Projection
Perspective Projection
![Page 7: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/7.jpg)
Rendering Pipeline
Hardware
Modelling Transform Visibility
Illumination +Shading
ColorPerception,Interaction
Texture/Realism
![Page 8: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/8.jpg)
Polygons, Meshes & Scan Conversion- In scan line rendering (the most common): Each polygon is calculated along each scan line. From the top scan line to the bottom of a frame in the 2D projection plane.
V2V3
RasterScan line
V1
![Page 9: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/9.jpg)
Approximating Curved Surfaces with Flat Polygons
Flat Shading – each polygon face has a normal that is used to perform lighting calculations.
![Page 10: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/10.jpg)
Gouraud Shading Compute vertex normals
by averaging face normals.
Compute intensity at each vertex.
I1
I2
I1,2 I1,3
I3
I1,2,3,4Raster
Scan line
![Page 11: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/11.jpg)
Illumination / Shading
Distinction between illumination and shading models– illumination - calculate intensity at a
point on surface– shading - uses calculated intensities
to shade polygons (uses illumination models)
we’ll review the important models
![Page 12: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/12.jpg)
Illumination / Shading– global illumination:
• ray tracing + radiosity
– mapping and other techniques• texture maps, bump maps, reflection maps,
transparency, anti-aliasing, shadows
ray tracing radiosity
![Page 13: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/13.jpg)
Local Illumination
Local vs. global illumination models– local (typically) - how is one point of
the scene illuminated directly by the light source• is light source only source of illumination?• Simple models lump the rest into a single
ambient term• do not account for reflections within the
environment
![Page 14: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/14.jpg)
Local Illumination
Local vs. global illumination models– global - illuminates the whole scene
• typically makes use of local illumination model
• incorporates inter-reflectance of objects
![Page 15: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/15.jpg)
Lighting Types Ambient – basic, even
illumination of all objects in a scene
Directional – all light rays are in parallel in 1 direction - like the sun
Point – all light rays emanate from a central point in all directions – like a light bulb
Spot – point light with a limited cone and a fall-off in intensity – like a flashlight
Cone anglePenumbra angle
(light starts to drop offto zero here)
![Page 16: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/16.jpg)
Light Effects Usually only considering
reflected partLight
absorbed
transmitted
reflected
Light=refl.+absorbed+trans.
Light
ambient
specular
diffuse
ssddaa IkIkIkI
Light=ambient+diffuse+specular
![Page 17: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/17.jpg)
Ambient Light is the light in the environment evenly reaching
all surfaces from all directions light location doesn’t matter eye position doesn’t matter
aaIkI IA: ambient light
ka: material’s ambient reflection coefficient
![Page 18: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/18.jpg)
Ambient Light
aaIkI IA: ambient light
ka: material’s ambient reflection coefficient
Models general level of brightness in the scene Accounts for light effects that are difficult to
compute (secondary diffuse reflections, etc)
![Page 19: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/19.jpg)
Ambient Light Example
![Page 20: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/20.jpg)
Diffuse Light Light absorbed by the surface and then reflected equally to all directions Models dullness, roughness of a surface
Light
LNIk
IkI
dd
dd
cos N
L
Id: intensity of light source
kd: material’s diffuse reflection coefficient N: normal vector (normalized) L: light source vector (normalized)
Lambert’s Law:(perfectly diffuse
surface)
![Page 21: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/21.jpg)
Diffuse Light
![Page 22: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/22.jpg)
Diffuse Lighting Example
![Page 23: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/23.jpg)
Specular Light Light that is reflected from the surface
unequally to all directions Models reflections on shiny surfaces
Light
ndd
nss
REIk
IkI
cos N
LEye R
Phong’s Law:
R
n=inf.
R
n=large
R
n=small
![Page 24: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/24.jpg)
Specular light example
![Page 25: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/25.jpg)
Specular light calculation
The effect of ‘n’ in the phong model
n = 10
n = 30
n = 90
n = 270
![Page 26: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/26.jpg)
Shading a Polygon
Illumination Model: determine the color of a surface (data) point by simulating some light attributes.
Local IM: deals only with isolated surface (data) point and direct light sources.
Global IM: takes into account the relationships between all surfaces (points) in the environment.
Shading Model: applies the illumination models at a set of points and colors the whole scene.
Texture Mapping: remappes and avgs. any value above (diffuse) from a 2d picture or map
![Page 27: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/27.jpg)
Shading a Polyhedra
Flat (facet) shading:– Works well for objects really made of flat faces.– Appearance depends on number of polygons for curved surface objects.
If polyhedral model is an approximation then need to smooth.
![Page 28: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/28.jpg)
Flat and Smooth Shading
Getting smooth Curvature : interpolation
Gouraud ShadingFlat Shading
![Page 29: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/29.jpg)
Flat Shading Polygon meshes approximate smooth curved
surfaces with planar facets. Using the previous methods does not generate an illusion of smooth curved surface.
Reason: discontinuity of the normal vectors.
N1 N2
![Page 30: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/30.jpg)
Gouraud Shading Assign vertex the normal of the smooth surface.
Or Average the normal of all neighboring polygons
N1 N2
N
Interpolate colors along edges and scan-lines
![Page 31: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/31.jpg)
Gouraud shading
![Page 32: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/32.jpg)
Phong shading
![Page 33: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/33.jpg)
Phong Shading Gouraud Shading does not properly handle
specular highlights.
Reason: Colors are interpolated Solution:
– Compute averaged normal at vertices (Gouraud)– Interpolate normals along edges and scan lines!– Apply illumination model at every pixel
![Page 34: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/34.jpg)
Phong ShadingGouraud Shading
Phong Shading
![Page 35: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/35.jpg)
SpecularSmall n Large n
![Page 36: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/36.jpg)
Surface ImageTexture
Textures Images (textures) applied to polygons (models) to enhance
the visual effect of a scene
Angel Figure 9.3
![Page 37: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/37.jpg)
Surface Textures Add visual detail to surfaces of 3D objects
Polygonal model
With surface texture
![Page 38: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/38.jpg)
Surface Textures Add visual detail to surfaces of 3D objects
![Page 39: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/39.jpg)
Parameterization
geometrygeometry
++ ==
imageimage texture maptexture map
• Q: How do we decide where on the geometryeach color from the image should go?
![Page 40: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/40.jpg)
Option: Varieties of projections
![Page 41: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/41.jpg)
Texture Mapping Steps:
– Define texture
– Specify mapping from texture to surface
– Lookup texture values during scan conversion
(0,0)
(1,0)
(0,1)
uv
x
y
ModelingCoordinate
System
ImageCoordinate
System
s
t
TextureCoordinate
System
![Page 42: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/42.jpg)
Texture Mapping
When scan convert, map from …– image coordinate system (x,y) to– modeling coordinate system (u,v) to– texture image (t,s)
(0,0)
(1,0)
(1,1)
(0,1)
uv
x
y
ModelingCoordinate
System
ImageCoordinate
System
s
t
TextureCoordinate
System
![Page 43: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/43.jpg)
Texture Mapping– Interpolate texture coordinates down/across scan lines
– U,V mapping can be arbitrary and manipulated
– Distortion due to interpolation approximation
![Page 44: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/44.jpg)
Texture Filtering
Angel Figure 9.5
Aliasing is a problem
Point sampling Area filtering
![Page 45: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/45.jpg)
Texture Filtering
Angel Figure 9.14
Size of filter depends on projective warp– Can prefiltering images
Magnification Minification
![Page 46: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/46.jpg)
Mip Maps Keep textures prefiltered at multiple resolutions
– For each pixel, linearly interpolate between two closest levels (e.g., trilinear filtering)
– Fast, easy for hardware
![Page 47: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/47.jpg)
What is a Texture? MAP surface detail from a predefined (easy
table (“texture”) to a simple polygon
Color Specular ‘color’ (environment map) Normal vector deviation (bumpmap) displacement mapping transparency ...
![Page 48: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/48.jpg)
Bump Mapping
Modifies the direction of the surface normal.
![Page 49: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/49.jpg)
Texture and Bump Mapping Diffuse and normal remapping
![Page 50: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/50.jpg)
Displacement Mapping
Modifies the surface position in the direction of the surface normal.
the actual geometric position of points over the textured surface are displaced along the surface normal according to the values stored into the texture.
![Page 51: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/51.jpg)
Programmable Shaders Vertex Shader - Small Vertex program that can modify the
vertex between submission to the pipeline and rendering
![Page 52: Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d475503460f94a22945/html5/thumbnails/52.jpg)
Programmable Shaders
Vertex Shader - Small program that can
modify every vertex before rendering 3 examples:
– Renderman (software-based, non real-time),
– Microsoft’s DirectX (GPU real time)
– Nvidia’s Cg (GPU real time)
http://www.nzone.com/object/nzone_luna_videos.html