Development news: lights improvements, shadow volumes in demo_models, Hunter's Mark, more

June 20, 2011
Spot headlight with per-pixel lighting Castle level with sharp spot headlight
Castle level with smooth spot headlight Castle level with smooth spot headlight
Shadow volumes from chopper over a house scenery. Chopper can be moved, rotated, scaled by mouse.
Fountain level model, with shadow volumes. The same fountain level model, with shadow volumes. After some interactive fun with moving/rotating stuff around :)
"Hunter's Mark" - main menu "Hunter's Mark" - in game
"Hunter's Mark" - menu in game "Hunter's Mark" - credits

Work on next view3dscene and engine release continues. I hope to release the next versions before the end of this month (it's already much delayed according to my plans, sorry :). Some highlights from this month's work:

  • All the lights, including headlight, are now correctly passed to the shader pipeline renderer. This means that using spot light as a headlight looks good now if you use View->Shader->Enable For Everything, the spot is calculated nicely.

  • You have much more options for customizing the headlight, by new NavigationInfo.headlightNode extension. You can put any X3D light (directional, spot, point) there, and it will work.

    Old KambiHeadLight node is deprecated and ignored now. It was exposing headlight in a way that was a little alien to other VRML/X3D lights, and is no longer comfortable to implement.

  • SpotLight.beamWidth is handled perfectly and precisely with shader pipeline. See per-pixel lighting notes

  • Shadow volumes demos are moved to demo_models/shadow_volumes/ (will be part of next release of demo models). Dragging with mouse moves/scales/rotates stuff (try dragging with Shift or Ctrl pressed), this uses standard VRML/X3D PlaneSensor and SphereSensor features. So you can actually see that shadow volumes work perfectly on dynamic scenes.

    Old and mostly useless demo examples/shadow_volume_test/ is removed, all the fun can now be performed by opening the files from view3dscene (or any other 3D browser from engine examples).

  • Bartha Rolland (aka B42iso) has made a small game called Hunter's Mark using our engine :) The screenshots are visible on the side of this news post. An excerpt from the mail:

    I'm really amazed at Kambi VRML. It's easy to use if you know the basics of Pascal programing language and Lazarus. [...] I was able to create a game using the map models from "The Castle".This game i named "Hunter's Mark" is just a project,but I'm going to start the developing of a real game as soon as I feel like the time is right.

    Cool :)

  • Our Blender X3D exporter was updated to set correct creaseAngle in radians. This is also fixed in Blender (my patch here, although they fixed it differently, by changing Python value to be already in radians).

  • Developers: one large "internal" improvement (not directly visible to user) is that the light sources are now much more comfortable to dynamically assign. You can override TKamSceneManager.InitializeLights to add dynamic lights to the scene (feel free to make their existence depend e.g. on time, or player position etc.). You also have TVRMLGLScene.GlobalLights, and you can easily make all global lights shine on everything through TKamSceneManager.UseGlobalLights.

    This works even for VRML 1.0 (because VRML 1.0 lights can also be global, this is another extension of our engine).

    The old dirty idea of "light set" (load lights from special xxx_lights files into special TVRMLGLLightSet class) is removed. This was ugly and complicated. Now, just place your lights inside normal scene (like a level), and use UseGlobalLights to shine on everything. More elaborate scenarios are possible through InitializeLights.