Page 1 of 2

Fun with Physics!

Posted: Mon Aug 26, 2013 10:43 pm
by heyvern
Someone posted a link to a cool site with a bunch of machines. I decided to convert the drawings to animated physics in Anime Studio Pro. I love doing this kind of stuff. It's so much fun.

Don't get too excited, this isn't one connected machine. There are 7 separate machines each one driven by one motor in each machine. My next goal would be to connect a bunch of the mechanisms and have them all driven by a single motor.


Re: Fun with Physics!

Posted: Mon Aug 26, 2013 11:13 pm
by Danimal
Woah, that is some cool stuff there! I could sit and watch that for probably more time than I should admit to... :oops:

Re: Fun with Physics!

Posted: Mon Aug 26, 2013 11:47 pm
by Pinesal
Interesting.

Re: Fun with Physics!

Posted: Tue Aug 27, 2013 2:27 am
by hammerjammer
Hello all

I thought I would give it a go, so I just tried to make two gears. One with a motor and the other just pivots.
Through trail and error I found out that you cannot use the curve profile tool to make your gears. Not sure why that is.
I could not get one gear to interact with the other using the Curve profile tool. Again, I'm not sure why.
Anyway, I did get my two gears to work after I made the gears by making an oval shape, then adding a bunch more point(using the new split curve script built into 9.5), then selecting every other point and resizing them smaller and like magic I had a gear.
I know, I know I'm living dangerously. My middle name is DANGER.

Very cool

HammerDANGERjammer

later
Hammerjammer

Re: Fun with Physics!

Posted: Tue Aug 27, 2013 4:45 am
by heyvern
Yes I've been pushing physics to the limit since they added this feature. I don't know why it's so much fun. I think it's the same attraction as legos or that old board game "Mouse Trap". ;)

Some rules:

1. It's FREAKING ACCURATE! This is good news. What ever simulation engine being used is really accurate. I mean really accurate to the edge of the shapes when they touch. Gears are tough to get right especially small tight gears. They tend to bind up. I built a working clock with a pendulum that used gravity and a flexible chain built with interconnected vector layers and a weight on a pulley without any motors. It didn't run very long but it actually worked. :)

A lot of the layers that rotate but don't have a motor are rotating around a non moving pivot. I could simply have them spin on layer center but I like using as much "real" physics as possible. When you do that the pivot needs to be "tight" to the rotating layer so it doesn't wobble too much. Low friction helps.

2. Shapes must be DRAWN No curve profiles, no stroke shapes. Only FILL SHAPES work as physics objects. Stroke shapes, or strokes on fill shapes are ignored by the physics engine. This is good and bad... but mostly good. You can't use stroke shapes to make gears (bummer! that would be awesome). However since this is "flat world", you can't create overlapping fill shapes with knobs that stick out. I use stroke shapes to fake additional shapes that I don't want to interact.

Layers used in physics can't have Z index translation. You can but the physics is calculated based on no z translation of the layer so it doesn't match the visual position of the layer.

3. More points is BETTER accuracy
The more points in a shape, the more accurate the physics. It doesn't have to be a whole pile of points. The best example is a 4 point circle. It works better if the circle has 8 equidistant points.

4. You can overload the physics processing
In the sample above I had to turn off physics and use the generated keys to render. I had 7 machines each in it's own physics group layer. I think I pushed it a bit too far :). It wouldn't render properly so I turned off the physics and just used the keys that were created.

I have in the past created much larger more complex "machines" that worked fine but were all in one layer. I think it was having so many physics layers with it's own physics calculations running separately.

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 2:16 am
by heyvern
More machines!

The one on the right was the toughest one. Getting those little knob/hooks to land on the next doohickey just right, getting the timing of the alternating motor. The "pendulum" is swinging based on a motor. I placed step keys in the physics channel of the motor that reverses the motor force and then cycled those keys.



