Page 26 of 29

Posted: Fri Feb 10, 2012 10:49 am
by Autex
Ha! Ya'll are awesome. How come I hadn't found that video yet myself?? :oops: But excellent, that's definitely a clever way to do it, thanks.

Posted: Fri Feb 24, 2012 9:02 pm
by RichardU
Is there anyway to reset the orientation of a Morph Dial? i.e. I want my morph bone to point to 9:00 and for that to be the "neutral" position. Instead, my neutral position is 12:00.

Posted: Fri Feb 24, 2012 10:16 pm
by jonbo
I think 12:00 is the default. Rudiger would probably need to change it in the script. You can, however, use layer rotate on the morph dials bone layer to rotate it -90 degrees. But then all of the morph bones would then have 9:00 as the default neutral position.

Posted: Sat Feb 25, 2012 12:58 am
by funksmaname
here's an idea (not tested):
You could set up a bone at the normal 12:00 position, but have it's angle control 1:1 by another bone which isn't named as a MD bone where it starts pointing left... that way it should work as expected when rotated?

Let us know how it goes!

Posted: Sat Feb 25, 2012 1:09 am
by jonbo
Tried that first Funk before I suggested rotating the layer, it didn't work. Not sure why. The MD bone did rotate with the control bone on frame zero but wouldn't move on other frames.

Posted: Sat Feb 25, 2012 2:03 am
by funksmaname
- deleted msg -

Posted: Sat Feb 25, 2012 2:12 am
by funksmaname
I managed to do it... easy to do, hard to explain - here's a screencast

http://youtu.be/4i5_7Bgwjpk

The thing to note is that the 2 bone is a child of the 1 bone, and going to the main time line makes the MD affect the shape in its original state, so you need to rotate the bone at frame 1 so that it puts the influence back to 0 - in this case, 9 o'clock.

the odd thing was that when recording the screen cast i needed to move the bone -45degrees, but when I tried it before recording i had to rotate the bone +135degrees - i guess i must have created the bones differently, so just rotate it until its back to 0, and if it's not at 9 o'clock, rotate the parent bone till the MD bone is facing west on frame 1.

Posted: Sat Feb 25, 2012 2:37 am
by Rudiger
The short answer is no, but Funk and Jonbo have offered some good suggestions that should work.

Another thing you could try is making the morph dial a child of another unnamed bone that you rotate counter-clockwise by 90 degrees on frame 1.

If you wanted to try changing the script, the relevant code is on line 154 of rt_bake_morph_dials.lua:

Code: Select all

            -- Up is 0, right is 1.0, clockwise is positive
            weights[name] = (-bone.fAnimAngle:GetValue(frame)+math.pi/2) / (math.pi/2)
To make 9:00 the neutral position, it should just be a matter of adding math.pi instead of math.pi/2, ie:

Code: Select all

            -- Left is 0, up is 1.0, clockwise is positive
            weights[name] = (-bone.fAnimAngle:GetValue(frame)+math.pi) / (math.pi/2)

Posted: Sat Feb 25, 2012 2:40 am
by jonbo
Wow Funk, that's really interesting. I wonder why it works but it does. Just tried it. Once again, you da man! :)

Posted: Sat Feb 25, 2012 5:47 am
by RichardU
Awesome feedback for a fantastic script. Thanks.

Posted: Tue Feb 28, 2012 4:37 pm
by Breinmeester
Rudiger wrote:

Code: Select all

            -- Up is 0, right is 1.0, clockwise is positive
            weights[name] = (-bone.fAnimAngle:GetValue(frame)+math.pi/2) / (math.pi/2)
Where did you even find that a bone's angle is in 2*pi counterclockwise? Trial and error?

This scripting for Moho needs a manual!

Posted: Sun Mar 04, 2012 11:30 am
by Rudiger
Breinmeester wrote:
Rudiger wrote:

Code: Select all

            -- Up is 0, right is 1.0, clockwise is positive
            weights[name] = (-bone.fAnimAngle:GetValue(frame)+math.pi/2) / (math.pi/2)
Where did you even find that a bone's angle is in 2*pi counterclockwise? Trial and error?

This scripting for Moho needs a manual!
Well, there is an html manual, but it has been out of date since AS6. I think it comes with the AS installation now, in the "Extra Files" folder.

Other than that, I use lots of print statements to do things like printing out the angle while I rotate the morph dials.

Posted: Wed Mar 14, 2012 7:27 am
by Psynema
Took me a long time to understand everything but think I have it working.

Only thing is it doesn't seem to do fill changes, which blend morphs can, however, Blendmorphs are too slow anyways compared to this so no big whoop.

Though it does seem nerve wracking riggging a character this complex - I'm afraid I'll mess something up with the bones etc.


So how it it when it's actually NESTED a few levels deep in a skeleton - all good?

Also keep getting errors for both buttons - says attempting to refer to a nil on line 117 on both scripts.

Posted: Thu Mar 15, 2012 6:02 am
by Psynema
So is there no way to see changes LIVE or does leaving that box checked always cause errors I'm confused if I installed correctly. Thanks.

Posted: Wed Apr 18, 2012 11:51 am
by Autex
Awhile ago someone (myself included) had written that Anime using Morph Dials would crash as soon as you change a bone's name and deselect. I'm not sure anymore what the solutions to that were (mostly because I'm too lazy to search thru the entire thread again) but I've noticed that, this crash seems to only happen when I have a control bone controlling other MD bones (for example sad;happy;etc) and I were to erase or change the name of my "sad" MD bone or erase the bone entirely. A way around this would just be to change the name of the bone or erase it from the control bone's "list," then you should be safe.