Reference layers for imported (by reference) rigs

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
dondo
Posts: 60
Joined: Tue Jan 15, 2019 4:45 am

Reference layers for imported (by reference) rigs

Post by dondo »

I'm either doing something fundamentally wrong, or I fundamentally misunderstand something important. Or, you know, both.

I'm struggling to deal with the moment that a character needs to exist on both sides of a prop - say, hug a tree. I learned from another thread on this forum about the idea of creating a reference layer, and hiding the pieces of the front layer as needed. Perfect, just what I need. I whip up a practice file, make sure I understand how reference layers work, awesome, I'm good to go.

So now it's time to do it for real. It's go time!

So thanks to the amazing people on this board, I have a slew of characters rigged up, and I have rich sets in which they're going to have adventures. Things work pretty well all in all. For each scene, I import the set, and then import the characters - and I specify "Import by reference" because, well, the rigs are still evolving as I learn, and because I think I remember that being what the tutorials suggested. Then I create the reference layer, and I notice the first oddity - in the layers panel, the icon indicating that it's a reference layer is the same - there's no difference between the "local reference layer" that I had expected to be referring to the other layer in this file, and the "source reference layer" (which should have some flavor of that little red "target") referring to the source file for the character rig (that I expected to be the target for the "local" one). Huh, that's not very moho-like, they've typically been really good about distinguishing modes.

And then I move the "source reference layer," the root of the local references... and the "local reference layer" is unaffected. Now, I know that if I move the local reference layer, it breaks the connection, so maybe I accidentally moved something? So I carefully start over... same behavior. Out of desperation I decide to introduce the "local reference layer" at the exact moment I need it, and discover that it works... until I hide any part of it. But... I thought that was the point?

So I'm not sure what I'm misunderstanding. Based on the iconography, I'm suspecting that the "local reference layer" is in fact referring to the source file - which implies I'm importing my characters wrong. Or perhaps I'm creating the reference layer wrong? Or... maybe something I haven't thought about?

Any pointers would be greatly appreciated.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Reference layers for imported (by reference) rigs

Post by Greenlaw »

I think you're confusing Import By Reference, which involves an exterior file, and creating a Layer Reference which is local to the project.

