Digital Media - Download as PowerPoint by HC121109074950


									Digital Media

 Dr. Jim Rowan
   ITEC 2110
Vector Graphics II
  objects AKA closed curves
• Translation is a simple up/down side-to-
  side movement
• Scaling: make bigger or smaller
• Rotation about a point
• Reflection about a line
                Object fills
• Solid color
• Patterns
• Gradients
  – linear
  – radial
       3-D... 3 dimensions
• x, y and z
• x & y form the ground plane
• z is the height
• Way more complex than 2-D
• 3-D shapes (objects) are defined by their
• Made even more complicated by the fact that
  a 3-D object inside the computer must be
  translated into 2-D to be rendered on a
  computer screen...
  – This results in the need to specify the viewpoint
   3-D: additional complexity
• lighting
  – natural
  – artificial
• atmosphere
• surface texture
• rendering is extremely computationally
  expensive (demanding)
Managing Complexity
       Structural hierarchy
• Things in the real world are
  compositions of smaller things
• Things in the 3-D graphics world are
  also compositions of smaller things
• Hierarchical structure is an excellent
  way of coping with complexity
• Also seen in object-oriented
  programming like Java and Squeak!
          Structural hierarchy
  – Wheels (4)
      • tire
      • wheel
      • hubcap
  – Doors (2)
      • handles
          – inside
              » lever
          – outside
              » button
              » handle
      • window(s)
  – Lights
      • headlights (2)
      • tail lights (2+)
      • stop lights (2+)
   3-D: additional complexity
• rendering is extremely computationally
  expensive (demanding)
  – lighting
     •   natural
     •   artificial
     •   reflections off other objects in the scene
     •   shadows cast by other objects in the scene
  – surface texture affects appearance
3D Models
              3-D models
Building things from known shapes
• Constructive solid geometry
  – uses geometric solids: cube, cylinder,
    sphere and pyramid
  – objects build by squishing and stretching
    those objects
  – objects joined using union, intersection
    and difference
         3-D models
  constructive solid geometry
• Union
  – new object is made from the space occupied by
    both objects
• Intersection
  – new object is made of the space that the two
    objects have in common
• Difference
    new object is made from one object’s subtraction
    from another object
                    3-D models
                    Free Form
Building things one side at a time
• Uses an object’s surface (it’s boundary with the
  world) to define it
• Build surfaces from flat polygons or curved patches
   – flat polygons are easier to render and therefore frequently
     used in games where computational power is limited
• Results in an object drawn as a “mesh”
• Can be done using Bezier surface patch but have 16
  control points
• More tractable patch uses a surface called a non-
  rational B-spline
          3-D models
      Free Form: Extrusion
Building things using a paydoh factory
• Draw a 2 dimensional shape through
  space along a line
• The line can be straight or curved
               3-D models
                Meat balls
• Reacts like soft objects rather than hard, solid
• Think of it as having surface tension
• Kinda like an uncooked meatball, press two
  of them together and they “squish”
              3-D models
          Procedural modeling
• Best known is based on Fractals
   –   Fractals
   –   exhibit the same structure at all levels of detail
   –   aka “self similar”
   –   used to model natural objects
• Particle systems... many particles, few controls
• Physics... distribution of mass, elasticity, optical
  properties, laws of motion
            3-D Rendering
• Rendering engine handles the
• Wire frames are used to preview objects
  and their position
  – can’t tell which surface is closer to us and
    which surface is hidden
• To save computation time, hidden
  surfaces are removed before rendering
  – Why render what can’t be seen?
             3-D rendering
• Lighting
  – Added to scene much like an object
  – spot light, point source, floodlight...
  – position and intensity
• Direct relationship between rendering
  quality and computational burden
              3-D rendering
• Shading... how light reacts with surface
  – Based roughly on physics but modified by
    heuristics (rules derived from experience)
  – Examples ===>
• Texture mapping
  – An image is mathematically wrapped around the
                    3-D rendering
• Light reflecting off objects of one color affect the color
  and lighting of surrounding objects
   – Ray tracing Complex... must be repeated for pixel
     in the image... photo-realistic results
   – Wayne Wooton Pixar
   – Radiosity

To top