Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques 2002.05.08 Presented by SooKyun Kim.

Similar presentations


Presentation on theme: "Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques 2002.05.08 Presented by SooKyun Kim."— Presentation transcript:

1 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques 2002.05.08 Presented by SooKyun Kim

2 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 2 Overview Impostors Nailboards Hierarchical Image Caching Level of Detail Discrete Geometry LODs Alpha LODs Geomorph LODs LOD Management Triangle Strips, Fans, and Meshes Strips Fans Creating Strips

3 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 3 Impostors What is the Impostors? An image of a complex object that is texture-mapped onto a rectangle Impostors are sometimes called sprites Pre-rendered images of three-dimensional objects  Faster to draw than the object  Closely resemble the object Imaging is opaque where is present

4 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 4 Impostors Impostor should be reused for several viewpoints located close together Figure 1. use impostors to accelerate cloud rendering

5 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 5 Impostors Figure 2. At the left an impostor is created of the object in the bounding box. At the right the center of the impostor is equal to the center of the bounding box, and the normal points directly toward the viewpoint

6 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 6 Impostors Resolution of the texture Do not exceed the screen resolution One limit to the usefulness of an impostor is its resolution If distance impostor comes closer, the individual pixels of texture may become obvious  Illusion breaks down Figure 3. the angle of a screen pixel is computed as B scr =fov/screenres, and the angle for the texture is computed similarly

7 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 7 Impostors Consider regenerating an impostor in case where the viewer moves Figure 4. the left part illustrates the overestimate of the error angle B trans, and the right part shows the overestimate of B size. when any of these angles becomes greater than B scr, the impostor needs to be regenerated

8 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 8 Nailboards

9 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 9 Nailboards What is the Nailboards ? With a depth buffer of the same size as the impostor texture  RGB +  Store the depth deviation from the nailboard polygon to the correct depth of the geometry Nailboards contain localized depth information

10 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 10 Nailboards Figure 5. a simple scene rendered with geometry what if impostors are created and used for the cube, the cylinder, and the cone Uses two bits for depth deviation Uses eight bits for depth deviation

11 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 11 Hierarchical Image Caching

12 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 12 Hierarchical Image Caching Uses impostors arranged in a hierarchy of better performance Basic Idea Partition the scene into a hierarchy of boxes create an impostor for each box Hierarchically create impostors for the parents in the partitioning Impostors are updated hierarchically The scene is partitioned by a BSP tree

13 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 13 Level of Detail

14 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 14 Level of Detail Basic idea Level of Detail (LODs)  Use simpler versions of an object as it gets farther from the viewer Example  Detailed car : 10,000 triangles  Viewer is close to the car  detailed car (10,000 triangles)  Object is farther away  Simplified car (100 triangles) Faces: 69,451 Faces: 2,502 Faces: 251 Faces: 76

15 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 15 Discrete Geometry LODs

16 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 16 Discrete Geometry LODs Figure 6. here we show three different levels of detail for a car chair

17 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 17 Discrete Geometry LODs Popping Effect Switch occurs during rendering it is usually noticeable and not very natural  Reduce the Popping  Morph between two consecutive models in the LOD sequence 2,000faces 10,000faces 50,000faces Pop

18 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 18 Alpha LODs

19 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 19 Alpha LODs Simple method Avoids popping altogether is to use alpha LODs User-defined distance that determines when an object shall start to be more and more transparent Advantage Avoids popping Disadvantage The object totally disappears

20 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 20 Alpha LODs Figure 7. The left part of this illustration shows how ranged-based LODs work. The right part shows how alpha LODs work

21 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 21 Alpha LODs Figure 8. The cone in the middle is rendered using an alpha LOD. The transparency of the cone is increased when the distance to it increase, and it finally disappears.

22 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 22 Geomorph LODs

23 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 23 Geomorph LODs Mesh simplification Create various LOD models from a single complex object Approach (discrete LODs) Create a set of discrete LODs Geomorph LODs Instead of using blending to transition from one model to the next  A set of models created by simplification  Edge collapse methods  Discuss Section 9.4

