Since introducing TressFX Hair in the smash hit Tomb Raider™ last year, we’ve been diligently working to optimize the technology, enable compatibility with more platforms, and add new features. Today we wanted to take a little bit of your time to tell you about what’s new with TressFX Hair, and where the technology will be going in the near term.

 

Before we dive in, however, a quick primer on the history of TressFX Hair feels warranted to set the stage. TressFX Hair was the world’s first real-time hair physics simulation in a playable game. TressFX brought an end to the era of short hair, fixed hairstyles, helmets and other unseemly workarounds structured to disguise the limited nature of hair technology.

 

In fact, TressFX Hair represented the first occasion that a hair physics technology had ever made an appearance on the PC outside of limited technical demos. AMD and Crystal Dynamics collaborated extensively to develop and optimize the technology for PC gamers, and to give Lara Croft the unabashedly contemporary look she deserved for a new chapter in her story.

 

tressfx.jpg

LEVERAGING AMD RADEON™ GRAPHICS ACROSS PLATFORMS

Over the past year, we at AMD have remarked on more than one occasion that bringing AMD Radeon™ Graphics and AMD APU technologies to life on multiple gaming platforms would pay dividends for gamers. That prediction came true with the remastered Tomb Raider: Definitive Edition for Xbox One™ and PS4™. In this revisiting, TressFX Hair made its debut outside of the PC space for the very first time.

“Getting TressFX Hair running on PlayStation® 4 and Xbox One™ benefited from the fact that AMD’s Graphics Core Next (GCN) architecture powers the graphics of these platforms,” said Gary Snethen, Chief Technology Officer of Crystal Dynamics. “We were already familiar with GCN from our collaboration with AMD on Tomb Raider, and that experience was instrumental when it was time to bring TressFX Hair to life on consoles with Tomb Raider: Definitive Edition.”

 

Citing the Graphics Core Next architecture2 as the motivation to broaden the audience for TressFX Hair is an important occasion, as it validated in practice the idea that a common architecture makes it easier to share code across the platforms targeted by a development studio. From another perspective, it shows gamers that this cross-platform simplicity enables new headroom to explore in-game effects—effects that may have gone unused in past generations due to insufficient ROI.

 

TALE OF TWO HAIRCUTS
TressFX Hair was certainly impressive from a visual perspective, but less discussed is the operational efficiency that compels appreciation on both technical and philosophical grounds. To put a fine point on that, we wanted to illustrate the actual performance impact of AMD’s TressFX Hair contrasted against NVIDIA’s Hairworks.

 

In the below diagram, we isolated the specific routine that renders these competing hair technologies and plotted the results. The bars indicate the portion of time required, in milliseconds, to render the hair from start to finish within one frame of a user’s total framerate. In this scenario, a lower bar is better as that demonstrates quicker time to completion through more efficient code.

 

tfx_tr_perf.png

 

In the diagram, you can see that TressFX Hair exhibits an identically low performance impact on both AMD and NVIDIA hardware at just five milliseconds. Our belief in “doing the work for everyone” with open and modifiable code allowed Tomb Raider’s developer to achieve an efficient implementation regardless of the gamer’s hardware.

 

In contrast, NVIDIA’s Hairworks technology is seven times slower on AMD hardware with no obvious route to achieve cross-vendor optimizations as enabled by open access to TressFX source. As the code for Hairworks cannot be downloaded, analyzed or modified, developers and enthusiasts alike must suffer through unacceptably poor performance on a significant chunk of the industry’s graphics hardware.

 

With TressFX Hair, the value of openly-shared game code is clear.

 

WHAT’S NEXT FOR TRESSFX HAIR?

As Crystal Dynamics worked to bring TressFX to other platforms, we have been busy developing an even newer version of our award-winning hair tech. In November we announced “TressFX 2.0,” an update to the effect that brings several notable changes:

  • New functionality to support for grass and fur
  • Continuous levels of details (LODs) are designed to improve performance by dynamically adjusting visual detail as TressFX-enabled objects move towards and away from the player’s POV
  • Improved efficiency with many light sources and shaders via deferred rendering
  • Superior self-shadowing for better depth and texture in the hair
  • Even more robust scalability across GPUs of varying performance envelopes (vs. TressFX 1.0)
  • Modular code and porting documentation
  • Stretchiness now respects the laws of physics
  • and numerous bug fixes!

 

Starting with grass and fur, implementing realistic physics for these objects is rather similar to hair: treat each strand as a chain, group chains together, and then apply an external force. There is obviously some voodoo at work to make grass and fur behave more like grass and fur, and rather less like long hair, but the principles are so similar that they’re a logical extension to TressFX’s capabilities.

 

