full working animatable pivot?


#1

Does any of you guys know the setup to use when wanting an animatable pivot of an object? I’m not looking for the ‘grouping’ solution, neither for the setup, when you can only use it once (or until you put rotations on the control, at which point, the moving of the pivot gets messy.)

Hope some of you guys do kno, it’s bugging me the whole day…

Thanks


#2

I won’t lie, I don’t think too many people would be happy about answering this post. It’s been answered many times. Searching “animatable pivot” right here on CGTalk would give you that info very quickly.

But instead of saying “google it” which is rude, I’ll just ask that next time you use the search function here before posting. I’ll give the bare minimum of an animatable pivot. Honestly, that setup isn’t entirely useful if you want the object to stay stationary while you move the pivot around. A more complex setup is required to do that If you want one for translation/scale, the setup becomes more difficult.

If you just want an animatable pivot for rotation, I’ll give you an example of a locator and a sphere.

Connect the locator’s translate values to the sphere’s rotatePivot attribute.
locator1.translate --> sphere1.rotatePivot

Then connect the locator’s rotation to the spheres rotation again, through the connection editor.

That’s it. This is the most basic setup for an animatable rotate pivot.

Either use a method like this or use object parenting between the “locator” and the “sphere” to get a more desired effect.

At the origin of your scene, create a sphere, a group node, and a locator. Parent the sphere to the group node and then the group node to the locator.

Create a multiply divide utility and connect the locator’s translate --> to the first input in the multiplyDivide node (again, in the connection editor window…). Change input 2 to -1 so that it multiply/divides the numbers to inverse the translation values. Take the multiplyDivide’s output and put that in for the group node’s translate.

Now when you move the locator around, the group node stays still. Because the sphere is parented under the group, it too stays still. But when you rotate the locator, the group node will rotate with it and the sphere follows. This method also works as a animatable pivot for scaling as well. Just scale the locator and everything will scale based off its position.

Two different methods, two different results.


#3

first, thank you for taking your time to reply. know this though, i never post a question without using the search function first. thats what it’s there for, and i never like to take someone’s time when i don’t necessarily need to.

obviously then, i know of both of your setups (as stated in my first post), but neither of them is a true animatable pivot, for the reasons i stated in my initial post. i was, and still am, looking for a solution, where one could position the pivot even when there are rotations on the controlled object.

but thank you for replying to this, thinking what you thought.


#4

I apologize if I insinuated any less. What exactly are you looking for in terms of functionality then if neither of those two work for you? An object that does not move unless the animatable pivot rotates? (so the pivot has freedom of movement but only affects the object when it rotates?). If so, I’ll try to look into that specific setup but it would require some math. Some of which may be beyond me. When you’re dealing with euler rotation + translation things can get hairy…

In the end, it will be a grouping solution with some math applied. Sorry to say. I’m not a C++ guy so I can’t develop a plugin to do the equivalent. Even then, I doubt that the C++ version would be any different in concept.


#5

I got it to work in concept but the result made the original object rotate around in place and so it wouldn’t be usable for any practical work, just as a proof of concept.

I found an old bookmark on the topic that I left for later if I ever going into MEL so that I’d still have it that pertains to this topic. Perhaps you’ve found link already.

Standard trig didn’t cut it but I don’t have handle on matrixes. If I had the time to learn it, I’d definitely look into it but I won’t promise anything.

Here’s the link:
http://leftbulb.blogspot.com/2011/04/making-animatable-pivot-part-1.html

The concept is understandable but I don’t know how to manipulate matrixes the way that the author described. If there’s another method then I’d love to hear about it!


#6

I’ve tried many ways to get a animatible pivot for characters and none of them worked for me. I wanted a way to animation the pivot, not destroy animation that was already in the time line and be able to move the keys in graph editor etc.
The solution I now use is a simple one, but it seems to work for animation and I’ve used it many times on characters to make jumping and flipping in the air easy. When flipping I find it much easier if the main root pivot is in the center of the characters.

