nHair Collision Issue

JabbaTheNut
Collaborator
Collaborator

nHair Collision Issue

JabbaTheNut
Collaborator
Collaborator

I am having an issue with nHair and a passive collider mesh. I have attached two images to illustrate my problem. Both images represent nHair on a body mesh. The nHair is attached to a scalp which is inside the head (i.e. not visible in the image). The body mesh is a passive collider with the default settings (e.g. default collision thickness).

The first image shows the initial state of the nHair.

The second image shows the state of the nHair immediately after I select Interactive Playback.

Please note how the nHair pushes away from the head at the root. At first, I thought it might have to do with the collision thickness setting of the passive collider mesh. However, the behavior is exactly the same when I set the collision thickness to 0.

What is causing the nHair to push away from the head at the root when I initiate Interactive Playback?

0 Likes
Reply
Accepted solutions (1)
1,624 Views
2 Replies
Replies (2)

JabbaTheNut
Collaborator
Collaborator

OK. I solved the problem.

The issue was with the Push Out Radius, located in the Quality Settings tab. By default, it is set at 1.415. When I set this to 0 (or a small value), the problem goes away.

I feel a bit stupid. I had a "push out" problem and the solution was a "push out radius" setting. Smiley Embarassed

0 Likes

JabbaTheNut
Collaborator
Collaborator
Accepted solution

Actually, my previous post did not completely solve the problem.  While it stopped the push out problem, it rendered the Push Out Radius setting useless.  The Push Out Radius may be needed for other purposes (e.g. pushing out hair tips, etc.).  Consequently, it is not advised to do as my previous post suggested.

 

Thanks to cineartist at the CGSociety forums, I now have a workable solution.  The setup is as follows:

Three meshes are used: Head, Scalp, Collision Head

1. Head is the main visible mesh.
2. Scalp is inside of Head. nHair is attached to Scalp. This keeps the roots inside of Head.
3. Collision Head is a replica of Head and is scaled down to a size that is inside of Scalp. Collision Head is set to be a passive collider with a thickness value which expands outside of Head to prevent hair from penetrating Head.

This does solve the problem while retaining the ability to use push out radius for other purposes.

 

To view cineartist's comments, you can view the CGSociety post here . 

0 Likes