Tressfx 4.1/Engine Integration Developer Guide
Total Page:16
File Type:pdf, Size:1020Kb
[AMD Public Use] TRESSFX 4.1/ENGINE INTEGRATION DEVELOPER GUIDE For AMD TressFX/Epic Games Unreal Engine Integration and AMD TressFX/Radeon™ Cauldron (DirectX® 12/Vulkan® framework) implementation THIS GUIDE: • Describes new features of the TressFX integration into Unreal Engine 4.22 (branch available to developers with an Epic Games EULA/GitHub account) and AMD Radeon Cauldron (GPUOpen); • Documents shader parameters, architecture, new features, Maya Exporter, and more; • Includes basic tutorials for creating hair, using TressFX Exporter, and importing into Unreal. AMD Immersive Technology [AMD Public Use] AMD TressFX 4.1 Developer's Guide Contents TressFX 4.x – Overview ................................................................................................................................. 7 TressFX – from 3.0 to 4.0 to 4.1 .................................................................................................................... 7 TressFX Engine Integrations and Installation ................................................................................................ 8 The TressFX/Unreal Engine Integration (the Basics) ................................................................................. 9 The TressFX/Radeon Cauldron Framework (the Basics) ........................................................................... 9 TressFX/Cauldron User Interface (UI) ................................................................................................. 10 TressFX Architecture ................................................................................................................................... 11 Collision Mesh ......................................................................................................................................... 12 Signed Distance Field (SDF) ..................................................................................................................... 12 Velocity Shock Propagation (VSP) ........................................................................................................... 13 Marching Cubes (MC) ............................................................................................................................. 13 Guide and Follow Hair System ................................................................................................................ 13 Rendering ................................................................................................................................................ 14 TressFX/Unreal 4.22 Integration Architecture ........................................................................................ 14 TressFX Engine Hooks ......................................................................................................................... 14 TressFXEditor Module ......................................................................................................................... 15 TressFXComponent Module................................................................................................................ 16 TressFX/Radeon Cauldron Architecture ................................................................................................. 19 Abstraction of Graphics APIs and Engine Interface ............................................................................ 19 Folder Structure .................................................................................................................................. 20 TressFX Hair ......................................................................................................................................... 21 TressFX Simulation .............................................................................................................................. 21 Physics Parameters ............................................................................................................................. 22 TressFX Rendering ............................................................................................................................... 22 Optimization Details ........................................................................................................................... 24 Rendering Algorithms Overview: ShortCut and PPLL ................................................................................. 24 Using TressFX/Unreal Components and Materials ..................................................................................... 25 TressFXComponent ................................................................................................................................. 25 TressFX Section ................................................................................................................................... 26 Lighting Section ................................................................................................................................... 26 TressFX Materials .................................................................................................................................... 26 TressFXRendering Material ................................................................................................................. 26 Page 1 of 121 [AMD Public Use] AMD TressFX 4.1 Developer's Guide TressFXSimulation Material ................................................................................................................ 27 Lights ....................................................................................................................................................... 27 Point Lights .......................................................................................................................................... 28 Spotlights ............................................................................................................................................ 28 Directional Lights ................................................................................................................................ 28 Lighting Channels ................................................................................................................................ 28 Boned Based Simulation and Tracking .................................................................................................... 29 The TressFX Component ............................................................................................................................. 30 Summary ................................................................................................................................................. 30 Basic Parameters ..................................................................................................................................... 31 Hide Tress FX (checkbox) .................................................................................................................... 31 Hair Asset (uasset drag/drop or dropdown selection) ....................................................................... 31 Scalp Albedo Base (uasset drag/drop or dropdown selection) .......................................................... 31 Hair Parameter Blending ......................................................................................................................... 31 Enable Hair Parameter Blending (checkbox) ...................................................................................... 32 Scalp Albedo Blend (uasset drag/drop or dropdown selection) ......................................................... 32 Hair Blend Control (1D) (uasset drag/drop or dropdown selection) .................................................. 32 Hair Param Blends (2D Lookup) (uasset drag/drop or dropdown selection) ..................................... 32 Strand UV (StrandUV) ............................................................................................................................. 33 Strand UV (checkbox) .......................................................................................................................... 33 Strand Albedo (uasset drag/drop or dropdown selection) ................................................................. 33 Strand Tangent (uasset drag/drop or dropdown selection) ............................................................... 33 Enable Strand UV Tiling (checkbox) .................................................................................................... 34 Strand UVTiling Factor (numeric) ........................................................................................................ 34 Render and Simulation Shared Materials ............................................................................................... 34 Simulation Material (uasset drag/drop or dropdown selection) ........................................................ 34 Render Material (uasset drag/drop or dropdown selection) ............................................................. 34 Hair Parameter Blending – More Information ............................................................................................ 35 StrandUV – More Information .................................................................................................................... 39 The TressFX Collision Mesh Component ..................................................................................................... 44 Summary ................................................................................................................................................