CGTalk > Software Specific Forums > Autodesk Maya
To minimize the ads you see on this page create a CGTalk account and log in HERE
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 03-12-2013, 06:29 AM   #1
VB2341
Frequenter
portfolio
Varun Bajaj
Troy, US
 
Join Date: Jan 2013
Posts: 125
Group (or pivot) inheriting child's world position, but not rotation

I posted a somewhat similar thread in character setup, but I think that's not quite the right place (correct me if I am wrong), and my issue has now changed.

Anyway, what I want to do is have an object in a group (having it parented may work better, but I haven't been able to figure it out yet), but have the groups pivot move to the world position of the object. Now I can't simply point constraint or set them equal, the there would be double transforms, and the translate values of the object are not in world space (I guess they are in a linear combination of the groups local spaces- I don't think this is the important part). However, if i simply hold D to move the groups pivot, I can move it just fine without changing the object's transforms. This is convenient because it allows me to rotate the group, and change the axes that the object transforms on in WORLD space, but not in its local space. I could rotate the move the object along the z axis, rotate the group so the objects z axis points in a new direction, and move it along the new z axis without the transforms being added to the x or y axis/their respectively channels. Is there any way to set this up using connections between attributes of the transform nodes? And I suppose, after that, is it possible to set up a controller for a system like that (I.E. the translation of the controller (in world space) would drive the translation of the object in local space, and the rotation of the controller would drive the rotation of the group)?

I know it seems odd, but I think it's the best way for setting up the system I'm trying to build.

Thanks.
 
Old 03-12-2013, 01:28 PM   #2
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,346
Maybe instead of trying to describe the technique you should start be stating what you are trying to achieve. What is the "system" you are trying to build? I'm asking because while it is possible to set up a system of animated pivots, I have rarely seen them used in practice - at least not to do what you seem to be describing. Being able to move a pivot is one thing, but being able to animate it in any meaningful way is entirely another thing, especially if you plan to change the animation even slightly after the first pass.

What you seem to be asking sounds more like a motion-path system.

But describe what you need to achieve more generally, and someone might be able to steer you in the right direction. - ha! was that a pun, or am I being ironic

David
__________________
http://www.djx.com.au
 
Old 03-12-2013, 09:02 PM   #3
VB2341
Frequenter
portfolio
Varun Bajaj
Troy, US
 
Join Date: Jan 2013
Posts: 125
Hi David, thanks for your input.

What I am trying to achieve is a system that is able to track how far an object has traveled along a certain axis (in this case, the forward axis in object space), even when it rotates. Basically I need the length of the path an object has taken. Now, I could use a motion path and work with those numbers, however, that doesn't give me much of an ability to change the path. Ideally, what I would like to do is use a group or parent with the object, as the group can rotate, but the translation values can still be added to the objects forward axis (as the entire local space of the object transforms upon rotating the group). This is important for the system I'm trying to build, which is a tank tread system that is not bound by motion paths etc, and does not require the tread animation to be calculated after the motion of the rest of the object. So like I said, a motion path COULD work, but then being able to move the object more would be a much more involved process. This way, animation would be straightforward, as it would animate like any other simple object, but calculate tread rotation very easily. I've been playing around with connections between rotate pivot and rotate pivot translate, as well as just the regular translate, but I still haven't found a good working solution. I'm open to any other ideas/suggestions though.

As far as your pun goes, just thinking about it makes my head spin !
 
Old 03-13-2013, 01:34 PM   #4
djx
Where's my pony?
 
djx's Avatar
David Johnson
vfx & creature td
Melbourne, Australia
 
Join Date: Jun 2003
Posts: 3,346
Quote:
Originally Posted by VB2341
What I am trying to achieve is a system that is able to track how far an object has traveled along a certain axis (in this case, the forward axis in object space), even when it rotates. Basically I need the length of the path an object has taken. Ideally, what I would like to do is use a group or parent with the object, as the group can rotate, but the translation values can still be added to the objects forward axis (as the entire local space of the object transforms upon rotating the group). This way, animation would be straightforward, as it would animate like any other simple object, but calculate tread rotation very easily. I've been playing around with connections between rotate pivot and rotate pivot translate, as well as just the regular translate, but I still haven't found a good working solution. I'm open to any other ideas/suggestions though.


Ok, I see what you are aiming for now, but I have to disagree with this bit.. "This way, animation would be straightforward, as it would animate like any other simple object". The problem with an animated pivot that you use to redirect the child's local translation is that after you key in a path, if you were to then adjust the pivot location and rotation of the parent at the first keyframe, the "history" of the path changes in a way that makes it difficult to manage these changes and have your object end up in the original location at the end of the path. Its a bit hard to put into words, but trust me I've done it. This is quite different to animating other simple objects where you can easily modify and tweak sections of the animation win a much more predictable manner. I'm not saying the animated pivot idea is impossible, but it may not be as simple as you imagine.

Getting back to driving the tank treads by distance traveled, I think I would do it using an expression to calculate the distance traveled in each frame step, and use that to calculate the relative rotation for that frame step. This would mean the tread belt will only be correctly rotated at a particular frame if you initialize it at frame 1 each time and step forward frame by frame, but usually this is not a problem. Once you are happy with the tank animation you can simply bake the rotation of the treads from the expression to keyframes. This method will free you of any limitations as to how you animate the tank. You could, for example, use a motion path, and have a locator on each side of the tank, and compute the tread rotation independently for each, so the outer tread will run faster than the inner one on tight corners (I actually have no idea how a tank works so this may be a stupid suggestion).

David
__________________
http://www.djx.com.au
 
Old 03-13-2013, 04:48 PM   #5
VB2341
Frequenter
portfolio
Varun Bajaj
Troy, US
 
Join Date: Jan 2013
Posts: 125
David, thank you again for your input.

I had originally thought of using the method you posted, but the one issue I had with that is that it might not look the best when I'm just dragging the handle around, but I guess that doesn't matter, I'm just nitpicking. As far as the history goes, I figured that might be an issue, and upon testing, I found that it was indeed, the using any undo commands is a nightmare. I think I'll just go with the method you suggested and see where that takes me. Maybe one day I'll work out all the matrix algebra and figure out how to do it properly, but not today :P .
 
Old 03-13-2013, 04:48 PM   #6
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 10:34 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.