Itoo Software Forum

Author Topic: How do I animate an object?  (Read 1225 times)

satoer

  • Newbie
  • *
  • Posts: 20
How do I animate an object?
« on: December 07, 2014, 07:27:26 PM »
I’ve recently bought Railclone Pro 2 and I’m trying to create an animation. But I can’t find any animation tutorials.

What I’m trying to do is animate the gears. But if I key frame a gear, the animation is lost in the cloned object and stayed static. It’s not possible to rail-clone animated objects?

So, I probably need to export an parameter to animate outside of the Style editor.

I’ve distributed the gear on the frame and  aligned it to the correct position with padding and translation. But if I want to animate the rotation, the object acts weird: It’s moving left and right on the X axis while rotating. But it’s not moving Up and down (Z axis).

Any I idea why it’s acting this way and what I’ve done wrong?
« Last Edit: December 07, 2014, 07:30:36 PM by satoer »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: How do I animate an object?
« Reply #1 on: December 07, 2014, 08:44:28 PM »
Hi,

Thanks for the contacting us. If you wish to use an objects with animated transforms in RailClone it is necessary add an XForm modifier and animate the Gizmo instead of animating the Position/Rotation/Scale directly. Alternatively as you mention, you could animate a segment's transforms directly inside the RailClone object by exporting a parameter, attaching a Numeric node, and animating from the modify panel.

However in both cases you may still encounter the side-to-side movement you describe. This is because the position of an object in the default segment slot is calculated in relation to the neighbour's bounding box. Because even a circular object has a square bounding box, rotating it pushes adjacent segments out of alignment. To remedy this we need to do two things.

  • Enter a Fixed Size to override the X dimensions, otherwise this changes as the bounding box rotates. It doesn't matter what this value is and in fact if you wish you can use it in place of right padding to align the segments. Make sure you turn Off Scale Segment so that the geometry maintains the original dimensions
  • Set the Alignment > X and Alignment > Y values to to Pivot or Center



I've attached a simplified file to illustrate. I hope this helps, please let me know if you have any further questions.

Many thanks,

Paul


« Last Edit: December 08, 2014, 10:39:02 AM by Paul Roberts »
Paul Roberts
iToo Software

satoer

  • Newbie
  • *
  • Posts: 20
Re: How do I animate an object?
« Reply #2 on: December 08, 2014, 11:25:12 AM »
YES!
I’ve managed to align and animate it from the modify panel with a single value. Love the “Arithmetic” operator, works way more intuitive and clear than the “wire parameters” built into max. Don’t know exactly what’s possible with the expressions, the manual is a bit basic on that topic. Is possible to use JavaScript like the expressions inside after effects?

Another thing, when I adjust the global scale, the alignment of the gears totally offsets, why?

Anyhow, thanks for the explaining and the illustration really helped.
« Last Edit: December 08, 2014, 11:44:40 AM by satoer »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1593
Re: How do I animate an object?
« Reply #3 on: December 08, 2014, 12:39:42 PM »
Hi,

No problem at all, glad you could to get it working. Expressions are a powerful feature that enable you to use a number of built in mathematical functions, but not other languages like Javascript or Maxscript.

The expressions editor uses a straightforward mathematical syntax comprising operators (+, -, *, /, etc.), constants (pi, e, etc.), RailClone's built in variables and inputs, and functions (that take one or more arguments and return a result). There are many built in functions, operators and constants available and these are all listed in the Expressions pane on the left hand side of the window. To see an explanation for each function, single click on it and a description and example syntax will display in the Expressions Help pane at the bottom of the interface.



I've just added this information to the documentation to help make it clearer. There are not currently any tutorials exclusively about the using expressions but you will find expressions used in the second half of the Counting Numbers and Bridge tutorials.

Quote
Another thing, when I adjust the global scale, the alignment of the gears totally offsets, why?

This is because the Global Scale value does not affect the Fixed Size parameter, though it does affect the Padding and Transform values. If you know you are going to use the Global Scale, then one solution is to use a very small Fixed Size value, for example 0.0001cm, and then position the objects using only the padding and transforms. You can then use Global Scale without problems.

I Hope that helps.

Many thanks,

Paul
Paul Roberts
iToo Software

satoer

  • Newbie
  • *
  • Posts: 20
Re: How do I animate an object?
« Reply #4 on: December 09, 2014, 01:04:30 PM »
For this project the global scale doesn't really matter. I just noticed the problem. Thanks for the clearing up Paul.