Українська   Русский
DonNTU   Masters' portal

Abstract

Content

1. Theme urgency

At present, due to the rapid development of the computer games industry, one of the most important criteria of game quality is often a photorealistic 3D gaming world. Dynamic visual effects, such as day-night cycle and weather effects simulation, enhances the sinking of users in the gaming world and build their sense of reality environment. Figure 1 shows example of realistic game graphics.

In addition, now we have all of the necessary technical preconditions for dynamic game environment development using shader graphics: continuous improvement of GPU architecture, increasing their speed, transition to programmable graphics processor and the emergence of the third generation of graphics processors with shaders support, development of the high-level shader programming languages.

Figure 1 – Realistic 3D  graphics in the game Assassin’s Creed

Figure 1 – Realistic 3D graphics in the game Assassin’s Creed

2. The purpose and objectives of the study

The aim is to examine existing development tools for dynamic game environment and develop dynamic game environment for 3D mmorpg.

The main objectives of the study:

  1. Make a review of available development tools for dynamic game environment;
  2. Consider the basic dynamic effects that can be implemented using shader graphics;
  3. Development algorithms of animation effects for the game scenes;
  4. Generation of dynamic images using shader graphics;
  5. Analysis of the results and evaluation of the developed project.

Research object : the process of developing dynamic game environment.

Subject of research : methods and algorithms for creating dynamic weather and atmospheric lighting effects.

Main features of scientific inquiry that characterize it scientific novelty , are as follows: The area of photorealistic effects dynamic environment, which are currently insufficiently covered in the Russian scientific sources; presented the implementation of dynamic game environment for 3D games that can be used to create photorealistic effects environment for multiple platforms.

3. Overview of Research and Development

At the moment, the issue of using the GPU to solve the various problems becoming more and more popular. Issues of modeling three‑dimensional scenes and rendering images on the GPU is dedicated to a number of studies of American, European, Russian scientists. But there are more English‑language articles and studies, than Russian‑language

3.1 Overview of international sources

Shaders grew from the work of Cook and Pearlin. For example, in the article Shade Trees [1] Robert Cook presents a flexible tree‑structured shading model that can represent a wide range of shading characteristics. The model provides an easy means for specifying complex shading characteristics. It is also efficient because it can tailor the shading calculations to each type of surface.  

A lot of currently available works devoted to the study of the graphics processing and analysis of the effectiveness of their use.

The article The GeForce 6 Series GPU Architecture [2] of Emmett Kilgariff and Randima Fernando describes the architecture of the GeForce 6 Series GPUs from NVIDIA, which delivers hundreds of gigaflops of single‑precision floating‑point computation, as compared to approximately 12 gigaflops for current high‑end CPUs. In the beginning of the article there is a general overview of where the GPU fits into the overall computer system, and then we described the architecture along with details of specific features and performance characteristics.

The article Shader Performance Analysis on a Modern GPU Architecture [3] writers Victor Moya, Carlos Gonzalez, Jordi Roca, Agustin Fernandez and Roger Espasa presents an analysis of the performance of the shader processing units in a modern Graphics Processor Unit architecture using real graphic applications. The architecture of a modern GPU is described and a simulator and associated framework used to evaluate the architecture is introduced. The paper analyses the effects in performance of different configurations of the shader processing units and compares a classic GPU with a unified shader GPU.

Cem Cebenoyan’s article Graphics Pipeline Performance [4] considers the features of the rendering pipeline, from an analysis of the performance of multiprocessor systems based on GPU. The paper presents algorithm of program optimization and GPU bottlenecks search.

Many works in the English language sources dedicated algorithms generate landscapes, visualization water surface and creating all sorts of weather effects using GPU.

The article Effective Water Simulation from Physical Models of Mark Finch and Cyan Worlds [5] describes a system for simulating and rendering large bodies of water on the GPU. The system combines geometric undulations of a base mesh with generation of a dynamic normal map. The system has proven suitable for real‑time game scenarios.

Juan Guardado and Daniel Sanchez‑Crespo in the article Rendering Water Caustics [6] expose a new technique for rendering real‑time caustics, describing the method from its physical foundations to its implementation details. Because the technique is procedural, it yields elegantly to an implementation using a high‑level shading language.

Arul Asirvatham’s and Hugues Hoppe’s article  Terrain Rendering Using GPU‑Based Geometry Clipmaps [7] describes a GPU‑based implementation of geometry clipmaps, enabled by vertex textures. By processing terrain geometry as a set of images, we can perform nearly all computations on the GPU itself, thereby reducing CPU load

