Various engine improvements: lift lights limit, test simultaneous animations, fix changing TLevel.Player, SaveScreenRgba…

Posted on

Zrzut ekranu z 2020-10-22 22-53-57
Zrzut ekranu z 2020-10-22 22-54-04
Zrzut ekranu z 2020-10-22 21-40-10
Zrzut ekranu z 2020-10-22 21-40-27

Here goes an unorganized list of engine features and fixes done lately 🙂 Enjoy, and see if you can find something for yourself in this menu 🙂

  1. You can now increase the number of allowed lights per shape using Scene.RenderOptions.MaxLightsPerShape. view3dscene has a menu item to experiment with it (“View -> Max Lights Per Shape…”). A test model is in demo-models: gltf/multiple_animated_lights.

  2. view3dscene allows to test multiple simultaneous animations. Just select the checkbox Enable Multiple Simultaneous Animations in the animations panel (Ctrl + A), and now you start/stop the animations independently. The animations are controlled using TTimeSensorNode.Start and TTimeSensorNode.Stop, just like in the example simultaneous_animations_one_scene.

  3. Thanks to Andrzej Kilijański, changing TLevel.Player after the level is loaded is now fixed. This fixes various applications relying on it, like the old “The Castle” game. It is demonstrated by fps_game example, just press F1 to recreate player. It works reliably in all cases, with 1st and 3rd-person navigation.

  4. In code you can iterate using for .. in over TCastleTransform and TCastleUserInterface children.

  5. Fixed opening Lazarus when it is installed from Debian packages (lazarus-ide binary), thanks to Eugene Loza.

  6. TCastleViewport.PositionToRay utility. This allows to get a 3D ray from a 2D viewport position and use this ray to e.g. perform collisions with the world geometry to determine anything you like.

  7. TUIContainer.SaveScreenRgba method allows to grab a screenshot to RGBA image. An example is in examples/short_api_samples/save_screen_rgba/save_screen_rgba.lpr.

  8. Fixed glTF look in case of no explicit material.

  9. Fixed gravity when reading glTF camera (in glTF, gravity is always +Y).

  10. Fixed TCastleViewport.Transparent to ignore X3D Background nodes (it was always documented like this, but got accidentally broken ~year ago).

Start the discussion at Castle Game Engine Forum