Smart Bone summons rainbow beachball

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Smart Bone summons rainbow beachball

Post by Hoptoad »

I have a character rig that works fine.
The character has 20 different mouths in a switch layer and the switch layer works fine when I animate the mouth.

So. . .I created a smart bone to speed-up lip syncing. The bone can be rotated 180 degrees to choose from one of the 20 switch layers.
It works as expected.

However, every few minutes, while I'm using the smart bone to choose a phoneme, the rainbow beachball will appear for a few seconds, freezing the interface.
This is weird, because I never see the beachball when animating with Moho.

Obviously the new smart bone is the problem somehow, but why?
And is there something I can do to fix it?

I rarely use smart bones to control switch layers, so I had made a few errors while setting it up until I got it right. It seems unlikely, but is it possible that I did something wrong that's impacting Moho's performance?

There is also another weird thing going on.
I went to bed last night before finishing the lip sync in a Moho file.
This morning, the smart bone was doing something weird.

When I spun it to point at a new phoneme, the mouth of the character would change to the new phoneme, but as soon as I released the mouse button, the mouth art would revert to the default art.
And yet, the keyframe had been updated. So the keyframe was correct, but the art didn't reflect that.
If I saved the file, the correct phoneme art would appear in the workspace, or if I clicked the keyframe, the correct phoneme art would appear.
This is only a nuisance, but still. . .it shouldn't be happening.

I closed and opened the file and the quirky behavior persisted.

I opened a new file and imported the character, and its smart bone does not exhibit the quirky behavior. Yay.
But the occasional rainbow beachball still appears, freezing the interface.

Thanks.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Smart Bone summons rainbow beachball

Post by Greenlaw »

FWIW, I haven't used a Smart Bone Dial to animate mouth Switch layers for years. IMO, it's easier and faster to use the Switch Selection window.

For the longest time, I regularly used the SBD method to animate mouths, but stopped after I tried the Switch Selection window to animate the mouth for the biker granny character in Boss Baby. (See my 2019 reel @ around 2:01 for reference.) Here are the reasons I switched (ha, ha)...

The downsides to using a Smart Bone for animating mouth Switch Layers:
1. Long setup time.
2. Additional steps required to update the setup for new shapes.
3. Drawings don't display labels (unless the SBD also drives a separate switch layer for non-rendering text labels. More extra work.)
4. Incompatible with Interpolate Sub-layers.

Upsides to using the Switch Selection window instead:
1. Setup time is negligible. Just open the Switch Selection window and select a switch layer.
2. Updating is easy. Just add a new drawing to the Switch Layer, and the window displays it.
3. Drawing label visible under drawing in window. (Assuming you name your drawings.)
4. Fully compatible with Interpolate Sub-layers. (I wanted to use this for the granny because Moho had just gotten Interpolated Sub-Layers for Groups at that time.)
5. Animating with the Switch Selection window is a breeze. Just scrub to the drawing you want and it creates a keyframe automatically.

Tips for using Switch Selection:

One thing I find annoying about the Switch Selection window is that the current drawing will always scale up in the view, which makes it harder to compare drawings as you scrub through. To work around this behavior, I add a common 'bounding' box layer to each drawing group, shaded to be fully transparent. Because this layer is the same for every drawing, it maintains the relative scale and position of the contained drawings as you scrub the window. Yes, this is a little extra work but I feel better user experience when animating with this tool. (Sub-tip: use a reference layer for the 'bounding box' layer. This way, when you added a new drawing that's bigger than the box shape, it can be updated easily.)

One tool I like using with the Switch Selection window is Synthsin75's Layer Shortcuts. This tool let you select any Switch layer by clicking on a button in the Workspace. Unfortunately, this tool currently doesn't work for imported projects, but Wes says a fix will come so keep an eye out for it.
Last edited by Greenlaw on Thu Jul 21, 2022 8:59 pm, edited 2 times in total.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Smart Bone summons rainbow beachball

Post by Greenlaw »

Something I just thought of:

For mouth animation, what might be a better application of an SBD is to use it to switch between different Switch Layer sets. For example, you might have a Switch Layer for 'neutral' mouth shapes, and additional Switch Layers for different emotion variants of the same mouth shapes. Or maybe you can have different Switch Layer sets for extreme head angles. The point is, this system can make it easier to manage many drawings and make it easier to scrub to the drawing you want.

Years ago, I made a group character rigs that had over a hundred hand drawings. Originally, I placed all the hand drawings inside a single Switch Layer and that was a nightmare to work with. This system became saner when I started grouping the drawings into multiple categorized Switch Layers inside a master Switch Layer.

If you don't want to use the Switch Selection window for some reason, another good alternative method is to simply press Ctrl + Alt + R-click over the drawing. This will make a pop up list appear that you can select the drawing from. (Of course, this assumes you've taken the time to name your drawing layers.) The cool thing about this method is you don't even need to select the switch layer to animate...just click over the current drawing in the switch layer. Tip: if the mouth drawings are small, or you have an 'empty' layer, you can add a non-rendering 'bounding box' layer to each drawing group to make it easier to select the drawing.

(Yeah, at this stage in my career I've explored pretty much every possible way to animate Switch Layers in Moho...and I haven't even covered them all here. Seriously though, Switch Selection is the easiest and fastest method.) 😸
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Smart Bone summons rainbow beachball

Post by Hoptoad »

Thanks for the reply.
I like the switch selection window when there's only a few choices to scroll through, but when there's 20+ choices, it slows me down. I timed myself and I'm faster using switch layers the typical way: right-click on switch layer group, left-click on selection.

