Ogre 13.5.0 was just released. This release contains some significant bug-fixes and feature additions, which we will discuss in more detail below. We recommend all users of the 13.x branch to update.

For a full overview of the changes, see the changelog.

Table of Contents

Automatic Instancing

Visible SubEntities can now be automatically batched up for Hardware Instancing.

While this is not as fast as using the respective InstanceManager class, it requires no code changes and still offers a nice speed-up (see above).

The idea is that you specify that your vertex shader is capable of instancing – similar to how you would do for hardware skinning:

includes_instancing true

Ogre will then do the rest and provide the world matrices through an automatically created instance buffer to the shader.

The RTSS will also set the respective flag, so enabling hardware instancing now merely takes only one line in the material script:

rtshader_system
{
   transform_stage instanced
}

Non shadow-casting lights and PSSM integration

The PSSM implementation in RTSS was improved to play along with multiple light sources. While it still only supports one shadow-casting light, other non-casting light are now correctly integrated – as shown above.

While at it, the PBR lighting got some fixes too. All computations are now correctly gamma composed and the ambient lighting is no longer applied twice. Due to this your PBR materials might appear darker (as typical for a PBR workflow).

Object Space Bones

Thanks to a hint by forum user loath, Ogre now offers the option to do the bone-to-world transformation on the GPU – aka “Object Space Bones”.

Traditionally Ogre passed bones to shaders (for HW skinning) via the world_*_array auto constant. Obviously this implied the bones to be in world space. To this end, Ogre did the transformation on the CPU. While this does not add much for a few bones, it becomes noticeable if you got multiple skeletons with 40+ bones.

You can opt-in into the new behavior via MeshManager::setBonesUseObjectSpace.
Also see Renderable::getWorldTransforms for how to return the transformations for your custom renderables when doing so.

When using the RTSS for HW Skinning, it will automatically generate improved shaders, when the option is on.

Also, you can now use the bone_*_array alias instead of world_*_array for clarity. Note that world_*_array was exclusively used for bones by Ogre anyway.

Modernized Codebase

Finally, the codebase was overhauled to take advantage of C++11 constructs. Most notably, all functions are now annotated with override. This means that you can now enable -Wsuggest-override for code using Ogre to get the useful warnings.

Additionally, we now extensively use std::make_shared and for-each loops which slightly improve performance, but considerably improve code readability. The for-each refactoring is an ongoing effort by github user Joilnen.

Preview: RTSS Terrain

RTSS based Terrain with multiple lights

The RTSS implementation of the Terrain shaders is now fully feature complete compared to the previous custom shader generator implementation.
This required some architectural changes to RTSS, but now the system is more flexible as a whole.

When it comes to the Terrain component, this means that all of the RTSS flexibility is available now:

  • multiple lights are now supported and benefit from the PSSM integration mentioned above
  • the shadows now use the hardware PCF filtering of the RTSS implementation
  • you can use the GBuffer SRS to do Deferred Shading with the Terrain
  • you can use the PBR lighting SRS if you want

This is scheduled to be merged for 13.6, as I want to get a stable 13.5 out first and this is a rather invasive change (even thought there are no API breaks).

If you want to try it out right away and give feedback before it is merged, see this branch. It contains only the terrain changes on top of the 13.5.0 release.

Ecosystem Roundup

Thanks to Simon Schmeisser there are some recent Ogre 1.12 packages in Debian (compared to the previously available v1.9).
This allowed us to easily create a CI pipelines for most of the OGRECave addon projects, which will improve the stability of that code as well.

Next, our PIP package now includes the Vulkan RenderSystem. This makes ogre-python the easiest way to get started with Vulkan and Python. As far as I am aware no other python renderer exposes Vulkan yet.

Finally, my Steam Deck arrived and the first thing to do was of course this:

The additional testing on the AMD GPU in the deck resulted in some fixes for the Vulkan RenderSystem.