English subtitles

← A Jog Down the Pipeline - Interactive 3D Graphics

Get Embed Code
4 Languages

Showing Revision 2 created 05/25/2016 by Udacity Robot.

  1. We now have some sense of how we can make lighting calculations, not take an
  2. incredible amount of time. In this lesson, we're going to take an extremely high
  3. level view of how objects get rendered by a graphics accelerator. This graphics
  4. hardware is usually called the GPU, for graphics processing unit. A GPU uses a
  5. rendering process called rasterization or scan conversion, which is optimized to
  6. use the simplifications I've outlined. Let's look at one rendering pipeline from
  7. end to end. The idea of a pipeline is to treat each object separately. The first
  8. step is simply that the application sends objects to the GPU. What objects?
  9. Typically, 3D triangles. Each triangle is defined by the full locations of its
  10. three points. An application converts a cube into just a few triangles. A sphere
  11. gets turned into a bunch of triangles. So, in the first step, the application
  12. decides what triangles to send down the pipeline. In the second stage of the
  13. pipeline, these triangles are modified by the camera's view of the world along
  14. with whatever modelling transform is applied. A modelling transform is a way to
  15. modify the location, orientation and even the size of a part. For example, if
  16. you were rendering a bouncing ball, the ball's modeling transform each frame,
  17. would move the ball to a different location along it's path. The effect of the
  18. camera view is clear enough. After the object is moved to it's location for the
  19. frame, is it still in view of the camera? That is, is the object inside the view
  20. frustum. If not, then we're done with this object, since it won't affect any
  21. pixels on the screen. In this case, we say the object is fully clipped. So here,
  22. this cube is fully clipped since its outside of the view frustum. The camera and
  23. modelling transforms compute the location of each triangle on the screen. If the
  24. triangle is partially or fully inside the frustum, the three points of the
  25. triangle on the screen are then used in a process called rasterization. If a
  26. triangle is slightly off the screen, it gets clipped and it's turned into more
  27. triangles. This process identifies all the pixels whose centers are inside the
  28. triangle. In other words, it fills in the triangle. So, rasterization here has
  29. found that this triangle covers the pixel centers, in these various places.
  30. These locations are then used to show the image of the triangle on the screen.