RobynsVeil opened this issue on Dec 03, 2010 · 409 posts
aRtBee posted Sat, 11 December 2010 at 5:43 PM
So, hold your breath again, I'm on Wind Force this time.
Actually, the experimental setup is simple. Piece of cloth, setup straight at a few meters above the ground. Clothified, and the upper row of vertices put in the choreographed group. We don't need a pole or so, the sim routine will leave choreographed verts untouched (so you can drive them by keyframes or what). And since we're not going to touch them either, they will stay put, and so make a hanging flag.
Give the cloth maximum stiffness (fold etc), zero friction, and default density and air resistance.
Then we put a Wind Force generator aside, and make it blow straight into the cloth. Take some distance (twice the cloth size will do), leave the angle at 45, and give it a serious range (4 to 5 times the cloth size will do). A Wind generator is quite a rude thing actually. It will proceduce the full force in an area determined by angle and range, and nothing outside it. No fall offs like spotlichts. Leave the Amplitude at 1, our queste will be what it means.
Run the sim, and find the flag hanging at an angle of 45.
Now we know what's meant by Amplitude = 1. That's the wind that - when blowing horizontally - will push a default piece of cloth up with the same force that is exercised by gravity to pull it down.
To look at it more closely, let's do the math first.
Take angle z as the ZRot value, the angel between the flag and the horizon. Z = 0 means a horizontal flag, extreme winds, and z=90 means hanging down, no winds.
The (vertical) gravity force on the skewed flag can be decomposed in a part along with the flag, stretching it and being countered by the pole (if we had one), and a part perpendicular to the cloth, making it rotate downwards. This latter force is
F = dSg*cos(z), d for mass densty, S for cloth surface, g for gravity acceleration constant.
The (horizontal) wind force has a similar effect, but we have to adjust for the fact that a skewed flag will present a smaller surface to the wind. Again, the force can be decomposed into one along the flag stretching it as well (you know cloth is pulling when the wind blows in), and a force perpendicular, rotating it upwards:
F = aSw*sin(z)^2 with airdamping a, windspeed w (in m/s), surface S and the sine squared thanks to the mentioned adjustment.
The flag hangs at equilibrium when both rotational forces cancel out, and since sin^2 equals 1-cos^2, we can make it to
0 = awcos(z)^2 + dgcos(z) - a*w
From this we learn that when a or w equals zero (no atmosphere, or no wind) then the equation reduces to cos(z) = 0, z = 90, flag hangs down.
And we learn that when a and/or w grows really big (under water, hurricane) then the equation reduces to cos(z) = 1, z = 0, flag fully stretched horizontally.
From this we can determine the meaning of Amplitude 1: we just solve the equation for z=45 and find a windspeed of 3,46 m/s. Default density at 0.005, default airdamping at 0.02.
So, what will happen to the windspeed when we adjust Amplitude?
For this, I had to repeat the sim at various amplitude settings.
Amplitude 2 created an angle of 23,5, that's a windspeed of 13,6 to 14 m/s, that's about 4 times as fast.
Amplitude 4 created an angle of 10-12, that's a windspeed of 80 - 55, or: another 4 times as fast again.
Amplitude 0.5 gave an angle of 56, that's 1.993 (say 2) m/s, or about half as much compared to amplitude 1.
And Amplitude 0.25 gave an angle of 68, windspeed 1.067 (say 1) m/s, or another half as much again.
It looks like the amplitude and windspeed relate in a linear way below amplutude 1 or a 45 flag angle (half the amplitude gives half the windspeed), and relate in a squaring way (double the amplitude quadruples the windspeed) above amplitude 1 or a 45 flag angle. This gives artists more control in both regions, as if the dial changes sensitivity.
Now you know windspeed, air-damping, mass density and the gravity constant values, you can easily predict the angle by solving
cos(z) = x for x^2 - (dg/aw) * x - 1 = 0.
That is: cos(z) = { -dg + sqrt[ (dg)^2 + (2aw)^2 ] } / (2aw)
Note that the cases aw= about 0 or aw= really large already were discussed above.
I ran my sims for 100 frames, flags were still waving a bit at the edges (they make a full wave despite the extreme stiffness settings) but still enough to make estimates of the angles. My standard 32x32 quads cloth, as in the previous fall-down test.
happy sailing
- - - - -
Usually I'm wrong. But to be effective and efficient, I don't need to be correct or accurate.
visit www.aRtBeeWeb.nl (works) or Missing Manuals (tutorials & reviews) - both need an update though