keijiro / KvantWig

Non-realistic hair simulation in Unity
MIT License
524 stars 63 forks source link

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

Open TheXRMonk opened 4 years ago

TheXRMonk commented 4 years ago

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.
keijiro commented 4 years ago

I'd also recommend looking into BurstWig as a SRP-friendly replacement.

https://github.com/keijiro/BurstWig

TheXRMonk commented 4 years ago

I'd also recommend looking into BurstWig as a SRP-friendly replacement.

https://github.com/keijiro/BurstWig

I found this right after posting here. But its HDRP only right? Also there is no sample scene, so hard to figure out whats happening.

keijiro commented 4 years ago

I've never tried it with URP, but there is no strong dependency to HDRP, so porting might be easy.

The BurstWig repository contains a test scene.

TheXRMonk commented 4 years ago

I've never tried it with URP, but there is no strong dependency to HDRP, so porting might be easy.

The BurstWig repository contains a test scene.

Ahh sorry - didn't see it in the root.

EDIT: I quickly removed the HDRP package, installed URP and VFXGraph packages. Not errors, but doesn't render the VFX. Look forward to compatibility with URP. :)

DhineshMoorthy-gamedev commented 2 years ago

SO there is no way i can use it in URP?

keijiro commented 2 years ago

@dhinesh-000

>SO there is no way i can use it in URP?

You can use BurstWig instead of KvantWig.