Playing animations backward, build tool output dir, fast rendering to TGLImage and other new features

Posted on

Lego "buggy" model in Collada
view3dscene controllig animation forward/backward
Engine in Collada

New features implemented this week:

  1. You can now easily play the animation backward, passing the Forward = false parameter to PlayAnimation. Internally, X3D TimeSensor node is enhanced with a new field TimeSensor.fractionIncreasing.

  2. view3dcene has menu item “Forward” to test above.

  3. Build tool has a new command-line option --output to place the generated files (executables, packages, castle-engine-output dir) anywhere you like.

  4. Collada material transparency is now read OK, you can test on various models here.

  5. dmOverwrite draw mode for TCastleImage.DrawFrom/To to copy pixels without any blending (thanks to Eugene Loza!)

  6. Fast rendering to image on GPU (using FBO) using TGLImage.DrawFrom and TGLImage.RenderToImageBegin. Example in examples/images_videos/draw_images_on_gpu.

  7. String is now always UTF-8, just like in Lazarus LCL. This changes the treatment of localized (non-English) characters inside AnsiString (the default string). The engine now behaves just like Lazarus (LCL), regardless if you use TCastleControl (with LCL) or TCastleWindow (without LCL), and treats all strings as containing UTF-8 characters. This change is done in CastleUtils initialization code. Advantages:

    • consistency with Lazarus, that already does the same.
    • consistency across platforms. It’s easier to catch bugs when string is always UTF-8 on Linux, Windows, Mac OS X… E.g. this bug (reproducible only on Windows) is now fixed.
    • our TCastleFont rendering was already assuming UTF-8 encoding of strings. Some of our XML manipulation also assumes that we want UTF-8 encoding.
  8. And various smaller bugfixes:)

P.S. If you like what I’m doing, please support Castle Game Engine development on Patreon. Thank you!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.