For the tree example, you want to put your character in a group and create a Layer Reference of that group. Then, place one group in front of the tree and the other behind the tree. Normally, you want to animate only the original folder which has the target icon (the Layer Reference will have the arrow icon.) If you accidentally animate the Layer Reference by mistake, you can sync it by right-clicking the Layer Reference and choosing Sync All Channels. (This is where I wish we could lock a layer. Synthsin75 has created a script that let's you do that but this really needs to be a native feature.)

Import By Reference is good for getting a character rig into a Moho scene that references another project file. The idea is that if you modify the original project, Moho will alert you that the original project has been changed and you have the option to update the imported reference to match the original. This is meant to make rig updating rig and artwork changes easier, and not really intended for updating local animation changes (like you would with Layer Reference.)

There are a few 'gotchas' with using Import As Reference. For example, not all bone properties will update (changes to bone strength, for example,) and major changes to the original can completely hose the animation in the project referencing the 'master' project. Be sure you're working with a copy of the project when updating a Reference rig.

If updating a Reference Project fails, you can try importing the new version of the rig into the same scene, and then copying and pasting the animation from the old version to the new. I usually have to do that after I make a drastic change to the master rig. Fortunately, that doesn't happen often.

Tip: if you don't need to update a referenced rig in a given project, don't do it! Just because you can doesn't always mean you should. And save file versions...you can never have too many versions you can safely fall back on. Moho's auto save feature can be handy but you should never depend on it.

(I think Synthsin75 also wrote a script that saves incremental versions at defined time intervals. I don't have that script but now that I'm thinking about, I'm going to look for it. IMO, this is another feature Moho should have built-in.)
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Reference layers for imported (by reference) rigs

Post by Greenlaw »

I want to pass on a tip I learned from Jeremy at Cartoon Saloon. This is probably more useful if you're working with team of animators, and it's worked out well with the animators I work with:

When you create a character rig, import that rig into an empty project, and then make this second project your 'master' project. When you import your Rig Reference from this file, it will import like a normal Rig Reference. The advantage with this system is that you can continue to work on the original rig and save the file without worrying about this messing up other artists who may already be using the 'master' file in their projects. When you're ready to release the updated rig, you can update the 'master' file and it becomes available to everybody on the team

As mentioned earlier, be sure you keep backups and versions of your files just in case an updated reference 'explodes' everybody's scenes.
dondo
Posts: 60
Joined: Tue Jan 15, 2019 4:45 am

Re: Reference layers for imported (by reference) rigs

Post by dondo »

As always, Greenlaw, thanks for the careful and insightful commentary. The details about how "Import by reference" were definitely helpful - there's so much still to learn! If nothing else, you've confirmed that the basic approach of using "Import by Reference" is a common way to use e.g. rigs. The idea of having a "release" version of the rig for a large shop is a great one. (BTW, taking a note from my day job as a software developer, if there were more than just my wife and me involved in this I would probably go a step further and use "git" or another full featured version control system to formally manage rig versioning. In fact, now that I've typed that, I think I'll do it for myself even though I'm really the only person working on the rigs - it totally would have paid me back already on some of the failed experimentation I've been doing!)

However, I actually wasn't confusing "Import By Reference" with "creating a Layer Reference" (local to the file). Let me describe what I'm seeing a little more carefully:

Scenario 1: I import my rig, NOT by reference. I then create another layer within that file using "create reference layer." That character hugs trees like you would not believe.

Scenario 2: I import my rig, checking "import by reference." I then create another layer within that file using "create reference layer" (specifically by right-clicking on the layer and selecting "Reference Layer" from the popup menu). These two layers just plain don't like each other, one giving up on the other unpredictably.

Based on your feedback, I played with a couple more options in the popup, and I'm seeing something else that makes me suspicious. When I select "Locate Original Layer," both the original imported layer and the "local Layer Reference" end up opening the external rig file. It makes sense that you should be able to have a local reference to a layer that in turn has a external reference, but I can't figure out how to do it.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Reference layers for imported (by reference) rigs

Post by Greenlaw »

Ok, now I understand what you mean. I don't think it's supposed to act up like that, and I'm almost certain I've used Moho at my workplace the way you described without a problem...but I'll have to play around with Moho when I get home and see if it's doing it for me too.
dondo
Posts: 60
Joined: Tue Jan 15, 2019 4:45 am

Re: Reference layers for imported (by reference) rigs

Post by dondo »

Learn anything? Totally understand that you're doing this as a volunteer, and I get it if you decided to, I dunno, have a life instead of answering my questions.

(...and I just looked at the index and realized - whew, I've had a lot of 'em! Thanks again for all your help. You guys have been transformative. :) )
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Reference layers for imported (by reference) rigs

Post by synthsin75 »

You can't chain reference layers in Moho, even within the same file. IOW, if it's already a reference, trying to reference it only results in a duplicate that references the same source...in your case referencing the external source.


There "might" be a way to change that with scripting, but I can't verify that yet.
EDIT: Nope, I can't change the reference source by script.
dondo
Posts: 60
Joined: Tue Jan 15, 2019 4:45 am

Re: Reference layers for imported (by reference) rigs

Post by dondo »

Well, at least I'm not losing my marbles. :)

I'm kinda perplexed, though. It seems to me that these two types of referencing (import by reference vs. local reference layer) solve very different problems. One allows me to refresh an external file to bring in updates; the other allows me to synchronize transformations at two different layer depths. It sounds like I have to choose between them - I either allow rigs to be updated or let my characters "hug a tree" - right?

How do you deal with this? I think it's pretty clear that I need to be able to have synchronized layers, so if I have to choose I guess I have to sacrifice the ability to update... but that seems a weird compromise to have built into the application. Do you not import characters "by reference?" How do you perform those imports?
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Reference layers for imported (by reference) rigs

Post by Greenlaw »

Just did a simple test, and I see you're right. I'm guessing the way I dealt with this previously was to break the reference before making the layer reference.

I know that's not the answer you're looking for but that's one way to get the job done. In this situation, if you need to revise the rig, you'll probably need to import the revised rig and then copy/paste the animation from the old rig to the revised one.

I've had to do that on occasion. It's not a big deal unless you have a lot of animation on separate layers. If you do most of your animation on bones and Smart Bones, this should be relatively painless.

It seemed like a while back somebody wrote a script to export animation data so you can import and apply it in another scene. You might look around for that. But, IMO, copy/pasting timeline data shouldn't be a big deal for most rigs.
dondo
Posts: 60
Joined: Tue Jan 15, 2019 4:45 am

Re: Reference layers for imported (by reference) rigs

Post by dondo »

Ah... Of course! Pretty much the only animation we've been doing that isn't bones has been "Transform Layer" on occasion for movement, but now that you point it out, I can't think of why I wasn't avoiding even that by just manipulating the root bone instead. That totally works, and solves the problem.

I'm running out of ways to express my fawning gratitude, but damn, you guys are amazing.
Post Reply