• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
8thlightu2
 

8thlightu2

on

  • 330 views

 

Statistics

Views

Total Views
330
Views on SlideShare
330
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • Z goes negative away from the camera. This is the coordinates you start with before you have three transformations - the View, Model and Projection. <br />
  • View Transformation - represents the camera. You must specify the view transformation before any others, because all other transformations are relative to it. Typically at 0,0,0 going down the z axis. <br />
  • Models. This is what you&#x2019;ll primarily be doing. Translate - then rotate! If you rotate first you are changing the coordinate system. You&#x2019;ll move differently than you think. <br /> <br /> MODELVIEW: <br /> <br /> If you imagine the camera as an invisible object, there&#x2019;s really no difference. No difference in moving camera in negative z, or moving the scene in positive z. <br /> <br /> By convention the initial transformation provides a frame of reference for all further transformations. <br />
  • MODELVIEW <br /> <br /> Imagine the camera is an invisible object that you place first. <br />
  • So each vertex you specify is represented, internally, as a 1x4 matrix. This is multiplied first by the ModelView matrix. That yields a transformed eye coordinate. That is then Multiplied by the Projection matrix. That gives you the coordinates before clipping. It gets clipped (perspective division) and finally transformed again to the viewport. Fortunately you only worry about the first two steps. <br />
  • <br />
  • <br />
  • The identity matrix. Resets the matrices. <br />
  • OpenGL Supports Matrix Stacks as well - you can push and pop if you like, useful if you&#x2019;ve already calculated a bunch of transforms and don&#x2019;t want to mess up. <br />
  • Code time <br />
  • <br />
  • <br />
  • <br />
  • <br />

8thlightu2 8thlightu2 Presentation Transcript

  • Transformation Let’s move things around
  • 3D?
  • Eye
  • View
  • Projection
  • Transformations
  • Transformations are Cumulative
  • Matrix Stacks
  • Perspective
  • Remember • glOrtho • glPerspective • glViewport • GL_PROJECTION
  • Modelview
  • Remember • glTransformf • glRotatef • glScalef • Load the Identity!
  • Homework • Take your model and render it using perspective projection. • Make more than one appear on the screen in different places, sizes, rotations. • Bonus points if you animate it.