Page 1 of 1

Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 1:25 pm
by Hoptoad
I am confused. Usually, what I see in the Moho workspace is what I get when exporting. I animate my vector art in the workspace, and when the timing is correct for all the movements, I export the animation as an mpeg. The speed of the animation in the mpeg is identical to speed of the animation in the workspace. That is how it usually goes.

Somehow, that did not happen yesterday.

I made a 30-second cartoon in the workspace. When the timing of everything was correct, I exported it. I played the exported mpeg and was stunned. It was awful. The animation was too slow.

I went back to my cartoon in Moho and realized that the time slider (the vertical line which traverses the frames) is incorrect. When playing the work-in-progress cartoon, the time slider is moving way too fast, almost twice as fast as it should be moving. The time slider covers around 2 seconds every second! Unfortunately, I failed to notice this problem while animating the 30-second cartoon.

How do I stop this problem from happening again?

I can't simple readjust the keyframes. I used physics to animate numerous shapes that crack, fall apart and tumble to the floor. Even changing one tiny thing would disrupt the physics and I like how everything falls apart.

I guess I can use a video editor to re-record the mpeg to play faster, matching the speed I saw in the Moho workspace while animating. I'm guessing my thirty-second cartoon is probably a fifteen-second cartoon. Sigh.

This is so weird. I never had Moho do this before. Did I accidentally check a box somewhere that speeds-up the playback?

EDIT: I did some online research and learned something. This problem may be a Moho bug which happens because of the Physics engine for some reason.

I'm using Moho 12.5. Does the bug persist in 13.5?

I'm enjoying the Physics engine a lot. I don't want to have to avoid it while animating. Does anybody know what specific activity triggers the bug? Maybe I can avoid doing that one particular thing, like lowering gravity or increasing a shape's friction level or whatever.

Re: Animation plays at the wrong speed

Posted: Mon Jul 26, 2021 6:56 pm
by Greenlaw
If it's group physics you're using , once the animation is baked, just disable physics since there's no point in having Moho continuously calculate the simulation while you're animating. The baked keys are just regular keyframes so you can stretch/compress the timing using Alt to speed up or slow down the anim.

Not sure why the animation was speeding up in you project, but simply pressing play does not mean Moho will play back the animation in real-time...Moho may try to, but it depends on the complexity of animation. With physics involved, my guess is that real-time playback shouldn't be expected.

Well, anyway, when I do this sort of thing in a 3D program, I don't expect 100% real-time playback until after I've baked the animation and removed the physics calculation, and I would think the same applies to Moho. Even then, I don't expect it if it's a super complex animation.

The only sure way to view real-time playback (2D or 3D) is to render the project out as a movie file. Since you're only checking the motion, preview quality settings is totally fine for this. (For example, Preview Animation is a good quick way to check animation timing for complex projects.)

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 7:23 pm
by Hoptoad
I'm not sure what you mean about baking physics or disabling physics. I'm new to physics.

After reading your post, I guessed that needed to go into the folders where the Physics layers are located and check the boxes called "Use baked physics (advanced)."

AND IT WORKED! The time-slider is working properly now. Thank you.

Should I always have this box checked at all times? I have no idea what it's for.

You mentioned disabling physics. How? I'm guessing that after the physics do their thing and there are a million keyframes, I should disable physics to improve Moho's performance, so Moho won't do physics calculations?

As far as real-time playing in the Moho workspace, I think Moho does a pretty good job, as far as I can tell -- at least with my computer. It is an old computer, but it has 16 GB of RAM, so that helps with real-time playback. That's why I was stunned when the exported animation was drastically different.

EDIT:

I opened the mpeg in iMovie and played it at x2 speed, and the movie looks great. That is, it plays at what I think of as 100% speed. It looks just like it looked in the workspace while I was animating it. Evidently Moho's workspace was exactly double speed.

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 8:40 pm
by Greenlaw
Baking, in this case, just means automatically creating a keyframe for every fame. You might think of it as motion capture for physics simulations. Once this is done, there is no need to re-calculate a simulation so you can turn it off. (More info in the next paragraph.) Well, that is, unless you want to change the simulation of course. Then you need to run the sim again and bake it again. This is a common workflow in many 2D and 3D applications because it keeps things efficient, predictable, and easily editable. BTW, since the keys are just regular keyframes, if you want to, you can edit and change them as necessary without recalculating. In other words, you're not locked into using a simulation exactly as calculated.