The implementation of the relief surface on the GPU is also dedicated to the article Terrain Geomorphing in the Vertex Shader of Daniel Wagner [8], which describes a method for rapid visualization of surface topography. This is done by using geo‑mipmapping which splits the terrain into a set of smaller meshes called patches. Each patch is triangulated view‑dependently into one single triangle strip. Special care is taken to avoid gaps and t‑vertices between neighboring patches.

The article GPU‑Generated Procedural Wind Animations for Trees [9] describes a procedural method of synthesizing believable motion for trees affected by a wind field. The main goal of this approach is to enable the simulation and visualization of large open environments with massive amounts of vegetation. By introducing procedural animation calculations inside the vertex shader, this method works well with instancing and leverages the power of the GPU.

The article Real‑Time Simulation and Rendering of 3D Fluids [10] devoted to animation effects such as smoke, water and fire. In this article authors show not only how these effects can be simulated and rendered in real time, but also how they can be seamlessly integrated into real‑time applications.

Well lit and the issue of representation of dynamic sky using shaders.

For example, in the Clouds and Stars: Efficient Real‑Time Procedural Sky Rendering Using 3D Hardware by Timothy Roden and Ian Parberry [11] authors propose an integrated set of efficient algorithms that run in graphics hardware for interactive sky rendering that is fully parameterized for real‑time control. Features of method include multi‑layered dynamic clouds and stars that individually flicker at varying intensity and rate.

The article Generating and Rendering Procedural Clouds in Real Time on Programmable 3D Graphics Hardware [12] discusses a process of generating and rendering procedural clouds for 3D environments using programmable 3D Graphics Hardware. Cloud texture generation is performed using Perlin noise and turbulence functions. The technique can be used in real‑time graphics applications, games, film special effects and visual simulations etc.

We should also mention the collections of articles from Nvidia [13], which is the most comprehensive compilation of knowledge on practical programming schedules of scientists and engineers, Nvidia, as well as development engines of computer games.

3.2 Overview of national sources

With regard to national sources, studies on the peculiarities of the work with the GPU, also covered well enough. Although questions of modeling of dynamic effects in real‑time presented not as wide a number of works of Russian researchers dedicated to the implementation of mathematical algorithms on the GPU to reduce the load on the CPU.

Ryabinin [14] propose the new anti‑aliasing technique based on the combination of super sampling anti‑aliasing and fast approximate anti‑aliasing. The described technique ensures high visual quality of the image and is independent from the platform.

Maltsev in the article The implementation of a system of particles in real‑time GPU[15] propose the technology for distributed simulation and visualization of such systems using modern multi‑core graphic processors. This technology includes two stages. The first stage includes calculation of particle system condition at specified time moment as particles data array. The second assumes a visualization of obtained array with on the fly synthesis of necessary particle geometry, their lighting calculation and texture mapping. Both stages are performed on videocard’s graphics pipeline that allows achieving high degree of parallelism. For this purpose the shader rendering mechanism is employed including vertex, geometry and fragment shaders.

It belongs to the author of a number of works devoted to the use of the GPU for three‑dimensional scenes. For example, Application shadow maps for the simulation of shadows into a virtual realtime 3D scenes [16] proposes methods and algorithms for shadow simulation in three‑dimensional virtual scenes containing directional and omni‑directional light sources, by using different types of shadow maps (planar, parabolic and cascaded maps). The process of such map creation and application in real time mode are considered in detail. To implement algorithms modern visualization tools are used, including shaders and FBO for direct visualization to a texture.

A similar article entitled Implementation of the shadows for directional lights in realtime 3D [17] proposes methods and algorithms for an implementation of real‑time effects of shadows from the light sources in a virtual 3D scenes using shadow maps. We introduce an expanded model of the illumination calculation at the surface point of the visualized virtual object, based on Blinn's model and considering both shading and the density of a shadow. The process of shadow maps creation for the directed light sources and application of these maps in real‑time with use of the expanded model of calculation of light exposure.

In the article Programming GPUs using extensible languages [18] author presents a GPU programming system, NUDA, built on top of an extensilbe language, Nemerle. NUDA provides control over porting application to GPU, while making the compiler do the mechanical work.

The aim of the article Research parallelized algorithms for image segmentation using a computation on the GPU [19] is to develop parallel algorithms for image segmentation, based on different approaches to the segmentation; and to compare them with analogues and with each other in the same conditions. Authors studied in detail the dependence of speed increase on images size and the number of segments

