Home STUDIO GAMES NEWS CAREERS PLAYTESTING STUDIO GAMES NEWS CAREERS PLAYTESTING

Innovating Strand by Strand for Lifelike Hair in Dragon Age: The Veilguard

Strand Hair technology adds visual fidelity and realism to characters, and it redefines what’s possible in Dragon Age: The Veilguard

November 12, 2024

In the fantasy world of Thedas, where heroes rise and legends are forged, every detail breathes life into an epic saga. Dragon Age: The Veilguard introduces players to a crafted and beautiful world where even the finest elements like strands of hair tell a tale of their own.

Each strand of hair weaves seamlessly into the fabric of the game, enriching your character’s journey through treacherous labyrinths and beyond. Together, the Frostbite and BioWare teams embarked on a quest to elevate Strand Hair technology, focusing on the following elements:

  • 50,000 individual strands per character for over 100 hairstyles – EA’s Strand Hair technology brings natural motion to your hero’s hairdo in Dragon Age: The Veilguard.
  • Adaptable to various character movements and environments – Frostbite and BioWare pushed the limits of hair rendering, achieving realistic material response and shadows. This collaboration introduced detailed, physics-driven hairstyles tailored to the unique world of Dragon Age.
  • Industry-leading realism – Dragon Age: The Veilguard sets a new standard for lifelike character hair at 60 FPS on PlayStation®5, Xbox Series X, and PC with compatible hardware, showcasing EA’s leadership in innovation and BioWare’s craftsmanship in enhancing immersive storytelling.

This is how Frostbite and BioWare brought Strand Hair technology to the next level, letting you be the hero you want to be as Rook in Dragon Age: The Veilguard.

Weaving Magic Into Reality

Harnessing the power of the Frostbite engine, Strand Hair technology transforms your character's locks into a living tapestry of thousands of individual strands. Strand Hair technology combines physics with real-time rendering to simulate believable modeling of human hair.

Incorporating realistic hair within games is quite challenging, which is why Frostbite has already spent years advancing hair rendering technology. Strand Hair was featured in previous EA SPORTS FC™, Madden NFL, and NHL titles, but the technology is always being upgraded for new releases.

While Strand Hair is present in other EA games, the BioWare team had to push the limits even further for Dragon Age: The Veilguard. For example, implementing Strand Hair technology for characters who have waist-length hair with horns on their head presented some unique challenges.

With hair attachments that move seamlessly, and the decoupling of simulation and render tessellation, this is the first EA game to offer such detailed physics-driven long hairstyles. The Frostbite team increased maximum hair length from 63 points to 255, and implemented a new system for complex hair structures like braids.

Frostbite and BioWare also collaborated to achieve accurate hair material response and shadows across diverse lighting environments. Strand Hair technology in Dragon Age: The Veilguard features a new hair lighting model with improved light transmittance and visibility calculations.

Dragon Age characters can have various builds and physical traits, each with unique hairstyles that adapt seamlessly to different garments and dynamic movements. Whether jumping at high speed in combat, slowing time, or going prone, the hair responds fluidly while maintaining realism across all scenarios.

A Heroic Collaboration With Trials and Triumphs

The evolution of Strand Hair technology has been a collaborative journey, beginning with Frostbite’s partnership with the EA SPORTS FC™ team that pushed the tech to a shippable state. Frostbite continues to refine and enhance this innovation, bringing its magic to titles like Battlefield 2042, UFC 5, College Football 25, and now, Dragon Age: The Veilguard. 

The Frostbite and BioWare teams worked closely together to get Strand Hair tech within Dragon Age: The Veilguard. The engineering team played a huge role in making sure hair looked good in new scenarios, like being surrounded by magical particles, underwater, or interacting with waterfalls. Their tireless work made these complex interactions both performant and robust.

“The collaboration between Frostbite and the BioWare engineering team was key to supporting complex hairstyles. Advancing the technology for intricate styles and optimizing performance ensured that specific moments, like when hair covers a large percentage of the screen in certain cinematics, run smoothly.” – Maciej Kurowski, Studio Technical Director, BioWare

Together, they tackled challenging lighting conditions and pushed the limits of strand length and tessellation, achieving hair designs far more complex than any previous EA title.

Complex Hair Rendering and Enchanting Visual Magic

A major difference between Dragon Age: The Veilguard and existing Frostbite titles that have shipped with Strand Hair is the sheer variety and quantity of visual effects and transparent objects. From magical spells to smoke, fire, and fog, the technology needed to blend seamlessly into the environment and magic of Thedas.

Strand Hair is not rendered like traditional objects are within Frostbite. The technology utilizes a bespoke compute software rasterizer and is composited into the frame and blended with other opaque and transparent objects when resolved.

