Bearbeiter: Ben Othman kabil - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Bearbeiter: Ben Othman kabil

Description:

The process of computing the luminous. intensity reflected from a specified 3-D point ... Radix sort: complexity O(n) Quick sort: complexity O(n lg n) ... – PowerPoint PPT presentation

Number of Views:98
Avg rating:3.0/5.0
Slides: 35
Provided by: wwwbrueg
Category:

less

Transcript and Presenter's Notes

Title: Bearbeiter: Ben Othman kabil


1
Proseminar WEB 3D
  • Bearbeiter Ben Othman kabil
  • Betreuer Boulila
    Naoufel
  • Aufgabensteller Prof. Boulila
    Naoufel
  • Abgabedatum 13. Febraur
    2003

2
Illumination and Shading
  • Light Sources
  • Empirical Illumination
  • Shading
  • Transforming Normals

3
Illumination Models
  • Illumination
  • The transport luminous flux
  • from light sources between
  • points via direct and indirect paths
  • Lighting
  • The process of computing the luminous
  • intensity reflected from a specified 3-D point
  • Shading
  • The process of assigning a colors to a pixels
  • Illumination Models
  • Simple approximations of light transport
  • Physical models of light transport

4
Two Components of Illumination
  • Light Sources (Emitters)
  • Emission Spectrum (colour)
  • Geometry (positional and directional)
  • Directional Attenuation
  • Surface Properties
  • Reflectance Spectrum (colour)
  • Geometry (position, orientation, and
    micro-structure
  • Absorption

5
Light Sources
  • Ambient Light Sources
  • No spatial or directional characteristics
  • Independent of object's position and orientation
  • Directional Light Sources
  • All rays have common direction
  • Example sunlight
  • Spot Light Sources
  • Emits rays in a radial direction from its source
  • Example light bulb
  • Other Light Sources

6
Diffuse Reflection and Lighting
  • Ideal diffuse Reflection
  • A very rough on microscopic level
  • Examplechalk
  • Computer Diffuse reflection
  • Lamberts cosine Law
  • How of the incoming light energy is
    reflected

7
Diffuse reflection und lighting
  • Ideal Diffuse Reflection
  • A very rough surface on microscopic level
  • Example chalk
  • Lambert's Cosine Law
  • How much of the incoming light energy is
    reflected
  • Computing Diffuse Refelection

8
Diffuse reflection und lighting
9
Specular Reflection and Lighting
  • Ideal Specular Reflection
  • A very smooth surface on microscopic level
  • Example mirror
  • Snell's Law
  • Non-ideal Reflectors
  • Empirical model

10
Specular Reflection and Lighting
11
Phong Illumination
  • The Phong Illumination Model
  • Phong examples
  • Variable Direktion of the light source

12
Simple Shading
  • Flat Shading
  • A only one illumination calculation for each
    primitive
  • Facet Shading
  • Apply illumination equation at each point

13
Gouraud Shading
  • First applies the illumination model one subset
    of surface points
  • Then interpolates the intensity of the
    remaining points on the surface
  • But the facet artefacts are still visible

14
Phong Schading
  • Based on Goraud Shading
  • First the surface normal is linearly
    interpolated across polygonal facets
  • Then the illumination model is applied at every
    point

15
Texture Mapping
  • Texture mapping is a successful technique for
    high-quality image synthesis
  • Results depend on key elements
  • Mapping
  • Filtering
  • Sampling

16
What will we cover?
  • Image warping
  • Affine, bilinear, projective mappings
  • Scan algorithms
  • Anti-aliasing
  • EWA Filter (Elliptical Weighted Average)

17
What is texture mapping?
  • Purpose To create rich visual illusions
    inexpensively
  • Definition Mapping a texture image onto a
    surface in a 3D scene

18
Mapping spaces
(u, v)
(x, y)
Texture Space (2D)
Screen Space (2D)
Screen Space (3D) (z buffer)
Object Space (3D)
parameterization
projection
World Space (3D)
rendering
19
Texture rendering
  • Texture mapped to cube model
  • Cube projected onto screen space

20
Hidden Surface Removal
  • Problem Given a set of 3D objects and a
    viewing specification, determine which lines or
    surfaces are invisible.

  • Primitives outside of the field of view
  • Back-facing primitives on a closed, convex object
  • Primitives occluded by other objects closer to
    the camera

21
(No Transcript)
22
General Approaches
  • Image-Based Approach (Image Precision)
  • for(each pixel in the image)
  • determine the ray through the pixel
  • determine the closest object along the
    ray
  • draw the pixel in the color of the
    closest object

  • Object-Based Approach (Object Precision)
  • for (each object in the world)
  • determine unobstructed object parts
  • draw the parts in the appropriate color

23
Coherence
  • Objects typically have properties which vary
    smoothly
  • Face coherence
  • Edge coherence
  • Scan line coherence
  • Area coherence
  • Depth coherence
  • Frame coherence
  • Object coherence
  • Helps to avoid making expensive calculations, or
    to turn them into simple differences (like line
    drawing)

24
Perspective Transformations
  • Depth comparisons are typically performed after
    the perspective transformation
  • Since were looking down the z axis, two points
    are now on the same ray if x1x2 and y1y2
  • The perspective transformation preserves
  • Relative depth
  • Straight lines
  • Planes

25
Normalizing the Viewing Frustum
  • Transform frustum to a cube before clipping -
    that is convert perspective frustum to
    orthographic frustum

26
Handling Occlusion
  • Problem some polygons will overlap, therefore
    we must determine which portion of each polygon
    is visible to eye.

27
Back Culling
  • Reduces complexity only
  • Convex self-occlusion
  • Angle between the viewing direction an the
    normal vector of a polygon to determine
    visibility
  • Criterion vector product positive

28
Back To Front Sorting
  • aka The Painter's method
  • First Step The list of surfaces are sorted
    according to their distance from the viewpoint
  • Second Step The objects are then painted from
    back-to-front.
  • Criterion for polygon comparison simplest
    solution compare the maximum z coordinate

29
Problems with Painters
  • Choosing a suitable sorting algorithm
  • Bubble sort complexity O(n2)
  • Radix sort complexity O(n)
  • Quick sort complexity O(n lg n)
  • The criterion of comparing the maximum z
    coordinate is not correct in general
  • Mutual overlapping and piercing

30
Constructing a BSP Tree
  • The Binary Space Partition (BSP) algorithm
  • Select a partitioning plane/facet
  • Partition the remaining planes/facets according
    to the side of the partitioning plane that they
    fall on ( or -)
  • Repeat with each of the two new sets
  • In the case of a crossing facet we clip it into
    two halves

31
Computing Visibility with BSP Trees
  • Starting from the root of the tree
  • Classify viewpoint as being in the positive or
    negative half-space of our plane
  • Call this routine with the opposite half-space
  • Draw the current partitioning plane
  • Call this routine with the same half-space

32
Pixel-level Visibilty
  • Thus far - visibilty at the level of primitives
  • Now - visibilty at the level of each pixel

33
Ray Casting
  • A very general algorithm
  • Works with any primitive we can write
    intersection tests for
  • but it's hard to make it run fast
  • And thats why
  • can use it for much more than visibility testing
  • shadows, refractive objects, reflections, motion
    blur,...

34
Scanline Visibilty
  • Looks a lot like polygon rasterization
  • Maintains active object table
  • Looks at one scanline at a time - no need to
    store entire image - nice if memory scarce
Write a Comment
User Comments (0)
About PowerShow.com