Transferring rigs from one file to another

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

Greenlaw wrote: Tue Mar 15, 2022 5:44 pm BTW, MQC has buttons for Copy Layer/Paste Layer and I like to keep MQC over on the right side of the screen near the Layer Window so there is a shorter distance to move the mouse back and forth for Copy Layer/Paste Layer.
I am going to try out MQC - it seems very useful now that I have a tablet to use with Moho. There are already a few issues I have encountered using a tablet with Moho, I want to experiment a bit more before asking questions about Moho and tablets.
User avatar
Greenlaw
Posts: 9386
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Transferring rigs from one file to another

Post by Greenlaw »

It works well with a mouse too. I do use a tablet but not as much when I'm using Moho, and MQC can help minimize the distance of mouse travelling. (Of course, it still helps to learn the keyboard shortcuts.) :)
User avatar
Greenlaw
Posts: 9386
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Transferring rigs from one file to another

Post by Greenlaw »

ggoblin wrote: Wed Mar 16, 2022 5:24 pm Fantastic demo reel Greenlaw. So many different animation styles, was it all animated in Moho? And the lighting effects? Were all the cats using the same rig or did you have two rigs, one for when the cats are on 4 legs, and one when they are on 2 legs?
My 2019 reel features mainly Moho animation comped in After Effects. My workflow is typically animate in Moho, render using Layer Comps and Moho Exporter, finish in After Effects. Ae is typically used for lighting and effects, sometimes for the camera work. Also, I usually prefer to comp the backgrounds in Ae rather than in Moho...it's faster and more flexible to save that for the final render pass in Ae.

Re: the cats...I animated that quite a while ago but here's what I think my setups were:

There were two basic cat rigs, a sitting cat and a quad cat. The sitting cat never transitions to quad pose, so it was easier to make two separate rigs. The sitting cat can turn its head and/or body side to side, meow, blink, switch its tail and maybe move its ears.

Then there was the quad cat that was able to run, and turn from profile to 3qtr, turn its head, plus the other features (meow, blink, ear twitch, and tail anim.). I believe I made a modified 'above view' for another animator to work with.

These two rigs shared parts and actions where possible...no reason to start from scratch.

There was also a standing version but I think I just modified the quad cat for this.

This was all the cats were expected to do in these scenes so the rigs were no more complicated than that. These rigs may have appeared in later episodes but I had moved on to another show by then.

My 2017 reel also has Moho footage but there's other animation programs featured there too. In general, I work with a lot of different animation programs, and sometimes several programs are used to create a single shot.
Greenlaw wrote: Tue Mar 15, 2022 5:44 pm .. possibly editing the .moho file directly. (A long time ago, I had to do that to edit a Style ID.)
As a matter of interest is the .moho file specification available?
I just opened the project file and searched for what looked like what I needed to change. As it turned out, that wasn't necessary. It was later that Chucky told me about using Unlink Shared Styles option in the Importer to change the Style IDs...that's much easier for this sort of thing.
Last edited by Greenlaw on Thu Mar 17, 2022 3:47 am, edited 1 time in total.
User avatar
synthsin75
Posts: 10013
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Transferring rigs from one file to another

Post by synthsin75 »

ggoblin wrote: Wed Mar 16, 2022 5:24 pm As a matter of interest is the .moho file specification available?
This is all info I know of: https://www.lostmarble.com/forum/viewtopic.php?t=27554
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

Thanks Wes, thats very interesting. Using JSON as its file format opens up a whole new sphere of scripting.

For example I pasted the moho project file for the simple nested bone layer example from the other thread in to an online JSON parser..

https://jsonformatter.org/json-parser

Image

Shows in a very accessible form that the project has 3 bones, the first 'head squash reye' ... bones length is 0.592204 .. shows x,y positions etc.. for example allows possibility to fix bone positions if they are off slightly, etc.

From a cursory glance I didn't find the bone id.. will look again later.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

Greenlaw wrote: Wed Mar 16, 2022 6:13 pm There were two basic cat rigs, a sitting cat and a quad cat. The sitting cat never transitions to quad pose, so it was easier to make two separate rigs. The sitting cat can turn its head and/or body side to side, meow, blink, switch its tail and maybe move its ears.

Then there was the quad cat that was able to run, and turn from profile to 3qtr, turn its head, plus the other features (meow, blink, ear twitch, and tail anim.). I believe I made a modified 'above view' for another animator to work with.

