Thursday, June 16, 2016

APB Reloaded: Weapon Pipeline Overview

Hello Citizens,

As most of you know, APB Reloaded is now available for the Xbox One. There's still time to join in the fun and earn yourself a nice Founders pack, which contains all you need for your gaming pleasure.

We received great feedback from our Character Pipeline Overview post that was done a few weeks back. The team wanted to provide you all with a little insight on how we create the weapons you all use when playing APB. Without further ado, I pass the remainder of this post over to our talented art department.

Concept and Proxy

The initial design and concept for a new weapon is usually centered around a new mechanic or unique visual design we’d like to incorporate into the game. The design space we have to work with is somewhat limited however, as each new weapon must currently use the existing animations/sockets and materials/skins.

Once we have settled on a weapon we typically design unique variations to maximize resource usage and to offer more options. These unique variations often introduce new optics, stocks, foregrips/handles, etc.

A typical concept may look like this:

Once we’re happy with the concept we now need to create a simple 3D model, or proxy, that can represent our weapon in game for testing. This is an important step as the new weapon must conform to the existing animations and varied character mesh sizes. We also need to test any unique aspects of the design, such as unique fore-grip elements.

If things don’t fit or feel right once in the game, we can adjust the proxy mesh on the fly until we achieve a nice balance between the concept and in-game practicality.

The proxy mesh for the Medusa:

The Medusa has a unique handle that is angled at 45 degrees from the main foregrip. This means we needed to test that the animations would still work as expected with the hand in this new position.


Using the concept art and the proxy model as a reference, the first stage of the final asset’s production is to create a high poly model of it. The high poly will be used to bake Normal and Ambient Occlusion textures for our in-game, low poly mesh.

Given the low triangle count and texture resolution of the final product, the high poly needs to incorporate large visual elements whilst still containing as much detail as possible.

The High poly model of the Medusa:

The details here are exaggerated and simplified to give them more resolution when baked down to a low resolution texture.

Creating the low poly and baking down the details from the high poly is where the real fun begins. With a poly count for weapons ranging from 500 – 1,500 triangles and final texture resolution of 256x256 – 512x256 pixels, it can be difficult to balance the details between the normal map and mesh. On top of this the same texture and triangle budget is shared with the variations designed in the concept.

The low poly mesh for the Medusa:

Textures and Masks

UV mapping APB’s weapon meshes can be tricky, as we have little texture space to spare given our budget. Any extra space we can get out of our UV map means more space for texture details.

A lot of mirroring and reusing elements occurs here to help save space. Such as the foregrip handle on the medusa which is mirrored twice breaking it into quarters. And the receiver which is mirrored but the large unique details of one side, like the feed guard, are built to sit over these mirrored features.

The normal map comes next, and is baked down from the high poly to low poly directly in 3DS Max. There is some trial and error here, making sure the details are being picked up well enough, making sure the UVs aren’t stretched and that any mirrored/reused elements are showing up ok.

The low poly mesh with the normal map generated from the high poly:

Due to the vast number of skins and material types available to weapons in APB, we use instances of a super shader for weapon materials. Using instances of a parent shader minimizes the impact on resources, but also means we don’t have the full freedom of a unique material. Because our weapon skins can range greatly in material type (Gold, Chrome, Wood, etc.) and be unique in color and texture, our weapons don’t have a dedicated diffuse map. Instead we use an ambient occlusion map (detail and shadow map) to help the details stand out, but this contains little color or detail typical of a diffuse map. As such, we rely on masks to break a model up so the shader can apply the correct information to the weapon. For example, we distinguish unique elements like the handle, the receiver, the stock, the sight, etc.

The masks for the Medusa:

The Medusa with the normal map and the ambient occlusion map:

Completing the look of the weapon after this point takes place in the editor.

Editor Setup

Setting up the weapon in the editor is straight forward but time consuming. After creating a package for the weapon, we need to create an instance of each material (weapon skin) available to date. Each of these materials will need to be edited to use the new weapon’s textures and masks. In some cases materials need to have parameters changed so the skin will fit and line up with the new weapon correctly.

Material editor:

The final result after plugging in our textures and masks into the JMB material:

Archetypes come next, and while very time consuming, these are very important and have to be correct as they tell the game which model and which skin to load when required. A copy is made of the weapon for each possible skin that weapon can use. Then a unique Archetype, or reference, is created for each one.

Weapon Archetypes:

Custom skins
Sometimes as JMB exclusives or unique items to be used across all weapons, we need to create unique skins. This process is quite complicated as any new skins we create need to be used in conjunction with the existing parent shader and the unique masks that were created for each weapon.

Skins usually consist of 1 or 2 elements. A unique pattern, a tiled texture that is applied uniformly to the weapons, and sometimes a unique feature element such as the faces on the casino skins or the Medusa skin.

Take one of the casino skins for example:

Once an instance of the parent shader is created with the new skin’s textures, we then create a copy of that material and place it in the package of each weapon that needs to be able to use it. Each copy then needs to have the corresponding textures and masks added for that particular weapon. Then by tweaking certain exposed parameters we can adjust and fine tune the placement of these new patterns/features for each weapon. This is a very time consuming task, but allows us to create new weapon skins without having to create custom textures for each weapon.

Getting it into game

At this point all the archetype information gets plugged into an .sdd table as part of the game’s main asset database. After some initial checks in game, the weapon is then handed off to a designer who will decide on the weapon’s final game play attributes.

I want to thank the Art team for taking the time to provide you all with inside on how we do things here at Reloaded.

That's it for now Citizens, be safe till next time.