Author Topic: Dev Log #12: Graphical Improvements  (Read 197 times)

Styg

  • Administrator
  • Godman
  • *****
  • Posts: 2426
  • Karma: +534/-31
    • View Profile
Dev Log #12: Graphical Improvements
« on: September 14, 2025, 08:29:25 pm »
See nicely formatter HTML version on the website.

Hi guys,

In the last several months, I implemented a number of significant features into the rendering engine. I'll try to keep it light with technical details as I go through the features/changes.

1. Shadow Maps / Dynamic shadows.

If you look at the old Infusion screenshots or watch the gameplay video, you'll notice that the shadows are only projected onto the floor and that they are always square. This is because I used a makeshift 2D ray tracing technique to give an illusion of real shadows when rendering the floor. So the floor was the only type of asset that had some sort of per-pixel shadowing, while other entities, such as walls, creatures and regular objects were either fully lit or unlit by a given light source (though normals were still taken into account) and this was determined through low resolution voxel ray tracing (similar to how player's vision works).

Naturally, this combination was inconsistent, inaccurate, and not very good looking. So instead, I switched to doing the good old tried-and-true shadow maps. I won't go into implementation details here as there's nothing new and interesting, the shadow mapping technique is well known and documented, so you can look it up yourself if you're interested.

One thing I will mention, though, is that this technique is meant for 3D games and our environment assets are mostly 2D pre-renders so they don't preserve the geometry required in order to project shadow maps. So, in order to make this work, we had to generate low-poly mesh for each pre-render asset that could be used for this purpose (and possible other purposes later). This meant that Mac and co. had to go through the old assets and generate these meshes. While all the new assets are now produced with these meshes included, the process is still ongoing for the old assets. For this reason, I cannot show you a direct comparison for how the old screenshots would look now, but you can see the effect of this technique on the new areas.


 
I think the impact is significant.

While this is one of more economic ways to deal with shadows, it can still be quite GPU expensive as is the case with any type of light simulation. A lot of 3D games, especially older ones, baked shadow maps into textures for static lights and objects in order to reduce costs. We do not have an equivalent in our 2.5D engine. This might cause some performance problems later on older machines, but for now I think just providing options for shadow map resolution and smoothing should be enough.

2. Liquids

We can now place bodies of various liquids into our areas. The surface is simulated through blending two moving normal maps along with screen space reflections (SSR). Later, I'm planning to implement dynamic ripples caused by objects fall in/jumping out or creatures moving through them. Another feature that would be nice to implement at some point is volumetric lights in liquids.



Liquids also affect gameplay as they can slow-down characters depending on the liquid's density, potentially deal damage (acid and the like), and even drown characters if they fail to keep their heads above the surface level. This opens a lot of level design opportunities where player will have to lower/raise liquid levels in order to accomplish some task or just mess with the enemies.

Some enemies, however, are completely unaffected by normal liquids, such as the slimes from the gameplay video. So, while you can easily outrun this damage resistant aberrant lifeform on dry land, this is not the case if you're waist deep in wastewater.

Furthermore, in the future we're going to have enemies that inhabit and move exclusively though liquids.

3. Specular lighting and SSR

Unlike with the 3D character and creatrure models, which are rendered using PBR (physically based rendering) technique, the environment is rendered using the more traditional diffuse texture base which has some lighting and shadowing baked in. This gives the game certain amount of traditional lean towards the old-school prerendered RPG classics.

One of the problems, however, is its limited interaction with the dynamic lighting system which made it hard for the viewer to distinguish between glossy and matt surfaces. The metal surfaces, which are common in Underrail, were particularly affected. It was hard to distinguish them from plastic surfaces. To fix this problem, we incorporated roughness texture in our rendering pipeline, which is used to calculate specular lighting component. Also, roughness is used when tracing screen space reflections for opaque objects - which allows the viewer to see reflections of environment and characters on high-polished metal surfaces.


 
Later on, I would like to implement SSR for glass surfaces as well, but due to the fact that these are forward-rendered, there are important performance issues to consider here.

* * * * * * *

That's all for now, but don't worry, we've been working on more than just graphical improvements and I'll show that stuff in a future dev log. In the meantime, follow me on X, where I post smaller tidbits of development regularly.

Cheers!
« Last Edit: September 14, 2025, 09:15:22 pm by Styg »

apollounderrail

  • Probably not a Spambot
  • *
  • Posts: 27
  • Karma: +5/-2
    • View Profile
Re: Dev Log #12: Graphical Improvements
« Reply #1 on: September 15, 2025, 12:10:33 am »
Looks incredible! Major hype!!!

sinsire

  • Probably not a Spambot
  • *
  • Posts: 3
  • Karma: +1/-0
    • View Profile
Re: Dev Log #12: Graphical Improvements
« Reply #2 on: September 15, 2025, 10:48:42 am »
Looks great! RIP low end systems.

apollounderrail

  • Probably not a Spambot
  • *
  • Posts: 27
  • Karma: +5/-2
    • View Profile
Re: Dev Log #12: Graphical Improvements
« Reply #3 on: September 15, 2025, 04:33:44 pm »
Looks great! RIP low end systems.

If one's system can't run a 2.5D game on minimum settings, it's safe to say that one needs an upgrade.

Arclight

  • Zoner
  • **
  • Posts: 95
  • Karma: +6/-5
    • View Profile
Re: Dev Log #12: Graphical Improvements
« Reply #4 on: September 15, 2025, 10:03:54 pm »
Spectacular! Can't wait!