Coder Social home page Coder Social logo

kvantwig's Introduction

KvantWig

Wig is a special renderer that simulates and renders hair in a non-realistic fashion.

gif gif

screenshot screenshot

Note that this is never useful for realistic hair simulation. They're completely different things, and this one is not intended to be realistic. It's recommended to check HairWorks or similar technologies for realistic simulation.

System Requirements

Unity 5.5 or later

Installation

Download one of the unitypackage files from the Releases page and import it to a project.

How To Apply This To My Own Model?

Select a mesh inside an imported fbx/obj file and right click it. From the context menu, select "Kvant" -> "Wig" -> "Convert to template". This generates Wig Template file from the mesh. Give it to a WigController component. Then play it.

The vertex count of the source model should be kept low because of 64k vertices limitation in Unity. 500-1,000 would be okay.

License

MIT

kvantwig's People

Contributors

keijiro 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kvantwig's Issues

Wig Not Building

Hi,
I can import the wig package and run the wig sample scene in the editor but for whatever reason the wig won't publish to a build, any suggestions?

Load filament length from texture file

Hi Keijiro, your work is absolutely awesome, thanks for sharing it.

I'm testing KvantWig for doing some cartoon-style hair and results are really great, way better than other mesh-and-bones based solutions I've tried so far and I really love your implementation.

hi-albert

I was thinking if would be possible to set the length of the every filament from a bitmap file loaded in the material, which in combination with the controller's Length parameter would result in a different length depending on the area of the head (or whatever mesh used as Wig surface). I.e. white areas multiplies length x1 while black ones would multiply by 0.

I think this approach would allow to make really cool hairstyles in a very simple way.

Could you give me some orientation about how to implement it?

Thanks a lot!

Trouble rendering on iPhone X

I think this is more a Unity issue, but the KvantWig is not displayed on an iPhone X, while it works perfectly on all other devices…
To be more precise : everything run, but nothing is displayed.

How to scale wig?

Thanks for your great job!
However ,when i scale the wig , the distance between target and wig is incorrect.
Hope for your help! :)

Important info for anyone trying this in 2020 + Request for S/URP support.

Documentation is lacking so ill try to give my 2 cents here for anyone trying to implement this.

  1. First of this only works in the legacy shader pipeline. You need to attach a material with the kvant->wig->Filament shader for the hair to even render. It took me some time to figure this out. Would be nice if someone could make it URP compatible (I know shit about shaders).
  2. The unity package does not contain the sample folder/scene. Download the whole repo if you want to get the test scene along with a precreated wig from a wig model. I learned point 3 from doing this;
  3. Wig templates are not created from "hair" meshes. They should be created from "scalp" meshes. Something I didn't understand right away. Meaning it extrudes and simulates triangles from the scalp model. I guess the author is talking about the scalp poly count when he advises to keep it low.
  4. I tested this repo in unity 2019.4.1f1 and it seems to work. Haven't tried a build though. But unfortunately I won't be using this until the shader is URP compatible.

compiler error

I get this error when I try to build for different devices. Not sure if it's something I may have broken but hope you might have an idea
wigerror2
wigerror

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.