Due to the complexity and uniqueness of the software rasterizer, the hair supported limited options for blending with the game world and characters. It was specifically designed to favor blending with depth of field, which is an important broadcast camera technique used in sports games.

This did not blend well with transparent objects, which while few in sports titles, are extremely common in Dragon Age: The Veilguard. Thus, the BioWare team needed to develop a new technique for blending hair with transparent visual effects and environment effects like volumetric fog and other participating media.

This technique involves splitting the hair into two distinct passes, first opaque, and then transparent. To split the hair up, we added an alpha cutoff to the render pass that composites the hair with the world and first renders the hair that is above the cutoff (>=1, opaque), and subsequently the hair that is lower than the cutoff (transparent).

Before these split passes are rendered, we render the depth of the transparent part of the hair. Mostly this is just the ends of the hair strands. This texture will be used as a spatial barrier between transparent pixels that are “under” and “on top” of the strand hair.

A rough outline of a video game character showing its transparent depth texture.

Transparent depth texture, note the edge of the hair.

Once we have that texture, we first render the opaque part of strand hair, and then we render transparent objects. The shaders for the transparent objects use the transparent hair depth texture to determine whether the shading pixel is “under” or “on top” of the strand hair. If it’s below, it renders the hair and marks a stencil bit (think of it as a masking texture). If the pixel is “on top” or equal to the hair, it simply discards that pixel and renders nothing.

After we’ve drawn the transparent objects once, we then draw the transparent hair since we are sure that there are no transparent objects ‘under’ the hair that have not been rendered yet.

Finally we draw the transparent objects again, this time checking that stencil mask to see where we did not draw the transparent objects before, thus layering the pixels of transparent objects that are on top of the hair properly. This results in perfect pixel blending with transparent objects. – James Power, Senior Rendering Engineer, BioWare

A picture showing  a video game character rendered with and without "Layered" transparency.

Left, without “Layered” transparency. Right, with “Layered” transparency.

Another challenge the BioWare team faced was handling the wide range of cinematic lighting rigs used for cutscenes, which must be rendered in real time in order to support customizable characters and followers.

Because pre-rendering cutscenes was not possible, performance in cinematics was still paramount to the technical vision for the product. The team also wanted to maintain the same consistent frame rate across gameplay and cinematics to avoid jarring transitions if the cinematics were to be locked to 30 FPS. 

With that in mind when lighting scenes, there needed to be support for a wide range of lights that would be less computationally expensive to render, but would have extreme consequences on the quality of hair self-shadowing. This is a major contributor to the overall quality of the hair.

Any given Strand Hair object, which has tens of thousands of individual thin hair strands, requires high quality shadow maps in order to have good coverage of the hair strands in the resulting shadowmap texture.

Wide angle lights, distant lights, and non-shadowcasting lights do not provide adequate coverage (or no coverage at all, in the case of the non-shadowcasting lights). When the lighting routines are run, the hair would occupy a low amount of pixels in the shadowmap. 

When attempting to calculate light transmission inside the volume of hair, the fidelity would be poor, resulting in flat shading lacking detail near the edges of the hair where a fine gradient of light transmission is expected.

To solve this, hero shadows are rendered for every Strand Hair object and every light that lighting artists designated as important to the shot. These hero shadows are generated at run time, using a tightly fitting light frustum that is adjusted to each hair’s bounding box, ensuring there are high fidelity shadowmaps. 

When applying shadows to the hair, we test to see if a shading point is in the hero shadow or the regular shadow (since the hair will not be in both) and composite the final results.

A picture showing  a video game character rendered with and without Hero Shadows.

Left, Bellara rendered without Hero Shadows. Right, with Hero Shadows. Note the differences in fidelity of transmission on the left side of the character head.

Harnessing Efficiency With Performance and Memory

Throughout development, Dragon Age: The Veilguard aimed for high performance and strict memory requirements across all platforms to ensure players have a smooth and scalable experience. 

Strand Hair is a memory and GPU dependent rendering system. Optimizations needed to be made in order to conform to the limited amount of system resources available for the following considerations:

  • Strand Hair assets, especially those with high strand counts and tessellation settings (which are necessary for the complex hair BioWare authored for both followers and Rook alike), have a high memory footprint.
  • The system is designed to allow for a large number of Strand Hair assets, but this comes at the cost of additional memory allocations to support the number of characters on field in other titles like EA SPORTS FC™.
  • For Dragon Age: The Veilguard, the team had a lot of control over which characters are on screen, and how many hair assets are supported. BioWare developed a system to control how large these allocations are to tightly fit the number of hair assets for the best possible memory utilization.

