Article
Article
Article

Behind the Scene — Building the World of Deus Ex: Mankind Divided

Share this Article

At Eidos-Montreal, the art team is passionate about architecture and it shows in our games. Deus Ex: Mankind Divided (DXMD) features some of the richest environments ever built in a video game. In this article, you are invited to take a peek behind the curtain. Find out how Eidos-Montreal typically builds an environment using Autodesk 3ds Max. We’ll look at the challenge of designing an extremely dense, narrative-driven, and gameplay-heavy environment while trying to stay as close as possible to real-life architectural constraints.

Other topics include how to deconstruct an environment into lightweight visual modules to be able to polish them by adding unique visual elements: clutter, decals, and more. Finally, how to then reorganize the modules into large, memory-intensive environments, and the limits of current real-time technologies and their workaround.

Pitfalls of Designing a Navigable 3D Interactive World

Why do most game environments feel so different from their real-world counterparts? To answer that, we need to look into the character controller, camera controller, and their relationship with the environment.

Our game switches regularly from a third-person perspective to a single-player perspective, or from a camera inside the head of the protagonist, to a camera about 1.5 meters behind the character. (This distance varies from one game to another.) Our character can also take cover in most surfaces in the game. This means he can hide behind walls and sofas and cars and be shielded from bullets, or hide from the enemy’s sight. This leads to a ton of rule sets that have nothing to do with real-life architecture, because of course, in life, cars and sofas are not designed to help an Interpol agent sneak his way through a bank. But as game designers, and environment designers in a game, we must create the environments with that in mind.

Another constraint is that not only does the player need to navigate, but the character living in that world needs to navigate alongside the player.

Example of world dimension constraints sheet produced for our team.
Example of world dimension constraints sheet produced for our team.

For example, in life you would need a stairway to be at least 36 inches wide to make sure two people could reasonably meet in a staircase, pass each other, and go on their way. In our virtual world, for various reasons, that stairway is more than twice as wide, at two meters. This leads to mismatching dimensions between interior and exterior environments.

Because of these sets of rules, the free space on both sides of a door must be at least one meter. And the door itself is 1.4 meters. The stairway needs to be at least two meters wide. Imagine a single door in your home. Imagine being forced to add one meter on each side, now propagate that change throughout the house.

Then propagate the extra width of the stairs. Imagine a hallway needs to be at least 3.5 meters wide, because in our game, the Interpol agent needs to be able to take cover behind a plant and have a camera 1.5 meters behind him that “looks” at the scene. Imagine that the space between the bed and the wall needs to be either zero meters (right next to the wall) or two meters (to accommodate navigation).

A Small Apartment
The smallest apartment in our game.

And imagine doing this in an apartment that needs to represent a futuristic dystopia, in a very small, undignified area. You end up with a single bedroom apartment that is about 12 meters long and 12 meters deep — the kind of living space you probably cannot afford if you live in San Francisco or New York, but somehow, it’s the smallest possible environment we can give to a “down on his luck, punk, low-life vagrant.”

An Interior EnvironmentAn Exterior Environment

Exterior environments are generally easier to deal with, as we are used to a larger frame of reference. But since the interior apartments are too big to fit within the exterior façade of the building, we have to cheat, and this leads to other complications. Because of this mismatch, we cannot produce some environments.

We spend a lot of time trying to make our environment as architecturally credible as possible. And Deus Ex’s environment is meant to be a very large “dollhouse” where we want the player to do what they want to do. We do not hold their hand. The sense of freedom we give to the player is very important. So, it is sad when we need to place a door somewhere that cannot be opened. We don’t like nonfunctional doors. It’s a boundary that jumps in the face of the player and screams, “Here is where we stopped building this virtual world!”

A nonfunctional door

In the above example, we are on the third floor of an apartment building, visiting what we call a micro-apartment — a single room apartment with the smallest possible area and a bathroom (not visible in the screenshot). These are not accessible by non-playable characters, so we cheat the dimensions to create such a small environment. Notice the door. It cannot be opened. Our agent went in there by jumping super high, grabbing onto the balcony, and crashing through the window. There is no “normal way” for the player to enter this apartment. And we cannot make a normal way. That door is only present for credibility. It is necessary because conceptually, if there is no door, how would the guy living there get into his apartment?

A hallway in DXMD

