GithubHelp home page GithubHelp logo

unity-china / cn.unity.hairfx.core Goto Github PK

View Code? Open in Web Editor NEW
112.0 5.0 15.0 420 KB

Unity HairFX is a strands based hair system (TressFX based Framework)

License: Other

C# 58.26% HLSL 2.06% Python 39.68%

cn.unity.hairfx.core's Introduction

cn.unity.hairfx.core

Unity HairFX is a strands based hair system, this supports for Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP). This hair system is based on open source AMD-TressFX hair framework.

Requirements

  • Unity 2021.2.13f1 +
  • Universal / HD Render Pipeline 12.1.4 +

Features

This package includes a new strand base hair system that integrated from the AMD’s TressFX hair system. This hair system supports both Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP). Our goal is that this real-time strand hair simulation and rendering system support for cross platform from desktop computer, consoles to mobile devices.

While this hair system has a lot more work remains to be done, we’re sharing what we have at the moment. You’re free to use or modify it to fit your productions and build if needed.

Note

  • The TressFX Exporter plugin for Maya is in Libray/PackageCache/cn.unity.hairfx.core/Maya_TressFX_Exporter~ folder or download here

  • This hair system is not the same hair system that show in ENEMIES demo video, which is separate hair system that created by Unity DemoTeam, you can find it in github

  • This package need to include URP / HDRP HairFX Shader Package, see the Usage below

Usage

Declare the package and its dependencies as git dependencies in Packages/manifest.json:

URP:

"dependencies": {
    "cn.unity.hairfx.core": "https://github.com/Unity-China/cn.unity.hairfx.core.git",  
    "cn.unity.hairfx.urp": "https://github.com/Unity-China/cn.unity.hairfx.urp.git",
    ...
}

HDRP:

"dependencies": {
    "cn.unity.hairfx.core": "https://github.com/Unity-China/cn.unity.hairfx.core.git",  
    "cn.unity.hairfx.hdrp": "https://github.com/Unity-China/cn.unity.hairfx.hdrp.git",
    ...
}

Tips

(URP only) If you build this hair system to mobile platform, please try to limit the total hair strand count less then 10 thousand in the viewing screen to maintain good frame rate. The performance of FPS is also depend on your device hardware.

Known Issues

(URP only) Currently not supports Huawei mobile phones due to some device does not support StructuredBuffer for vertex program in shader

Related links

AMD TressFX

cn.unity.hairfx.core's People

Contributors

francisjsun-amd avatar michael430 avatar michael430unity avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cn.unity.hairfx.core's Issues

[Solved] Installation issues. Shader validation source file does not exist

This is the error I get upon installation.

"Shader Graph at Packages/cn.unity.hairfx.hdrp/Editor/ShaderGraph/HDPipeline/SG_Hair.shadergraph has 1 error(s), the first is: >Validation: Source file does not exist. A valid .hlsl, .cginc, or .cg file must be referenced
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)"

I do not seem to have the GetExpandedVertex shader.

HairFX

I am using Unity 2022.2.0f1
HDRP 14.0.4

This is using a brand new empty project.

The manifest additions were:

"cn.unity.hairfx.core": "https://github.com/Unity-China/cn.unity.hairfx.core.git",
"cn.unity.hairfx.hdrp": "https://github.com/Unity-China/cn.unity.hairfx.hdrp.git"

Maya plugin does not work with 2023.2

After following the installation instructions I'm getting this error:
// Error: file: C:/Program Files/Autodesk/Maya2023/scripts/others/pluginWin.mel line 316: (TressFX_Exporter)

The Plugin-Manager sees it, but it will not let me select the "Loaded" option without giving me the error above.

What version(s) of Maya work with this plugin? Thanks.

Does this hair system support webgl?

20231121-155511
Does this hair system support webgl? i get this error when builded

Shader error in 'URP/Lit-Detail _4_Layer': maximum ps_5_0 sampler register index (16) exceeded at line 7306 (on gles3)

Compiling Subshader: 1, Pass: Universal Forward, Vertex program with _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _LIGHT_COOKIES _MAIN_LIGHT_SHADOWS _REFLECTION_PROBE_BLENDING _REFLECTION_PROBE_BOX_PROJECTION _SCREEN_SPACE_OCCLUSION
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _CLUSTERED_RENDERING _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _RECEIVE_SHADOWS_OFF

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.