Development news: fixed view and isometric games in engine examples, shadow maps improvements, color interpolation in HSV space

December 23, 2011
Example Fixed Camera Game "Rift" - intro
Example Fixed Camera Game "Rift" - game menu
Example Fixed Camera Game "Rift" - inside game 1
Example Fixed Camera Game "Rift" - inside game 2
Example Isometric Game "Sandbox" - 1
Example Isometric Game "Sandbox" - 2

Hi everyone, here's a summary of improvements done to the engine in last month.

Remember you can check all new features of view3dscene immediately by downloading a binary from our nightly builds. To get new engine examples, you can download engine from SVN. Have fun!

  1. Two large examples added to engine sources:
    1. isometric game example (sandbox).
    2. fixed camera game (rift). "Fixed camera" means you have a still 2D background + animated 3D models on top, like "Alone In The Dark", "Syberia", "Still Life" and many other adventure games.

    Both these examples were converted from an unfinished (but maintained for a long time) games in the SVN. We also plan to add an example fps_game to engine 3.0.0 release, which will show the main purpose of the engine — full 3D games.

  2. Shadow maps improvements:

    • Shadow maps generation optimized a lot. This speeds up greatly (2 times or more in our tests) scenes when shadow maps are dynamic (recreated every frame).

      We now use a special mode for rendering shadow maps, that essentially only sends pure geometry and textures for shadow maps. Textures are send since they may be needed for alpha test (in the future, we may improve this to actually ignore other textures).

    • Many Variance Shadow Maps improvements. They are quite usable now, if you have sufficiently good GPU (with good float texture support). Work fast, and honor alpha test textures (typically used for wired cages, tree leaves etc.).

      There are still some problems with VSM (which is why they aren't used by default):

      • Unfortunately, on some older GPUs, they may exhibit really weird behavior and uncover wild OpenGL bugs.
      • In some cases, there are accuracy problems. These are known VSM problems (see papers around VSM describing possible improvements of the base idea).

      You're most welcome to test Variance Shadow Maps yourself. For starters, just get demo models, and open models inside shadow_maps subdirectory there with view3dscene. shadow_maps/sunny_street/sunny_street.x3dv is one test worth trying, projected_spotlight_* is the other. Turn on Variance Shadow Maps by menu item "View -> Shadow Maps -> Variance Shadow Maps". Please report on forum the GPUs where they work / where they don't, this will help me get some idea where they can/should be enabled by default.

  3. Fill Mode "Solid Wireframe" and "Normal with Silhouette" improved: wireframe is now always white. (Previously it was textured — which was hardly visible in many cases.)
  4. Saving viewpoint in some specific configurations (when look direction was close to +Z) fixed.
  5. Geometry shaders fixed on ATI graphic cards fixed (see ticket #2 and macro CASTLE_GEOMETRY_INPUT_SIZE docs.)
  6. Fixes to demo models GLSL shaders to work with Gallium3D on ATI graphic cards. Finally, we have an open-source OpenGL drivers with real support for GLSL! Not everything works with Gallium 3D perfectly, but a lot of stuff does work, and works even quite fast — which is really great, compared to state of GLSL in Mesa3D a couple of years ago.
  7. ColorInterpolator and ColorSetInterpolator interpolate colors in HSV space now. Our engine contains simple HSV<->RGB conversion routines for general use in base/castlecolors.pas unit.