Project

Grand Strategy Renderer

A custom terrain/map renderer inspired by Europa Universalis IV, featuring procedural terrain generation, height-based texturing, and province map visualization.

Grand Strategy Renderer Preview

🛠️ Skills and Technologies

  • Custom Educational Engine: Developed using the Bee engine, a proprietary tool used at Breda University of Applied Sciences for the CMGT programming track.
  • Europa Universalis IV Assets: Utilized EU4’s map assets, including the heightmap and textures, to create a terrain rendering system inspired by the game’s visual style. Assets can be found here.
  • Procedural Terrain Mesh: Optimized terrain rendering with GeoMipMapping on the CPU.
  • Height based texturing: Implemented a configurable layer system using a color map for terrain texturing.
  • Compute Shaders: Using compute shaders in OpenGL, a Distance Field texture is generated for the political map mode.

⚙️ Key Highlights

alt text Political Map mode combined with the terrain texturing


Procedural Terrain Optimization

To optimize terrain rendering, the mesh is divided into patches, each with multiple levels of detail (LOD). The appropriate LOD is dynamically selected based on the camera's distance.
GeoMipMap

Height-Based Texturing

Terrain textures are applied by height using diffuse and normal maps, with a color map for tinting.
Height Map Texturing

Water Rendering

Simple water rendering using an HDR and two scrolling normal maps.
Soft Shadows

Political Map Visualization

Compute shaders are utilized to generate the Political Map mode in two passes:
- First Pass: Province borders are identified and saved to an edge detection texture.
Province Borders Texture
- Second Pass: A distance field texture is generated to create a gradient effect around the province borders.
Distance Field Texture
Effect Visualization:
Gradient Effect with Nearest Filter

Filter set to nearest neighbor for clearer visualization of the gradient effect


📚 Project Article

As part of the project, we also had to create an article where we share the knowledge we gained over the span of our research and development process.

Basic Texturing for Grand Strategy Games Using Europa Universalis IV Files

📂 Source Code

Unfortunately, due to NDA restrictions, I am unable to share the codebase.

alt text