Bone morph dials script

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

User avatar
GCharb
Posts: 2202
Joined: Mon Oct 10, 2005 2:31 am
Location: Saint-Donat, Quebec, Canada
Contact:

Post by GCharb » Fri Jun 17, 2011 6:58 pm

Hello Brooke.

First you need to make sure that the scripts are loaded...

On the bone layer with the control bones you need to embed the rt_gen_morph_weights.lua script

Then, on each vector layer you want animated you embed the rt_apply_morph_weights.lua script

Then you go on frame 1 then start rotating the control bones.

If you do not know how to embed a script, you just double click the layer, then select the embedded script file checkbox, then go to the location of the script then select it.

Hope this helps!
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Fri Jun 17, 2011 10:49 pm

GCharb wrote:Hello Brooke.

First you need to make sure that the scripts are loaded...

On the bone layer with the control bones you need to embed the rt_gen_morph_weights.lua script

Then, on each vector layer you want animated you embed the rt_apply_morph_weights.lua script

Then you go on frame 1 then start rotating the control bones.

If you do not know how to embed a script, you just double click the layer, then select the embedded script file checkbox, then go to the location of the script then select it.

Hope this helps!
Actually, with this latest release (v0.2), the rt_gen_morph_weights.lua script is no longer required and will actually just slow things down if you have it embedded. By the way, in case anyone is wondering, v0.2 also still works fine with AS6 and not just AS8.

In v0.1, you had to re-embed the scripts as they were pointing to an absolute path, but this shouldn't be necessary in v0.2 and it should just work straight out of the box.

Just make sure you are not on frame 0 when trying to move the MorphDial bones around. Also, check the MorphDials Options, which you can access from menu/Morphs and make sure realtime morph blending is enabled.

Another gotcha is that the tools have to be installed as buttons in the _tool_list.txt file, but this shouldn't impact on whether the head is being affected by the MorphDials or not.
User avatar
Brooke
Posts: 45
Joined: Sat Jun 11, 2011 9:40 pm
Location: london

Thanks :)

Post by Brooke » Mon Jun 20, 2011 7:03 pm

Just wanted to say thanks to GCharb and Rudiger for taking the time out to reply to me so soon. I havent been able to try the morph dial script out yet because I have been away from my computer - But cant wait until I do - Once again thanks for the instructions :)

Brooke
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Mon Jun 20, 2011 9:18 pm

I should update my screencast about setting this up...
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Tue Jun 21, 2011 1:56 am

Aw, no more Amazon warrior :(.

By the way, I'm currently doing a complete rewrite of the core functionality of the development version, which is something I've wanted to do for a long time. There was just so much code duplication before that it made it very prone to bugs as well as very difficult to optimize.

When I'm done, I'll probably pass along the same changes to the release version and may even pass along some of the new features that I consider to be the most useful. This should automatically fix the small number of bugs that are still in the release version and may also improve the performance.

The reason I'm mentioning this is that, Funk, you may want to wait until I release this version before you do an updated screencast.
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Tue Jun 21, 2011 2:35 am

Hehe, popular she was, but getting a little old - she may come back sometime :)

Thanks man, I'm just about to go into a short production and I'd love to use the MorphDials script (so hurry up ;) hehe j/k) - its so great! After making a standard walk cycle, I use it to create the speed up and slow down for the walk...

I still need some help with workflow though, a little confused by baking, although i see its potential I'd like to know how to bake just areas that have changed rather than the whole thing (it freezes for a bit while calculating, understandably)

The AF and CF buttons are doing nothing again, I need to go back in the thread to how we fixed it last time - my tool.txt might be incorrect again

Thanks so much, and again for the shape tool - selecting multiple shapes is a godsend!
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Tue Jun 21, 2011 2:55 am

It's basically done, just need to do more testing.

The AF button stands for Auto-Frame Bake, and this is the one you want. It bakes from the previous to the next keyframe of the currently selected morph dial. This will probably be one of the development features that I'll pass onto the release version. Not sure why it's not working, but definitely check your _tool_list.txt file, especially if you've just switched to AS8.

Glad to hear you're finding the multi-select shape tool useful :)!
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Tue Jun 21, 2011 3:21 am

I'm salivating.
I've added some lines to the tool.txt and the buttons now work :)
It takes a loooong time to bake though - can we add a *PING* when it's done? :D

It's been so long since I've looked at this I really need to refresh my memory as to how to do things and what's possible... not to mention the create morpha nd toggle direction buttons, passes and all that jazz...

*huff*
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby » Tue Jun 21, 2011 3:29 am

Hi Rudiger, I'm curious is there a significant improvement in speed with the new version in ASP 8? I don't want to buy ASP8, but that might would be reason enough. If not, I hope the script still works in ASP 6.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Tue Jun 21, 2011 3:55 am

@funk I agree that a 'ding' would be helpful, but I think the only sound that is currently available to the scripting interface is a 'click' which might cause more confusion.

@darth I haven't noticed any significant speed increase with using ASP8, but I'm hoping the rewrite will help improve performance or at least open the way up for future speed optimizations in the future. I'm pretty sure this rewrite probably won't work with ASP5, but there's no reason it can't stay compatible with ASP6 and above.
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Tue Jun 21, 2011 4:13 am

Rudiger, I have a riddle for you...

I created a walk cycle at from frame 1 of an action which loops back to its starting position. I then transition into it on the main timeline, but because it puts down the cycle frame that goes back 40 relative frames he keeps stopping in his walk :P

Is there any way around this? I suppose if i know what frame the walk begins I can move it or create a duplicate action...

Ta!
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Tue Jun 21, 2011 4:40 am

Hmm, that's a tricky one. I think there is an option to stop it inheriting the interpolation mode from Morph keys, so perhaps you could try that. It could be that it should never inherit the interpolation mode if the key is a cycle type.
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Tue Jun 21, 2011 5:02 am

then it will never cycle - don't like that idea :P instead i'll sync the cycle start with the 100% dial and work around it ;)
User avatar
funksmaname
Posts: 3113
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Post by funksmaname » Tue Jun 21, 2011 5:09 am

is there a way for the embedded script to work on all child layers? I have a head group with 5 layers which currently need embedding of scripts - will that effect performance?
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Tue Jun 21, 2011 5:29 am

I guess I don't quite understand what you mean, but I wouldn't have thought you would want to bake keys into the main timeline still with cycling enabled, but have it act as though it was a long series of duplicated keys. This would mean that you could more easily blend them with other actions to modify the cycled action.

I think it would be possible now for an embedded script to also affect it's children. There might be a performance hit with embedding the script in the children manually as the weights would be calculated from the MorphDials layer for each individual child.
Post Reply