Pixelate:Issue 1/Sunrise 3D
From Allegro Wiki
Contents |
Introduction:
So, what is SunRise?
'SunRise' is actually two distinct parts. The first the underlying 3D engine. The second is the demo downloadable from the main page.
The engine:
I've started work on the SunRise engine in June of 2000 with no prior experience in OpenGL, and little knowledge of 3D and 3D accelerators. It's been mainly built as a technology demo, to try out new things, and to gain experience in the world of 3D. SunRise is by no means perfect or bug free. It hasn't been made for any particular game gender or application, although I am building a game prototype that will make use of it. It's mainly an outdoor engine. It will soon be open-sourced and under the zlib license.
Sunrise provides a simple way of loading and displaying meshes and sprites, removing hidden surfaces (backface), managing textures, lights, fog, the camera, world mesh data, terrain rendering (via hightfields, color maps and detail maps), quaternion orientation for meshes and cameras, axis-aligned bounding boxes, and drawing text. Sunrise is built on top of Allegro for the Windows/X interface, window management, sound, bitmap loading, and file management. It also uses AllegroGL, for simply interfacing the program with OpenGL and OS dependent issues. However, I am keen on separating the engine from those otherwise excellent libraries, to preserve the independence of the engine.
The demo:
The SunRise demo has been a key element in developping the engine. It served as a source of ideas for new features, and a way to test new additions to the engine. The current demo shows off the terrain engine with detail map, color map and height map. Alpha-tested sprites are also included (the trees), as well as alpha-blended sprites (the sun). The sprites are actually posters. They are 2D images drawn inside a 3D world. This allows me to simplyfy computations, and reduces the total polygon count by not having to draw a full 3D mesh. The sky is a Mesh consisting of a half-dome, slightly stretched and textured. The texture coordinates are generated in real-time by the demo. The introduction texts are provided by the system (the font is Arial) thus are drawn as a series of solid polygons and polylines instead of proper textures. For that, I am using AGLF, my 3D text library. Coincidently, the latter will be merged with AllegroGL so everyone can benefit. Finally, the night-dawn-day effect is acheived by variying the color and thinkness of the fog. It's a hack I know, but a very nice one :-P
What the future holds.
I am working on making SunRise a basis for future hobbyist game development, much like what Allegro is striving to accomplish, but adding 3D. I will by no means compete with Allegro, but rather complete it. SunRise will only work as a program/3d world drawing interface, managing the graphics only. I'll leave collision detection, physics simulation and particle systems up to the game or some other library.
Here's a small wish list for features that I would like to see implemented in SunRise. Who knows, with enough (free) time, I might be able to write all of those. Well here they are: Continuous Dynamic Mesh Level of Detail, Octree or Kd-tree sub-division and culling, Quadtree-based terrain rendering with fractal complementation for detail, Perlin noise built textures, Mesh morphing, Environment mapping, Environment Mapped Bump Mapping, mirror effects, portal clipping, Shadow Volumes, and support for many more 3D file formats.
Screen Shots
Here are some screenshots from the developpement. Click on an image to get a larger view.
| Issue 1: The Awakening | ||
| Previous: More3d | Present: Sunrise 3D | Next: MUUDPIC |
