se 313 computer graphics
Download
Skip this Video
Download Presentation
SE 313 – Computer Graphics

Loading in 2 Seconds...

play fullscreen
1 / 28

SE 313 – Computer Graphics - PowerPoint PPT Presentation


  • 76 Views
  • Uploaded on

SE 313 – Computer Graphics. Lecture 8 : Transformations and Projections Lecturer: Gazihan Alankuş. Plan for Today. Post-exam talk Revisit transformations Projections. Exam Talk. Go over exam questions. Transformations (summary). Three types of linear transformations

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' SE 313 – Computer Graphics' - quanda


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
se 313 computer graphics

SE 313 – Computer Graphics

Lecture 8: Transformations and Projections

Lecturer: GazihanAlankuş

plan for today
Plan for Today
  • Post-exam talk
  • Revisit transformations
  • Projections
exam talk
Exam Talk
  • Go over exam questions
transformations summary
Transformations (summary)
  • Three types of linear transformations
    • Translation (point-vector addition)
    • Rotation (3x3 matrix multiplication)
    • Scale (vector-scalar multiplication)
transformations summary1
Transformations (summary)
  • Three types of linear transformations
    • Translation (point-vector addition)
    • Rotation (3x3 matrix multiplication)
    • Scale (vector-scalar multiplication)
  • Cannot combine these operations in one type of operation
    • Convert them to one type of operation (not possible unless you use homogeneous coordinates)
transformations summary2
Transformations (summary)
  • Homogeneous coordinates enable us to represent translation, rotation and scale using 4x4 matrix multiplications.
  • This way we can combine them easily by multiplying matrices together. The resulting matrix is another transformation.
transformations summary3
Transformations (summary)
  • 4x4 matrices that are combinations of translation, rotation and scale

Rotation and scale

Translation

0

0

0

1

transformations summary4
Transformations (summary)
  • You can read the local coordinate frame from 4x4 transformation matrices

Rotation and scale

Translation

The x, y and z axes of thelocal frame

Where in the world the local frame’s origin is

0

0

0

1

transformations summary5
Transformations (summary)
  • Intuitive understanding of transformations
  • Local-to-world: insert new transformations near the wall (world)
  • World-to-local: insert new transformations near the object
transformations summary6
Transformations (summary)
  • Quaternions: data structure for rotation
    • Useful for animations
  • Ways of representing rotations

One axis, one angle

3x3 matrix

Quaternion

Three angles (euler angles)

Best interpolation (slerp)

Great-looking animations

plan for today1
Plan for Today
  • Post-exam talk
  • Revisit transformations
  • Projections
projection
Projection
  • Projections from 3D to 2D
    • Taking pictures of the virtual world

[Images are borrowed from http://db-in.com]

projection types
Projection Types
  • Perspective projection
    • Just like our eyes and cameras
  • Orthographic projection
    • Architectural drawing with no distance distortion
orthographic vs perspective projection
Orthographic vs. Perspective Projection

[Images are borrowed from http://db-in.com]

orthographic projection
Orthographic Projection
  • Get the 3D world, compress it on a 2D paper

[engineeringtraining.tpub.com]

orthographic projection1
Orthographic Projection
  • Great for isometric games (Starcraft, Diablo I-II)
  • No depth sensation
orthographic projection in blender
Orthographic Projection in Blender
  • Select the camera
  • The viewport is defined by the render output size
  • Camera has
    • Scale
    • Start and end clipping distances
perspective projection
Perspective Projection
  • Take the picture of the world from a single point
perspective projection1
Perspective Projection
  • What parameters do I need?
perspective projection3
Perspective Projection
  • How do you do it mathematically?
    • Also using a 4x4 matrix

[songho.ca]

perspective projection4
Perspective Projection
  • Let’s try to make sense of it very simply

0

0

0

0

0

0

Translating in z

0

0

-1

0

Output’s w depends on input’s z

The further it is in z, the smaller it will get

perspective projection5
Perspective Projection
  • What that matrix does
perspective projection in blender
Perspective Projection in Blender
  • Select the camera
  • The viewport is defined by the render output size
  • Camera has
    • Field of view angle
    • Start and end clipping distances
perspective vs orthographic projection
Perspective vs Orthographic Projection

Fov=60◦, distance = 1

Fov=30◦, distance = 3

Perspective

Fov=10◦, distance = 5

Fov=0◦, distance =

Orthographic

perspective vs orthographic projection1
Perspective vs Orthographic Projection
  • Orthographic camera is a perspective camera where the camera is at the infinity and the field of view angle is zero
perspective vs orthographic projection2
Perspective vs Orthographic Projection
  • In this transition, the size of the arrow in the image stays the same
  • This is also "called the “dolly-zoom”,“Hitchcock zoom”, or “vertigo effect”
  • Demonstration in Unity and sample scenes from movies
for next week
For next week
  • No homework
  • Study what we learned today, there will be a quiz
  • Next week, a part of the lab will be about projection
ad