odf opened this issue on Oct 27, 2008 · 13933 posts
odf posted Tue, 19 May 2009 at 8:10 AM
I think this version of the knee bend might actually do for the first round. Encouraged by my success, I shall try the same technique on the hip bend to make it look good at up to 150 degrees or so.
I thought I'd give some more details on how I did it. In the following I'm assuming that you are familiar with how JCMs and, more generally, ERCs work.
The basic idea was to use cascading JCMs for the bend. So instead of one, I used three JCMs for this bend, lets call them A, B and C. So let's just talk about what I wanted to see, and then how I achieved it.
Up 90 degrees, only A is active and B and C stay at 0%. A reaches 100% at 90 degrees and then stays at 100%. Between 90 and 120 degrees, A and B are active. B reaches 100% at 120 degrees and then stays at 100%. You can now imagine what C does. In effect, I get a smooth transition between four shapes, including the normal one at 0 degrees.
In tabular form:
angle | A | B | C |
---|---|---|---|
0 | 0.0000 | 0.0 | 0.0 |
15 | 0.1667 | 0.0 | 0.0 |
30 | 0.3333 | 0.0 | 0.0 |
45 | 0.5000 | 0.0 | 0.0 |
60 | 0.6667 | 0.0 | 0.0 |
75 | 0.8333 | 0.0 | 0.0 |
90 | 1.0000 | 0.0 | 0.0 |
105 | 1.0000 | 0.5 | 0.0 |
120 | 1.0000 | 1.0 | 0.0 |
135 | 1.0000 | 1.0 | 0.5 |
150 | 1.0000 | 1.0 | 1.0 |
Get the idea?
So A needs to increase by 1.0 while the angle increases by 90, which means I slave it to the rotation channel with a factor of 1.0 / 90 = 0.011111. Then I just set the limits for A to 0.0 and 1.0, and A is done with. Now B is supposed to grow from 0.0 to 1.0 between 90 and 120 degrees, which means the factor for B must be 1.0 / 30 = 0.033333. So far, so simple.
But supposing that B starts with the value 0.0 at 0 degrees, with that factor it would already be at 3.0 when the angle is 90 degrees. Not good! So I have to make sure it starts with a nominal value of -3.0 at 0 degrees. Then when I set the limits for B to 0.0 and 1.0 as well, it will effectively stay at 0.0 until the angle reaches 90 degrees. But simply setting it to -3.0 as an initial value doesn't seem to work very well. So the trick I'm using at the moment is to add a channel with the name "one" to the BODY actor and set it up so its value is always ... wait for it ... 1.0. Then I slave my morph B to that channel as well with a factor of -3.0.
Okay, you see now where this is going. For morph C, I need a 100% increase between 120 and 150 degrees, so the factor is again 0.033333. That factor gives me a value of 4.0 at 120 degrees, so I slave my C morph to the "one" channel with a factor of -4.0. Et voila!
The beauty if this scheme is that it works for any number of intermediate shapes, and with the DAZ setup tools, it is in fact fairly easy to rig. I'm happy to go into more detail if anyone has questions.
-- I'm not mad at you, just Westphalian.