Blog: Softening polygon intersections in Blightbound

The next weblog submit, until another way famous, used to be written through a member of Gamasutra’s group.
The ideas and critiques expressed are the ones of the author and now not Gamasutra or its dad or mum corporate.


Our new recreation Blightbound options many sorts of foggy results: mist, mud, smoke and extra. Such results are ceaselessly made with planes and debris, permitting us to attract fog and impact textures through hand and giving us most inventive keep watch over. Then again, one factor with that is that where the place fog planes intersect with geometry creates a difficult edge, which appears very pretend and out of date. My resolution used to be to put into effect intensity fade. It is a often used method for cushy debris, however we apply it to a number of gadgets, now not simply on debris.

In nowadays’s blogpost I’ll provide an explanation for how intensity fade rendering works. I’ll additionally display simply how broadly this system can also be implemented, through going thru a host of examples from Blightbound.

First, let’s take a look at what downside we’re looking to remedy right here. When striking partly clear planes on this planet, where the place they intersect with different gadgets creates a immediately cut-off line. Occasionally that’s desired, however ceaselessly the ones clear planes constitute volumetric results. They’re now not meant to seem like flat planes, however that’s simply the perfect and most productive means of rendering them. That is high quality when there aren’t any intersections, but if there are then the exhausting strains the place they contact different gadgets ruin the volumetric phantasm.

There’s a easy resolution for this that’s utilized in a large number of video games: intensity fade. The speculation is to easily fade out the airplane close to the intersection. This produces an impact very similar to how actual fog works: gadgets that pass into the fog appear to easily fade out. Then again, in truth understanding all polygon intersections takes an excessive amount of efficiency, so we would like a rendering trick as a substitute.

This screenshot from Blightbound displays a fog airplane simply above the bottom. Within the most sensible symbol it’s rendered in the usual means, leading to exhausting intersections with the characters, rocks and cart. On the backside the intersections are smoothened through intensity fade.

The trick to rendering with intensity fade is to first render all commonplace geometry, apart from any clear gadgets. This fills the intensity buffer, so for each and every pixel we all know what distance it has from the digital camera. Then when rendering the gadgets that want intensity fade, the pixel shader appears up the gap within the intensity buffer and compares that to its personal distance. If those are shut to one another, then we suppose that we’re close to an intersection and fade out this pixel. The closer, the more potent the fade out, till the item is totally invisible on the level of intersection.

This system has a couple of neat bonus options on most sensible of simply smoothing out intersections. By means of merely environment the gap over which the fade happens, we will alter the density of the mist. Additionally, gadgets do not wish to in truth intersect with the fog airplane to get intensity fade implemented. Being simply underneath the fog airplane additionally makes the impact visual. Thus intensity fade is greater than only a method to smoothen intersections.

The fog’s density environment determines the width of the smoothing of the intersections. At an overly top density the smoothing is nearly misplaced. At an overly low density the fog nearly disappears for the reason that floor is now additionally regarded as ‘shut’ to the fog airplane.

Whilst this system is historically most commonly used for debris, it might probably simply be used for all gadgets with transparency. For the reason that international of Blightbound is roofed through the blight (a thick, corrupting fog) now we have a large number of sorts of fog in our recreation, together with many fog planes and debris, in addition to smoke and particular results. Our artists can observe intensity fade rendering to all of the ones, now not simply to debris.

Intensity fade may be nice for hiding the seams of shifting gadgets, like this fog wall.

A pleasant belongings of intensity fade is that it does not price all that a lot efficiency in comparison to conventional alpha mixing. For every pixel of a particle or fog airplane that we render, it prices one additional texture look-up (within the intensity buffer) and a distance calculation. In comparison to extra complicated volumetric tactics, like voxel ray marching, that is an overly low worth. For the reason that efficiency affect of intensity fade is low, our artists can use this system on many gadgets, now not simply at the few that truly, truly want it.

Intensity fade too can remedy issues of digital camera going through glow planes. The glow in this torch is all the time orientated in opposition to the digital camera, however that makes it intersect with the wall at the back of it underneath sure angles. The usage of intensity fade, the intersection can also be hidden. This animation displays alternating with and with out intensity fade.

After I carried out intensity fade, I assumed I used to be being beautiful artful: I had handiest ever noticed this system used for cushy debris, now not for generic object rendering. Then again, whilst looking out the internet a bit of to write down this blogpost, I discovered it is in truth an ordinary characteristic within the Unreal engine. For Harmony I handiest discovered the choice on debris, however it could exist in a extra generic shape there as neatly.

Now that we understand how intensity fade works, let’s take a look at a host of instance makes use of from Blightbound. Particular due to my colleague Ralph Rademakers, who made many of the ranges and is thus the top person of intensity fade in Blightbound. Ralph gave me a pleasing checklist of cool spots to turn:

A compilation of examples from Blightbound the place intensity fade is used to nice impact, appearing each with and with out intensity fade.


Some other software of intensity fade is to cover seams of VFX with the sector. On this instance the smoke impact intersects with a black floor airplane.

After I first of all carried out intensity fade in Blightbound, I assumed it will most commonly be used on fog planes that waft simply above the bottom, to present the impact of heroes strolling thru a low striking, milky fog. Once our artists were given grasp of this system then again they began the usage of it on heaps of alternative gadgets. That is to me probably the most a laugh portions of creating graphics tech: seeing how a lot more artists can do with it than I had at the beginning imagined!

For extra blogposts on construction of Blightbound, Awesomenauts, Swords & Infantrymen, Cello Castle, Proun, procedural song, my cello album and any of the opposite stuff I paintings on, take a look at my dev weblog at

Leave a Reply

Your email address will not be published. Required fields are marked *