Mount & Blade II: Bannerlord Developer Blog – Engine

This week’s Mount & Blade II: Bannerlord developer blog talks about and showcases the latest 1.4 version of the game’s engine. If you’re a tech-savvy individual, you’ll probably appreciate reading about the newly added global illumination system, shader calculation improvements, and the new particle shading atlas. And if you just like your game to look nice and run well, you can check out the latest in-engine video below:

Here’s an excerpt from the update:

Global Illumination

We introduced a new global illumination system to the engine which can correctly illuminate both static and dynamic objects. It is based on a pre-baked system called “Precomputed Radiance Transfer”. It is independent from the atmosphere, which is a must for a game like Bannerlord where you will enter a scene at different times of the day. The system saves the illumination data to probes inside a regular grid. We developed lots of automatic placement tools so that the work required by artists to bake the scenes is kept to a minimal. Modders will be able to bake GI to their scenes using these tools.

Compute Shader Skinning

By using profilers we have learnt that in large-scale battles the majority of the GPU time is spent on the skinning of agent meshes. Normally, the skinning process is repeated every time a mesh needs to be rendered (shadow pass, gBuffer pass, special passes for custom hair shading etc.). To combat this, skinning calculations of skeletal meshes have been moved from the vertex shader stage to a separate compute shader stage. Despite both stages running on the GPU, executing a separate stage for skinning and storing results in temporary memory enables us to do skinning calculations only once per frame and use special optimisation mechanisms that are exclusive to compute shaders. This results in the rendering time of skinning meshes being reduced by 60% which enables us to achieve 60FPS in huge battle scenes on a wide range of GPUs.

Particle Shading Atlas

Particles are now shaded in a separate compute shader stage. Each visible particle is assigned a rectangular region (2×2, 4×4, 8×8, 16×16 or 32×32) in a big global texture atlas according to its screen space size. Shading is done on these tiny quads with a compute shader stage. During the actual rendering, we just sample the lighting result from the atlas texture and skip any complex lighting computation. Separating shading and drawing stages enables us to reduce the fill rate costs of particles since the amount of shaded pixels are extremely reduced. This reduces the high GPU cost of the desert-like scenes. This technique also eliminates the sharp shadows on the particle quads, further increasing the visual quality of the already beautiful particles of Bannerlord!

At this point we feel it is important to stress the fact that while yes, we are still developing the engine and making new additions: this work is running entirely parallel to the development of Bannerlord. Our dedicated engine team are constantly striving to give us a better optimised engine which allows us to have larger battles, higher frame rates, greater visual fidelity and faster loading times. This work doesn’t hold back the development of the game in any way, shape or form and will ultimately improve the overall quality of the final product.

Share this article:
Val Hull
Val Hull

Resident role-playing RPG game expert. Knows where trolls and paladins come from. You must fight for your right to gather your party before venturing forth.

Articles: 9834
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments