Unity-Technologies / com.unity.demoteam.hair

An integrated solution for authoring / importing / simulating / rendering strand-based hair in Unity.
Other
730 stars 99 forks source link

Generate UVs for strands in order to work with HDRP Physical Hair Shader (HDRPSamples/PhysicalHair_Ribbon) #79

Open evanvlane opened 7 months ago

evanvlane commented 7 months ago

I'm trying to get the material shading of this project working well. Ideally I'd like to use the strand-based HDRP hair shader that was recently released, however it expects UV maps from the root to the tip covering the whole UV space (laid out as in the attached image).

Is there a way to get this package to work well with the hair shader I listed without significant modification?

There isn't a lot of documentation for the package, but does UV Resolve in the Hair Asset settings help with this?

If not, is there a way to add UV generation to the HairInstanceBuilder class? Somewhere in BuildMeshStrips could probably add UV info. I'm not sure exactly how to do this, but I could give it a shot if you have any tips.

image

fuglsang commented 5 months ago

Hi. This will be added soon, pending some additional refactoring work on inputs/outputs of the HairVertex node.