1 / 19

Computer Graphic

Computer Graphic. Creator: Mohsen Asghari Session 6 Fall 2014. Matrixes. World

raja-mcgee
Download Presentation

Computer Graphic

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Graphic Creator: Mohsen Asghari Session 6 Fall 2014

  2. Matrixes • World • The World matrix being the first, is unique for every object within your world, and is responsible for transforming the vertices of an object from its own local space, to a common coordinate system called world space. • View • After that, the view matrix provides the concept of a mobile camera, when it reality the camera is actually the only constant point of reference within the world. The view matrix is a transformation that is applied to every object in the scene (but is not unique to each object), and provides the illusion of a camera. The view matrix is basically the inverse of what could be considered a world matrix for the camera. Yet instead of moving the camera itself, it provides the opposite movements to the rest of the scene (the illusion ;) ).

  3. Projection • Finally the projection matrix is responsible for converting a 3D world into the homogeneous screen space that you see on your screen. This is the matrix used to represent your view frustum, and is usually represented as an orthographic or perspective projection.

  4. Trick in OpenGL (Transpose) • ترانهاده

  5. Trick in OpenGL • it is important to remember that matrices in OpenGL are defined using a column-major notation (as opposed to a row-major).

  6. Projection Matrix (Perspective)

  7. Projection Matrix (Perspective)

  8. Unit Cube

  9. Projection Matrix (Perspective)

  10. Projection Matrix (Perspective)

  11. Projection Matrix (Perspective)

  12. Projection Matrix (Perspective)

  13. Question? • All the matrix is related to • Left = l • right = r • Bottom = b • Top = t • Near = n • Far = f

  14. Calculate l,r,b,t BY (FOV) – (asp-r)

  15. ProjectionMatrix • Projection Matrix (GL_PROJECTION) • GL_PROJECTION matrix is used to define the frustum. This frustum determines which objects or portions of objects will be clipped out. Also, it determines how the 3D scene is projected onto the screen. (Please see more details Ortho Perspective

  16. Model View Matrix "World Matrix" and a "View Matrix", they are both transformation matrices.

  17. View LookAt() • Eye • Target • Up

  18. END OF SESSION 5 ANY QUESTION?

More Related