This is Tikiwiki v2.0 -Arcturus- © 2002–2008 by the Tiki community Fri 10 of Sept., 2010 21:11 CEST

Menu [toggle]

GraphicsEngine

Thoughts on the 3d engine
Print

Introduction


This page describes the existing 3d engine. We might want to use an existing 3d engine, which is discussed in NewEngine

Architecture


The 3d engine is built on top of OpenGL. No direct commands should be emitted to OpenGL. Instead, there is a scene graph which can be seen as some sort of program. The renderer sorts the scene graph to produce a sequence of OpenGL commands minimizing state changes.

The scene graph is composed of internal nodes, and leaf nodes. Leaf nodes render stuff and have no children. Examples of leaf nodes are mesh nodes and text nodes.

Internal nodes typically inherit from GroupNode and are used to specify textures, transformations... Anything that changes the openGL state.

Status


The current engine is still pretty crude, but it's sufficiently sophisticated to handle e.g. shadows using the Z-pass algorithm.
Things that are missing, but should be easy to add:

  • Transparency: transparent objects must be drawn in a second pass, and sorted according to their distance to the viewer.
  • Lens flare effects
  • 2D GUI (buttons, icons...). The current in-game is horrible.
  • Multitexturing, needed for e.g. grass (typically needs a detail texture and a more rough texture).
  • There is no level-of-detail right now, we should add that, both for the terrain and for the vehicles. The algorithm and datastructures for the two cases will probably differ.



Created by: jode. Last Modification: Saturday 06 of October, 2007 11:59:43 CEST by jode.

Online users