Actually the tricky part with all of these is getting them to loop properly. You don't see it in these Youtube videos but they loop seamlessly. It's very tricky to get each different machine to loop with the same animation length.

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 3:55 am
by GCharb
Darn nice Vern, I did some testing with gears and physics about two years ago, but nothing as complex as this, very impressive!


Re: Fun with Physics!

Posted: Wed Aug 28, 2013 4:58 am
by hammerjammer
heyvern wrote:More machines!

The one on the right was the toughest one. Getting those little knob/hooks to land on the next doohickey just right, getting the timing of the alternating motor. The "pendulum" is swinging based on a motor. I placed step keys in the physics channel of the motor that reverses the motor force and then cycled those keys.



Actually the tricky part with all of these is getting them to loop properly. You don't see it in these Youtube videos but they loop seamlessly. It's very tricky to get each different machine to loop with the same animation length.
Hello,

Those are way cool. I like the middle one, very creative.

Hammerjammer

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 6:16 am
by Joofville
Haha! That's so awesome. I've never tried physics in Anime Studio Pro.

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 1:09 pm
by GCharb
Joofville wrote:Haha! That's so awesome. I've never tried physics in Anime Studio Pro.
I have a basic tutorial on my blog, real easy stuff.

http://gcharb2d.blogspot.ca/2011/07/bas ... tudio.html

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 1:38 pm
by Danimal
GCharb wrote:I have a basic tutorial on my blog, real easy stuff.

http://gcharb2d.blogspot.ca/2011/07/bas ... tudio.html
Thanks! I know what I'll be doing today instead of working, unless my boss is reading this in which case I'm at it nose to the grindstone!

Great video, heyvern! I had to watch it 3 times just to take in all of what was going on. Really nicely done!

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 8:41 pm
by heyvern
Okay, this is just plain weird. Not sure it has any useful application, but it sure is fun.



Each "worm" is made of a chain of bones. Each bone has a rotation constraint limit. A motor is applied to each bone. A noisy key interpolation is added to each bone's motor strength and the keys are sort of randomly offset to create a different behavior.

The noisy interpolation is set with a large modulation and a fairly high amplitude (amp: 7-9, mod: 11-15). This creates a bit of randomness to the bone rotations (the motor).

Re: Fun with Physics!

Posted: Wed Aug 28, 2013 9:14 pm
by Danimal
Poor guys just looked like they were writhing in pain. I particularly enjoyed the one yellow worm leaping off screen about halfway through. Really innovative stuff! Useful or not: it's fun to watch!

Re: Fun with Physics!

Posted: Thu Aug 29, 2013 3:38 am
by sbtamu
LOL Vern, I tried something like this a few years ago (worms.) I actually tried to make a basketball be thrown and go through the hoop and set off a chain reaction(like the game mouse trap) hitting a switch...I have it about 30 seconds long, all done by physics. The hard part about doing this is when you get a perfect set up that works and then you add more shapes for the next "event" the physics changes and does not work anymore and you have to adjust everything again.

Re: Fun with Physics!

Posted: Thu Aug 29, 2013 3:59 am
by heyvern
sbtamu wrote:LOL Vern, I tried something like this a few years ago (worms.) I actually tried to make a basketball be thrown and go through the hoop and set off a chain reaction(like the game mouse trap) hitting a switch...I have it about 30 seconds long, all done by physics. The hard part about doing this is when you get a perfect set up that works and then you add more shapes for the next "event" the physics changes and does not work anymore and you have to adjust everything again.
I've been trying to create "battle bots". You can create some really odd stuff with bone physics that sort of walk, crawl and bounce. I have to come up with some kind of arena for them to fight in. I've been playing with an overhead view and no gravity. I have "tubes" with a reversed force field. When they get too close it sucks them out of the arena. It's quite funny to watch. The creepy part is sometimes it actually appears that they grab the edge and try to keep from getting sucked through the tube. :)