[Closed] accessing hair geometry
Just a quickie.
Is there any way to access hair/fur geometry through script. More spesifically I’m trying to attach particles at the tip of each strand. Mesher doesn’t pick them up and neither does “position object” operator. Creating one shot mesh of course works, but is not very handy for animation…
Well, I wouldn’t go for hair mesh if you just want the endpoint…
I’d go for hair->splines and read the vertex position of each spline…
Are you sure you want all hairs? it can produce massive amounts of splines…
If you want animated splines you would have to extract the hairspline at each frame and build an (very very) large animated spline out… you can then access the last hair vert in each spline at each frame…
This can be a very intensive proces, I build an in-house tool to extract an animated spline shape from the extracted guides. If you have large sequences with many hairs it will take quit a while to proces
You have some more details how many hairs etc…
-Johan
It’s just some flowers in a field, few hundred at most. Some are getting ripped loose by gust of wind. It just occurred to me too, that I can quite easily bake the hair motion into vertex animation. Since it’s one shot thing, it doesn’t matter that much how long it takes to process. My original idea was to have one square polygon at the tip of each strand and read position scale and orientation from there. Same can be read from sline too. Need to see which one works better.
Spline will only give you position data! maybe you can get a invector and derive some rotation out of it… but a spline point is only a position.
Something to think about.
-Johan
yea that’s what I meant, position from knotpoint, rotation from in vector and relative scale from spline length. That last one is a bit iffy in some cases but mostly it’s adequate.