View Full Version : A very bad hair day
snv1492 04-22-2007, 01:48 PM I'm having a problem with with my hair.
This is what my hair looks like relaxed with 'surface to hair' checked and no hair collider set up:
Good hair (http://i128.photobucket.com/albums/p193/snv1492/cg-hair1.jpg)
So far, it looks just like I'd expect it to at this point.
When I tag the body mesh as a hair collider, all hell breaks loose and it looks like this:
Bad hair (http://i128.photobucket.com/albums/p193/snv1492/cg-hair2.jpg)
It looks like this whether or not 'surface to hair' is checked.
The same thing happens if I check 'hair to hair'.
If I render the first picture, it turns out fine and the hair is about 10 centimeters. If I try to render the second picture, a bird's nest of hair extends from the character's head for what appears to be 300 kilometers in either direction.
There seems to be an issue with collision objects but I don't know what it is. Other than turning collisions on, nothing else is changed. I don't understand where all the excess length coming from and why is it scattered all over the place.
I appreciate any help.
|
|
From your first image it's clear that the hair is heavily intersecting the head already. Turning on collision in this state is asking for trouble.
You will need to model the guides with collision detection on to prevent this (or model by hand so no intersections occur).
Cheers
Björn
Per-Anders
04-22-2007, 06:20 PM
When you're styling like this don't forget to turn on collision in the actual tools themselves, in order to avoid having intersection problems. the issue looks to be as srek points out that your hair guides are going through the head geometry to start off with, which means it can't resolve the collision in the dynamics succesfully (is it on one side or the other?), and so it explodes. Try restyling so that no hair guides intersect the head geometry before applying any form of dynamic collisions on the hair with the head.
snv1492
04-22-2007, 07:55 PM
Srek seems to be correct, I turned on all my dynamics first and set up the body mesh as a collider, then performed a "cache >> calculate" to simulate about 20 frames to put the hair at rest and it worked. But here's the problem now.
After I calculated the simulation, I decided I wanted to change the length (or anything else). The only way I could do this was to completely delete the hair and redo everything from scratch, because if I made any changes after I ran the simulation once, even after scrubbing back to frame 0 or clicking Empty Cache, I ended up with the same bird's nest.
Empty Cache doesn't seem to work at all, because after I click it I can still scrub through the animation, but I don't know if that's just how it functions until you re-cache something.
I've also tried doing a simulation just by clicking on Relax, and the same problem occurs. After I relax it once, I can never edit it. I have to delete and start over. There isn't an Empty Cache option when using relax, so how to I un-relax something to make edits?
So basically, after I run a test simulation using either method, how do I completely purge it so that I know I'm making adjustments to the hair in it's initial state?
It's as if once you cache the simulation or relax it, you're stuck with it. However I know that isn't true because I've watched several video tutorials and they are constantly running a simulatiuon, then tweaking it. I'm just missing whatever they are doing to make it possible.
Thanks for your help so far.
AdamT
04-22-2007, 08:49 PM
Did you try turning off hair dynamics before editing, and/or doing as Per suggested and turning on collision detection in the editing tools?
snv1492
04-22-2007, 09:24 PM
Ok, we have some progress. :thumbsup:
Everything seems to be working now, I can now relax, remove dynamics, and re-edit things. Though I seemed to stumble upon it completely by accident and now have to figure out how I did it. :banghead:
The last remaining problem (until the next one) I have now is that the collider mesh isn't acting like a collider. Maybe I'm not setting it up right.
When I tag the body mesh as a hair collider, do I need to do anything else to get it to recognize the hair object or vice versa, like parenting or targeting one to the other? Right now I'm just tagging it a hair collider and assuming it will collide with any hair in the scene. Do I have to make the hair and the collider aware of each other in any other way?
ps - srek, your hair videos are awesome.
AdamT
04-22-2007, 09:34 PM
You just have to tag the object and enable dynamics for your various hair objects. You also have to be aware that, by default, Hair only calculates collisions between guides and colliders. If you want hair/object collisions you have to enable that in the Hair object>Dynamics>advanced tab (expect slow calculations).
snv1492
04-22-2007, 09:54 PM
You just have to tag the object and enable dynamics for your various hair objects. You also have to be aware that, by default, Hair only calculates collisions between guides and colliders. If you want hair/object collisions you have to enable that in the Hair object>Dynamics>advanced tab (expect slow calculations).
Right now my problem is that the guides are going through the collision object (of course the hairs follow, but I'm only worried about the guides now).
So I must have something else wrong. The body mesh is a hair collider, and the hair guides have dynamics enabled but they are still going through the body.
The dynamics seem to be working correctly otherwise, so the problem seems to be with my collision object.
CGTalk Moderation
04-22-2007, 09:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.