Automated Stop Motion Animation

User avatar
rylangrayston
Posts: 22
Joined: Sun Dec 02, 2012 2:49 pm

Automated Stop Motion Animation

Post by rylangrayston » Wed Dec 12, 2012 8:40 pm

I have this hole idea about a new( iv never seen it before) way to make moves...

Basically you animate in 3d then get a robotic version of you character to act out each frame of the animation and take a pic of each frame.

This process would have some interesting advantages.....

1 you get the efficiency of key framing, and much more but in real life objects.
2 You skip the hole process of trying to make your renders look real with things like ray tracing.
3 You can make the robotic characters appear to move with extreme speed and fluidity ( although as robots can do this for cheaper live performances could be done)
4 you could have extremely interesting lighting .. for each frame many pictures could be taken with different lights turning on and off and masking for this lighting would be
Im sure that’s nothing new but because every thing is also done in 3d making complex masking arrangements for each lighting frame could easily be automated.
5. You could to Attribute scrubbing ( that’s another idea of mine ... I wont explain it here tho)

Im posting this project now to see what kind of interest there is in our Techworks community.
Its not something Im focusing on right right now, but having said that most of the code work is already done in another project of mine.

Here are the steps involved in this project. Any help is welcome.

1. Find and write some code that allows blender models to control servos via arduino and signal the shutter of a camera.
2. Mount a battery and blue tooth>arduino the saxes bot.
3. Wire arduino PWM pins to servos and power to the servos on the sax bot.
4. Model and animate thesaxmachines four legged robot.
5. Set the scene up and let it play out at Techworks.
6. Compile the still frames and click play!
7. Post the video in this form and on a web site that Rylan makes for this project.. the web site being a place people can get the code for free and buy an ebook or something.
8. Rylan buys a case of beer... With all those e book revenues lol.

Your thoughts.

User avatar
thesaxmachine
Posts: 233
Joined: Tue Dec 07, 2010 11:31 pm

Re: Automated Stop Motion Animation

Post by thesaxmachine » Thu Dec 13, 2012 9:23 am

I already have it hooked up to a micro and have it interfaced to some software I am writing.
https://sourceforge.net/projects/ubwutility/
I am using the usb bit whacker (UBW), because I have an aversion to the Arduino. I have the ability to automate one leg at the moment. The 4 should be not a problem. I would like to correct a misconception about PWN pins and servos. Hardware generated PWN is too fast to control servos, the correct way to do it is timer interrupts. However with using a device like the Arduino, you probably don't have to worry about that since there probably is a library for it.
So the next logical step at this point is to pipe the blender outputs into my program or some other translator we can write. I've basically put the walker on hold for the moment because I'm doing too much other things and moving and such.
For now I have the robot tethered to the computer and powered by a PC power supply until I can get the legs moving how I want them. The idea was to hard code a walking gait into the micro somehow and control it with a 4ch rc controller. I've been reading up on inverse kinematics and the like, but this idea sounds easier since you will be taking care of the hard part.

User avatar
rylangrayston
Posts: 22
Joined: Sun Dec 02, 2012 2:49 pm

Re: Automated Stop Motion Animation

Post by rylangrayston » Thu Dec 13, 2012 3:59 pm

Hey Sax

1. Thanks for the correction about PWM
2. I will gladly accept your aversion to arduino... as I have an aversion to doing work that’s already done.
3. I agree the next step is to pipe it to your software

Ok so today while I was waiting for another video to render I did the following.

1 Created a blend file with a triple jointed arm similar to your working arm
2 Rigged the arm and added IK.
3 Animated the arm buy inserting only 3 key frames and the copying them over and over to create a walk cycle.
4 added a particle engine to better visualize the foots path ( there is one particle for each frame so you can see the "resolution" of the position to be sent I can make this resolution much higher if the arm movement is rough)
5 rendered out a little clip of all this and posted on you tube http://www.youtube.com/watch?v=3H1GUGPT ... e=youtu.be

The rev2 ...blend is posted here:
http://blenducation.com/students/Mr%20G ... topmotion/

It made that video. Everyone feel free to down load it and play with it ..
....hit g key to move the arm i to insert it position in the time line.

6. Started creating a script that will iterate through each frame of the animation and pipe rotation information to your software.
There is just one piece of code I dont have working so I posted a question here. http://blenderartists.org/forum/showthr ... ost2259882

Sax I just have one question as Im not really a programmer .. how do i pipe my variables to your program?
I can program blender to the stage where it writes to a txt file, the position of each joint on a new line for each frame in the animation.
After that Ill need help.

