TressFX Hair使用了DirectCompute编程语言,结合AMD GCN架构(Radeon HD 7000系列)的强大并行计算能力,可以理解成将头发渲染的工作部分转到了后期处理中。AMD还利用了此前的顺序无关透明(OIT)技术,使用“Per-pixel Linked List”(每像素链接清单/PPLL)数据结构来管理渲染的复杂性和显存使用。
TressFX Hair就这样构建了一套实时物理模拟系统,将每一根头发作为几十条链接中的一环,让重力、风雨、头部运动等因素以更真实的方式描绘头发。还有碰撞检测机制,确保发丝不会彼此穿越,或者跑到头皮、衣服、身体等其它实体表面之下。
此外,头发在受到外力影响而发生变化之后,会逐渐回到最初状态。
Bad Hair Days
Since the dawn of the 3D era, characters in your favorite games have largely featured totally unrealistic hair: blocky and jagged, often without animation that matches your character’s movements. Many games have attempted to disguise the problem with short haircuts, updos, or even unremovable helmets. But why? Simply: realistic hair is one of the most complex and challenging materials to accurately reproduce in real-time. Convincingly recreating a head of lively hair involves drawing tens of thousands of tiny and individual semi-transparent strands, each of which casts complex shadows and requires anti-aliasing. Even more challengingly, these calculations must be updated dozens of times per second to synchronize with the motion of a character.
A New Frontier of Realism
Lara Croft is an iconic character with an equally iconic ponytail. Re-imagining Lara and her haircut for the 2013 release of Tomb Raider wasn’t just an opportunity to modernize the character, it was an opportunity to substantially advance in-game realism by tackling the long-standing challenge of unrealistic hair. Through painstaking collaboration between software developers at AMD and Crystal Dynamics, Tomb Raider proudly features the world’s first real-time hair rendering technology in a playable game: TressFX Hair.
The Science of TressFX Hair
TressFX Hair revolutionizes Lara Croft’s locks by using the DirectCompute programming language to unlock the massively-parallel processing capabilities of the Graphics Core Next architecture, enabling image quality previously restricted to pre-rendered images. Building on AMD’s previous work on Order Independent Transparency, this method makes use of Per-Pixel Linked-List data structures to manage rendering complexity and memory usage.
DirectCompute is additionally utilized to perform the real-time physics simulations for TressFX Hair. This physics system treats each strand of hair as a chain with dozens of links, permitting for forces like gravity, wind and movement of the head to move and curl Lara’s hair in a realistic fashion. Further, collision detection is performed to ensure that strands do not pass through one another, or other solid surfaces such as Lara’s head, clothing and body. Finally, hair styles are simulated by gradually pulling the strands back towards their original shape after they have moved in response to an external force.
Graphics cards featuring the Graphics Core Next architecture, like select AMD Radeon HD 7000 Series, are particularly well-equipped to handle these types of tasks, with their combination of fast on-chip shared memory and massive processing throughput on the order of trillions of operations per second.