In the case of DXMD, we would have the time to produce most environments that are hiding behind doors. But we cannot, because there is likely not enough room behind a given door. The dimensions required for this to work would mean that from the outside, a building would be at least twice as large as you’d expect it to be in life. We would not be able to build the stairway, and make it fit with the actual layout of the virtual city itself. And we don’t want the city itself to be infinitely large. The city itself is not respecting the actual layout of the city for believability reasons.

While we try to avoid screaming to the player, “This is where we stopped building the world,” at some point we have to stop building the world: obviously we cannot build infinite worlds. Sometimes, in other types of games, the city is based on an island, so the limitations are natural. Other times, we build big walls with big invisible collisions. We call these “world boundaries.” In our case, we try to hide the world boundaries. And we do this by looping the city’s layout.

In Human Revolution, our previous game released in 2011, we tried to dress up the world boundaries to justify them. For example, a street became a highway and went into a tunnel, and an eternal traffic jam was stuck there. This backfired, because it doesn’t make sense to see no car circulating ever, and then see a ton of cars stuck in the entry of a tunnel for some reason. So everyone understood the real reason for this meaningless traffic jam.

A Tunnel

By dressing up this world boundary, it actually screams more loudly to the player, “This is where we stopped building our world.” In DXMD, there is no end of the road. Every street you take will loop back onto another street. You will never get to an end. You will never get to a point that says, “Here is where we stopped building this.”

Conceptually this makes no sense, as it means there is no way in or out of the city. But this is less obvious to the player because they never see a hint of it. And as such we went with that. The suspension of disbelief is better protected this way.

A plaza

The city is not constructed based on an actual layout of the city, because this would be too big a constraint to the level designers, who are tasked with creating the challenges and scripting the missions for the players in that city. So, we just accept that we are creating a fictional city, and the level artists try their best to convey a sense of architectural credibility to make it believable.

Deconstructing an Environment into Lightweight Visual Modules

There are many environments in Mankind Divided, but by far the most complicated environment is Prague. The density and size of our virtual Prague makes it a significant technical challenge to achieve with today’s hardware. So, we’ll continue with this example.

Anything That Can Be Repeated, Should Be Repeated

Architecture generally has a whole lot of repeating patterns. Even modern parametric architecture usually revolves around modifying a pattern with a given algorithm. Today those algorithms are already getting complicated enough in life to say we can’t repeat them easily as mathematical constructs inside a game engine. But if we are creating a large enough environment, we cannot simply save every single building as individual custom meshes that have been generated with offline algorithms. We need to figure something out.

Vertices cost memory, and we don’t have that much memory, even on a current gen console. Everything that is easily repeatable should be saved once, and repeated as much as needed.

Dividing a Building into Submeshes

Vanilla building

We often use this vanilla façade (left) in our city. It is subdivided in meshes. We call this instantiation. It is common in the industry and is quite like the Reference function in 3ds Max. Each of the meshes are saved once in memory, and then only the different locations of each instance are saved in memory. Given that a single column on this façade is pushing about 1,000 vertices, each with their saved location, indexes, and normal information, it is much better to repeat this set of data five times by only modifying the base location, and then reapplying the very same set of data at each instance location.

Instanced assets

We then push this a bit further. In our engine, Dawn, we can output any single parameter of pretty much any kind of resource to be modified at runtime, at any point in the game. We use this to modify each instance. So, we do keep the same set of data, then we simply modify one parameter to change something — anything: the color of the diffuse, the actual texture diffuses inside a material, the way it reacts to light depending on whether it’s wet or dry outside.

Module variants

Nighttime variants

Then rendering pushes this further still. Not only is this saved only once in memory and reapplied multiple times inside the environment, but we are doing what we call instanced rendering, where we agglomerate all those instances inside the same draw call. This is a significant optimization that is entirely credited to the engineers. In the end, this is how we fit 13,500 draw calls inside a more possible limit of 4,500.

Extreme clutter

Want more? Download the full class handout to read on. 

Hubert Corriveau is a computer artist based in Montreal, currently working in video games. Hubert started working in architectural previsualization back in 1999, then transitioned to adventure video games featuring prerendered visuals in 2001. He has worked at various studios including Gameloft, Microids, and Ubisoft, and is currently the environment director on the Deus Ex franchise at Eidos-Montreal.