Skip to main content

Blog Archive

Exploring the Possibilities of Articulated Physics, Part 2

October 08, 2013

by Kevin He


Archive

We have a vision for ROBLOX where builders can create complex mechatronic constructs and simulate them in real time with other players. To that end, we’ve been working on implementing a new articulated physics engine, which will ultimately offer greater fidelity and more robust support for joints, motors and multiple articulated bodies. This has been a long and challenging process, but the videos below illustrate the progress we’ve made so far (and since our first article in this series).

This video represents a very complex simulation — the standard walking mech is built using 14 joints (a blend of prismatic, hinge and ball-socket), while the balancing version of the mech uses 20 joints and has 30 degrees of freedom. On top of that, Lua scripts power the mech’s movement, including the snapping claws, torso rotation and walking legs.

What’s particularly interesting about the balancing mech is the complex network of sensors and actuators it uses to stay standing. Each of the mech’s feet is, at the base, a rectangular plate equipped with sensors on each corner. The mech’s torso is also equipped with a gyro sensor. Anytime the sensors calculate the mech’s center of mass to be outside a safe radius of balance, they make adjustments; for instance, the torso will twist and the legs will step to prevent a complete fall. These adjustments depend on accurate joint sensors — more specifically, accurate readings of position and relative velocity at each joint of the mechanism — and such fidelity is only possible with articulated physics.

This tank is relatively simple, with three separate sections and a blend of revolute and ball-and-socket joints. The most complex components are the tracks, which each consist of 25 individual hinges. Unlike what you might find in a more traditional video game, this ROBLOX tank is modeled very realistically — to the point that the tracks are not just ”parented” to the tank wheels using traditional kinematic animation bones, but confined to the wheels by the dynamic collision forces among the track, wheel, ground and tank chassis (as they would be in the real world). While our tank simulates all the motion between the tracks and wheels, you can see the opposite end of the spectrum in this Steel Beasts Pro video. The tank tracks are animated as single pieces without the soft-body motion between the tracks and the wheels.

In total, our tank is built using 75 joints, which result in 81 degrees of freedom.

Both the mech and the tank put our articulated physics engine to the test, which is the primary purpose of these demos. The constructs allow us to exercise the strength and scalability of the articulated physics engine, while highlighting limits and bugs to be fixed.

Everything you’ve seen so far — the Chaos Canyon 10-wheeler and the front-end loader, and now the mech and tank — was built using tools we’ll release alongside the articulated physics engine. That means you’ll have the same freedom we have to create complex mechatronics. Just note that it takes time. Internally, we’ve spent days creating these mechs, tanks and other vehicles. However, we’re working on tutorials to guide you through the steps of harnessing the power of articulated physics.

We are planning for one more blog-demo before the release of the articulated physics engine, which is expected this fall. We’re now focusing on “sleeping” non-moving parts so as to reserve computing resources, and then diving into the multiplayer implementation and testing. All of this is an effort to perfect and refine the engine so we can deliver it to you.

Articulated Physics Mech