Ogre 14.1.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 14.x branch to update.
A new spot light type LT_RECTLIGHT has been introduced along with the Light::setSourceSize method, enabling the rendering of rectangular area lights. In order to process this light type in your shader, verify that the spotlight_params.w autoparam is equal to 2. Then, spotlight_params.xyz contains the light width in view space, and light_attenuation.xyz contains the light height. Alternatively, just use the RTSS.
Correct whitespace loading
Historically, Ogre had incorrect glyph placement due to the initial authors not fully understanding the freetype glyph conventions.
The majority of these issues were addressed in version 13.0, but one notable exception remained: the width of the whitespace character. This was caused by a bug that prevented the width from being correctly read from freetype, so Ogre used the width of the number ‘0’ instead. This issue has now been resolved, as can seen below
However, to achieve this, you must load the code-point 32. Failure to do so will result in the ‘?’ placeholder character being displayed following the behaviour of ImGui.
RTSS: support for multiple shadow casting lights
Up until now, the shadow mapping SRS had only supported a single light source with the option of using parallel splits for increased resolution, due to the fact that it initially only supported PSSM.
I have finally came around to refactoring this code such it supports multiple shadow casting lights now. By default this implements additive shadows, which was the most costly shadowing variant when not using integrated shadows. As we are using integrated shadows here, it is basically free now. Only when using per-vertex lighting, we fall back to modulative shadows as all lights were already evaluated in the vertex shader.
You can configure the number of lights that should be considers via:
We just tagged the Ogre 14 release, making it the new current and recommended version. We would advise you to update wherever possible, to benefit from all the fixes and improvements that made their way into the new release. This release represents almost 2 years of work from various contributors when compared to the previous major 13 release. Compared to the last Ogre minor release (13.6), however we are only talking about 6 months. Here, you will mainly find bug-fixes and the architectural changes that justify the version number bump.
Ogre 13.6.0 was just released. This is the last scheduled release for the 13.x series and contains some significant bug-fixes and feature additions, which we will discuss in more detail below. We recommend all users of Ogre 13.x to update.
Generally speaking, this release brings much better lighting/ shadowing due to several bugfixes that previously degraded results.
Already mentioned in the 13.5 announcement, this has now finally landed. Thanks to the preliminary testing by the rigs-of-rods guys, the remaining bugs have been ironed out. This feature allows to easily enable multiple lights or switch to PBR equations altogether.
RTSS based Terrain with multiple lights
Additionally, the layer normal blending equations have been improved and now multi-layer terrain has improved lighting.
Improved LiSPSM Quality
Here, I finally found the bug that significantly reduced the shadowmap resolution, when using LiSPSM (see above). This bug also affected PSSM, which internally uses LiSPSM.
Ogre 13.6Ogre 13.5
Additionally, I could add shadow pancaking for directional lights. This is a feature also present in Ogre Next, that improves depth shadow z-resolution and thus reduces shadow acne.
Shadow pancaking is automatically used on RenderSystems that support depth clamping, like GL3+, D3D11 and Vulkan.
Image Codec implemented in Rust
To improve the security of the Ogre codebase, I looked into using the Rust language. The most critical part of Ogre is probably texture loading, as it has to deal with a plethora of different image formats. As astart, I have implemented a new Codec_RsImage. Image codec are plugins since Ogre 1.11, this means that the Rust part is completely optional and you do not have to update your build environment, if you dont need it.
The new Codec internally uses image-rs to load the various formats, that are all implemented in Rust and thus provide memory safety. Unfortunately, currently the Rust implementation is slower than the highly optimized C libs that have been around for decades. However, as Firefox is using image-rs internally too, I assume performance will catch-up over time.
UAV support in Ogre Script and compute shaders in D3D11
The texture shows the grid of GPU thread-groups that are generating it
Complementing GL3+, D3D11 now supports compute shaders as well. The respective Sample in the SampleBrowser will show you how to do it.
Additionally, that sample now got considerably simpler too, as you can now specify in the ogre script that you want to use a texture for writing in the compute shader, as
texture_unit {
texture …
unordered_access_mip 0
}
This will bind mipmap level 0, at the binding point of the texture_unit order UAV access (D3D11 jargon) or image load/ store (GL jargon).
IBL support added to the RTSS
Filament GLTF ViewerOgre RTSS Sample
Now the RTSS can add indirect, image based lighting (IBL) to PBR materials. To enable it via material scripts, you have to specify
Note, that it requires the metal_roughness parametrization to work. For best results, generate the cubemaps using cmgen tool of the Filament project.
While at it, the cubemap support was generally improved. Ogre now can correctly load the HDR .ktx files generated by cmgen (GL3+, D3D11 only) and also use the slightly more sane _px, _nx, _py, _ny .. layer suffixes in additon to the _fr, _bk, _lf .. suffixes it traditionally used.
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.
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.
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.
We asked the team behind the game if they could share some insights into the Ogre3D usage and how the game was built in general, and Suny was kind enough to provide those:
What is SHMUP Creator
SHMUP Creator is a shoot ’em up maker. It allows people to create games without any coding or scripting. The games can use 2D sprites or 3D models. The game editor offers a lot of features allowing people to create gameplay, weapons, particle effects, and so on. We tried to make this tool easy to use and powerful enough for more experienced users. The team is tiny: I’m the only coder (+ musician + texture artist + sprite artist), and one other artist made the Art direction UI design and modeled all the 3D assets.
Ogre
I’m using Ogre 13 and the DirectX9c renderer. I only modified a few lines of Ogre code to simplify my workflow (for example, to not crash when a font is looking for a non-existent character), and I wrote a few simple particle affectors, like simple damping or another one that keeps an effect 2D. I also wrote all the shaders, trying to be pretty but fast.
Performance
Shoot ’em ups are simple games, but performance is very important. I wrote an optimized bullet engine that creates a manual mesh object per bullet type. So I can display hundreds of bullets with one draw call per type. Also, the engine can create 3D or 2D games, and for 2D games, I’m displaying a quad per sprite. When a game is exported, I create static meshes for backgrounds to reduce the number of draw calls, and it helped quite a lot with performance. Users are quite surprised by the speed of the 3D engine. I’m not doing very fancy things (no GI or AO, no PBR for now) but it’s working quite well.
GUI and other libraries
The SHMUP Creator is mainly a tool, and obviously, the UI is a very important part of the product. I’m using MyGUI for this, with a lot of custom animations and transitions. I really enjoyed using MyGUI and I hope it will be maintained in the future! Other libraries used are Bullet for some simple ray/mesh collisions, Fmod for sound, assimp for 3D import and export, and SDL for gamepad and windows creation. I also use a tiny bit of boost and rapidxml for serialization.
Why Ogre
I started to work on this project a long, long time ago. Actually, it’s my first C++ project ever 🙂 I tried Unity, but their rendering engine was very bad at this time, so I choose Ogre. There are downsides, but the good thing for me was that I had to learn a lot of things in a variety of subjects and do everything by myself, like writing all the shaders, optimizing the rendering pipeline, etc. All that knowledge is invaluable to me and I use it every day in my day job. Also, the community is not very important those days, but people are quite friendly and I can always find someone to help me if I need some help (Thanks again Paroj!).
Spreading Ogre
SHMUP Creator is a game-making tool. I’m amazed by the quality of games made by the SHMUP Creator users: you can already play some of them on itch.io, and I hope some of them will be sold on Steam soon. So, in the end, I hope this product will help create a lot of games using Ogre 🙂