26
Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Embed Size (px)

Citation preview

Page 1: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Digital Media

Dr. Jim Rowan

ITEC 2110

Thursday, September 13

Page 2: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Roll call

Sanchez-Casas, Jon F.Simson, DavisSinnock, Grant A.Swaim, Mark S.Tran, Dung Q.Vyas, Anand A.Woldeyohannes, Tesfamichael

Barton, Paul H.Bois, Lauren C.Bonds, Allison E.Duncan, Jarred T.Lawson, Joseph I.Mulongo, Julio B.Pennison, Heather L.Reilly, Daniel J.

Page 3: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Roll call

Jones, Crystal L.Marsh, Kerreen A.Thompson, Daniel G.Tran, Christopher V.

Page 4: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

vector graphics:shapes

• shapes are inherently defined internally• makes it easy to move the shapes around• straight lines are created with a line tool

– internally the line is stored as its endpoints

• connected lines are stored as a polyline– internally the polyline is stored as a series of

points

• closed polylines form a shape

Page 5: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

vector graphics:rectangles and squares

• rectangles can be described by two corners• squares are special cases of the rectangle

Page 6: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

vector graphics:ellipses and circles

• ellipses can be described by two points• circles are special cases of the ellipses

http://en.wikipedia.org/wiki/Ellipse

Page 7: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

vector graphics: curves

• Question: How would you draw a curve using a computer with a mouse?

• You can’t draw smooth lines very easily• Create a tool with handles based on the

Bezier curve that can be manipulated by those handles

Page 8: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Lines and curves

• Bezier curves can be smoothly joined together

• An anchor point is the point where one joins the other

• When a curve closes on itself it is considered a closed curve

• When it doesn’t it’s an open curve

Page 9: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Lines and curves

• Closed (and open for that matter) lines can be filled– This is how drawn shapes become objects like the

cowboy on Toy Story– solid color, patterns or gradient (linear or radial)– Patterns are built of tiles that match when placed

side to side

• Lines have ends– ends can be messy when joined– mitre, rounded, square, bevel

Page 10: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Manipulating 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

Page 11: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Object fills

• Solid color

• Patterns

• Gradients– linear– radial

Page 12: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D... 3 dimensions

• x, y and z• x & y form the ground plane• z is the height

Page 13: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D

• Way more complex than 2-D• 3-D shapes (objects) are defined by their

surfaces• 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

Page 14: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

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!

Page 15: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Structural hierarchyCar

– Wheels (4)• tire• wheel• hubcap

– Doors (2)• handles

– inside» lever

– outside» button» handle

• window(s)

– Lights • headlights (2)• tail lights (2+)• stop lights (2+)

Page 16: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D: additional complexity

• lighting– natural– artificial

• atmosphere• surface texture• rendering is extremely computationally

expensive (demanding)

Page 17: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D models

• 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

Page 18: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D modelsconstructive 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

• Differencenew object is made from

Page 19: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D modelsFree Form

• 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

Page 20: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D models Free Form: Extrusion

• Draw a 2 dimensional shape through space along a line

• The line can be straight or curved

Page 21: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D modelsProcedural modelling

• Objects are defined by formulas• Best known is based on Fractals• Fractals

– exhibit the same structure at all levels of detail– aka “self similar”– used to model natural objects

• Meatballs model soft objects• Particle systems... many particles, few controls• Physics... distribution of mass, elasticity, optical

properties, laws of motion

Page 22: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D Rendering

• Rendering engine handles the complexity

• 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

Page 23: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

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

Page 24: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D rendering

• Shading... how light reacts with surface– Based roughly on physics but modified by

heuristics• Texture mapping

– An image is mathematically wrapped around the object

• Light reflecting off objects of one color affect the color and lighting of surrounding objects– Two methods

• Ray tracing Complex... must be repeated for pixel in the image... photo-realistic results

• Radiosity

Page 25: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

3-D texture mapping

• An image is mathematically wrapped around the object

Page 26: Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13

Questions?