top of page

Diablo IV

Mar 2020 - Aug 2021
Blizzard Entertainment

Proprietary Engine
Platforms: PC, Xbox, PlayStation

Vista Map System

Design

Design pitch aimed at solving the issue of motiving players to explore the majority of World Regions.  The ideas below form a core exploration loop that feed back into the game's systems in meaningful ways and give players a consistent set of rules for discovering Open World content.

System Overview
  • A Vista Goal marker is placed on the player's map upon entering a new Region.

  • Region map details remain hidden until player reaches Vista Goal.

  • Discourage straight line paths to the Vista Goal is key.
     

  • Players must explore around the Region in order to find a path leading to the Vista. 

As players work their way along various paths toward the Region's Vista they discover lots of new gameplay content.

Once the player arrives at the Region's Vista they are granted several key benefits such as unveiling the Region map showing the location of all Region Towns and key areas to visit next.

Town Stages

Design

Design pitch given to address multiple key issues discovered during playtests.  Players felt that the following aspects of the game were missing or underdeveloped:

System Overview
  • Town Stages is a set of rules that merges the above aspects of gameplay into a single system that's easy to understand and reuse. 

  • Near each Town are a number of "Sources of Evil" indicated by the number of flames above each Town icon shown on the player's map.

  • In order to unlock Town services, purchase new items, and acquire Quests, players must hunt down and clear the Sources of Evil affecting each Town.

Map Progress Indicators

The player's map shows Towns at different Stages allowing them to prioritize which Town to help next.  Town icons show the number Dungeons and Enemy Camps left to find in the Region allowing player's to track their progress.

Stages of Development

As the player locates and clears Sources of Evil near Towns, the Towns level up and more Services, Items and Quests become available to the player.

Volumetric Clouds

Programming

Diablo IV features periodic views of expansive environments and epic skyscapes.  My goal in implementing the game's cloud system was to give artists full control in crafting dynamic skies that could be tuned for mood and tone, and take into account changing weather conditions across the game's large open world.

The cloud system in Diablo IV features a wide array of control for tuning things like cloud shape, color, lighting values, velocity, precipitation, and sky curvature.

My implementation was based on the successful work done previously by Andrew Schneider on Horizon: Zero Dawn which proved high fidelity cloudscapes could be rendered in real-time within a tight frame budget and offer lots of parameterized control.

Data Inputs

The main inputs for creating cloud shapes was packing Perlin-Worley noise and layered Worley noises into the RGBA channels of a 128^3 3D texture. This 3D texture was repeated across the sky for use with raymarching when building up cloud shapes from the different noise frequencies.

A two-channel Weather Texture was laid across the sky to give artists manual control of where clouds should be located and of what type.  The Red Channel specified the chance of clouds in that part of the sky, and the Green Channel specified the type of cloud: 0 - Thin Stratus, to 1 - Large Cumulonimbus.

Optimizations

Integrating up to 128 ray-march samples per pixel was costly for rendering clouds.  To combat this, temporal shading was used to update 1/16th of cloud pixels each frame, with the full resolution clouds being averaged over time.

A lower resolution buffer was used to update 1 pixel every frame for every 4x4 quad of the full resolution cloud render target.  Each frame, updated results from the lower resolution buffer were blended on top of the full resolution target using a running exponential average to smoothly update clouds results over time. 

Slow motion time lapse of temporal shading in action where 1 pixel of every 4x4 quad of the cloud render target is updated resulting in a full cloud image every 16 frames.  This optimization led to a huge10x performance improvement in cloud rendering.

References:

  1. Andrew Schneider, "Real-Time Volumetric Cloudscapes", GPU Pro 7, pp.97-127, CRC Press, 2016.

  2. Andrew Schneider, "The Real-Time Volumetric Cloudscapes of Horizon: Zero Dawn", https://www.guerrilla-games.com/media/News/Files/The-Real-time-Volumetric-Cloudscapes-of-Horizon-Zero-Dawn.pdf, 2015.

Volumetric Clouds

Specular Anti-Aliasing

Programming

