Harmonic motion

When keyframing the motion of an object, it sometimes becomes clear that the motion follows a pattern, so there must be a better way to animate the object. This is especially true if the motion is simple but repetitive. Out of Range functions in 3ds Max can help, but they carry on until the end of the scene once applied, and this is often not flexible enough. In this situation, a neat bit of MAXScript may be just the answer.

One type of motion that is all around us, and therefore frequently animated, is oscillation: an object moving backwards and forwards. Most oscillating objects follow a simple rule called the sine wave, which has the distinctive mathematical property of having its speed and acceleration also defined by sine waves. This makes the motion of the object defined by the sine wave appear smooth and natural. Just about every programming or scripting language has the ability to apply the mathematical sine function, so it is relatively easy to write some script to animate objects oscillating. More importantly, once the script is written, it can be used over and over on different and multiple objects.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.