In Moho, yes, you need to enable Advanced Physics to get baked keyframes. Sorry, I forgot to mention that. You can leave it off until you're satisfied with the simulation, and then enable Advanced Physics. After the keys are baked, disable Enable Physics (Animated). Disabling this option effectively disables both options. Now Moho is no longer calculating physics or baking keys, but you still have your animation as calculated. That's pretty much it.

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 9:49 pm
by Hoptoad
Thank you for the information. Moho is amazing.

In my cartoon, I have large objects on a table breaking into pieces and the pieces collapsing into piles. I'm using physics for animating the pieces/shapes. I like to tweak gravity, density, and so forth to create interesting piles. The problem is, if I change anything in the physics folder, however slightly, Moho recalculates everything and the nice pile is lost and a different pile takes its place.

It sounds like I can "bake" the physics, so when I like the look of a pile, I can preserve it. That is great. Thanks again for the information.

Thanks also for the tip about being able to manipulate the shapes in the physics folder. I had figured that out earlier, but I do have a question on the topic. I can only move those physics-affected shapes with the translate points tool, as the translate layer tool doesn't work on them. This is correct, right? It seems strange to me that I cannot use the translate layer tool on the shapes in the physics group, but that is what I'm experiencing. Not a big deal, but strange nonetheless.

I am enthralled by physics. Have you used the force field for anything? I'm not sure what to do with it, but the name makes me want to use. :D

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 10:12 pm
by Greenlaw
Yeah, playing with physics is fun! TBH, though, I haven't used physics a lot inside Moho but, conceptually, I don't think it's that different from using physics in 3D programs. (Just less one dimension, of course.)

A force field is something you can move around as a collision object or as wind or magnet to affect other objects. Usually, it's invisible, and you can use it to direct a simulation. I use this in 3D all the time to sort of 'puppet' a simulation so it does what I need it to do, because in movies and TV, realistic simulations almost never have anything to do with what producers actually want to see.

To see an example in a 3D program, look at leaves in the 'excerpt' from my Brudders music video project here:

https://littlegreendog.com/2016/02/21/t ... sic-video/

The blowing leaves are directed using force fields and invisible collision objects. I used different forces to get the leaves to spin on the ground, gather along walls and tombstones, or to weave through 'air streams' or follow pathways. Otherwise, the leaves would just sort of blow randomly all over the place, which is not what I want. (Sigh...one of these days, I'll finish this stupid project.) :wink:

I can't recall if I've ever used this feature in Moho but I'm thinking it's the same idea. Will take a quick look in my lunch break today.

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 11:01 pm
by Greenlaw
I took a quick look during my lunch break. It appears Force Field pushes whatever is in the simulation, and you can keyframe the amount of force and the direction. I don't think animating the position does anything extra. So, it's a simplified version of what I described earlier...you can use it to guide items inside the simulation. If this was a more advanced tool, you could also set the range, falloff, invert the force, and animate the item within scene...among other fun options. (It would be cool to see this feature in Moho get expanded in the future...but then again, there are other useful things I'd rather see improved in Moho before that.)

Another tip: remember, you can also use vector art to guide your simulations. Just set them as non-moving collision objects, and you can hide them before you do your final renders.

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 11:03 pm
by Hoptoad
Thanks for researching force fields.

Cool video. The movement of the leaves made them seem more real.

Re: Animation plays at the wrong speed (bug?)

Posted: Mon Jul 26, 2021 11:11 pm
by Hoptoad
Greenlaw wrote: Mon Jul 26, 2021 11:01 pm Just a thought: remember, you can also use vector art to guide your simulations. Just set them as non-moving collision objects, and you can hide them before you do your final renders.
I had been using non-moving collision objects, but I made them alpha = 0, so they would be invisible. I like your idea of hiding them before rendering -- that way I can still see them while animating. A couple times an invisible object caused a small problem because I forgot it was there and something landed on it.

Re: Animation plays at the wrong speed (bug?)

Posted: Tue Jul 27, 2021 3:43 am
by SimplSam
Just started using the Force Fields a couple of week ago - and in my head I said - "they affect other objects during collisions, without being affected by other objects".

Another feature is the Nudge ([Animation] > [Nudge Physics Object]) - which allows you to kick objects in a particular direction with a particular force at a particular time - without having to direct something to collide with it.