Fun with Physics!

Want to share your Moho work? Post it here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Fun with Physics!

Post by heyvern » Mon Aug 26, 2013 10:43 pm

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.

Danimal
Posts: 1584
Joined: Thu Nov 15, 2007 3:06 pm
Location: The Danimal Kingdom
Contact:

Re: Fun with Physics!

Post by Danimal » Mon Aug 26, 2013 11:13 pm

Woah, that is some cool stuff there! I could sit and watch that for probably more time than I should admit to... :oops:
~Danimal
User avatar
Pinesal
Posts: 260
Joined: Mon Feb 18, 2008 2:43 am

Re: Fun with Physics!

Post by Pinesal » Mon Aug 26, 2013 11:47 pm

Interesting.
User avatar
hammerjammer
Posts: 144
Joined: Sun May 26, 2013 10:04 pm
Location: Pittsburgh, PA

Re: Fun with Physics!

Post by hammerjammer » Tue Aug 27, 2013 2:27 am

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
Check out All of my animations on my YouTube Channel

http://www.youtube.com/user/HammerAnimation/videos

Thanks for watching!
Hammerjammer
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Re: Fun with Physics!

Post by heyvern » Tue Aug 27, 2013 4:45 am

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.
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Re: Fun with Physics!

Post by heyvern » Wed Aug 28, 2013 2:16 am

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.
User avatar
GCharb
Posts: 2202
Joined: Mon Oct 10, 2005 2:31 am
Location: Saint-Donat, Quebec, Canada
Contact:

Re: Fun with Physics!

Post by GCharb » Wed Aug 28, 2013 3:55 am

Darn nice Vern, I did some testing with gears and physics about two years ago, but nothing as complex as this, very impressive!

User avatar
hammerjammer
Posts: 144
Joined: Sun May 26, 2013 10:04 pm
Location: Pittsburgh, PA

Re: Fun with Physics!

Post by hammerjammer » Wed Aug 28, 2013 4:58 am

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
Check out All of my animations on my YouTube Channel

http://www.youtube.com/user/HammerAnimation/videos

Thanks for watching!
Hammerjammer
User avatar
Joofville
Posts: 139
Joined: Fri Apr 13, 2012 8:19 am
Location: South Africa

Re: Fun with Physics!

Post by Joofville » Wed Aug 28, 2013 6:16 am

Haha! That's so awesome. I've never tried physics in Anime Studio Pro.
User avatar
GCharb
Posts: 2202
Joined: Mon Oct 10, 2005 2:31 am
Location: Saint-Donat, Quebec, Canada
Contact:

Re: Fun with Physics!

Post by GCharb » Wed Aug 28, 2013 1:09 pm

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
Danimal
Posts: 1584
Joined: Thu Nov 15, 2007 3:06 pm
Location: The Danimal Kingdom
Contact:

Re: Fun with Physics!

Post by Danimal » Wed Aug 28, 2013 1:38 pm

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!
~Danimal
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Re: Fun with Physics!

Post by heyvern » Wed Aug 28, 2013 8:41 pm

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).
Danimal
Posts: 1584
Joined: Thu Nov 15, 2007 3:06 pm
Location: The Danimal Kingdom
Contact:

Re: Fun with Physics!

Post by Danimal » Wed Aug 28, 2013 9:14 pm

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!
~Danimal
sbtamu
Posts: 1911
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Re: Fun with Physics!

Post by sbtamu » Thu Aug 29, 2013 3:38 am

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.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Re: Fun with Physics!

Post by heyvern » Thu Aug 29, 2013 3:59 am

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. :)
Post Reply