Friday, December 11, 2009

Attaching Hair (First Attempt)

My original plan was to add one "key hair" (Bullet soft body rope) to the center of each tri-face in an input scalp mesh (.obj). However, with 256 ropes to create, Bullet was not happy. The following is what I got, which looks fine in a static screen shot, but believe me, the application was not running in real-time.
So, I knocked the number of hairs down (for testing purposes) to 10, changed some property values, and took a closer look.
As you can see, there are some "in-grown" key hairs that are growing into the head (the two sprouting out the back) instead of away from the head along a face normal. My next step will be to investigate why the faces of the scalp .obj are not being exported such that (pt2-pt1)^(pt3-pt1) = the proper face normal direction. Then, from there, I'll begin to dabble in ways to speed things up...

EDIT: The in-grown hairs issue was my own fault...coding typo, if you will. Here's what I have after that fix (and with restitution bumped up to give the hairs a bit of stiffness near their roots).
But the question still remains... what is the maximum number of key hairs that Bullet can handle in real time? I'll need to start with that number of hairs and interpolate between them to create the illusion of density. The only problem is, what if the maximum number is something like 5? Eeek!

No comments:

Post a Comment