Gamasutra: Joost van Dongen’s blog

The following blog post was written by a member of the Gamasutra ?? s community, unless otherwise stated.
The ideas and opinions expressed are those of the writer, not Gamasutra or its parent company.

In 3D games, perspectives are often treated as given. The law of nature. However, you don’t have to. Shader tricks and clever modeling can be used to manipulate perspective to achieve specific configurations that may seem impractical, but look more interesting and convincing to the player. One such example is how to display the horizon on the screen in the new game Blightbound by subtly bending the world.

At Ronimo, we come from the world of 2D games. In 2D, you can compose whatever you like. As a result, art director Gijs Hermans may want to ignore standard perspective rules and instead visually see what he wants to achieve. So, early in development, Gijs came to me and said he wanted to look down at the camera quite a bit, but still see the horizon. In fact, he wanted to place the horizon well below the top of the screen. His reasoning was that, in most cases, the visuals look much better when only the floor is invisible. The position of the horizon is an important tool for shaping the composition.

The cause of this request is a common conflict in game development. It looks nice and the gameplay is clear. Our artists spend a lot of time achieving both goals at the same time. A very successful example of this is how the previous game Swords & Soldiers 2 draws gameplay objects and backgrounds in different styles, as described in this blog post.

In games where depth is important, such as Bright Bound, there is a problem because it is difficult to tell whether you are standing in front of or behind an enemy with a low camera. Higher cameras solve this, but taller cameras remove the horizon from view and make the image more boring.

When Gijs came to me with this request, I came up with two possible solutions. Either give the camera a wider field of view, or bend the world and move down the horizon. First I tried the simplest solution: wide view. However, it turns out that this needs to be set very wide so that the overall perspective looks distorted. The extreme field of view was often not very clean, which was definitely not in Brightbound.

The alternative I came up with was to bend the world away from the camera. This is an effect used in many games to create the feeling that the world is very small and makes the world feel cute and interesting. However, Blightbound is aimed at dark fantasy games and isn’t cute and entertaining, so I didn’t want that extreme. With a little tweaking, I thought it might be possible to achieve a more subtle version that doesn’t have an interesting atmosphere while keeping the horizon in view.

My implementation of this effect is very simple. The vertex shader bends the world according to the Z position of the vertices in the world. The nice thing about implementing it this way is that it’s very simple because the gameplay code and level design tools can assume a flat world. Bending is only present during rendering, so gameplay logic doesn’t need to take that into account.

A small challenge in implementing this bend is how to handle lighting and shadows. It is not desirable for the object’s lighting to change as the camera moves forward and the world bends. This is because the bends are so sharp that the player will focus on the background rather than the gameplay. Also, the objects in the background should not be brightened as they rotate towards the light due to bending. My solution was to calculate all the lights, shadows and fog as if there were no bends in the world.

Also, a little technical note: bends occur at vertices, so the object needs enough vertices. Large square planes on the ground with no vertices in between cannot be bent. This could lead to a bug where small objects would float above large objects because the large objects did not have enough vertices to bend correctly.

If you set the bend effect to an extreme value, it’s a lot of fun to see it actually work. However, as the camera moves, all sorts of geometric deformations are so noticeable that I decided to fix the bend in the world instead of moving it with the camera.

Several different settings for bends, including the last setting used by Blightbound.

As you can see in the video, the bend effect is bright bound and very subtle. It’s intended for dark fantasy games, so I didn’t need any cute and funny effects at all. Level artist Ralph Raidmakers has tweaked the effects and camera to make it feel like a natural camera with no bends at all. However, if you compare with and without bending, you can see that bending makes a big difference in what you actually see. And that’s exactly the way it was intended: achieve the desired configuration, but don’t make it look like something strange is happening.

And the fog has come! The bend effect was implemented when we did not yet understand world folklore. At that time, we didn’t know we wanted so much fog. In fact, the tentative title of the game was Awesome Knights, not Blightbound. The final decision on folklore revealed that the world of Brightbound was “ravaged”, or covered with rotting fog. Along with that, Ralph added a lot of fog to all levels. This creates a great atmosphere, but … hides the horizon!

Does it make the world useless? No, absolutely not. It is used at a significant number of levels to change the perspective and make the background appear more horizontal, even if it cannot be seen as far as it used to be. It’s a more subtle tool than originally intended, but it’s still a very useful tool.

I think the bend effect used here is a great example of the kind of graphic programming I enjoy most. See what you need from an artistic point of view and create the technology to make it happen. I’m not very interested in realistic rendering personally. 3D is just a tool for creating cool art, regardless of shape or type. The bend technique used here makes no sense from a physical point of view, but it is added to make Blightbound a more beautiful and engaging game.

Check out the development blog at for other blog posts about developing Blightbound, Awesomenauts, Swords & Soldiers, Cello Fortress, Proun, procedural music, my cello album, and anything else I’m working on.

Leave a Reply

Your email address will not be published.

Back to top button