Digital Dawn Graphics Toolkit (original) (raw)
Last update Jan 18, 2003 Updated Terrain Engines List
Read the News link for uptodate information including new features/downloads etc.
.
Contents
| Introduction Features Classes Terrain Engine Using the DDG toolkit For Your Project Credits About The Author Release Notes | ![]() |
|---|
Introduction: The DDG Toolkit is a Library of C++ classes to build real time 3D graphics applications.
The reason that this toolkit came into being was because I was tired of reimplementing all sorts of infrastructure each time I wanted to try out some graphics algorithm. By placing this generic functionality in a library and adding to it over time I have been able to develop a flexible architecture allowing me to rapidly design and implement new graphics concepts.
The reason I made this work public is to help other graphics developers to quickly try their own implementation or to serve as examples.
The terrain engine which was developed with DDG (version 4 was incorporated with the Crystal Space portal engine).
The toolkit has stabilized a lot but some higher level features which are not exercised by the terrain engine are probably not working at the moment.
I'm not responsible in any way for any damage this program may incur on you, your family or your computer. I think nothing harmful will happen but if it does, the author (Alex Pfaffe or Digital Dawn Graphics Inc.) is not responsible!
Features:
- 3D Scene graph implementation for ease of use.
- Pure C++ implementation with well organized Class structure and usually one file per class.
- Development with the DDG toolkit suitable for a variety of developers. By using the existing DDG classes you are totally shielded from OpenGL specifics and you can work at a high level. Alternatively you can implement you own rendering classes and anything you want with OpenGL at anytime. As of version 6, the toolkit is separated into 4 DLLs:
DDGCore independent of rendering. DDGTerrain independent of rendering. DDGGL the rendering classes which implemented rendering using GL. DDGDX the rendering classes with initial integration with DirectX8. This change was made to make it easier to implement rendering classes using another SDK like D3D/DirectX and to use a alternative window/event handling class like SDL or KDE/Gnome. - Uses OpenGL and GLuT3.7, works with Mesa.
- Works under Windows and should work under Linux again with a bit of work.
- Online and downloadable HTML documentation generated from source.
- Open Source.
- Includes VC++6 projects.
Classes:
The DDG Toolkit implements over 100 classes which are documented online, downloadable and in the code. Here is an overview of what is included:
- Has 2/3/4D Vector, Matrix classes.
- Angle class for degree to radian conversion as well as LUT versions of sin/cos.
- A Utilility class for min/max interpolation.
- A String class for pure C++ string operations.
- Error handling infrastructure.
- Clock to measure time, scalable for simulation.
- File logging class, console output class.
- List, SplayTree classes with iterators.
- Multiple Viewport architecture (allows for PIP/HUD). supports keyboard and mouse control via EventHandler classes.
- A Control class to control events and bind to keys to actions.
- Scene graph architecture allows multiple Cameras to view the same scene with independent Contexts.
- Bounding Box, Convex Hull classes. and Octree classes for View frustrum and Occlusion culling
- Easy scene graph construction.
- New classes can derive from Node and Group classes and plug into Scene.
- Transformation node and Scale, Translate, Rotate with support for bill boards.
- Color and ColorGroup classes.
- Material, Light LightModel and Fogclasses.
- Text class to render text using sprintf like functionality.
- Image buffer and Texture classes which can read/write RGB, TGA, frame and z-buffers.
- Support for Terragen's height map format through the heightmap class (also support for DEM and other formats).
- Performance measuring infrastructure allows you to record and play back 'flight' paths and record their performance to log files.
- 3D/4D Noise (Perlin/Wyvill/Turbulant/Spectral) functions.
- Generic objects like Box, Cylinder, Axis, Grid, Lattice, Camera and Light.
- 2D HUD objects to provide onscreen information include a texture based Text class and a Histogram class.
- Geodesic object to create faceted spheres with visiblity culling for Domes.
Terrain Engine:
The key implementation done with DDG at this time is a real time terrain renderer inspired by the ROAM algorithm. This terrain engine allows you to view meshes of several millions of triangles in real time frame rates with a high level of detail.

To run the terrain engine Accelerated OpenGL is highly recommended as software mode will be about 1FPS.
The terrain engine is very flexible, it supports reading heightmaps and textures from the command line. Heightmaps need not be square. The level of detail that should be shown each frame can be adjusted using 's' to decrease and 'S' to increase detail. All features can be disabled from the command line or interactively while the app is running. Type 'demo -help' to see the command line options and press '?' at runtime to see the keyboard bindings. For more screen shots, look here.
Terrain Classes:
- A variable brightness Star class based on real star data.
- A Ground or Ocean object to provide a floor that renders to the horizon.
- A Sky class which changes color/opacity according to the time and day.
- AnimatedClouds.
- A CLOD based terrain Mesh capable of performing realtime LOD.
- A quad tree based Terrain class.
- A billboard base forest class for rendering various plants based on ecosystem maps.
- Serveral of these classes are implemented using Vertex Arrays.
Using the DDG toolkit in your own projects:
| It is easy to create your own applications see Tutorial for an example. If you do use the DDG toolkit I would like to know where it is used and to be Credited where appropriate. If you find a bug in DDG Toolkit you can contact me . Try to give as much specific information as possible to reproduce a bug. Suggestions and additions/improvements are also welcome. | ![]() |
|---|
Credits:
Credit should go to Jorrit Tyberghein for running the Crystal Space project, which has allowed many aspiring 3D developers to contribute something to a project which no one person has time to develop on their own. Credit should also go to Mark Kilgard for supplying GLut to the world and also to Brian Paul (author of Mesa) who supplied OpenGL to those of us who couldn't afford to buy an SGI. Also to Linus Torvalds who supplied a free OS to the world and to the 1000s of developers who contributed tools and applications to Linux.
About The Author:
My name is Alex Pfaffe. I was born in Germany, spent my childhood in The Netherlands and moved to Canada where I went to high school and university. There after I worked a while in Calgary. I was offered a job in The Netherlands again where I worked 4 years at a research facility on an OpenGL based graphics infrastructure to model very large scientific datasets.
In 1998, I was offered a job in the US and that is where I am working now. I have been fascinated with Computer Graphics since 1982 when I took my first CS class and did a lot of ascii graphics on a TRS-80 Model3. I then bought my first computer a ColorComputer because it supported a BASIC graphics library in ROM unlike the Apple/Commodore 64 and others where all graphics had to be done in assembler. When generating fractals became to slow and wire frame spinning objects too simple, I abandoned the CoCo and switched to an Amiga 500.
I chose the Amiga 500 because it could do 4096 colours when PCs were still mostly 16 colors. When my Amiga 3000 with 040 accellerator just couldn't keep up anymore for raytracing, I switched to a P133 Laptop which I have been using until recently.
I am now experimenting on a 500Mhz Xeon PentiumIII which offers a rich set of SIMD instructions which along with the GeForce graphics card dramatically accelerate graphics and elevate my ability to experiment with algorithms to yet another level.

