compression

Document Sample
compression Powered By Docstoc
					Computer Animation

         Dr. Gino Cheng
  Media Arts Technology Center
Hong Kong University of Science and
            Technology
    eegino@ust.hk, 2358-8540
Application
 Scientific visualization
 Industrial design
 Media production
 Simulation
 Entertainment
Computer Animation
   Types
    • Color cycling
    • 2D animation
    • 3D animation
 Use / production
 Programming
Color Cycling
 Earliest form of “animation”
 Indexed color - change color values with
  time
2D Animation
   “Page flip”
    • GIF animation (e.g., GIF animator)
   Key-frame
    • Director
    • Vector-based motion and effects
    • Alpha channels
   Flash (supports both)
Key Frames
 Define position of elements at a specific
  time - “key frame”
 Computer interpolates between key
  frames
2D Animation
   “Sprites”
    • 2D animated objects
    • Hardware support for motion, collision
      detection
    • Objects animated by page-flipping
    • Layers
Double Buffering
   Frame buffer to reduce flicker



          Draw              Display


          Display           Draw


          Draw              Display
3D Animation
 Render 3D images from computer
  models
 Ray-tracing to synthesize image
 Simulate light
    • Reflection
    • Refraction
    • Diffusion
3D Animation Process
 Modeling
 Lighting
 Animation
 Rendering
Modeling
 Models constructed from polygons and
  primitive elements (spheres, cubes,
  cones)
 Model capture tools, libraries
 Smooth services created from shading
  and shadowing
 Additional realism through texture
  mapping (applying images onto
  surfaces)
Complex Models

   Hierarchical representation
    • Scene, objects, object components
    • Easier to manipulate
 Linked motion within hierarchies
  (bones)
 Texture mapping for detail / realism
    • Images “mapped” onto surfaces
Modeling Tools
 Multitude of formats
 Tools are good at certain things
    •   Softimage
    •   3D Studio Max
    •   Lightwave
    •   Alias Wavefront
   No guarantee in format translations
    (e.g., textures, coordinate system)
Lighting, Camera
   Placement of light sources
    • Spot-light
    • Point light
    • Directional light
   Camera - rendering perspective for a
    scene
    • Location, direction, lens
3D Animation
 Motion through key-frame approach
  (3D)
 Wire-frame render to reduce time to
  visualize
 Can play with motion vectors to
  simulate real-motion (e.g. bouncing ball)
Rendering
   Other animation effects
    •   Motion blur
    •   Lens Flare
    •   Particle systems (smoke, fog, etc.)
    •   Radiocity effects
   Render with full effects for final output
    • Ray tracing is slow
    • Render farms
3D Animation Technologies
 Metaballs - textures mapped onto “balls”
  structure
 Nurbs - Non-uniform rational B-splines
  (rather than polygon meshes)
 Inverse kinematics - modeling motion
 Motion capture
    • body suits
    • Cameras
VRML
   View 3D models over the WWW
    • 1.0 - static models
    • 2.0 - animation, sound (Netscape 4.0, 3.0
      with plug-in)
    • Distributed objects
 Interactivity through Java/Javascript
 Modeling packages specifically for
  VRML
 Slow
Real-time Animation
   Open GL
    •   API for 3D modeling and rendering
    •   OS, platform independent
    •   Hardware support
    •   C, C++, Java
   Other APIs
    • Heidi (3D Studio Max)
         – 3D studio max doesn’t support Open GL
    • Direct 3D (Microsoft attempt)
   Still slow
Ray Casting
 “2 1/2 D” real-time technique
 Popularized by “Doom” genre of games
 Use “rays” to identify viewable
  boundaries (e.g., wall edges)
 Apply transformation to texture mapped
  surfaces
 Apply lighting gradients
Animation Resources
 Animation tips and techniques
 Game engines
 Microsoft’s Direct 3D