Image Quality-Driven Level of Detail Selecton on a Triangle Budget

For our bachelor thesis in development of digital games, Ludvig Arlebrink and I decided to continue with our LOD studies following the pre-study we conducted of Unity’s LOD group component in the beginning of the year. This is only supplementary material for our bachelor thesis, so do not feel like you are missing something if some parts are hard to grasp. It is necessary to have read our paper from the very beginning, but at least you can enjoy the “stunning” graphics! For more supplementary material, see the bottom of the page. The thesis will, hopefully, be available for the public in the coming months. That is, if we actually make it and receive our final grading. For now, nothing is guaranteed.

We had previously thought out many different ideas, staying late at school, frantically drawing on the whiteboard, running the equations, repeatedly bashing our heads into the concrete wall, but no progress.  Ludvig was the one coming up with all ideas, I was just tagging along with my curiosity. Sometimes we came up with ideas that were utterly terrible, but sometimes, they left us completely mind blown…only to discover that it had already been done. Damn!

Nothing really stuck with us or seemed to fit the scope of this course. We had started to move away from the LOD pre-study and were curious to take on new techniques, but I think it was the right decision to go back to it. Eventually, Ludvig came up with the idea of image quality-driven LOD selection, which took him a while to explain. The approach felt confusing at first, but then it all made perfect sense.

In this study, we propose an image quality-driven process to choose a LOD combination given a camera position and orientation, and a triangle budget. The metric to assess the quality of the rendered image is the structural similarity (SSIM) index, which is a popular choice in computer science for image comparison for its ability to approximate similarity between images.

The aim of our thesis was to determine the difference in image quality between a custom level of detail pre-preprocessing approach proposed in this paper, and the level of detail system built in the game engine Unity. This is investigated by implementing a framework in Unity for the proposed level of detail pre-preprocessing approach in this paper and designing representative test scenes to collect all data samples. Once the data is collected, the image quality produced by the proposed level of detail pre-preprocessing approach is compared to Unity’s existing level of detail approach using perceptual-based metrics.

Despite that the proposed approach is primarily developed for the personal computer platform (PC), it is more likely to contribute the most to rendering complex scenes on mobile devices. This is because large productions rarely have to be concerned with triangle budgets using the modern day hardware, but mobile devices are running on stricter triangle budgets due to their limited hardware in comparison to the PC. Even so, image quality must still be preserved and maintain a high quality on the triangular meshes even if a lower triangle count is required. That is where the proposed approach differs from the previous DLOD approaches by also taking image quality into account, and not only performance.

Except a few corner cases, such as accidental culling, we managed to maintain similar image quality as Unity’s built-in LOD approach. However, the conclusion is drawn from the experiment that when comparing the SSIM quality of rendered images between Unity’s built-in approach to LOD and the proposed approach, Unity’s built-in approach generally performed better in terms of SSIM.

I would like to thank my friend Ludvig Arlebrink to have been given the opportunity to work with him, this has been a true learning experience and it has really helped my confidence. Last but not least, we would like to thank our supervisor Francisco Lopez Luro for his feedback and guidance throughout the project.

Additional supplementary material

LOD group component pre-study
Bachelor thesis presentation

A Study on Discrete LOD in Unity Game Engine

A study of the built-in LOD Group component in Unity carried out by students Ludvig Arlebrink and Fredrik Linde at Blekinge Institute of Technology. This is supplementary material to the full report.

The Unity version used at the time was 2017.3.0f3 (64-bit). We use the Stanford bunny with LODs ranging from 0 to 4 for the experiment. We define five tests: LOD, Crossfade, Dither, No LOD and Empty. Where LOD, is a standard LOD test using the unity LOD group component, without any transitions. Both crossfade and dither also uses the LOD group component but with transitions enabled and set to crossfade. The no LOD does not use the LOD group component and renders the bunny on its maximum LOD. Finally, the empty test is just for reference and is a completely empty scene with a black clear color.

We began the implementation with creating Unity prefabs for each of the tests, except the empty test. For the LOD, crossfade and dither test, we add a LOD group component and for each LOD we add a child gameobject with a mesh renderer component for the LOD mesh. The No LOD prefab only includes a mesh renderer component with no children.

In the beginning of a test, we instantiate 20 bunnies of its corresponding prefab for each axis for a total size of 8000 bunnies. When the test is complete, we destroy all instances of the bunny and repeat this process until all tests have finished executing. At this point the application enters its final stage by running the empty scene test and automatically shuts down afterwards. We created a script for the camera to traverse a path defined by a number of points that the camera interpolates between given a constant speed at all times.