Bone morph dials script

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

Moderators: Víctor Paredes, Belgarath, slowtiger

commanderstitch
Posts: 2
Joined: Thu Nov 10, 2011 11:48 pm
Location: OHIO

Post by commanderstitch »

neon22 wrote:funksmaname - love your work dude. I'm in Auckland and not sure what I'm doing on the computer on a long weekend and the day after the world cup... :roll:

I've been programming for years in CG - mainly in Python but LUA is pretty nice...

Rudiger - sent PM. Looking fwd to it
Any update on this? Rudiger's script is a nice bit of work. anyone got any more working examples?

-thanks.
- Commanderstitch
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

commanderstitch wrote: Any update on this? Rudiger's script is a nice bit of work. anyone got any more working examples?

-thanks.
I know that Jessica used a MorphDials rig for this animation http://www.youtube.com/watch?v=Mh5_rQCVbxY&feature=channel_video_title.

What's interesting about it to me is that she used it to control the whole body instead of just the face.

Other people have contacted me for help in constructing their own rigs, but I rarely get to see the finished result. Perhaps they can post examples of their rigs in action here.

Things should also get more interesting now that it looks like a relative morphing mode will be included in version 8.1. This should make Morph Dials much faster, even for complex characters.
Last edited by Rudiger on Tue Nov 15, 2011 1:17 am, edited 1 time in total.
commanderstitch
Posts: 2
Joined: Thu Nov 10, 2011 11:48 pm
Location: OHIO

Post by commanderstitch »

Wow, that sounds really good. I hope this really pushes the capabilities forward! (thank you for the insanely fast response.)
- Commanderstitch
User avatar
neon22
Posts: 51
Joined: Tue Aug 28, 2007 5:41 am
Location: New Zealand

Post by neon22 »

commanderstitch wrote:Any update on this? Rudiger's script is a nice bit of work. anyone got any more working examples?
-thanks.
I've got 4.5 minutes of animation to finish in the next 10 days. I'll start working on Rudiger's script after that.
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

Hi Rudiger,

I'm not sure what I'm doing wrong. I downloaded the v.03 file and I'm able to run the demo project, no problem (at least none that are apparent). I have an older file of my own which has some single-frame actions set up to make a head move. I've tried applying the morphdials script (via funksmaname's tutorials) and I get...nada. Not sure why, seems like everything should work. Any ideas?

-Also, the head is a set of layers inside of a group layer, the actions are set at the group layer. Both the head and the 'MorphDials' bone layer are nested inside of a parent 'skeleton-ish' bone layer.

Thanks,

S
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

Hi again,

In my attempt to figure out the reason for the problem, I replicated the problem with a test file. I just created a dummy file with layers inside a folder, actions applied to the folder, and the morph dials bone layer on the same level as the folder. Kaput. Didn't work. I'll try with an even simpler file to see at what stage the script works.

S
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

OK, so here's the solution that's worked so far:

a.) create your 'MorphDials' bone layer and place it under the group layer.

b.) on frame 0, pull ALL the layers out of the group layer and apply the embedded script to each layer, including switch layers and the original group layer.

c.) create your MorphDials bones and test the animation by going a couple of frames into the animation and rotating the bones. Delete the keyframes (if you want to, you're just testing it anyway).

d.) return to frame 0, re-place all the layers BACK into the group layer.

e.) test the Morph Dials bones again. This is where it worked for me.

My first thought was that MorphDials didn't like group layers because when I tested my dummy file, it didn't seem to have any effect on the layers inside the group but when I pulled the layers OUTSIDE of the group, it worked. Now I'm not so sure about my first assumption. I'm also suspicious that if I save the file, and then start Anime Studio up again and then reload the file, that it won't work again and I'll have to re-set all the layers.

Keep you posted.

S
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

OK, so now the new thing is creating the control bone. Anime Studio crashes every time. -Is this a known issue? Haven't yet seen it get beyond the crash.

-S
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

what version of AS are you using?

You shouldn't need to pull layers out to attach the layer script to them - they should work inside the folder... might it be a naming issue?
Also try putting the group and morphdial level under a parent group so they are both at level2, and all sub-layers are at level 3 under the character group.

Also, the layer script is only necessary for real time feedback which can get inhibitingly slow fairly quickly - if you use the 'bake' function in the menu script after making adjustments it will put keyframes on effected layers for you (this will hopefully be improved once 8.1 is released)
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

funksmaname wrote:what version of AS are you using?
I'm using version 7.
funksmaname wrote:You shouldn't need to pull layers out to attach the layer script to them - they should work inside the folder... might it be a naming issue?
For some reason, it wouldn't work otherwise. I tried attaching the script to it before pulling them out and it didn't work. I don't know why. When I pulled them out and tested the script, it worked. Then I put them back into the group and it didn't work, so I attached the script to the group and it worked again. Wonky, I know, but that's what happened.
funksmaname wrote:Also try putting the group and morphdial level under a parent group so they are both at level2, and all sub-layers are at level 3 under the character group.
The morphdial bone layer is inside of a bone layer, as is the head group which it's affecting. The head group consists of sub-layers of hair, eyes, nose, eyebrows, etc.
funksmaname wrote:Also, the layer script is only necessary for real time feedback which can get inhibitingly slow fairly quickly - if you use the 'bake' function in the menu script after making adjustments it will put keyframes on effected layers for you (this will hopefully be improved once 8.1 is released)
The problem I'm having now is that the control bone (i.e. the bone that you move between the other morph bones to create a head turn) crashes ASP when the control bone is named using ";" in between the names of the morph bones. I haven't had ASP stay un-crashed when I do that, yet.

