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:

.

.

.

 
Web video-animation.com

.

.

flash tutorials flash tutorials flash tutorials flash tutorials

3D Graphics Rendering Pipeline Algorithms

This algorithm comes from a Simple Cube Demo by Chaz. Clipping and Backface Culling is not implemented.

Definition of Variables

  • Set the Vanishing point - ZSCALE = 500.00
  • Define a large Number for vertex snapping
  • Define Matrix4x4
  • Load Identity Matrix
  • Define Rotation Matrices
  • Define rotation angle variables - rotx,roty,rotz
  • Define List of Vertices - original
  • Define List of Vertices - transformed
  • Add Points
  • Set coords to 3d Objects
  • Set shading to Flat or Gouraud or whatever

Set oow loop
for ( 0 to numFaces/objects){
object[i].oow = 1/Object[i].z + ZSCALE;
}

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

Infinite animation Loop

  • Set Rotation Matrices
  • Loop - for(0 to numFaces){
    1. Rotation Transform
    2. Convert Points to 2D
    3. points2DList[i].oow = 1/point2DList[i].z + ZSCALE ;
    4. Snap the vertices - point2DList[i].x += vsnap;
    5. } // End for Loop
  • Loop - for(0 to numFaces){
    1. set color
    2. DrawPolygon i
    3. End for Loop
  • Increment x,y,z rotation angles for next frame
  • End Main Loop

ExtremeTech Algorithm

This Algorithm comes from a series of articles at extremetech.com about setting up a pipeline.

    Declare and Initialise variables
  • Declare pointsList, faceList, ObjectsList, etc
  • Declare brightness, lights etc.

  • Load Model Data
  • Add Points to pointsList
  • Set up FaceList
  • Do any precalculations - sin, cos, normals , whatever you can

  • Main Animation Loop
  • Get Key input
  • Set/update translation, rotation variables
  • .   Loop thru poinstList
    1. Transform points to World Space
    2. Transform to Camera Space
    3. Occlusion Culling
    4. Frustum Culling
    5. Backface Culling
    6. Perspective calculations
    7. SwapDepths or Z-sorting
    8. Draw Polygons
    9. End PointsList Loop
  • End Main animation loop

Grigory's 3d Flash Engine Algorithm

    Setup and Initialisation
  • Set World Center
  • Initialise Camera
  • Initialise Lights
  • Add Points
  • Initialise Faces
  • Initialise x,y,z axes
    Main Animation Loop
  • Transforms
  • Camera Calculations - get Normals
  • sort Depths
  • Draw Polygons

Smalltalk 3d Pipeline

    Precalculations
  • Visibility Regions
  • Static lightmaps
  • Collision Detection Data Structures

  • Game
  • Initialise Graphics
  • Read Game world

  • Loop
  • Read input from users - keys, mouse
  • Tick all objects
  • transform all objects
  • Collision Detection

  • Draw
  • Cull objects
  • Frustrum Culling
  • Occlusion Culling
  • Backface Culling
  • Z-sorting
  • Render From Camera's Perspective

3d Pipeline

    Initialisation
  • Precalculate Normals
  • Normalize normals

  • Loop
  • Rotate + translate points and normals
  • backface Cull
  • Sort depths
  • Frustum cull
  • Draw To Scene
  • Increment angles and translation variables.

9 Engine Pipeline

  • Rotate and translate
  • Calculate Normals
  • Calculate average z-Value for each face
  • Lighting
  • Backface Culling
  • Set Fill colours
  • Draw
  • SwapDepths(Math.floor(meanZ+10000))

Andre's milk bottle pipeline

  • Initialise PointsArray
  • Initialise FaceList/s

  • Loop
  • Rotate/translate Points
  • Perspective calculations - 3d to 2D
  • Z-sort
  • Calculate normals
  • Calculate colours
  • draw

ef3d engine Pipeline

    Initialisation
  • Init points variables
  • Init Arrays
  • Init camera

  • Loop
  • Transform to World Space
  • Transform to Camera space
  • draw
  • translate object
  • rotate object

3d Pipeline basic

    Loop
  • Rotate/translate
  • Calculate normals
  • Calculate light vectors
  • z-sorting
  • Perspective , 3d to 2D
  • Draw
Go here for a summary of Alan Watt's perspective on the 3D Rendering Pipeline

If you want your algorithm to go up here, or have any comments, suggestions, criticisms , please post to the board.

flash 8
.