Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation.

Similar presentations


Presentation on theme: "Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation."— Presentation transcript:

1 Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation process, H/W & S/W Extra functions Texture mapping and use of the alpha channel

2 Implementation tasks Modeling Representation of geometric object Geometric processing Transformation & Normalization Clipping Hidden surface removal Rasterization 2D Image, Frame buffer Anti-aliasing Display Output Screen, Automatically H/W

3 Basic implementation strategies Object-Oriented Loop of Object For (each object) render (object) large amount of memory object independently reguire other buffers such as depth buffer Image-Oriented Loop of Pixel For (each) render (pixel) need only limited display memory disadvantage - all time during the rendering process

4 Implementation of transformation Model coordinates World coordinates Camera(eye) coordinates projection matrix Clip coordinates - fit within the clipping volume X Y Z X Y Z X Y Z X Y Z Object Coords. Eye Coords. Clip Coords. Normalized Device Coords. Screen Coords.

5 Implementation of transformation Normalization device coordinates x’ = x y’ = y z’ = 0 Window(screen) coordinates

6 Clipping Definition The process of determining which primitives, and part of primitives, fit within the clipping volume define by the application Term Clipper, Accepted – fit within the specified view volume Rejected, Culled – primitives that can’t appear on the display are eliminated

7 Cohen-Sutherland Clipping 8 Separate clipping region Each region assigned 4-bit binary number Outcode bit 1 => if point above of window bit 2 => if point below of window bit 3 => if point right of window bit 4 => if point left of window 0011 10011000 1010 0001 0101 0100 0110 0010 0000

8 Cohen-Sutherland line clipping algorithm in 3D B4 1 if Z > Znear B5 1 if Z < Zfar

9 Liang-Barsky Clipping Parametric Line Clipping Algorithm Two define a line in the plane.

10 Polygon Clipping Cohen-Sutherland and Liang-Barsky algorithms can be applied to polygons on an edge-by-edge basis. Sutherland and Hodgeman Concave & Convex 1 2 3 4 5 1 2 3 4’5’

11 Sutherland-Hodgeman Polygon Clipping Process polygon against each of the 4 boundaries in turn (left, right, bottom, top) TopBottomRight Left

12 Other method for polygon clipping Bounding Boxes The smallest rectangle, aligned with the window, that contains the polygon Clipping in the Frame buffer - scissoring


Download ppt "Implementation of a Renderer Consider Programs are processd by the system line & polygon, outside the view volume Efficiently Understanding of the implementation."

Similar presentations


Ads by Google