Page 1 of 1
Which constraint type to use to simulate a bending stem?
Posted: Sun Feb 13, 2011 3:23 pm
by jamesw
Hi guys!
I'm still fairly new to Chipmunk. Can someone give me some insight on which constraint / joint type would be best to use when simulating a bending flower stem under a certain wind condition?
Thanks!
Re: Which constraint type to use to simulate a bending stem?
Posted: Sun Feb 13, 2011 5:21 pm
by slembcke
Ooof. I tried this recently. I contracted on a book (due to be out any day now) with Atomic Antelope recently that had a flexible plant stem in one of the scenes. It was much harder to get it stable than I expected.
Basically it was a bunch of bodies with pivot joints holding them together. To get the "flex" I added damped rotary springs with extremely high spring values. To compensate for the extreme forces causing the numerical precision to explode, I had to make the moment of inertia of the plant segments to be about 50x higher than would be correct (though it wasn't noticeable at all). I did get it to work quite well after a few hours of tweaking, but it wasn't very easy. Quite often the stem would bend a little, then all the pieces would go flying apart. The scene had 90 joints/constraints in it by the time I was done.
Re: Which constraint type to use to simulate a bending stem?
Posted: Wed Mar 16, 2011 10:14 am
by hm50
I did a simple "bending" flower by attaching the flower rect to ground body with a pin and then attaching damped springs at the top of the flower at 45 deg back to the ground body. looks ok for small flowers.