Coder Social home page Coder Social logo

inarutom2014 / com.unity.demoteam.hair Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unity-technologies/com.unity.demoteam.hair

0.0 0.0 0.0 59.07 MB

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.

License: Other

C# 85.23% HLSL 10.21% ShaderLab 4.56%

com.unity.demoteam.hair's Introduction

Package: com.unity.demoteam.hair

Header

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity. Built from the ground up with Unity users in mind, and evolved and hardened during the production of 'Enemies', the hair system is applicable not only to realistic digital humans, but also to more stylized content and games. It allows users to easily create 'Hair Assets', either from grooms from external DCC tools (through the alembic file format for curve data), or through simple built-in procedural generation tools (e.g. scatter x amount of hairs on a mesh or other primitive, or using a custom generator). Using a fast and flexible GPU-based solver that works on both strand- and volume-information, the system enables users to interactively set up ‘Hair Instances’ within scenes, and then see and interact with those instances as they are simulated and rendered in real time.

Requirements

  • Unity 2020.2.0f1 +
  • Compute shader enabled platform

Features

  • Authoring

    • Import grooms from external DCC tools through the alembic file format (.abc) [ depends on com.unity.formats.alembic >= 2.2.2 ]
    • Make procedural grooms in just a few clicks
      • Scatter strands on built-in primitives, or on user specified meshes
      • Shape strands using simple parameters like length and curl
      • Plug in your own generators for custom placement
    • Clustering / Level of detail
      • Build clusters and LOD chain automatically from spatial relationships
      • Can also assign artist-provided clump maps + optionally refine them
      • Supports root-, strand-, and simplified strand-level clusters
  • Skinning

    • Easily attach strand roots to skinned geometry in a scene [ depends on com.unity.demoteam.digital-human >= 0.1.1-preview ]
  • Simulation

    • Strand-based solver supporting tens of thousands of individual strands
    • Solver also adds volume-based quantities such as density and pressure
      • Uses physical strand diameter, physical strand margin
      • Applies pressure to preserve the volume of a groom
        • Allows targeting uniform density
        • Allows targeting initial pose density
      • Applies pressure to soften strand-strand collisions
      • Exposes directional opacity to HDRP physical shading model
    • Fully configurable set of constraints
      • Boundary collision w/ friction
      • Particle-particle distance (soft, hard)
      • Particle-root distance
      • Local bend limiter (<, >, =)
      • Local shape
      • Global position
      • Global rotation
    • Level of detail support
      • Allows simulating partial set of strands (e.g. at a distance, or for art reasons)
      • Volume-based effects also work for partial set of strands
      • Seamless LOD blending while simulation is running
  • Rendering

    • Supports all current rendering pipelines
      • Built-in RP
      • HDRP
      • URP
    • Easily build your own hair materials
      • Add the ‘HairVertex’ node to any Shader Graph to read the simulation data
      • Add the 'HairVolume' node to access simulation volume data like density
      • (Planned) Optionally, assign generic materials as the cost of serializing strands to generic mesh [ will depend on Unity >= 2021.2 for vertex buffer access ]
    • Multiple modes of rendering
      • Render strands as simple line primitives
      • Render strands as view facing triangle strips w/ tangent space normals
      • Render high quality strands using the upcoming compute-based HDRP hair renderer [ depends on Unity >= 2023.1 ]

Installation

Use Add package from git URL (in the Package Manager):

https://github.com/Unity-Technologies/com.unity.demoteam.hair.git

... or declare the package as a git dependency in Packages/manifest.json:

"dependencies": {
    "com.unity.demoteam.hair": "https://github.com/Unity-Technologies/com.unity.demoteam.hair.git",
    ...
}

Related links

References

  • [Bender et al. 2015] Position-Based Simulation Methods in Computer Graphics
  • [Bridson and Müller-Fischer 2007] Fluid Simulation SIGGRAPH 2007 Course Notes
  • [Gibou et al. 2002] A Second Order Accurate Symmetric Discretization of the Poisson Equation on Irregular Domains
  • [Harris 2004] Fast Fluid Dynamics Simulation on the GPU
  • [Kelager et al. 2010] A Triangle Bending Constraint Model for Position-Based Dynamics
  • [Kim et al. 2012] Long Range Attachments - A Method to Simulate Inextensible Clothing in Computer Games
  • [Kugelstadt and Schömer 2016] Position and Orientation Based Cosserat Rods
  • [Losasso et al. 2008] Two-Way Coupled SPH and Particle Level Set Fluid Simulation
  • [Macklin et al. 2014] Unified particle physics for real-time application
  • [Macklin et al. 2019] Small Steps in Physics Simulation
  • [McAdams et al. 2009] Detail Preserving Continuum Simulation of Straight Hair
  • [Müller et al. 2006] Position Based Dynamics
  • [Müller et al. 2012] Fast Simulation of Inextensible Hair and Fur
  • [Petrovic et al. 2005] Volumetric Methods for Simulation and Rendering of Hair
  • [Zhu and Bridson 2005] Animating Sand as a Fluid

See also

https://github.com/Unity-Technologies/com.unity.demoteam.digital-human

com.unity.demoteam.hair's People

Contributors

fuglsang 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.