More than a texture patch? (Part 4)


More than a texture patch? (Part 4)

ThielHater | 2. 4. 2021

The fourth part of this series is about a feature that the Gothic Reloaded Mod will introduce: the fog zones. We suspect that Piranha Bytes had already implemented this feature in a rudimentary way at the time, but had not yet recognized the design possibilities or were unsatisfied. This is supported by the fact that there is a single object of the type "zCZoneZFog" in Gothic, which surrounds the Swamp Camp but has no effect. The color given was a light, neutral shade of gray, which doesn't really fit the Swamp Camp.

Technically, fog is a cube-shaped zone in which the range of visibility is limited. The color of the fog as well as the increase in density towards the midpoint can be configured. This way it is possible to configure a slowly increasing greenish fog as well as an abruptly appearing dark violet fog. The former is suitable for swamps and forests, the latter for a cave with a Skeleton Mage, for example. In Gothic 2, this effect was used very atmospherically in the forest near Akil's Farm, above Khorinis, among other places.

In this context, the effect should not have escaped anyone's attention, but did you notice it while playing? Many fans surely remember the dark, endless, dangerous forests from Gothic 1. But how did that happen, when the forests are not that big from the outside and there was no fog to create that illusion? The Piranhas made use of a different trick.

Whoever carefully observes the borders of the forest will notice that there are faces that have been covered with a dark texture of vertical tree trunks. These are the so-called forest portals, which have a honeycomb structure when viewed from above and slowly fade out as you approach them. Together with the changing music and the monsters behind each tree, they are what cause this atmosphere in the forests.

From the outside, however, the forest portals look clunky and outdated, which is why we had an intensive discussion about how we should redesign the forests. One point of this was the use of fog zones, as you know them from Gothic 2. For this I wrote a Union-based plugin, which determines in which zones the hero is at the moment, calculates the resulting visibility as well as color and applies it. I have also modified the D3D11 renderer so that it renders the fog as well and does so as similar as possible to the D3D7 renderer. Here is an example from the forest between the Old Camp and the Old Mine:

Furthermore, we have designed new trees with wide crowns, which we want to place instead of the simple trunks. Since the implementation is not finished yet, I can't show a screenshot of it yet. However, there is an album in the gallery that reflects our progress. You can therefore be excited to see what the forests will finally look like with the Gothic Reloaded Mod, because we are too.

There is one catch to the fog zones, however: they are not visible when you are outside of them. Why this is a problem? Let's imagine a rectangular surface with a cube-shaped fog zone in the middle. If you were to stand at one corner of the surface, you would not be inside the fog zone and would have a clear view. If you would cross the surface along its diagonal, you would enter the fog zone and the visibility would be reduced. Depending on the settings, even to the point where you can barely see your hand in front of your eyes. This behavior is counter-intuitive. After all, you should have seen this dense fog before you went off! Therefore, fog zones are only suitable for fenced-off areas where it's hard to see inside - which is fortunately true for forests.

In the next part of this series, we'll be looking at an acoustic aspect of the Gothic Reloaded Mod instead of a visual one.