Development news: Many shadow maps improvements, castle fountain, more

July 9, 2010
Just a screenshot with nice shadow maps Close up shadows on the tree. Notice that leaves (modeled by alpha-test texture) also cast correct shadows.
Close up shadows on the tree, with Percentage Closer Filtering. Shadow map mapped over the scene
Fountain water Fountain close-up view

First of all, my paper Shadow maps and projective texturing in X3D got accepted for the Web3D 2010 Conference. Wee, I'm going to Los Angeles :) This paper presents our new shadow mapping extensions, with many improvements over the old ones previously implemented in our engine. You can read the paper online, you can also read the new shadow mapping extensions documentation.

The improvements already implemented are:

  • First of all, Appearance.receiveShadows field for nice and comfortable shadows usage. This very simple extension is what I hope to be ultimately used in 90% of the simple cases when you "just want shadows".
  • Easy menu items to activate Percentage Closer Filtering (4, 16, 4 bilinear) and visualize shadow maps for scenes using the receiveShadows field. Look at the new View -> Shadow Maps -> ... menu items.
  • New ProjectedTextureCoordinate node, that replaces deprecated now TextureCoordinateGenerator.mode = "PROJECTION".
  • Variance Shadow Maps are also implemented. Although their implementation is not optimal yet, and should be treated as experimental. You can easily turn them on by View -> Shadow Maps -> Variance Shadow Maps menu.

For now, you can test these features by using view3dscene from our nightly builds.

You may also be interested in our shadow maps testing scene "sunny_street", you can checkout it from SVN url

Other features implemented:

  • Extensions to control head-bobbing in VRML/X3D worlds (docs from nightly builds).
  • view3dscene Edit -> Merge Close Vertexes menu item, that makes close vertexes to be perfectly equal.
  • Teapot mesh is much improved, thanks go to Victor Amat.
  • Picking and ray-tracer in orthogonal projection (like by OrthoViewpoint) fixed.
  • Workaround nasty fglrx bug, thanks Simon for reporting.
  • Better menu behavior with GTK2 backend.
  • Our procedural terrain demo (examples/vrml/terrain/ in sources) can export the terrain to X3D (ElevationGrid) now.
  • Support IMPORT/EXPORT for VRML 2.0 (97) too. Although it's defined only in X3D spec, it's so useful that I enable it also for VRML 2.0.

In unrelated news, the quest to release castle 1.0.0 is ongoing (even if terribly delayed). Remember, I wanted to add some eye-candy to "Fountain" level for this? Well, part of the job is done, see the screenshot on the right for a nice water pouring from the fountain.