View Full Version : scale objects with hair
01 January 2009, 12:59 PM
I built a simple plant that needs to react to wind (large leaves need to move slightly as if wind was blowing through them).
To achieve this I recreated a tutorial that I found somewhere on the web that makes use of the xsi hair system: I created a grid (1 polygon), attached hair to it, scaled/ brushed the hairs according to the shape of the leaves, created several clusters on hair points along the 4 strands, attached a null to each cluster using the 'object to cluster' constraint and set the hair dynamics. Then I selected the plant object and enveloped/ rigged it to the nulls.
-> take a look at the attached picture
The problem now is that the plant model needs to be scaled. But no matter how I link the different objects it always comes apart. Mainly this is because the hair strands to which the nulls are constrained do not scale correctly, I tried to link the global scale x/y/z of the hair strands to the global scale values of the bottom null using an expression, but with no success (see picture nr. 2).
How can I link the entire object and rig to a null so the entire thing can be scaled correctly?
01 January 2009, 03:20 PM
Well, I just created something similar, but didn't get the problems you seem to be having.
Alternatively, have you tried to make a model out of of everything? A good hierarchy should scale the hair properly. Make sure the nulls and the hair are parented to the grid, and the grids to the null.
Also, you might want to look into the MTSpring (http://www.xsi-blog.com/archives/259). Although it's a big primitive at first, you can do some pretty amazing things with it. And it'll play way faster than simulating hair dynamics.
Hope that helps!
01 January 2009, 05:34 PM
A good hierarchy should scale the hair correctly, I think so too, but this is the exact question in this thread: what is the correct hierarchy?
When I, as you say, simply parent the hair and the nulls to the grids + the grids to the null and then scale up the null the hair certainly is not scaled correctly, it is not scaled at all. The length of the hair strands stays the same, no matter how the null is scaled. The nulls are scaled up, thus blowing the objects geometry out of proportion. The nulls need to, of course, retain their scaling since the object is rigged to them.
When I link the global x/y/z scale values of the hair to the x/y/z scale values of the null via an expression and then scale the null the hair is scaled with it, but in an incorrect way. The more the null is scaled up the more the rig-nulls shift from where they are supposed to go.
I have attached the file (XSI 6.5) with this posting. Maybe you could check whats wrong and let me know how to fix it? Thanks in advance.
01 January 2009, 07:32 PM
Okay, here's what I tried, and it seems to work.
Instead of scaling the hair themselves, I scaled the center in Y of the grid that emits the hair (I had numbers like 100 and 160, but that might depends on what you want). Then, set neutral pose on the grid. You could even select everything and set neutral pose to reduce the risk if you're scaling a lot.
Parent everything to the SRT (the circle curve you have), and when you scale it, it should scale accordingly.
Also, don't forget to FreezeM on your plants. It might speed up your renders.
It worked for me.
01 January 2009, 07:32 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.