flash animation video tutorials

 

 

 

START LEARNING
FLASH NOW

Get instant access to over
45 minutes of FREE Flash tutorials on video
 and our newsletter.

Name:
E-Mail:
Phone:
Describe

.

.

.

 
Web video-animation.com

.

.

flash tutorials flash tutorials flash tutorials flash tutorials

3D Rendering Pipeline a la Watt

This is a summary of the Rendering Pipeline Chapters of the book by Alan Watt, "3D Computer Graphics". It is an excellent book and well worth having as a reference book.

Local Coordinate System

The local coordinate system is how the models are inputted. The system usually is built around a origin , nominally (0,0,0). The axis of symmetry would be usually the z-axis. In model's the vertices, polygon normals, vertex normals are stored in this local system. And are all transformed together.

World Coordinate System

  1. Place object in the scene. All objects have their own coordinate system. Objects are transformed for local to global/world coords.
  2. Light sources are initialised. The Scene is lit in world space
  3. Specify surface attributes - texture, color, etc.

Camera Coordinate System

  • Establish the view point, viewing direction, and the view volume.
  • Transform global coords to camera/view coords

A Viewing System needs :

  1. Camera/View Point
  2. View Coordinate System defined with respect to View Point
  3. A View plane onto which the 2D image of the scene is projected
  4. View Frustum - defines field of view

Operations in View Space :

  • Back-face Elimination
    Visibility = planeNormal.dotProduct(ViewVector) > 0 ;
  • View Frustum

Flash Tutorials in Video Format - Watch them now at LearnFlash.com  

3D Screen Space

Operations :

  • Frustum Cull
  • Z-Buffer Algorithm - hidden surface removal - compare depth values of different faces
  • Transform to 2D Space

Rendering or Algorithmic Processes

  1. Z-Buffer Algorithm - hidden surface removal
  2. Interpolative Shading
    • Allows us to fetch individual polygons from the database in any order
    • No limit in scene complexity
    • but it is inefficient

Render Processes in 3D Screen Space

  1. Rasterization - finding the set of pixels onto which a polygon projects
  2. Hidden Surface removal
  3. Shading
  4. Clipping against the view volume

View Volume/Frustum Clipping

We want to discard as many polygons as possible at an early stage in the rendering pipeline.
How ?

  1. Scene Management Techniques
  2. Bounding Volumes
A simple test is to calculate a bounding sphere. All we need is the radius of the sphere surrounding the object and its centre point.

Lighting

Reflected Light = Ambient + Specular.
Specular light is the value calculated from the angle between the camera vector and the polygon normal. Ambient is usually a constant value.

Rasterizing

Where :
(xs,ys) = start point
(xe,ye) = end point
The algorithm for rasterizing could be :

x = xs;
m = (xe-xs)/ (ye- ys);
for(y = ys to ye) do{
	output(round(x),y);
	x=x+m;
}

Order of Rendering

  1. Polygon by Polygon - each poly is rendered in turn , in isolation from the rest
    Not so efficient because edges arent shared.
    Algorithm
    for each polygon do
    	construct an edge list from polygon edges
    for y = yMin to yMax do
    	for each pair(xi,xi+1) in EdgeList[y] do
    		Shade horizontal segment (xi, y ) to (xi+1, y)
    
  2. Scan Line Order - segments of all polygons that cross a given scan line are rendered , then the next line is
    * Needs to hold in memory :
    • rasterization
    • shading
    • texture
    • information for all polygons
  3. Algorithm
    clear active edge list
    for each scan line do
    	for each edge starting on that scanline do
    	add edge to active edge list
    	initialise its shading & raster values & their increments
    	remove edges with end on that scanline
    	parse entire edge list to obtain & render segments
    	add the increments to all active edges
    

Z-Buffer

Operates in Screen Space.
Pixels inside poly are shaded using an incremental shading scheme and the depth is evaluated by interpolation from z-values of the poly vertices after view transformation.

flash 8
.