Animate the pivot point?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Animate the pivot point?

Post by ggoblin »

Hi, is it possible to animate the pivot point?

So for example during an animation of a layer you want the centre of rotation in that layer to change? I suppose a workaround might be seperate layers grouped together for common rotation?
User avatar
Greenlaw
Posts: 10439
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the pivot point?

Post by Greenlaw »

Yes, I just use another group. Groups can essentially used like nulls or locaters in a 3D program. I use Groups all over the rig for this purpose...for example, to add secondary squash and stretch after I've animated a walk or run.

Tip: when you use a group as a secondary pivot point, name the layer in a way that you know exactly what it's for. For example, in the above setup I might call the group layer 'bounce' or 'squashAndStretch'.

I keep hoping we get the equivalent of null objects in Moho so we can construct advanced camera rigs. ATM, I have to do this in a 3D animation or a composting program.
Last edited by Greenlaw on Thu Jun 23, 2022 9:23 pm, edited 3 times in total.
User avatar
Greenlaw
Posts: 10439
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the pivot point?

Post by Greenlaw »

You can also use a hierarchy of bones to do this...this is better if you want to keep the control and animation within a single layer.

But TBH, I prefer the Group approach because it's easier to mute the offsets and motions this way when I need to. Since I mainly use it for secondary motions, it makes sense to keep these keys in another layer.
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Animate the pivot point?

Post by Lukas »

I scripted a version of the 'Set Origin' tool that allowed the pivot point to be animated. It's dependant on a layerscript on a bone layer and simply attaches the pivot point to a pinbone named "Origin". I can find some time to upload it up if you're interested in a scripted solution. The tool also supported switch layers where the child layers would be able to dictate the Origin position of the switch (or FBF layer).
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Animate the pivot point?

Post by ggoblin »

Lukas wrote: Thu Jun 23, 2022 9:18 pm I scripted a version of the 'Set Origin' tool that allowed the pivot point to be animated. It's dependant on a layerscript on a bone layer and simply attaches the pivot point to a pinbone named "Origin". I can find some time to upload it up if you're interested in a scripted solution. The tool also supported switch layers where the child layers would be able to dictate the Origin position of the switch (or FBF layer).
Thank you Lukas, I am intrigued - it sounds like an innovative approach to solving the problem. If you do get a chance I would love to try it out. Thanks.
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Animate the pivot point?

Post by ggoblin »

Greenlaw wrote: Thu Jun 23, 2022 7:14 pm Yes, I just use another group. Groups can essentially used like nulls or locaters in a 3D program. I use Groups all over the rig for this purpose...for example, to add secondary squash and stretch after I've animated a walk or run.

Tip: when you use a group as a secondary pivot point, name the layer in a way that you know exactly what it's for. For example, in the above setup I might call the group layer 'bounce' or 'squashAndStretch'.

I keep hoping we get the equivalent of null objects in Moho so we can construct advanced camera rigs. ATM, I have to do this in a 3D animation or a composting program.
Thanks Greenlaw for the prompt response. I just did a quick search of the forum and surprise surprise you apparently asked the same question 16 years ago when you were just one week into Moho :D :

http://www.lostmarble.com/forum/viewtopic.php?t=4111

I haven't gone through the replies but I'm guessing that since you are still using groups as a work around, the solutions on offer didn't work out..

Yes it would be great to get null objects in Moho. I'm not sure how you manage to do the camera work in the composition program, what resolution do you export from Moho to allow further movement / cropping during composition?

[ EDITED: Sorry my mistake your post was about moving pivot point for point rotation, not animating it ]
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Animate the pivot point?

Post by Lukas »

ggoblin wrote: Fri Jun 24, 2022 1:37 amThank you Lukas, I am intrigued - it sounds like an innovative approach to solving the problem. If you do get a chance I would love to try it out. Thanks.
You can download it from mohoscripts.com, let me know if anything doesn't work:

Image


Put these files:
- LK_Origin_Bone.lua
- LK_Origin_Switch.lua


in this folder:
/YourCustomContentFolder/Shared Resources/Layerscripts/
User avatar
Greenlaw
Posts: 10439
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the pivot point?

Post by Greenlaw »

This sounds very useful Lukas. Will check it out this weekend.

