Unity-Technologies/com.unity.demoteam.hair

There is no way to get the initial hair vertex position, or the strand length

methusalah opened this issue · 0 comments

I wish to make a color gradient on the hair, say having the root red and the tip blue. The StrandUV.y in the HairVertex node helps, but I have two issues:

  • the strands' tips don't all have the same color because they have various lengths and StrandUV.y is scaled with the longest in the group.
  • the strands of the bangs have blue tips even if they are shorter, because they are on a separate group.

The solution I found was to have different materials on the different groups and calibrate the gradient length and/or spread for each group, with non ideal results.

A perfect solution would be to have access to the initial vertex position of the hair, so I can color my hairstyle with a simple gradient on Y axis.

It would also be good to have the non-scaled strand rate (0 is root and 1 is tip, whatever is the length), and the strand length so we can make a lot of different combinations.