Institutional Repository of Vilnius University
Nematomų linijų ir paviršių nustatymas /
Abstract
dc:descriptionNowadays, computer graphics are widely used starting from the simplest calculator or text editor and finishing with high-definition video game rendering. While it‘s not a common problem with the simpler usages, there might be drastic performance issues while rendering complex 3D scenes or video games, because of the huge amount of vertices and polygons graphics cards have to render. Usually, the games run on 60 FPS(frames per second) mode, so each scene has to be prepared and rendered in less than 0.016 second. With the massive number of primitives graphics card has to process, some measures have to be taken to reduce that number before each render call. This is where the hidden line and surface removal algorithms come to play. Hidden line and surface removal algorithms determine which vertices, lines or faces are not visible from the camera viewport and are removed from the rendering process, thus considerably improving the application‘s performance. There are a number of hidden line and surface removal algorithms, so this paper focuses on testing application‘s performance changes by using 3 popular hidden surface removal algorithms: backface culling, view-frustum culling and Z-buffer methods. For this testing a custom application is written using Groovy and LWJGL(lightweight java game library), which is a binding for OpenGL library. Four different scenes are constructed and they are tested against 2 different test versions, with the difference of view-frustum implementation. Each test version is run with 6 different modes giving each of them 2 minutes of warmup time and 20 minutes of testing time. During that time, current FPS value is logged each second, and after all the tests a report is generated showing all the FPS values during the test, the average FPS value, the maximum and minimum 5% of the FPS values. After the tests it is confirmed, that it is almost always better to implement a CPU side view- frustum culling using bounding boxes on all objects. It is incredibly taxing to use it inside geometry shader, as it not only adds an additional layer the primitives must go through, but it tests each and every so far not removed face of all objects, which takes a lot of time and usually becomes counter-productive. However, since most objects are quite complex, they have a lot of faces, so having one bounding box or sphere around the object makes it faster to test against the view-frustum planes. After the tests it is noted, that backface culling always improves the application‘s performance. In theory, it should remove about 50% of the objects faces which are facing away from the camera and since it is easy to activate, it should be used in every application. GPU‘s do not have an inbuilt view-frustum algorithm, so the developer must implement it himself, however it is worth the time implementing it if the application renders a full scene with many objects outside the camera‘s viewport. If it is a rendering program, which renders only the objects in front of the camera, then the view-frustum culling should not be activated as it would only decrease the performance. Z-buffer method is a depth fixing method, and should be used despite it‘s performance changes. It is implemented in the GPU, so it‘s easy to activate it and use it. In the tests the Z-buffer method did decrease the performance, but it was quite minimal and did not make any difference from the user‘s perspective.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2017
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Mitkus, Ernestas,
- Contributors dc:contributor
-
- Lenkevičius, Antanas
Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- lit
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD23159663&prefLang=en_US