KTX – mipmaps, ASTC, Docker – GitHub CLI, Compressonator, macOS fixes, node renames API, TCastlePlane.Size

Posted on

Invincible - Mark Grayson (3D model rendered using Castle Game Engine)

Here goes a list of recent Castle Game Engine improvements that I need to get off my chest 🙂 Overall I’m very happy with the engine state lately — we’ve done good features, we have big things coming (like new physics), and have good base and can polish the experience in many places. This resulted in recent improvements a bit “all over the place” as I test and polish 1st-user experience with e.g. our examples.

If you’re looking for an introduction to the engine, watch engine tutorial on our YouTube channel and explore our examples.

Please support the engine development on Patreon! We want to do everything from our roadmap and more!

Engine improvements done lately:

  1. We now support reading mipmaps from KTX (Khronos Texture) files.

  2. Automatic texture generation can be instructed to generate mipmaps for textures. Mipmaps allow trilinear filtering that looks good when the texture may be seen from various distances (typically useful for textures on 3D models, but there are cases when it makes sense for 2D too).

  3. ASTC compression is done to KTX format and using AMD Compressonator.

    This is our general direction for the future: We like KTX format (open standard from Khronos), we like open-source Compressonator with lots of output options. We will push our automatic texture generation to utilize these 2 (Compressonator to KTX) consistently for everything where possible. Other formats (like DDS) or tools (like NVidia texture tools ver2, with a proprietary successor in ver3) will get lower priority.

  4. Our Docker image now contains AMD Compressonator (to generate textures) and GitHub CLI (to interact with GitHub from continuous integration jobs).

  5. We’ve done a number of macOS fixes. They all can be tested using macOS build available prominently on our main page. The macOS build is done automatically by Jenkins and contains the latest CGE. Fixes:

    • Fixed crashes when clicking on lists in editor,

    • Fixed error message about -psn_... at 1st run,

    • Added ability to set CGE location (useful if you run CGE editor from zip downloaded from the Internet, which will be the most common case here). This may also be useful on non-macOS platforms.

    • By default we package app bundle to zip. You can change it though.

  6. I’ve done some thinking and made a documented decision to not try to rename nodes to be unique when loading (glTF, X3D, others).

  7. Following the above decision, I extended TCastleSceneCore.Node and TX3DNode.FindNode methods. Simpler and allow to search by class criteria too. Deprecated some old alternatives.

  8. Last but not least, TCastlePlane.Size gets a trivial but compatibility-breaking fix: it is now treated as total size in both dimensions. This means that size = (10, 10) results in rectangle around (0,0,0) that has size 10, for example from X = -5 to X = 5, and from Z = -5 to Z = 5. This is consistent with TCastleBox.Size and more natural.

    Previous interpretation resulted in larger rectangles. Size = (10, 10) resulted in rectangle around (0,0,0) that has size 20, like from X = -10 to X = 10.

Screen for this post shows Invincible and Mark Grayson 3D models from SketchFab created by ASideOfChidori. As usual when I don’t have a perfect screen to illustrate the current news post, I go ahead and pick something cool that can be rendered by Castle Game Engine 🙂 I did watch the Invincible lately and enjoyed it a lot. You can download the glTF file from SketchFab for free and play with it yourself, just drop it on a 3D viewport.

Start the discussion at Castle Game Engine Forum