In designing TressFX 2.0, we addressed a notable issue in our hair physics simulation: stretchiness. Extreme linear and angular acceleration of a fast-moving or fast-turning character could cause the hair sim to appear unnaturally stretchy. In very rare instances, the physics model could even prevent the hair from ever recovering its original length.

 

While AMD and Crystal Dynamics were largely able to overcome this problem by performing rolling iterations of a “length constraint” system in Tomb Raider, we wanted to fix it permanently and more efficiently. TressFX 2.0 addresses this issue head-on through R&D and the creation of a new General Constraint Formulation, which is designed to be considerably more accurate than the old model at dealing with the forces of acceleration on a head of hair’s global and local (per-strand) level.

Additionally, we overhauled the math behind the aforementioned “chain” structure of hair, grass and fur. We now use the Thomas Algorithm to evaluate the behavior of these objects, and this is notable because the Thomas Algorithm is very efficient and lightweight with respect to GPU number crunching. The end result for you: hair that behaves more realistically.

 

tressfx_math.png

Behind-the-scenes R&D work for TressFX 2.0; simplifying the TressFX Hair algorithm.

 

 

Next, we wanted to illustrate the impact self-shadowing (right) has on the texture and depth found in a head of hair:

 

shadowing2.jpg

 

Finally, we’ll take a look at TressFX 2.0’s LOD levels. As indicated earlier in this blog, a LOD level brings scalable detail to a system of 3D objects. As LOD-enabled objects move away from you, detail is reduced by a system that sustains the apparent quality for the player—you shouldn’t notice a thing if we do our job right! Inversely, when an object moves closer to you, the detail levels are slowly dialed up to maximum in a manner that, again, should be largely imperceptible to the player.

 

The primary benefit of a LOD system is an improvement in overall system performance. With LOD levels, the GPU needn’t render a full-detail head of hair when those details are beyond the visual acuity of the player’s position in the game world.

 

lod_levels.png


THE FIRST TRESSFX 2.0 GAME

Beyond improvements to the effect, many gamers have asked about the next game to use TressFX Hair, and I’m pleased to say it’s Lichdom: Battlemage! The team at Xaviant is making healthy use of TressFX Hair 2.0, and had this to say about their decision to adopt TressFX:

 

“TressFX Hair is the most impressive advancement in visual fidelity in the past 24 months,” said Michael McCain, CEO and Founder, Xaviant. “TressFX proved that significant leaps in realism are still possible, even in an age where many have expressed skepticism about the very possibility of such a leap occurring. The beauty, simplicity and performance of TressFX—especially compared to its alternatives—made it an obvious choice to augment the commitment to image quality we have for Lichdom.”

 

Lichdom: Battlemage prominently uses TressFX Hair to render the female version of The Gryphon, a companion/aid to the player when a male protagonist is chosen. Her short bob haircut moves and shines just as you would expect real hair to do.

 

 

A MULTI-PLATFORM WORLD

TressFX Hair took the PC gaming world by storm, chiefly because it demonstrated that 3D graphics needn’t be incremental improvements—big and unexpected leaps can still happen! We were (and still are) very proud of that fact.

 

TressFX Hair also demonstrated the power of being transparent with your code when working with game developers. By collaborating so closely with Crystal Dynamics on TressFX Hair, we were able to make the technology efficient for all hardware, quickly incorporate the lessons and feedback from Tomb Raider™ into the 2.0 version TressFX, and make those improvements publicly available in source code form for adoption in games like Lichdom: Battlemage!

 

Finally and excitingly for gamers everywhere, Crystal Dynamics’ decision to adopt TressFX Hair for Tomb Raider: Definitive Edition shows that cross-pollination between PCs and consoles is not only possible, but happening right now and improving the overall experience on all platforms.

 

SUPPORTING RESOURCES

 


Robert Hallock does Technical Communications for Gaming & Desktop Graphics at AMD.  His postings are his own opinions and may not represent AMD’s positions, strategies or opinions. Links to third party sites, and references to third party trademarks, are provided for convenience and illustrative purposes only. Unless explicitly stated, AMD is not responsible for the contents of such links, and no third party endorsement of AMD or any of its products is implied.


FOOTNOTES:

  1. All performance evaluation conducted on the following platform: Intel Core-i7 4960X, ASUS X79 Sabertooth, 16GB DDR3-1866, Windows 8.1 x64. AMD Driver: 14.2 Beta 1.3. NVIDIA Driver: 334.89. Settings: 1920x1080, maximum in-game quality preset.
  2. >Select AMD Radeon graphic cards are based on the GCN Architecture and include its associated features (AMD PowerTune technology, AMD ZeroCore Power technology, PCI Express 3.0, etc.). Not all features are supported by all products—check with your system manufacturer for specific model capabilities.

 

 

*Originally posted by Robert Hallock in AMD Gaming on Sep 23, 2014 10:33:39 AM