These two rigs shared parts and actions where possible...no reason to start from scratch.
How did you share parts and actions between the rigs? Did you modify one of the rigs with the actions already there to create the second rig, or did you import ( via copy and paste layers ?) from one rig to the other? Did you merge the bone layers from one rig in to the other or did you keep them as nested bone layers?
User avatar
synthsin75
Posts: 10013
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Transferring rigs from one file to another

Post by synthsin75 »

Where you see "bones [3]" for the head bone layer, that's the number of bones. Right below that is "0 {46}." That "0" is the bone ID...the first bone created on that layer. If you hit the arrow beside it, you'll see "1 {46}" below that, and collapsing that, "2 {46}." 0, 1, 2 are the IDs.
User avatar
Greenlaw
Posts: 9386
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Transferring rigs from one file to another

Post by Greenlaw »

ggoblin wrote: Thu Mar 17, 2022 3:41 am How did you share parts and actions between the rigs? Did you modify one of the rigs with the actions already there to create the second rig, or did you import ( via copy and paste layers ?) from one rig to the other?
This was a long time ago but from looking at the footage, it might have been as simple as:

1. I built one cat rig (quad version)
2. saved a copy (sitting version)
3. modified the artwork in the copy
4. modified the skeleton to fit new art

Done. This one was pretty straight forward. I didn't even need to modify the actions or point animations because both rigs use the same cat head.

Back then I was actually more concerned about how to get different colors for other cat variants without spending a lot of time on each cat. The key was figuring out how to change the Style IDs for each variant. If you don't have unique Style IDs for each cat, imported cats wind up inheriting the style of existing cats. At that time, I edited the Moho project files directly because I didn't know about the Unlink Shared Styles option. In the end, I made several cat rigs because of all the fur color variations.

To simplify, I probably imported the second rig into the first rig's project file just to keep the two rig versions together. There was no conflict because each cat has its own bone layer. And then I made new color variants by saving copies and changing the Style IDs by editing the files. If I were to do this today, I would simply import the cats into a new project and enable Unlink Shared Styles...changing the Style IDs this way is much easier.

From what I recall, when I was ready to animate the 'cat heavy' shots, I prepared a project with all the cat variants in same project file. Then, when I imported the file, the import screen listed all the rigs in the file and I simply picked which cats I wanted to bring into the new project. I don't normally cram a bunch of rigs into one project file like this but it worked well for this situation.

Additionally, I created a 'master' project where I animated the quad rig in a run cycle. This version was imported by other animators working on other shots in this sequence.
Did you merge the bone layers from one rig in to the other or did you keep them as nested bone layers?
That wasn't necessary here. The sitting and standing cats have the same bones and all I needed to do was move around and resize them. Be careful not to overthink these things. 😺

All the tricky 'limb sharing/transfer' business described earlier is more useful when you want to share parts between completely different characters, like 'generic' but complicated hand setups for example. (Many of the Boss Baby characters used the same hand setup I originally created for Boss.) If you have complex actions involved, that's when need to do the isolation stuff...this way, you can rename the existing actions and bones and keep existing actions.

The bone ID conflict problem only happens when you use the Bind Points tool or Bind Layer tool, it doesn't happen when you're using one of the other binding methods, like Use Selected Bones for Flexi-binding. So, if you're not using Bind Points or Bind Layer, you can skip that part.
User avatar
Greenlaw
Posts: 9386
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Transferring rigs from one file to another

Post by Greenlaw »

About nested bones...

I generally avoid setting up nested bone layers. When I'm animating a character, it's a lot easier to keep all the keyframes for a character on a single bone layer. When bone keys spread out in multiple bone layers for the same character it really complicates things unnecessarily.

Sure, special situations do come up where I may need to use nested bones but that's really rare. Most of the time, I don't want to deal with it.

Of course, point animations and Switch layer animations have to be keyframed in separate layers. That's when I use Timeline Visibility so I can see the relationship between these layers and the bones layer. I may also set up an on-screen button to select those layers using Synthsin75 Layer Shortcuts script. (The video there shows how I use this script for selecting animation layers in a character. Alternatively, you can use Stan's Layer Selection Buttons.)

The point is, I try to minimize the number of layers where I set my keyframes, and I make it easy as possible to access these layers when I need to edit them.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Transferring rigs from one file to another

Post by chucky »

Greenlaw wrote: Thu Mar 17, 2022 5:39 am About nested bones...

I generally avoid setting up nested bone layers. When I'm animating a character, it's a lot easier to keep all the keyframes for a character on a single bone layer. When bone keys spread out in multiple bone layers for the same character it really complicates things unnecessarily.

Sure, special situations do come up where I may need to use nested bones but that's really rare. Most of the time, I don't want to deal with it.