Thanks,

S
jonbo
Posts: 896
Joined: Thu Apr 08, 2010 2:53 am

Post by jonbo »

Hey slice, I had that crash problem too. I found that when I entered all the bone names I wanted to be controlled and hit enter I would have a crash. So now I do the same when naming but instead of hitting enter I just click on a different tool, names are still there and no crash. Maybe try that. Also there is a bug in AS7 when you try to render with embedded scripts you'll have trouble.
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

I must admit I think used to get an intermittent crash sometimes when naming control bones. Bigger problem is crashing on render in v7 if you have a multi-core CPU...
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

jonbo wrote:Hey slice, I had that crash problem too. I found that when I entered all the bone names I wanted to be controlled and hit enter I would have a crash. So now I do the same when naming but instead of hitting enter I just click on a different tool, names are still there and no crash. Maybe try that. Also there is a bug in AS7 when you try to render with embedded scripts you'll have trouble.
Thanks, man. Tried it twice, crashed both times.
funksmaname wrote:I must admit I think used to get an intermittent crash sometimes when naming control bones. Bigger problem is crashing on render in v7 if you have a multi-core CPU...
crashed on render, too. -Does this mean that I'll have to bake the morphs before rendering? Damn, I was looking for a reason to hold off upgrading ASP 'til v.9 or something.

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

Post by Rudiger »

Sorry for not replying to your post sooner, but didn't get an email notification for some reason.

I would be surprised if it is necessary to pull out your layers from the group layer and put them back to get it to work. It is true that you do have to embed the layer script on every layer including all child layers, so perhaps that was the real problem. Here are some other fixes to common problems that people have had in the past:

1. Bring up the MorphDials options window and make sure the options have sensible values:
Image
2. Make sure the script rt_apply_morph_weights.lua is in the same folder as your anme file and is embedded in the layer you want to be controlled by the MorphDials layer, which should be a sibling layer to it, be below it in the layer order, and have the name MorphDials.
3. Make sure the button tools have been installed as buttons in the _tool_list.txt file.
4. Make sure you are not on frame 0 when manipulating the MorphDials.

Note that the crashing could be due to names in the ctrl bone not tet matching any of the target bones. Sometimes, I disable realtime morph blending, using the options window, while I am naming bones to avoid it crashing.

You are right that you won't be able to render it with AS7 without baking first. Also, I'm not sure if I would recommend waiting until AS9 to upgrade as it looks like Smith Micro are putting more effort into point releases this time around, so I would say it's unlikely that AS9 will be released in June of next year as has been the pattern in the past.
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

Rudiger wrote:I would be surprised if it is necessary to pull out your layers from the group layer and put them back to get it to work. It is true that you do have to embed the layer script on every layer including all child layers, so perhaps that was the real problem. Here are some other fixes to common problems that people have had in the past:
No biggie for me, I'm just happy it worked. I'll try it the normal way next time. It's all part of the learning curve. Perhaps someone else who reads this thread will learn from my blunders.
Rudiger wrote:1. Bring up the MorphDials options window and make sure the options have sensible values:
Image
2. Make sure the script rt_apply_morph_weights.lua is in the same folder as your anme file and is embedded in the layer you want to be controlled by the MorphDials layer, which should be a sibling layer to it, be below it in the layer order, and have the name MorphDials.
3. Make sure the button tools have been installed as buttons in the _tool_list.txt file.
4. Make sure you are not on frame 0 when manipulating the MorphDials.
1. check!
2. check!
3. check!

I pretty much followed Funksmaname's excellent tutorials on youtube. -Very informative, by the way.
Rudiger wrote:Note that the crashing could be due to names in the ctrl bone not tet matching any of the target bones. Sometimes, I disable realtime morph blending, using the options window, while I am naming bones to avoid it crashing.
AAAAaaahhh.... That's IT! I was putting a 'space' after the ';'! -Lousy typing education! Now it works!
Rudiger wrote:You are right that you won't be able to render it with AS7 without baking first. Also, I'm not sure if I would recommend waiting until AS9 to upgrade as it looks like Smith Micro are putting more effort into point releases this time around, so I would say it's unlikely that AS9 will be released in June of next year as has been the pattern in the past.
I was being a little....uh....facetious(?) here. I was a bit upset when AS7 came out so soon after AS6, but I bought it anyway because there was a sale and I also realized I could deduct the purchase from my year-end taxes. Problem was, AS7 didn't really do much that I couldn't already do with AS6 and the inclusion of all the extra character animations was a rather moot issue anyway since I create all my own files. Physics was nice, but I've had it for over a year now and I still haven't used that feature. When AS8 came out, I just figured that SmithMicro was going to the well a little too frequently for my taste so I decided I'd hold off on buying it until I ran into a wall that only AS8 (or later) could overcome.

Thanks again,

S
Post Reply