Dungeons in Diablo IV are lit with direct lighting that can cause flickering specular highlights as the camera moves past smooth surfaces with lots of normal map detail such as cracked ice, rocky mud, and water. 

My goal in implementing the game's Specular Anti-Aliasing was to smooth away the overly bright spots on detailed surfaces without requiring extra authoring by artists or additional run-time cost.

My solution was based off the specular anti-aliasing work previously done by Danny Chan on Call of Duty: WWII ⁽¹⁾, which showed a novel way of filtering normal and roughness maps offline during MIP-Map generation that baked in extra roughness in areas with more normal variation.

MIP-Map Generation

During each step of MIP-Map generation the previous MIP level's normal and roughness values are used to compute a filtered roughness and normal for the next MIP level that reduces Specular Aliasing.

(a) - Reading two Roughness values from the previous MIP-Level.

  • Left value is "rough" with microfacet normals aligned in a more spread out set of directions.

  • Right value is "smooth" with microfacet normals aligned closely together in a smaller set of directions.
     

(b) - Reading two Normal directions from previous MIP-Level.

(c) - The two roughness and normal values from previous MIP-Level are used for subsequent steps.

(d) - Resize each normal based on a "Roughness to Shorten-Normal Length" look-up table. 

  • Based on microfacet theory, where microfacets of rougher surfaces align more randomly which gives a shorter average normal direction than smoother surfaces.
     

(e) - Average the shortened normals (blue) to form a new normal (green) for the current MIP-Level.

(f) - Convert the new normal (green) to roughness, and renormalizing the new normal for the current MIP-Level.

Results of applying the above process repeatedly at each level of MIP-Map generation. Extra roughness is added for areas of greater normal map variation which is propagated down the MIP chain allowing for increasing amounts of Specular Anti-Aliasing at higher MIP-Levels.

References:​

  1. Danny Chan, "Material Advances in Call of Duty: WWII", Advances in Real-Time Rendering in Games Course, SIGGRAPH, https://advances.realtimerendering.com/s2018/MaterialAdvancesInWWII.pdf, 2018.

Area Lights

Programming

An early request from lighting artists during Diablo IV development was to the ability to add wide light sources to environments with more control to soften overly bright specular highlights.

Having worked in Unreal Engine previously, I knew of Brian Karis' work ⁽¹⁾ approximating Area Lights that fit our team's requirements perfectly.  Below is an in-game screenshot of my implementation of Area Lights using Brian's method which allows artists to change the radial size of Area Lights along with a smoothness bias to spread out specular highlights.

References:​

  1. Brian Karis, "Real Shading in Unreal Engine 4", Physically Based Shading in Theory and Practice, SIGGRAPH, https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf, 2013.

Specuar Anti-Aliasing
Area Lights

Soft Shadows

Programming

Early feedback revealed that dark dungeons with a bright player light caused sharp shadow edges of enemy mobs to move rapidly across the screen making gameplay disorientating at times.

To combat this I implemented a Soft Shadow technique for the player light that softens shadow penumbras more the farther the shadow is from the object casting the shadow.  This way, as shadows grow in size further from the player they also become softer and less noticeable under fast motion.

My implementation was based on recent techniques for rendering percentage-closer soft shadows ⁽¹⁾ ⁽²⁾.

A cube shadow map from the omni-directional player light is first constructed.  This shadow map is then fed into a lighting pass which performs an 8x8 blocker search to estimate the width of the shadow penumbra for the currently lit pixel.

The penumbra width is then used to perform multiple Percentage-Closer Poisson Samples of adjacent shadow map MIP levels.  The shadow results are then blended together using cubic Bézier interpolation.

Debug visualization of shadow penumbras determined by 8x8 shadow map blocker search per pixel.

Filtering the final shadow results for various penumbra width sizes along the shadow.

References:​

  1. Randima Fernando, "Percentage-Closer Soft Shadows", SIGGRAPH, https://developer.download.nvidia.com/shaderlibrary/docs/shadow_PCSS.pdf, 2005.

  2. Sikachev et al, "Next-Generation Rendering in Thief", GPU Pro 6, pp.79-84, CRC Press, 2016.

Soft Shadows
Vista Map Sytem
Town Stages
bottom of page