Showing posts with label expressions. Show all posts
Showing posts with label expressions. Show all posts

7.8.13

How to : Create Expressions Without the Expression Editor in Maya

There's a really quick way of getting a simple expression on a channel in Maya.

In the attribute editor, just type in your expression starting with a '' in the field you wish to modify.

For example, when I'm designing cranks or cams, I often just want something rotating at a constant rate and don't want the faff of keyframing. So I'll select the object I want rotating, and enter  ' =frame * 10 'in the field for the Z rotation in the attribute editor.


Now when I scrub the timeline, it will always rotate. Btw, frame is a pre-defined variable and refers to the current frame and the * 10 is a multiplier, so I know that on frame 36 I've rotated by 360 degrees.


There's plenty of scope for this, you can use it for connecting channels or I've even used it to lock channels, just put =0 on the rx,ry and rz channels of an object to stop it's rotation, though that's probably taking it a little too far.

8.5.13

How To : Create Hoeken's Linkages in Maya

Hoeken's Linkage is quite a special thing, really, it is. It sounds stuffy and technical and yes it is, but trust me it's also quite amusing. No doubt you've seen it before and is remarkably simple.

This linkage is a special case of a four bar linkage system where it converts rotational motion into constant linear motion in such a way as to produce an approximate stepping motion. This motion could be used to provide the mechanism for a walk, a conveyor belt, or other types of modified stepped motion.



9.11.11

How To : Animate Cranks and Pistons in Maya

figure 1


A recent project I worked on required the modelling of an animating crank and a piston similar to those used by steam locomotives. Engines that use pistons as a power source need a way of converting the back and forth (reciprocating) linear piston motion into rotational motion. Cranks are used to do this and these are connected to points that are offset from the main rotational axis on what is called the crankshaft, and these in turn are connected to the pistons. The crankshaft is the part that receives the rotational energy. The system will also work in reverse, turning the rotational movement into linear.

So that's how it works in the real world, so how do we translate this into Maya?