Under my smart bone dial, I made a layer of vector art which identifies each phoneme, so rotating the smart bone to "TH" or whatever is a breeze. But yeh, it took a while to set up. And altering the contraption to include another switch layer would be an ordeal. But I timed myself, and I'm 25% faster with the SBD versus right-click/left-click.

If the switch selection window had tiny thumbnails arrayed along the bottom, perhaps ones that were clickable, I'd be thrilled.
Something along the lines of this. . .

Image
User avatar
MrMiracle77
Posts: 181
Joined: Mon Jun 24, 2019 2:30 am

Re: Smart Bone summons rainbow beachball

Post by MrMiracle77 »

Check out synthsin's Switch Icon script:

viewtopic.php?t=34078

It adds an option bar interface that generates preview images of your switch layers and lets you change them with a click. You can even move the timeline by click-dragging in the preview pane to help speed up lipsync.
- Dave

(As Your GM)
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Smart Bone summons rainbow beachball

Post by Hoptoad »

Thanks, I had used that script in the past. I don't know why it stopped working, but it stopped working for me. Moho will crash if I try.
I just tried it again. Crash.

That is a nifty script, though.
I'd like to see LostMarble to add something similar to Moho.

In my mind, Moho is about speed. Bones and layers make animation much faster. If I was CEO of LostMarble, I would focus on speed.

FASTER FASTER FASTER!

Everything FASTER!
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Smart Bone summons rainbow beachball

Post by Greenlaw »

Hoptoad wrote: Thu Jul 21, 2022 6:22 pm I like the switch selection window when there's only a few choices to scroll through, but when there's 20+ choices, it slows me down.
Yes, this is why I suggested making sub-group switches controlled by an SBD. It makes working with many drawings more manageable. In the case of hands, for example, I'd make separate Switch Layers for each of four angles, and then use a 'hand turn' SDB to switch between the four using a master 'hand' Switch Layer.

I just wish Moho had a direct way to select the desired Switch Layer for the Switch Selection window. Layer Shortcuts does make this much easier, but as mentioned earlier there's an issue with the current release.

Of course you can use an SBD to control the sub-switches too. Just make one 'hand turn' SBD to switch between view Switches, and then use either the Switch Selection window or another SBD to switch the drawings.

(What I do for hands at my workplace these days is a bit more advanced than the above but easier to animate with once set up. It's way too much to go into here but I'll make a tutorial about it later.)

Regarding the stalling you described in the original post, I don't think I've seen that. Check that don't have any unintended negative keyframes by using Synthinsin75's Delete Negative Keyframes script. Whenever I see a mysterious performance issue in Moho, this is my first response. If that's not the problem, maybe the project or the display options can be optimized? To check if this is a display issue, see if it's any faster when GPU acceleration is disable/enabled (whichever is different from your current setting.) If that's not it, maybe try optimizing your drawing layers?

Hope some of this helps.
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Smart Bone summons rainbow beachball

Post by Hoptoad »

I installed the negative keyframe script. Thanks for the tip.
No negative keyframes. Yay.
But that test got me thinking: Mac has an Activity Monitor which allows me to see where the CPU spends its energy. . .

I think I figured-out the problem.

Moho generally uses 20-50% of my CPU power. Rotating or scaling points is no big deal to Moho, energy-wise, but the Smart Bone Dial takes a lot of power. The SBD can crank-up the CPU usage to 70% or so.
But that still leaves my CPU with plenty of power, right?
So I'm wondering, what is using that power?

I think it is auto-save.
When I manually saved, the CPU shot-up to over 90%.
I suspect that when I'm using the SBD rapidly , click click click, and Moho auto-saves, that I will sometimes get the rainbow beachball as a consequence.

* * *
Ugh. Never mind. I just checked.
I had "auto-save for crash recovery" turned off.

Oh well.
The rainbow beach ball is pretty. Maybe whenever I see the beachball, I'll remember the beach for those few seconds and be happy.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Smart Bone summons rainbow beachball

Post by Greenlaw »

Good guess though. I'm not sure I've seen pauses caused by Auto-save in Moho but I have seen it in other programs that have Auto-save.

Just curious but is the performance any better when you turn Auto-save on? (FWIW, I believe the Auto-save crashing bug is fixed in the current 13.5.5 update. I keep it on now and it seems very stable here anyway.)

Another thought: do you have any of the third party auto-save scripts installed? If so, is it better when you disable the script?
User avatar
Hoptoad
Posts: 619
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: Smart Bone summons rainbow beachball

Post by Hoptoad »

I appreciate the help.
I think I tracked down the problem.

My Digital Audio Workstation (Reaper) may've been the culprit, pulling energy from the CPU. The DAW wasn't being used -- it was "on" and minimized -- so it shouldn't be using more than a fraction of a percent of the CPU.
Yet it was using 10-15%.

I turned it off and Moho has been working fine.
No more spinny beachball.

Thanks again for the helpful ideas.
Sometimes I learn something from your suggestions and tips that I recall and implement months or years later.
You shared a lot of good info in this thread about structuring switch groups that I'll try later, I'm sure.

I bet if you collected all your Moho tips into a PDF, it would be something like 300 pages long.
I'd pay $25 for that.
Hoptoad: the first in line for Moho Tips by Little Green Dog.

Volume 1.
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Smart Bone summons rainbow beachball

Post by Greenlaw »

Yay! Glad to hear you got that solved! 😺
Post Reply