Jump to content
Hash, Inc. - Animation:Master

Making Gears roll opposite one another


Ilidrake

Recommended Posts

I've got two gears and a large door. I've given each gear a bone and placed constraints that only allow them to roll. The larger gear is constrained to the first gear so that when the small one turns it turns. Only problem is that the larger gear actually needs to turn the opposite way. Does anyone know what constraints to apply to make this happen, cause I'm stumped. :(

Link to comment
Share on other sites

  • Replies 19
  • Created
  • Last Reply

Top Posters In This Topic

Okay that works great, here's another. The gears are turning and I have this door with a single bone. The idea is while the gears turns this catches the teeth along the doors edge and lifts it. Is there a constraint system I could use or would it be easier to simply animate it?

Gears0.jpg

Link to comment
Share on other sites

Guest jandals

If they're part of the same model you could do it in a smartskin. You should also be able to use an expression to turn the gear's rotation into a transtlation in the door.

Link to comment
Share on other sites

If they're part of the same model you could do it in a smartskin. You should also be able to use an expression to turn the gear's rotation into a transtlation in the door.

Yes, they are the same model. Could you elaborate what you mean with "expression"?

Link to comment
Share on other sites

Guest jandals

Yes, they are the same model. Could you elaborate what you mean with "expression"?

Here you go:

[attachmentid=20201]

 

Model 1 has an Expression on it's Y-translate attribute. It's Position along the y-axis is determined by the rotation of Model2. Expand the channels in the PWS and you should see the Expression.

 

To make a new expression, right-click the attribute in the objects properties. In this case I went to Model1 Properties->Transform->Translate->Y, right-clicked it and chose "edit expression" from that menu.

 

You could go either way on this one, smartSkin or expression. You can put an expression in a pose if you want the bones to have a mathematical relationship. Or you can set up a smartskin if you want precise control over the motion. Either one will stay with the model.

Expression.zip

Link to comment
Share on other sites

It reminds me a bit of programming, using varibles and switches to make changes. After reading about it it sounds great, only one thing eludes me. How do you create an expression where one bones movement effects anothers. Am I missing something or am I completely dense? The reason I'm doing this experiement is so i can furthur develop my blanket rig for the TWO movie.

Jandals, you sound very knowledgable in this area, could you elaborate a bit more as to how you get one bone to effect another through expressions? Is it the particular way you code the expression? Do you have to use the names of the bones, etc?

Link to comment
Share on other sites

Guest jandals

Jandals, could you elaborate a bit more as to how you get one bone to effect another through expressions? Is it the particular way you code the expression? Do you have to use the names of the bones, etc?

Whoops, I left that part out.

 

Let's say you have Model1 and Model2 in a choreography and you want Model2 to follow Model1. You could just use a Translate to Constraint but that's not the point. To do it using expressions you'd expand Model 1 in the PWS until you can see it's Translate Properties, right-click Y and choose "Edit expression" (see the left image).

 

That creates the expression in the PWS and you can type something in there if you know what you want. It's usually easier to click the expression in the PWS (the "=" icon) so that the text field is enabled (click just under the text) and then click on the channel you want to insert. In this case I clicked the expression to put a cursor in the text field and then clicked on Model1's "Transform.Translate.Y" and A:M put the correct syntax into the expression's field.

 

See if you can get a couple of simple translate relationships to work. You can also drive translation with a bone's rotate, scale or just about any other value in a choreography or action.

 

Rhett

post-330-1157144454_thumb.jpg

Link to comment
Share on other sites

Okay, I've been toying with these gears and door and the expression thingy is really powerful, only I don't know how to get the door to translate while the gears rotate. When I set the expression in the PWS AM sets it up for me, formula wise, but the door never moves. I have the gear bones rotating on the Z-Axis, and I want the door bone to translate in the Y-Axis. Only nothing happens. Anyone got any ideas?

Link to comment
Share on other sites

:( Sorry, I'm at work and don't have access to AM here. But the bones and running left to right along the X-Axis in front veiw, and the door bone is running up and down in the Y-Axis in front view. By going to left view you can rotate the bones along the Z-Axis. I guess I'll have to post a pic tomorrow. Basically I just want the Door bone to translate up along the Y-Axis while the gears roll around on the z-axis. I click the bones z-rotate-axis in the expression window. The bone never moves though. Guess I'll just wait until tomorrow to post a pic. Thanks Jandals.
Link to comment
Share on other sites

Cool. I guess I don't know when a 'relationship' becomes an 'expression'.

 

Anyway- just to chime in late with me 2bits... I see in your gears that one is smaller than the other, so it would actually spin faster(?) than the larger gear. Therefore, a value of -125 to -150 might work, with some experiments. A mathematical mind would do it via a formula, but I'm a WYSIWYG guy.

Link to comment
Share on other sites

Here's a simple version of translation from rotation using an expression in a pose

 

 

[attachmentid=20334] :blink:

 

 

[attachmentid=20335]

 

 

Rotating level at right translate to door on right going up and down

 

 

Hope this helps

Thanks Jon :P That helps big time!

Link to comment
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...