Previous topicNext topic

The Dancing Robot! (3D model animation)

Tutorials, FAQs, resources, and examples for using Magic.
Post Reply
Magic
Site Admin
Posts: 3451
Joined: Wed Apr 09, 2014 9:28 pm

The Dancing Robot! (3D model animation)

Post by Magic »

EDIT: As of Magic 1.61, the Dancing Robot project is included in the main Magic installation as a sample project, but there is still some helpful information below.
---


I was inspired by Terry Payman's most recent video (http://magicmusicvisuals.com/forums/vie ... ?f=5&t=173) in which he used a 3D model. I haven't done any projects with 3D models in a while, so I decided to put something together.

What I ended up creating was something a bit silly, but also hopefully useful as a tutorial about animating 3D models.

I've uploaded my Magic project further below so you can play with it.

But first, here's a video:
As you can see, the robot dances in a simple way according to the beat of the song. (I quickly composed the song from loops in Garage Band).

The movement of the robot is achieved by linking the volume of the drum beat to the rotation of the arm, leg, and head, as well as the vertical position of the entire body.

Here's the finished project. It contains only the robot; the backgrounds in the video were added by me afterwards just for fun.
DancingRobot.magic
(2.36 KiB) Downloaded 2917 times
You will also need a 3D model file for the project, which is a rounded cube:
cube.obj
(16.19 KiB) Downloaded 2827 times
Many thanks to the original author of the cube:
http://acceleroto.com/2013/08/game-prot ... -3d-model/

A few more details about the project:

1) The robot is a slightly complicated character, requiring lots of modules, so I split him up into several scenes. Every part of his body is created with the same cube object, but scaled and rotated in different ways. I created separate scenes for the head, arm, and leg. I then used the arm and leg scenes twice -- one for the left side, one for the right.

2) Every module parameter linked to Volume has a Smooth modifier. Otherwise I felt that the movement of the robot was too jerky. You can play with the Smooth values to see how it affects the movement. In general, higher values will create nicer movement, but will also reduce the responsiveness and thus create a bit of a lag.

3) 3D models tend to have jagged edges when Antialiasing isn't enabled. You can either use the Antialias module I put in the scene (bypassed by default) or you can enable GPU Antialiasing (Window > Magic Window Options > GPU Antialiasing). If you do the latter, make sure Antialiasing is also enabled in your graphics card control panel. Note that GPU Antialiasing doesn't work with exporting movies though. Also note that any kind of Antialiasing always lowers your frame rate.

4) The Garage Band soundtrack is composed of four separate loops (1 drum, 3 synth), and I imported each loop separately into Magic. This way, the song elements can be visualized much more cleanly. The robot's movement in particular looks much better when it's responding to the drums and nothing else.

Can't think of anything else for now, but please feel free to ask any questions. Also please feel free to use this project however you like, but be sure to credit the original author of the cube model when applicable.

Eric
damstraversaz
Posts: 176
Joined: Tue Aug 26, 2014 11:22 am

Re: The Dancing Robot! (3D model animation)

Post by damstraversaz »

that's really fun !
Terry Payman
Posts: 723
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: The Dancing Robot! (3D model animation)

Post by Terry Payman »

...and inspiring in its turn!
Thanks Eric - very elegant use of a simple building element , and you've created such an appealing character.

I'm off to look for a 3D hemisphere so I can make a "South Park" Canadian robot :D
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: The Dancing Robot! (3D model animation)

Post by blackdot »

That's pretty cool Eric. :)
John Tannam
Posts: 3
Joined: Fri Jul 03, 2015 2:17 pm

Re: The Dancing Robot! (3D model animation)

Post by John Tannam »

Hi Eric,fantastic programme,at baby steps for the moment
am wondering is their a tutorial on creating a 3D model
:D
Magic
Site Admin
Posts: 3451
Joined: Wed Apr 09, 2014 9:28 pm

Re: The Dancing Robot! (3D model animation)

Post by Magic »

Thanks John :). Magic only lets you manipulate 3D models though; it doesn't let you create them from scratch. You will need to use a different program for that (similar to how you would need Photoshop to create images from scratch).

I recommend looking at Blender (https://www.blender.org/), which is free, but also somewhat complicated. Another thing you can try is http://www.turbosquid.com/, which has some free models for download.
John Tannam
Posts: 3
Joined: Fri Jul 03, 2015 2:17 pm

Re: The Dancing Robot! (3D model animation)

Post by John Tannam »

Hi Eric tried downloading the dancing robot but magic says it cannot load the cube obj.
I have downloaded the cube but what do i do with it now ie where do i put it
Pardon my ignorence
Magic
Site Admin
Posts: 3451
Joined: Wed Apr 09, 2014 9:28 pm

Re: The Dancing Robot! (3D model animation)

Post by Magic »

No worries. You just have to put the cube file in the same folder as the project file.
Post Reply