PDA

View Full Version : Bullet: simulation capabilities?



jeric_synergy
08-13-2017, 01:43 AM
Could Bullet be used to simulate this mechanism?: :confused:


http://507movements.com/mm_088.html

squarewulf
08-17-2017, 11:29 AM
Is that similar to a ratcheting motion?

jeric_synergy
08-17-2017, 11:21 PM
More like a Geneva Wheel, but a full 180 each time. The illustration does not convey well that "wheel B" is not on the same center as "wheel A".

It's easy to animate, but I wondered if simulation was practical.

BTW, that resource is soooooo much fun.

MonroePoteet
08-18-2017, 03:22 PM
It turns out the answer is "Yes" it can be simulated with Bullet. The scene is attached.

137711137713

The setup is a Bullet Hinge on the Disc B "stops" with Disc B a child of that object, a Hinge with a Motor on the Disc A paddle with the Disc A Axle a child of that. The paddle makes the action easier to see, IMO, and the only active part of the Disc A in the original diagram is the flat land which contacts the "stops" on Disc B.

A couple of critical but not very obvious requirements were to A) model the objects centered around the Y axis and set up the Hinges *BEFORE* moving / rotating them into their initial positions, B) set World=>Gravity to 0.0, and C) scale the Disc_A_Pivot and Disc_B_Pivot Nulls down to 0.001.

Creating the Hinges which were to be used as the pivot points was a little tricky. The trick is to create a Null (e.g. Disc_A_Pivot) which is where the Hinge will be, then offset the Pivot Point of the Disc_A_Paddle object down it's full length using Modify=>Move Pivot Point. Then, first select the Disc_A_Paddle object, then the Disc_A_Pivot and apply a Bullet Hinge. Rotate the Hinge 90 degrees in Pitch so it rotates around the Y axis. Then, move the Pivot Point for Disc_A_Paddle back to (0,0,0) so we can set up the initial position (offset from 0,0,0) and rotation (-45,0,0). Same process for the Disc_B_Stops.

The Bullet Hinges appear to use the "center of gravity" of the object (I'd guess the centroid of the constituent points), so if that's not in the same plane as the hinge is supposed to rotate, you get some wierd off-axis rotation. Thus, the requirement to model the objects centered around the Y axis for a Y axis Hinge.

The (B) requirement above is because applying the Bullet Hinge causes the corresponding Pivot Null to be added to Bullet as a Kinematic object (for whatever reason). Because it's default "range" in Bullet causes collisions, I scaled them down to 0.001 in all dimensions, which means they don't "toss around" the Paddle or the Stops due to collisions. If I scale them down to 0.0, Bullet appears to lose the intended axis of rotation.

Anyway, to make a long story short: yes, it's possible. :)

mTp

P.S. As an aside, note the very wide inner diameter of Disc B allowing the Disc A Axle to reach its power source. In a real world application, I think it'd be tricky to capture the intermittent motion of Disc B for use outside the mechanism in the configuration I modeled. Perhaps gear teeth on the inner surface of Disc B, a gear surrounding the Disc A axle, and a final gear centered on Disc B to utilize the intermittent motion. Of course, if the Disc A Axle came in from above rather than from below, it'd be no problem.

Greenlaw
08-18-2017, 04:21 PM
That's very cool! Nice work MonroePeet. :thumbsup:

jeric_synergy
08-18-2017, 05:10 PM
Monroe Poteet, THANK YOU for being a sterling citizen of the forum-- you've never been less than perfectly helpful and have gone out of your way many times to give help to me and many others.

THANK YOU! :bowdown: :bowdown: :bowdown:

+++
Also: your notes on 'critical but non-obvious' is why I didn't try to give this a whirl myself: how did you know that the nulls have to be scaled to such a miniscule value??? :stumped:

+++2

P.S. As an aside, note the very wide inner diameter of Disc B allowing the Disc A Axle to reach its power source. In a real world application, I think it'd be tricky to capture the intermittent motion of Disc B for use outside the mechanism in the configuration I modeled. Perhaps gear teeth on the inner surface of Disc B, a gear surrounding the Disc A axle, and a final gear centered on Disc B to utilize the intermittent motion. Of course, if the Disc A Axle came in from above rather than from below, it'd be no problem.
I always assumed the shaft being driven by Wheel B to be hollow, as are many of the mechanisms in http://507movements.com/ . Mechanical drawings had not reached a very high point of standardized readability in 1868. :D

Cite: http://507movements.com/mm_357.html

I could look at the collection all day long though!

MonroePoteet
08-18-2017, 05:40 PM
Also: your notes on 'critical but non-obvious' is why I didn't try to give this a whirl myself: how did you know that the nulls have to be scaled to such a miniscule value??? :stumped:



Well, basically trial-and-error-and-cursing. I'd get it all set up "logically", Enable Simulation, and Disc A would go flying off into the air and jitter around madly. So, turn off and on things until it became clear it was something with the Pivots. Tried setting the Collision Margin to 1mm, 0, etc., then decided they didn't really play a part in the actual simulation other than a placeholder for the Hinge, so scaled them down as described.



I always assumed the shaft being driven by Wheel B to be hollow, as are many of the mechanisms in http://507movements.com/ . Mechanical drawings had not reached a very high point of standardized readability in 1868. :D


I think my second comment is the actuality: the input shaft and the output shaft are on opposite ends of the mechanism, so they don't interfere with each other.



Cite: http://507movements.com/mm_357.html
I could look at the collection all day long though!

Yes, I have a reprint of the original book, "507 Mechanical Movements, Mechanisms and Devices" by Henry T. Brown. Fascinating.

mTp

- - - Updated - - -


That's very cool! Nice work MonroePeet. :thumbsup:

Thanks. I *might* try more of these mechanical devices with Bullet - at least try to remember the "super secret setup" stuff that Bullet requires.

mTp

jeric_synergy
08-18-2017, 06:11 PM
Well, basically trial-and-error-and-cursing.
I got the third part covered.

Thanks for the process. :thumbsup:


I think my second comment is the actuality: the input shaft and the output shaft are on opposite ends of the mechanism, so they don't interfere with each other.
Yes, for sure, BUT that could significantly add to the bulk/volume of the device.

jwiede
08-20-2017, 07:03 PM
I *might* try more of these mechanical devices with Bullet - at least try to remember the "super secret setup" stuff that Bullet requires.

I'm not sure it's accurate to say that Bullet requires the workarounds mentioned, as Bullet in C4D seems to function in a much more predictable manner w.r.t. discs rotating properly in plane, etc. A quick check of MODO's Recoil (also a Bullet integration) doesn't appear to exhibit such issues either. Seems like these issues are much more tied to LW's integration of the Bullet engine, than they are to the behaviors of the Bullet engine itself.