Unity-Technologies / com.unity.demoteam.hair

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

How can I make the hair recover to a different pose from the initial one after collision? #56

Closed jurohosoi closed 1 year ago

jurohosoi commented 1 year ago

In our application, the final hair pose after some collision and recovery should be different from the initial pose. For example, when sweeping the hair in the reversed direction of hair, we expect that the hair should keep being raised instead of recovering to its initial pose. However, in this model, the final hair pose will always be the same as the initial pose. How can I make them different?

fuglsang commented 1 year ago

Hi. The feature that you describe (being able to swap in a new rest-pose) is something that has come up before, and it is not yet implemented. It will be added in the future.

To achieve a new rest-pose, you would have to overwrite the data held in these buffers:

The format of this data is described implicitly by KInitialize in HairSimComputeSolver.compute.