Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
MAYA:MAYA ForumMAYA TutorialsMAYA

A racheting type animation---

COW Forums : MAYA

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
FreddieA racheting type animation---
by on Jun 16, 2004 at 10:58:34 pm

This may sound complex at first, but I am sure it's simple.

I need to create a relationship between two objects so that they both move together in a given (positive only)direction (say, X for instance) but reversing the parent object has no effect on the child. This is a spatial relationship, but in some ways it's much like the rotation properties of a rachet and bolt.

The bolt and wrench both move when turned clockwise- but when the user switches directions and rotates the other way- only the wrench (body) moves because of the racheting effect built into the device- (click click). (If you want to be precise, the socket head also is stationary) As the user stops and tightens again- the bolt continues from the same rotation value it was at before- and "adds" the additional rotation from the wrench as he or she applies more twisting to it.

In a nutshell, how can you link two objects so that they are parented in a given direction, but zero relation in the reverse direction...

How would this be set up???

Thanks...


















Return to posts index

Sean FennellRe: A racheting type animation---
by on Jun 16, 2004 at 11:17:16 pm

the easiest way is to orient constrain the rachet bit to the bolt object. That when when you rotate the bolt the ratchet bit rotates with it, then when the handle is swung back the head doesn't seem to move with the handle because it is actually only rotating with the bolt.

Another way is to use a semi-advanced expression that only rotates the head when the handle(or parent) is rotating in the proper direction. the problem with this is it requires knowledge of the frame before, effectively turning this into more of a simulation than direct animation.


Return to posts index

Steve SayerRe: A racheting type animation---
by on Jun 17, 2004 at 12:51:38 am

Do you want the 'ratchet' to be able to push the 'bolt' further ahead than it itself travels?

For instance, if you slide the 'ratchet' from 0 to 10, the 'bolt' should also move from 0 to 10, and if you then move the ratchet back to 8, the 'bolt' should stay at 10. If you now move the 'ratchet' from 8 to 12, you've advanced it a distance of 4, but only 2 of those extend beyond the previous maximum. In this case, should the bolt move from 10 to 12 (starting once the 'ratchet' passes 10) or from 10 ahead to 14 (starting as soon as the ratchet does)?

An expression will work in either case. Here's one for the first:

float $trans = ratchet.tx;
float $oldTrans;
if ($trans > $oldTrans)
$oldTrans = $trans;
bolt.tx = $oldTrans;
And for the second:

float $trans = ratchet.tx;
float $oldTrans;
float $diff = $trans - $oldTrans;
if ($diff > 0)
bolt.tx += $diff;
$oldTrans = $trans;
Ask away if you need any part of those explained.

-Steve


Return to posts index


Sean FennellRe: A racheting type animation---
by on Jun 17, 2004 at 12:55:43 am

should those be rotates instead of translates?


Return to posts index

FreddieRe: A racheting type animation---
by on Jun 17, 2004 at 2:10:50 am

My animation has nothing to do with rotation- it's all translations in a single direction.

Here's a picture of the racking system---

http://mywebpages.comcast.net/patane8/images/rack1.jpg

I was using the rachet analogy because it would have been cumbersome to explain the details of the actual device. But, here we go!


The animation represents two warehouse bays. (they are most likely off the ground- this is merely representational)Each of them is identical. Both have a center "platform" or sled-like device that sits inside the L-shaped tracks underneath the pallets. In its resting state, the pallets are all sitting on the rails with some space between the sled and the underside of the pallets. Simple, huh?

When raised, the platform causes the row of pallets to move forward exactly one pallet distance- whereby the forklift operator pulls off the "reachable" front-facing pallet. As seen in the image, the forklift operator has yet to come get the front one before the device can cycle the row ahead one place. (He's union, you know... a little slow)

If you imagine the front spot vacated- the platform will get raised up until the weight of all pallets is off the tracks- (almost like a mechanic's jack)- then the entire yellow unit (one piece) slips forward one pallet distance- lowers, thereby dropping them- then returns to starting place. I think the proper word is reciprocating. This is done until every pallet is cleared from the rack--- You can imagine the same in reverse for "loading" the racks.

The difficulty I was having was setting a relationship between the "platform" and the grouped pallets forming the pallet row. Essentially- it's a rachet type of animation whereby the pallets move ahead only, never backwards. Yet, the platform moves both ways.

Thanks so so much for the help. Let me know if you can see the image. No critiquing my render, either (grin) it's only rough... the plan is to animate both bays, (although you'd never operate a vacant bay) simultaneously so one can get a feel for what's not clearly seen under the pallets....











Return to posts index

Steve SayerRe: A racheting type animation---
by on Jun 17, 2004 at 2:32:22 am

Hi Freddie. The image shows up fine, and the concept is clear.

For your final animation, have you considered animating cross-sections of your setup, and/or using transparency to make the action more clear?

You may run into problems using those expressions I posted if you want to animate the pallets being taken away by the forklift... as written, they don't allow for any additional animation in the x-axis.

Good luck!

-Steve

P.S. Sean... thanks for the flag, but I had noticed he talked about spatial--not rotational--motion in the original post.


Return to posts index


Sean FennellRe: A racheting type animation---
by on Jun 17, 2004 at 6:43:17 am

yeah my brain was all messed up. sorry


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2013 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]