Thanks for sharing your scripts! 😸
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Animate the pivot point?

Post by ggoblin »

Lukas wrote: Fri Jun 24, 2022 12:04 pm
ggoblin wrote: Fri Jun 24, 2022 1:37 amThank you Lukas, I am intrigued - it sounds like an innovative approach to solving the problem. If you do get a chance I would love to try it out. Thanks.
You can download it from mohoscripts.com, let me know if anything doesn't work:

Image


Put these files:
- LK_Origin_Bone.lua
- LK_Origin_Switch.lua


in this folder:
/YourCustomContentFolder/Shared Resources/Layerscripts/
Brilliant, thank you Lukas, I will check it out!
User avatar
WargaNetLife
Posts: 16
Joined: Mon Apr 26, 2021 6:58 pm
Location: Indonesia
Contact:

Re: Animate the pivot point?

Post by WargaNetLife »

Lukas wrote: Thu Jun 23, 2022 9:18 pm I scripted a version of the 'Set Origin' tool that allowed the pivot point to be animated. It's dependant on a layerscript on a bone layer and simply attaches the pivot point to a pinbone named "Origin". I can find some time to upload it up if you're interested in a scripted solution. The tool also supported switch layers where the child layers would be able to dictate the Origin position of the switch (or FBF layer).
Hello Lukas, I have downloaded your script. I have followed the installation method.
But when I try it doesn't work. Even though I already embed "LK_Origin_Bone.lua", I've also changed the name of the bone to "Origin"
Please help
Arby D.K.
Creator - WargaNet Life - Naya & Loli
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Animate the pivot point?

Post by Lukas »

WargaNetLife wrote: Sun Jul 24, 2022 4:29 amHello Lukas, I have downloaded your script. I have followed the installation method.
But when I try it doesn't work. Even though I already embed "LK_Origin_Bone.lua", I've also changed the name of the bone to "Origin"
Please help
Could you specify what version of Moho you are using?

If you've got the layerscript embedded and have a bone called "Origin", the layer origin of the bone layer will (should) snap to that bone. Is that happening?

After setting it up correctly, you can animate the pivot with any bone tool. Or use my LK_SetOrigin tool to animate the Origin. Note that it doesn't work with the original Set Origin tool. In fact, if you've got your bone named "Origin" and layerscript "LK_Origin_Bone" embedded, the original Set Origin tool no longer changes the origin.
User avatar
WargaNetLife
Posts: 16
Joined: Mon Apr 26, 2021 6:58 pm
Location: Indonesia
Contact:

Re: Animate the pivot point?

Post by WargaNetLife »

Could you specify what version of Moho you are using?
I'm using Moho version 13.5.5
If you've got the layerscript embedded and have a bone called "Origin", the layer origin of the bone layer will (should) snap to that bone. Is that happening?
It works :D Thank you
But, does it work if you don't use the embed method? Like the tools in "other"
Arby D.K.
Creator - WargaNet Life - Naya & Loli
User avatar
Greenlaw
Posts: 10439
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Animate the pivot point?

Post by Greenlaw »

ggoblin wrote: Fri Jun 24, 2022 1:49 am Thanks Greenlaw for the prompt response. I just did a quick search of the forum and surprise surprise you apparently asked the same question 16 years ago when you were just one week into Moho :D :

http://www.lostmarble.com/forum/viewtopic.php?t=4111
Yikes! That post is from 2006. Have I really been here that long??? :shock:

I do recall getting Moho early on (like version 1.0 or 2.0?) for evaluation at my workplace. At the time I thought Moho had potential but wasn't quite ready to use in production...decided to keep an eye on it.

What's funny is that I didn't really start using Moho till 2013 (ASP 9.5 I think,) and before I knew it, Moho became one of my all time favorite animation programs! 😸
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Animate the pivot point?

Post by Lukas »

WargaNetLife wrote: Sun Jul 24, 2022 6:32 pm
If you've got the layerscript embedded and have a bone called "Origin", the layer origin of the bone layer will (should) snap to that bone. Is that happening?
It works :D Thank you
But, does it work if you don't use the embed method? Like the tools in "other"
No, it absolutely needs the layerscript, a tool is not enough to animate the layer origin until it becomes an official Moho feature.
Post Reply