Simulating combat environments in Killing Floor 2 — Competition Finalist

by abusing sphere masks

Hristo Enchev
Hristo Enchev
4 min readApr 2, 2019

--

Responsibilities:

All technical implementations and map optimizations

Some set-dressing

All lighting

Development time: 8 weeks

YoYo gif of the initialization sequence

Competition Update:

We took 5th place in the Survival category, and here is the official quote:

Tripwire Interactive Judge Notes: This map was an extremely impressive technical showcase for how it constructs the environment for each of the different rooms like the holodeck. It made the small spaces feel much larger with the simulated backdrops.

The Process:

I, along with two other students, decided to enter TripWire’s NEWGROUNDS mapping contest. Killing Floor 2 is running on a modified version of the Unreal 3 engine and none of us had any prior experience with it. After exploring the engine, its features, scripting language [UnrealKismet] and its limitations, it was time to settle on an idea for the level and start prototyping. I pitched the idea about a level which serves as a training facility for soldiers, simulating layouts and environments like the ones already in the game. The idea immediately resonated with my level designer and environmental artist, so we began concept-ing and prototyping.

First Room Power Prototype
Final Simulator Rooms Showcase

The main reason why I pitched this was that we had access to all assets from the base game, and this was a very elegant way to reuse them. But at the same time, if these rooms were to power down, when the players are not in them, then it also offers a new gameplay experience. The ZEDs [zombies] don't care about simulations, room lighting and such, they care about the player's brain, but the brain cares about lighting and visibility. And as a bonus, if the room power is properly replicated, a player outside the simulations would be able to spot where their friends are, based on whichever simulation is powered on. But what if the players don't like the constant on and off switching, well for cases like this, in the Lab area there is a control station that can toggle between full power to all rooms or the default which based on players proximity to them. Plus it replicated over network, so you can yell at your teammates to turn on the power :)

The Tech behind the simulations:

For the walls, I made use of the CubeMaps and world positioned reflection vectors. The cubemaps themselves are 4k screenshots of official Killing Floor 2 levels on all six sides of a cube. The objects inside each simulation room is where it gets tricky, each object uses an altered material shader, utilizing a masked blend mode, and a custom material function which utilizes a world position sphere mask to control the blend between the material itself, and the hologram-like wireframe outline which you see if you are outside a simulation room. In total, I had to copy, edit and reapply around 30 materials and 200 material instances for the three simulation rooms present in the final level. Everything I have just said is animated using Kismet and Unreal Matinee. It was a tedious process, especially with those materials, but it's not a complex one. And the effect at the end, when everything comes together is amazing. And all of this on a last-gen engine. Coming from UE4, working with Unreal Engine 3 was unpleasant, to say the least, there wasn't a single day without editor crashes. But the overwhelmingly positive community response to the level and the simulations made it all worth it, and I would do all of it again.

Here is a community gameplay video on the highest game difficulty:

If you have Killing Floor 2, you can download the level via subscribing from the steam workshop.

--

--

Hristo Enchev
Hristo Enchev

An ambitious technical game designer, who also likes photography, graphic design and … well video games