Giter Site home page Giter Site logo

mistajuliax / tressfx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gpuopen-effects/tressfx

0.0 1.0 0.0 115.36 MB

DirectX 11 library that provides convenient access to realistically rendered and simulated hair and fur

License: MIT License

C++ 95.02% C 0.33% Lua 0.22% HLSL 3.77% Batchfile 0.10% SourcePawn 0.07% Assembly 0.34% Python 0.14%

tressfx's Introduction

AMD TressFX

AMD TressFX

The TressFX library implements AMD's TressFX hair/fur rendering and simulation technology for DirectX 11. The TressFX technology uses the GPU to simulate and render high-quality, realistic hair and fur. TressFX makes use of the processing power of high-performance GPUs to do realistic rendering and utilizes DirectCompute to physically simulate each individual strand of hair.

Latest release

Highlights include the following:

  • GCN-optimized rendering and simulation
  • Full source code provided
  • Hair and fur support
  • Animation/skinning support
  • Maya plugin provided for authoring
  • Viewer provided for preview
  • PPLL and "ShortCut" OIT methods

Prerequisites

  • AMD Radeon™ GCN-based GPU (HD 7000 series or newer)
    • Or other DirectX® 11 compatible discrete GPU with Shader Model 5 support
  • 64-bit Windows® 7 (SP1 with the Platform Update), Windows® 8.1, or Windows® 10
  • Visual Studio® 2012, Visual Studio® 2013, or Visual Studio® 2015

Getting started

Start with the TressFX viewer to see example content or to check out the code.

  • Visual Studio solutions for VS2012, VS2013, and VS2015 can be found in the amd_tressfx_viewer\build directory.
  • There are also solutions for just the core library in the amd_tressfx\build directory.
  • Additional documentation is available in the amd_tressfx\doc and amd_tressfx_viewer\doc directories.
  • Pre-exported example models ready for use in the viewer can be found in the amd_tressfx_viewer\media directory.
    • Look for DEFAULT_TFXPROJFILENAME near the top of main.cpp to start up with a different model.
    • Or you can load a different model after start-up with the "(O)pen project" button.

For authoring new content, documentation for the Maya exporter is available in the amd_tressfx_tools\MayaPlugin\doc directory.

ShortCut

ShortCut is our new Order Independent Transparency (OIT) option. It is inspired by the method presented by Eidos-Montréal and Hybrid Transparency. Whereas our original method focused on the front k = 8 layers of hair, ShortCut is good for cases when you can get away with k = 2 or 3, and you’re more concerned about memory usage.

It does require some forethought on how to build your models, however, as it comes with different performance characteristics, and a quality trade-off. But between the simpler memory bounds and the potential for higher performance, we expect it to be a popular choice.

The four main steps are outlined below:

  1. Render hair geometry, using a sequence of InterlockedMin calls to update the list of k nearest fragments while computing an overall alpha.
  2. Screen space pass that puts the kth nearest depth in the depth buffer for early z culling in the next step.
  3. Render hair geometry again. Shade the fragment and write or blend the color (depending on variant). [earlydepthstencil] focuses shading cost on the front k.
  4. Screen space pass that does the final blending.

Learn More

Premake

The Visual Studio solutions and projects in this repo were generated with Premake. If you need to regenerate the Visual Studio files, double-click on gpuopen_tressfx_update_vs_files.bat in the premake directory.

This version of Premake has been modified from the stock version to use the property sheet technique for the Windows SDK from this Visual C++ Team blog post. The technique was originally described for using the Windows 8.0 SDK with Visual Studio 2010, but it applies more generally to using newer versions of the Windows SDK with older versions of Visual Studio.

The default SDK for a particular version of Visual Studio (for 2012 or higher) is installed as part of Visual Studio installation. This default (Windows 8.0 SDK for Visual Studio 2012 and Windows 8.1 SDK for Visual Studio 2013) will be used if newer SDKs do not exist on the user's machine. However, the projects generated with this version of Premake will use the next higher SDK (Windows 8.1 SDK for Visual Studio 2012 and Windows 10 SDK with Visual Studio 2013), if the newer SDKs exist on the user's machine.

For Visual Studio 2015, this version of Premake adds the WindowsTargetPlatformVersion element to the project file to specify which version of the Windows SDK will be used. To change WindowsTargetPlatformVersion for Visual Studio 2015, change the value for _AMD_WIN_SDK_VERSION in premake\amd_premake_util.lua and regenerate the Visual Studio files.

Third-Party Software

  • DXUT is distributed under the terms of the MIT License. See framework\d3d11\dxut\MIT.txt.
  • ContentExporter is distributed under the terms of the MIT License. See amd_tressfx_tools\ContentExporter\src\LICENSE
  • Premake is distributed under the terms of the BSD License. See premake\LICENSE.txt.

DXUT and ContentExporter are only needed for the viewer, not the core library. Only first-party software (specifically amd_tressfx, and amd_lib) is needed to build the TressFX library.

Attribution

  • AMD, the AMD Arrow logo, Radeon, and combinations thereof are either registered trademarks or trademarks of Advanced Micro Devices, Inc. in the United States and/or other countries.
  • Microsoft, DirectX, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

tressfx's People

Contributors

jstewart-amd avatar khillesl-amd avatar mrgreywater avatar dongsoo-amd avatar

Watchers

mistajuliax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.