The section "Business Information" continues to publish information about latest hard/soft-ware developments in computer graphics and geometry applications.
V.Pilyugin
BARS3D ENGINE
Y.V. Barsoukov, D.V. Maslennikov, V.V. Pilyugin
MEPhI,
Faculty of Cybernetics
Moscow, Russia
e-mail: barsoukov@yahoo.com
AUTHORS
This article was prepared by the participants of Computer Geometry School-Studio of Consortium “Geometrical Education in New Information Technologies” Y.V. Barsoukov, D.V. Maslennikov and personally by the President of Consortium V.V. Pilyugin. The engine has already been used in the activities of the School-Studio mentioned above. For any details regarding the current research process or any released features please e-mail main developers Y.V. Barsoukov and D.V. Maslennikov at barsoukov@yahoo.com .
The aim of a given article is the review not of a technology which Bars3D engine is based on but rather of his capabilities and perspectives of evolution. So we’ve omitted the basics of engine’s mathematical model and the formulae supporting it.
1. OVERVIEW
Bars3D is an OpenGL-based tool intented for fast rendering of the large dynamical scenes. It has a strong mathematical basis which provides enough optimization for engine to run quickly. In the algorithms of Bars3D, speed is the main factor.
2. INVISIBLE SURFACE CULLING AND OTHER MATHEMATICAL ALGORITHMS
In the very beginning of development we had to make a choice: for invisible surface culling it was possible either to use the BSP-tree technology provided by John Carmack [1] or to rely upon the videocards’ Z-buffer. We chose the second option. Today, taking all the newest achievements in the field of 3D-hardware into consideration, it can be said we’ve made a perfectly right choice, yet two years ago we were led rather by laziness then by precise calculation.
Soon it became obvious that Z-buffer alone couldn’t handle the large arrays of geometry we had been trying to feed to it. The speed was becoming very slow when rendering a scene consisting of approximately 40,000 triangles, so we had to think of a way to speed the rendering up.
The solution was rather simple: the octrees [2]. These three dimensional structures are very economical because they don’t require costly triangle splitting like the BSP-trees do. Moreover, the octrees provide a perfect way of culling a large part of invisible surfaces.
This test is called the “frustum – octree test” because it’s partly based on the visibility frustum model from OpenGL. Frustum consists of five planes, first four representing the boundaries of the screen and the fifth being the far culling plane. This mathematical structure is tested upon the octree resulting in culling of a large part of invisible surfaces, so that only the potentially visible triangles are fed to Z-buffer – thus reducing rendering time greatly.
Later we’ve optimized octree for culling of invisible models and, recently, for culling of invisible reflection surface groups.
3. LIGHTING
A major part of every engine, lighting is also rather hard to develop. Bars3D uses two-side technology: the level (or the map, as you can also call it) is being lit using the additional textures called lightmaps [1]. These lightmaps are being built during the pre-rendering time and after that applied to every surface in the level.
The high-poly models are lit with the standard OpenGL lighting. It uses Gouraud shading to interpolate the lighting values between pixels, but the large numbers of polygons which are a common thing with Bars3D models fix the situation.
 |
|
High-poly models lit with OpenGL lighting. |
4. VISUAL FEATURES
Bars3D includes rendering of a dynamical sky and the lens flares.
Also a great attention is paid to careful and realistic rendering of the weather effects like rain, snow etc.
5. THE NEWEST UPDATES
Some months ago we included stenciled reflections in Bars3D rendering pipeline.
|

|
|
Multiple reflections |
As you can probably learn from the picture above, these reflections are multiple: the room is reflected in the floor and then again in the wall which the camera is facing.
At the current moment the research is being made in the field of the volume stenciled shadow rendering [3].
Also, the standard DOT3 bumpmapping with cubemap normalization is included. It’s clearly seen on all the pictures of this article.
At the end of the article, a question remains: what of the vertex and pixel shaders? How are they used in Bars3D? The answer is rather simple: at the current moment they are used to render refraction effects (bumped windows etc.), but in perspective we are hoping to include Phong shading to partially replace the lightmaps.
REFERENCES
- WWW.IDSOFTWARE.COM
- “Introduction to Octrees” by Jaap Suter
- “Shadow Algorithms for Computer Graphics” by Frank Crow, Computer Graphics, Vol.11, No.3, Proceedings of SIGGRAPH 1977, July 1977
- “Êîìïüþòåðíàÿ ãðàôèêà. Ïîëèãîíàëüíûå ìîäåëè”, Øèêèí À.Â., Áîðåñêîâ À.Â., ÄÈÀËÎÃ-ÌÈÔÈ, 2000 (in Russian)
- “Interactive Computer Graphics. A top-down approach with OpenGL” by Edward Angel, Addison-Wesley Publishing Company, Inc., Second Edition, 2000
- “Computer Graphics. Principles and practise” by D.J. Foley, A. van Dam, S.K. Feiner, J.F. Hughes, Addison-Wesley Publishing Company, Inc., 1991