My main root set up has attribute to hide/unhide another “pivot” object, which is basically a curve control that looks like a locator. This control is parented to the main root control so it follows it around, but it can be translated anywhere. I then wrote a script that moves the main roots pivot to the location of the pivot control without moving the main root. Of course in reality the main root control is moved, but the script moves it back to it’s original position and sets up keys one frame back and on the present frame to keep it all from moving. By using this control and script I can animate a character, move it’s pivot to a new location and animate from there. I can move the pivot as many times as I like without destroying aniamtion that is already done.

Thanks,

Richard


#7

It sounds like the moveable pivot that Jason Schleifer showed us in the animator friendly rigging series. I never quite mastered using it successfully. Its fine on the first pass through, but becomes quite messy if you need to change something near the start of the animation. That one change can have a ripple effect down through the keyframes that come after it which is sometimes quite hard to deal with. Did you manage to overcome this problem with your system?

David


#8

Hi…!
try zv parent script from Creative crash.
Rgds,


#9

thanks everyone for chipping in to this. Gnimmel, your setup is fine, but spoiled me, i want to figure out how to do it without scripts and definitely without keying before and after, which is quite messy for the animators.

Korinkite, yes it’s gonna be math, and damn hard one (at least for my standards ^^) cuz we’re dealing with matrixes and I have little to no clue what to do with those :slight_smile:

shinyprem - as for the zv parent master, I found it interesting about a year ago, and it may work quite well, at least for dynamic parenting / space switching (at which point, it’s I guess easier still with a space switcher attr at the control, without the need to fire an extra UI that just clutters one’s screen). I’ll research into that and into the possibilities, thanks for bringing that up, but for an animatable pivot, i wouldn’t use this.

Let me rephrase my question, since I think this is going to “how to cheat an animatable pivot” rather than “how to achieve it” :slight_smile:

Do you guys know anything about matrixes, or how the rotate pivot translate gets calculated - how can it be calculated using only the .rotatePivot attr?


#10

Sorry, been busy and havn’t had a change to check this post in a while.

This is why I open up the pivot attributes so they can be keyed. If you hit the “s” key and key everything then altering the pivot will not mess up things in the future because the pivot and translation has been keyed.

This way may not be perfect, and there might be a better way to go, but so far it’s given me the best results from all my experiments and everyone using my rigs seems to like it.

The characters these are on have a lot of other scripted features and I have a character menu added to maya for other controls, so adding the script is just one mouse click as long as the animators machines are set up correctly.

I will be keeping an eye on this thread in case someone comes up with a better way.

Thanks,

Richard


#11

Keying the pivot and translation is important, but it is not a total solution (though it may be the best we have). An example of where it can get messy is a foot roll where you could use an animated pivot and move it from the ankle to the heel or ball or toe, to have a more natural rotation at various stages of the roll. This can work really nicely when you are animating straight ahead, but if you come back and change a rotation on the ankle somewhere near the start you may find that the heel is no longer being planted in the same location and that the keys you set on the pivot jump from ankle to heel no longer work as a smooth transition. Correcting this in isolation can be relatively easy, but it may have a domino effect right through the rest of the animation.

I’ve found that rather than a freely moveable and keyable pivot, a more restricted space-switching system can be easier for me to manage and make changes to the animation.

David


#12

I am not sure if my solution would solve the problem of animators, but I think it makes things much easier to use. And it involves only few lines of mel which goes in script node so it’s easier to transport. The only problem now is that in referencing this solution is dependent on other solution. This solution itself is a scriptNode that I made to take care of scriptNodes with referencing. But I want to remove this dependency in future solution.
I posted two articles related to this on my blog some time back. They are not in tutorial format, but might be helpful in understanding the approach. I will try to post a demo of it soon.

It’s always interesting to see how other people tackle this problem.


#13

Sorry I come off rude, but I really need to ask this to djx.
I´ve tried leaving a message in your blog but could not.

Is there any chance to get a posedeformer compile for maya2012 32bits?
I tried doing it myself but I´m in a rush and I don´t even know where to begin.
I apologize again for the OT and to mr djx for jumping on him in a random thread.

Thank you for reading.


#14

Zv parent… www.paolodominici.com


#15

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.