Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Graphics Imaging

Similar presentations


Presentation on theme: "Computer Graphics Imaging"— Presentation transcript:

1 Computer Graphics Imaging
Ying Zhu Lecture 04 Transformation, View, and Projection

2 Before we start Short animation films to inspire your idea
Go to GSU E-journal locator Type in “computer graphics” and search Select “Computer graphics proceedings, annual conference series” Click on “Association for Computing Machinery” If off-campus, use the ID on your Panther card to log in Click on “SVR: SIGGRAPH Video Review” Selected short animation films from SIGGRAPH conference

3 Project Teams Send me an email with a link to your team web site
All I need is a web site with a list of team members

4 Today’s lecture Transformations View 3D projection
Translate, rotate, and scale View The camera 3D projection Orthographic projection Perspective projection

5 Coordinate systems Each point and vector is defined in reference to a coordinate system Once we fix the origin of the coordinate system, we can represent all points unambiguously A 3D coordinate system is defined by its three base vectors (x, y, and z axis)

6 Geometric transformation
In 3D graphics, animation is achieved by transforming geometric objects in the virtual world Transforming geometric objects means transforming points (vertices) and vectors Transformation of points and vectors can be conveniently achieved by matrix multiplications Introduced by Larry Roberts in 1966

7 Transformations in computer graphics
There are three basic transformations in computer graphics Translation Rotation Scaling Sophisticated 3D animations can be achieved by concatenating a series of basic transformations

8 Translation Translation P’ P d x y

9 Scaling Scaling

10 Rotation Rotation about the origin
Counter-clock wise rotation by 90 degree.

11 2D Transformation Summary
Translation Scaling Rotation

12 3D Affine Transformations
3D affine transformations are an extension of the 2D transformations. Use 4x4 matrices instead of 3x3 matrices in 2D transformations. For example 3D scaling

13 3D Translation 3D translation matrix
OpenGL function: glTranslatef(tx, ty, tz)

14 3D Scaling 3D scaling matrix OpenGL Function: glScalef(Sx, Sy, Sz)

15 3D Rotation About the Origin
3D rotation is more complicated than 2D rotation. Rotation about X axis Rotation about Y axis Rotation about Z axis

16 Transformations in Blender
See Blender User’s Manual Interaction in 3D

17 3D Scenes and Camera In computer graphics, we often use terms that are analog to theatre or photography A virtual world is a “scene” Objects in the scene are “actors” There is a “camera” to specify viewing position and viewing parameters. Viewing and projection is about how to position the camera and project the 3D scene to a 2D image

18 Viewing There should be at least one camera in the scene
You can switch cameras in the animation sequence Camera can be animated too The 3D scene is rendered through the viewpoint of the camera It’s important to make sure your objects are visible through the camera, not just your eyes Note the difference between a camera in CG and a real camera

19 Camera in computer graphics
Computer graphics uses the pinhole camera model This results in perfectly sharp images Real cameras use lenses with variable aperture sizes This causes depth-of-field: out-of-focus objects appear blurry

20 Projection For each camera, there is a view volume for projection
Everything inside the view volume will be projected to the 2D plane Everything outside the view volume will be “clipped” and ignored Two basic projections Orthographic projection Perspective projection

21 Orthographic Projection
Projection lines are orthogonal to projection surface

22 Orthographic Projection
Projection plane parallel to principal face Usually form front, top, side views isometric (not multiview orthographic view) front in CAD and architecture, we often display three multiviews plus isometric side top

23 Orthographic Projection
Preserves both distances and angles Shapes preserved Can be used for measurements Building plans Manuals Cannot see what object really looks like because many surfaces hidden from view Often we add the isometric view

24 Perspective Projection
Projectors converge at center of projection Perspective projection reflects real world experience

25 Perspective Projection
The view frustum of perspective projection

26 Camera parameters in Blender
The default projection in Blender is perspective projection, you can switch to orthographic view You can modify the following parameters in Blender Field of view Near plane Far plane

27 Camera parameters in Blender
In 3D view, select camera, press F9 Demonstration

28 Summary Three basic transformations
Translation Rotation Scaling Camera in CG is different from camera in the real world Two basic projections Orthographic projection Perspective projection

29 Readings See Blender User’s Manual
Interaction in 3D ( ion_in_3D)


Download ppt "Computer Graphics Imaging"

Similar presentations


Ads by Google