4. Fundamentals of programming for the GPU

Shader is a program of visual determination of the object surface, written in a special language and executed on the GPU.

The process of graphics processing is shown in Figure 2.

Figure 2 – Stages of graphics processing on the graphics pipeline 
(Animation size: 11.4 Kb, Number of frames: 8, Number of cycles: 10)

Figure 2 – Stages of graphics processing on the graphics pipeline
(Animation size: 11.4 Kb, Number of frames: 8, Number of cycles: 10)

The graphic processor receives from the so‑called program vertex stream information about the position of vertices in space, their color, normals, texture coordinates. This data is passed to the vertex shader of GPU, which begins to execute the shader source code written by a programmer in a special language. Vertex shaders are programs that produce mathematical operations with vertexes. All the matrix conversion and installation of lighting are done here. In the course of their work, they can modify the program data transmitted from the calculating and recording, for example, the new coordinates of the vertices [ 25 ].

The output of the vertex shader are then passed to rasterization and interpolation units. Rasterization is necessary for the accurate completion of its primitive pixels. Interpolation allows us to get smooth transition from one color to another [26].

After the rasterization and interpolation all of data arrives to the pixel shader. A pixel shader is performed for each pixel. Here occurs mathematical operations on the color and depth of pixels.

Next, Z‑buffer operation is performed on the output data of the pixel shader. Object’s vertexes are placed depending on the distance of the location, thereby creating volumetric image. After that, all data is sent to the so‑called frame buffer, or simply frame [26].

Today, there are two most famous specific equipment for three‑dimensional visualization API – OpenGL and Microsoft Direct3D [27].

Programs oriented to use one of these standards will work under the other, but the question of efficiency in this case is still open [28].

The development of OpenGL beginning Silicon Graphics (SGI) in the late 1980s. The first version of OpenGL was released in 1990. At the moment, the latest version of OpenGL is numbered 1.5, that is, the specification is not updated very often. OpenGL functions as a state machine, ie, Parameter setting reduced to wealth management machine. Today, OpenGL provides a set of several hundred functions, providing easy access to the capabilities of the graphics card [27].

The first working version of the graphics API from Microsoft released in 1998, and from that moment began to spread among developers. The new version of the API are made frequently, the latest at the moment is version 9.0. Vertex and pixel shaders were first implemented in version 8.0. The structure of Direct3D has recently become more and more similar to the structure of OpenGL, but Direct3D is better structured through the use of a model of COM‑objects [27].

Conclusions

Analysis of the sources shows that the issue of image rendering on the GPU is becoming more relevant. English‑language research and development cover a wide range of topics, from the analysis of the architecture and performance of graphics processors, ending with the creation of all kinds of visual 2D and 3D effects. Among the effects of a dynamic environment more fully address the issues of a realistic rendering of the sky, creating a realistic water surface, as well as simulation of particle systems to create effects such as smoke, fog, fire, clouds.

The Russian‑language sources are represented mainly by issues of implementation on the GPU of some mathematical algorithm with a lot of computation to offload the CPU. However, some works are devoted to rendering dynamic effects for the game scenes, the issues of formation of dynamic lighting and shading for different light sources, the creation of a system of particles in real time.