On average, there is a flat GPU cost of around 128MB of GPU memory for the full field of followers (eight hair assets).

Outside of this fixed memory cost, the system can dynamically adjust the size of system memory, GPU memory, and group shared memory in compute shaders using custom permutations with set thresholds. 

This provides the ability to scale additional memory costs from 300MB to 600MB depending on quality settings and resolution. Both Xbox Series X and PlayStation®5 sit at around 400MB depending on the number of characters and the assets loaded, as they each have their own memory costs. 

These costs are dynamically adjusted due to hair needing less memory to occupy less pixels. Lower resolutions (or lower dynamic hair resolution on lower quality settings) can get away with smaller buffer allocations for many of these per-frame costs without sacrificing any image quality. 

This work was especially important for PC due to the wide array of available graphics memory on GPUs available to consumers. This amount of memory being allocated per frame can push the GPU into demoting or paging memory, which can result in significant performance loss and hitches.

For lower quality settings on PC, as well as Xbox Series S, swapping out Strand Hair assets for Card Hair assets is supported. These assets have significantly lower memory footprints and allowed the team to push for higher fidelity on systems that can handle the load without sacrificing performance on lower end systems.

To achieve the performance requirements of Dragon Age: The Veilguard, BioWare implemented a number of scalable performance features that are applied across various quality settings on PC and performance modes on consoles.

Strand Hair is normally rendered at render resolution and is unaffected by upsampling technology such as NVIDIA DLSS, AMD FSR, or Intel XeSS. Therefore it does not scale as well with other render features when those settings are applied. 

To ensure great performance across all configurations, BioWare implemented technology that scales the hair render resolution for a set of minimum and maximum targets based on said render resolution. 

Hair rasterization performance scales fairly aggressively with resolution and screen coverage. As hair covers more of the screen, a larger primitive count is required to render the strands at adequate detail. This requires both more memory and GPU resources. 

To ensure we meet our frame time requirements, we set a maximum frametime budget for strand hair rendering for consoles at 6.5ms for 30 FPS (33.3ms frame time) and 3ms for 60 FPS (16.6ms frame time) with eight strand hair assets on screen. 

Our hair resolution control will adjust the resolution within a minimum and maximum resolution based on our upsampler and DRS settings and keep the hair costs proportional to those targets. This is important since hair does not go through upsampling, as mentioned earlier, and will not have its load reduced by those technologies.

Running hair simulation costs are also done on the GPU in compute, and change dramatically depending on the asset, but tend to hover around 2ms with some spikes to nearly 5ms depending on complexity of the hair and whether we are loading/teleporting new assets. This cost does not scale with resolution. 

We have a variety of systems for cinematics and gameplay that will disable simulation for hair assets off screen or far away and do not contribute to shadows that are on screen. Controlling simulation costs is largely done by cinematic designers ensuring their scenes do not go over budget. – James Power, Senior Rendering Engineer, BioWare

As mentioned earlier, BioWare’s Hero Shadows provide the hair with high fidelity shadow maps, but come at a heavy cost to GPU performance. 

Support for scalable hair decimation was added to combat this, allowing for the reduction of strand count when rendering shadows, thus reducing the cost of hero shadows. This enables lighters to use more of them, and support them for both 30 FPS and 60 FPS targets.

Head and Shoulders Above the Rest

Examples above describe only some of the improvements the BioWare and Frostbite teams worked on to redefine state of the art, real-time hair simulation and rendering technology for Dragon Age: The Veilguard.

This groundbreaking accomplishment underscores EA's innovative spirit and highlights BioWare's exceptional craftsmanship.

Whether you're uniting the Veilguard or facing the gods, the lifelike detail of your character's hair allows you to make this heroic story truly your own. As you journey through Thedas uniting companions and forging your legacy, remember that every detail down to the last strand of hair has been crafted to enhance your adventure.

Join the ranks of innovators shaping the future of gaming realms. At EA, we forge alliances and craft powerful tools like Strand Hair. Explore open roles and embark on your adventure!

Related News

Dragon Age: The Veilguard’s accessibility opens the game for everyone

Electronic Arts Inc.
Nov 21, 2024
Dragon Age: The Veilguard accessibility features allow players with different disabilities from around the world to enjoy the game.

GVGC partners with UNICEF for Game Changers Coalition

Electronic Arts Inc.
Nov 18, 2024
Bridging STEAM skill gaps, strengthening inclusive practices, and more.

EA Security - Keeping Your EA Account Safe

Electronic Arts Inc.
Nov 6, 2024
An update on EA Account safety measures, in partnership with Google.