Of course, point animations and Switch layer animations have to be keyframed in separate layers. That's when I use Timeline Visibility so I can see the relationship between these layers and the bones layer. I may also set up an on-screen button to select those layers using Synthsin75 Layer Shortcuts script. (The video there shows how I use this script for selecting animation layers in a character. Alternatively, you can use Stan's Layer Selection Buttons.)

The point is, I try to minimize the number of layers where I set my keyframes, and I make it easy as possible to access these layers when I need to edit them.
What IF those nested bones could be controlled from the top bone layer ( as if they were actually there).
SO they were not just visible in the top bone layer but selectable and moveable.
Would that potentially change your enthusiasm for such an idea ( assuming it works of as expected with IK and smart actions etc. course) ?
User avatar
Greenlaw
Posts: 9386
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Transferring rigs from one file to another

Post by Greenlaw »

I'm not sure about that.

For me, the most common reason I would nest bones is to keep them out of the parent layer in their own group...face bones, for example. But, TBH, I would rather have keyframeable visibility for bones so I can just show and hide those bones in the parent layer as needed. For example, I might use this to set up an SBD that switches visibility between the body and face bones. This way, the keyframes remain in the parent layer and I don't have to jump into a completely different bone layer to animate them.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Re: Transferring rigs from one file to another

Post by chucky »

No worries, I think you answered a different question than the one I asked. All good though. :D
What I'm suggesting would not have you go to a different layer to animate.... that's the whole point. :roll: :D
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

synthsin75 wrote: Thu Mar 17, 2022 3:59 am Where you see "bones [3]" for the head bone layer, that's the number of bones. Right below that is "0 {46}." That "0" is the bone ID...the first bone created on that layer. If you hit the arrow beside it, you'll see "1 {46}" below that, and collapsing that, "2 {46}." 0, 1, 2 are the IDs.
Ah ok. I thought that was just the index of the array holding the bones.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

Greenlaw wrote: Thu Mar 17, 2022 4:52 am

This was a long time ago but from looking at the footage, it might have been as simple as:

1. I built one cat rig (quad version)
2. saved a copy (sitting version)
3. modified the artwork in the copy
4. modified the skeleton to fit new art

Done. This one was pretty straight forward. I didn't even need to modify the actions or point animations because both rigs use the same cat head.
That seems to be the sensible approach that works well with Moho - reuse a rig by making a copy of it and then building on it the new features that you require.

This is different to a modular approach where you plugin rigs (import) into a new rig when that functionality is required. The modular approach of course has several advantages. For example if you decided that the cat needed a talking mouth.. apart from adding it to the original (quad version) rig you would also need to retrofit it to all the versions that were derived from that original version (sitting version, walking version..). In a modular approach you could add it to the mouth rig which could be referenced by the cat head rig which could be referenced by all the different cat poses rigs. All the advantages are of course lost if that method works against the way Moho is designed to be used.
Greenlaw wrote: Thu Mar 17, 2022 4:52 am The sitting and standing cats have the same bones and all I needed to do was move around and resize them. Be careful not to overthink these things. 😺
Funny you should say that as I was thinking the opposite - that your example is teaching me to think ahead before creating the rig - a sitting cat doesn't need all the bones a quad cat does and its easier to build, but you chose to build the more complex quad cat first so that all future derivations like the sitting cat would have that full functionality built in. :)

Greenlaw wrote: Thu Mar 17, 2022 4:52 am The bone ID conflict problem only happens when you use the Bind Points tool or Bind Layer tool, it doesn't happen when you're using one of the other binding methods, like Use Selected Bones for Flexi-binding. So, if you're not using Bind Points or Bind Layer, you can skip that part.
I haven't hit the bone ID conflict problem yet but the tutorials I have seen suggest using layer binding for the head as you don't want it to deform when moved, and layer binding the hands if you use a switch layer for hand shapes. And for smooth limb joint movement I tend to use point binding rather than go overboard with smart action 'fixes' . :(
Last edited by ggoblin on Thu Mar 17, 2022 6:52 pm, edited 1 time in total.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Transferring rigs from one file to another

Post by ggoblin »

chucky wrote: Thu Mar 17, 2022 3:50 pm What I'm suggesting would not have you go to a different layer to animate.... that's the whole point. :roll: :D
Intriguing. How would you do that?

Would it entail setting up lots of smart bones in both the main bone layer and the nested bone layer (as per the discussion in the other thread? https://lostmarble.com/forum/viewtopic.php?t=34924 ) or is there another way to control for example point transform animation in a nested bone layer from the main bone layer?
Post Reply