References

  1. Robert Cook — Shade Trees [Электронный ресурс]. — Режим доступа: http://www.cs.cmu.edu/afs/cs/academic/... .
  2. E. Killgariff, R. Fernando The GeForce 6 Series GPU Architecture. — GPU Gems 2: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2005 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter30.html .
  3. V. Moya, C. Gonzalez, J. Roca, A. Fernandez, R. Espasa — Shader Performance Analysis on a Modern GPU Architecture [Электронный ресурс]. — Режим доступа: http://www.eecg.toronto.edu/~moshovos/ACA05/read/GPU-micro.pdf .
  4. C. Cebenoyan — Graphics Pipeline Performance. — GPU Gems: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2004 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems/gpugems_ch28.html .
  5. M. Finch, C. Worlds — Effective Water Simulation from Physical Models. — GPU Gems: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2004 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems/gpugems_ch01.html .
  6. J. Guardado, D. Sanches‑Crespo — Rendering Water Caustics. — GPU Gems: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2004 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems/gpugems_ch02.html .
  7. A. Asirvathan, H. Hoppe — Terrain Rendering Using GPU‑Based Geometry Clipmaps. — GPU Gems 2: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2005 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter02.html .
  8. R. Vagner — Terrain Geomorphing in the Vertex Shader[Электронный ресурс]. — Режим доступа: http://www.gamedev.net/page/resources... .
  9. R. Zioma — GPU‑Generated Procedural Wind Animations for Trees — GPU Gems3: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2004 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch05.html .
  10. K. Crane, I. Llamas, S. Tariq — Real‑Time Simulation and Rendering of 3D Fluids — GPU Gems3: programming techniques for high‑performance graphics and general‑purpose computation (Matt Pharr ed), 2004 [электронный ресурс] — Режим доступа: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html .
  11. T. Roden, I. Parberry — Clouds and Stars: Efficient Real‑Time Procedural Sky Rendering Using 3D Hardware [Электронный ресурс]. — Режим доступа: https://larc.unt.edu/ian/pubs/clouds_and_stars.pdf .
  12. M. Hasan, S. Karim — Generating and Rendering Procedural Clouds in Real Time on Programmable 3D Graphics Hardware [Электронный ресурс]. — Режим доступа: http://paris.cs.wayne.edu/~ay2703/research/publications/getPDF2INMIC2005.pdf .
  13. Сайт разработчиков Nvidia .
  14. Рябинин К. В. — Адаптивное сглаживание границ объектов на изображении для мобильный устройств [Электронный ресурс]. — Режим доступа: http://elibrary.ru/item.asp?id=22014741 .
  15. Мальцев А. В. — Реализация системы частиц в реальном времени на GPU [Электронный ресурс]. — Режим доступа: http://elibrary.ru/item.asp?id=23286179 .
  16. Мальцев А. В. — Применение теневых карт для моделирования теней в виртуальных 3D сценах в реальном времени [Электронный ресурс]. — Режим доступа: http://elibrary.ru/item.asp?id=22938246 .
  17. Мальцев А. В., Михайлюк М. В. — Реализация теней для направленных источников света в 3D в реальном режиме времени [Электронный ресурс]. — Режим доступа: http://elibrary.ru/item.asp?id=16360912 .
  18. Викторович А. А. — Программирование графических процессов при помощи расширяемых языков [Электронный ресурс]. — Режим доступа: http://cyberleninka.ru/article/... .
  19. Тушницкий Р. Б., Кожух И. Я. — Исследование распараллеленных алгоритмов сегментации изображений с использованием вычислений на графическом процессоре [Электронный ресурс]. — Режим доступа: http://cyberleninka.ru/article/... .
  20. Гонахчян В. И. — Обзор методов упрощения полигональных моделей на графическом процессоре [Электронный ресурс]. — Режим доступа: http://cyberleninka.ru/article/... .
  21. Романюк О. Н., Довгалюк Р. Ю., Олійник С. В. — Класифікація графічних відеоадаптерів// Наукові праці Донецького національного технічного університету, серія Інформатика, кібернетика та обчислювальна техніка, вып. 14 (188), Донецк, ДонНТУ, 2011. — С.211–215.
  22. Зори С. А., Лисеенко В. В. — Методы синтеза реалистичных изображений рельефов и ландшафтов для параллельных вычислительных систем трехмерной компьютерной графики. Материалы 4‑й международной научно‑технической конференции Моделирование и компьютерная графика — 2011. Донецк, 5–8 октября 2011 г. Стр. 114–118.
  23. Volkov V. P., Dosta M., Heinrich S., Svjatnyj V. A. — High‑quality hardware accelerated visualization of particulate materials [Электронный ресурс]. — Режим доступа: http://ea.donntu.ru:8080/jspui/bitstream/... .
  24. Романюк А. Н., Обидник М. Д., Романюк О. В., Костюкова Н. С. — Особенности архитектурного построения систем формирования трехмерных изображений //Научные труды ДонНТУ. Серия Информатика, кибернетика и вычислительная техника. — 2010. — Вып. 12 (165). — С. 87–94
  25. Современная терминология 3D графики [Электронный ресурс] — Режим доступа: http://www.ixbt.com/video2/terms2k5.shtml .
  26. Свет [Xbox 360] [Электронный ресурс] — Режим доступа: http://gfaq.ru/publ/igrovye_stati/razrabotka_igr/... .
  27. С. Сент–Лаурент — Шейдеры для программистов игр и художников [Электронный ресурс] — Режим доступа: http://netlib.narod.ru/library/book0053/index.htm .
  28. Аппаратное и программное ускорение графических функций [Электронный ресурс] — Режим доступа: http://www.chieftec-ru.com/guide/... .