24 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 24 LOD Management

25 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 25 LOD Management It is feature of a rendering system to have a constant frame rate Adapts the selection of the level of detail for all visible objects in a scene to meet the requirement of constant frame rate Predictive Selects the detail level of the visible objects based on desired frame rate and on which objects are visible

26 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 26 LOD Management Gives (O,L) for each object Object : O Rendered at a level of detail : L Estimate the cost of rendering an object at a certain level of detail Cost(O,L) Estimates the benefit of an object rendered at a certain level of detail Benefit(O,L)

27 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 27 LOD Management Main idea Optimize the selection of the LODs for the objects S Under the constraint Select for the objects the level of detail that gives us “the best image” within the desired frame rate

28 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 28 LOD Management Cost function Estimate how long it takes to render an object (O,L) Dependent on  Graphics Hardware, number of polygons…  Coefficients c 1, c 2 and c 3 Benefit function Benefit(O,L)=Size(O)*Accuracy(O,L)*Importance(O)* Focus(O)*Motion(O)*Hysteresis(O,L)

29 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 29 Triangle Strips, Fans, and Meshes

30 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 30 Triangle Strips, Fans, and Meshes To increase graphics performance is to send fewer than three vertices per triangle to the graphics pipeline Two popular methods of using less data, namely triangle strips and triangles fans Converting a triangle mesh into triangle stripes

31 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 31 Strips

32 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 32 Strips How would it possible to describe a triangle with less than three vertices? Not to describe one triangle at a time, but instead to give a sequence of connected triangles Figure 9. Here an image was rendered with different target frame rates. The target rate for the top row was 10Hz, for the middle row 20Hz, and for the bottom row 50Hz.

33 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 33 Strips Figure 10. A sequence of triangles that can be represented as one triangle strip. after sending vertices v 0, v 1, and v 2 for triangle T 0, it suffices to send one vertex per triangle and reuse the previous two vertices from the previous triangle in the triangle strip

34 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 34 Strips Swap Swaps the order of the two latest vertices  Triangle strips with swaps are called generalized triangle strips Implemented by resending a vertex A swap is better than restarting Figure 11. we would have to a send to the graphics pipeline, to use these triangle as a strip.

35 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 35 Fans

36 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 36 Fans The vertex shared by all triangles is called the center vertex Another kind of set of connected triangles Figure 12. the left figure illustrates the concept of a triangle fan. Triangle T 0 sends vertices v 0 (the center vertex), v 1, and v 2. the subsequent triangles. T i (i>0), send only vertex v i+2

37 Graphics Graphics Lab @ Korea University cgvr.korea.ac.kr 37 Creating Strips

38 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 38 Creating Strips Given an arbitrary triangle mesh Decomposed efficiently into triangle strips and fans  Graphics Library  pfdMeshGSet from Performer  opTriStripper from Optimizer Two methods for constructing triangle strips from polygonal models SGI algorithm STRIPE

39 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 39 Creating Strips Figure 13. the left image shows some surfaces of a car in wireframe mode. The right image shows the same model, but here each triangle strip has been randomly colored.

40 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 40 The SGI Algorithm Works for fully triangulated models Contains polygons with than three vertices, then triangulated before being fed into the triangle strip creation code Algorithms  Starts by choosing an arbitrary triangle of lowest degree  Degree : the number of neighbors of a polygon

41 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 41 The STRIPE Algorithm Figure 14. a patch of a rectangular region of quads. The largest patch in this polygon set is marked in grey. The STRIP algorithm then turns the largest patch into a triangle strip, and finally extends the start and the end of the triangle strip as much as possible.

42 CGVR Graphics Lab @ Korea University cgvr.korea.ac.kr 42 The STRIPE Algorithm Figure 15. Each quad is triangulated in order to allow a long triangle strip to be formed.


Download ppt "Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques 2002.05.08 Presented by SooKyun Kim."

Similar presentations


Ads by Google