PS
In my opinion your the one taking care of the hard part.

User avatar
thesaxmachine
Posts: 233
Joined: Tue Dec 07, 2010 11:31 pm

Re: Automated Stop Motion Animation

Post by thesaxmachine » Fri Dec 14, 2012 11:33 am

my servo placement is based off this design:
http://www.trossenrobotics.com/productd ... ropod.html
To help you with movement and make sure that the leg can actually move as intended.

To answer your question about outputs, not really sure. Text file is a great start though.

User avatar
thesaxmachine
Posts: 233
Joined: Tue Dec 07, 2010 11:31 pm

Re: Automated Stop Motion Animation

Post by thesaxmachine » Fri Dec 14, 2012 11:49 am

Also if IK is as simple as just "hey this leg has IK", then all the hard work has been done.

User avatar
rylangrayston
Posts: 22
Joined: Sun Dec 02, 2012 2:49 pm

Re: Automated Stop Motion Animation

Post by rylangrayston » Sat Dec 15, 2012 12:24 am

Yes IK has been that simple in blender for quite some time now.
Indeed all the hard work is done were just connecting things.


Ok so thanks to batFINGER and Kastoria s help on this form----------> http://blenderartists.org/forum/showthr ... s-rotation
I now have a blend file ------------------------------------------------------------------->rev 10 at http://blenducation.com/students/Mr%20G ... topmotion/
that creates a text log ---------------------------------------------------------------------->http://blenducation.com/students/Mr%20G ... on/leg.txt
contaning the degrees of each joint, for each frame in the animation.
each frame is 1/24 of a second long ( the animation is 24 fps)

Sax let me know if that will work for you.

User avatar
rylangrayston
Posts: 22
Joined: Sun Dec 02, 2012 2:49 pm

Re: Automated Stop Motion Animation

Post by rylangrayston » Sat Dec 15, 2012 11:22 am

I have told a good friend of mine (handle Dark9void)
About this project ... His skills far exceed mine in both modelling and rigging.
Infact he has won awards for his work.... here check out one of his modles ---------> http://shadow-whisperer.deviantart.com/ ... /#/d5cbj03

Hope fully we will be graced with his help as well ... He will find the modelling and rigging of this project rather trivial, but he could bring a hole new
angle to the project. He could ad too the base model various cowling , weapons, anything he wants really.... then these parts could be 3d printed and placed on the real
sax bot or could EASILY and AUTOMATICALLY be Composited on to stop motion frames.

PS Sax, what is the hi-est rate that your servos-micro-controler setup can take updates in positional information? I can easily make animations in blender that would log the servos position up to 1200 times per second, any faster than that will require extra work.

User avatar
thesaxmachine
Posts: 233
Joined: Tue Dec 07, 2010 11:31 pm

Re: Automated Stop Motion Animation

Post by thesaxmachine » Mon Dec 17, 2012 9:49 am

The servo values in my test update every 50 ms. So 20 times a second. It was a value I arrived at for those particular servos through the guess and check method. Will prolly need some tweaking to move like your animation does. Should be simple enough since each frame has a logged position and the frame rate is just off the update rate. The text file looks good to me. I will get to work on parsing it, I won't be able to get the precision you have outputted to the file. The best I can probably do is the nearest 0.5 to 1 degree.
Not sure when I will get to it but the plan is to:
1. parse the text file
2. covert the angles to in value outputs
3. display to screen to ensure I'm interpreting the values correctly
4. output to micro/servos

User avatar
thesaxmachine
Posts: 233
Joined: Tue Dec 07, 2010 11:31 pm

Re: Automated Stop Motion Animation

Post by thesaxmachine » Mon Dec 17, 2012 10:34 am

So taking a closer look at the text file I notice that the zero values do not correspond with the position of the robot leg in the neutral position.
Your model begins 0,0,0 here
foot --o--o-- hip
My robot begins 0,0,0 like this
o--o--hip
|
foot
So it starts with a 90° bend at the ankle joint which is the zero degree position.

User avatar
rylangrayston
Posts: 22
Joined: Sun Dec 02, 2012 2:49 pm

Re: Automated Stop Motion Animation

Post by rylangrayston » Thu Dec 20, 2012 7:40 pm

This directory contains the rev11 blend file ------------>http://www.blenducation.com/students/Mr ... ion/rev11/
an .ogg video made by rev11.....blend
and a txt log made by rev11...blend

rev11 changes :

1. the frame rate is now 20 fps
2. the start and end position of the ankle is now 90 degrees

PS Sax you are awesome.

Post Reply