OPEN SOURCE DEEP DIVE
AnyMachine: Rebuilding Articulated Machines in Blender
Six experiments show how measured references and generated surfaces become articulated mechanisms with rebuilt joints, baked motion, contact checks, and validated GLB export.
An experimental workflow, not a product endpoint
AnyMachine studies a narrow Blender Python problem: when image-to-3D produces a convincing machine whose parts are fused together, how can a script measure the joints, rebuild the moving hardware, author motion, and export a glTF that ordinary engines can play? The repository contains six experiments: a laptop, quadruped, spider, three backpacks, a thirty-metre walker, and a set of static hard-surface props. Its README calls the status experiments and says there is no endpoint.
This is not a rigid-body simulator, physical robot controller, or general conversion service. The walking machines use kinematic planning and baked forward-kinematics keys, not mass, friction, or actuator dynamics. A person chooses the design and approves each visual stage; an agent writes measurement, construction, rigging, animation, and validation code. The useful contribution is the separation between a generated surface and a mechanical structure that can be tested.
Why generated meshes fail as mechanisms
Generators recover appearance better than topology. The laptop base arrived with more than 47,700 open boundary edges, and filling every hole produced giant triangles across the keyboard. Quadruped and spider legs were fused to their bodies instead of forming separate links. The spider brief asked for eight legs, but the image model and both 3D generators returned six. Inferring part counts from that mesh would make every later rig and gait wrong.
AnyMachine therefore takes part counts and joint types from a category prior or explicit request. The mesh supplies proportions, an articulated pose, surface detail, and material samples. A mid-motion reference makes the mechanism measurable: the open laptop allowed a deck-plane fit, a lid-direction estimate, and their intersection to place the hinge. The lid was then rebuilt as a slab whose rear cylinder is coaxial with that axis, so the closed construction prevents penetration instead of relying on later tuning.
Geometric success does not guarantee a finished asset. Tripo's metallic maps turned the keycaps chrome, so the materials were corrected by hand. The base retained a texture blotch, the sides lacked ports, and the lid remained plain. The experiment reports both the working hinge and these visible limits.
Two ways to build a machine
The first route starts with a generated everyday object. The script measures the visible mechanism, keeps useful generated detail as a skin, rebuilds the shell and every relative-moving part, then rigs and validates the result. This works for a laptop, quadruped, spider, or backpack when the category supplies the missing mechanical knowledge. It does not ask the generator to infer joints it cannot represent.
The second route starts with references. A concept image becomes a turnaround, large single views, and close-up plates for each mechanism. The author writes dimensions, axes, load paths, parts, and bones before building geometry. The Stilt required forty reference images, about 2,200 lines of build code, and forty comparison renders, with human approval between stages. Static props use the same reference-first rule but replace rigging with a second detail pass and texture baking.
Stopping same-chain collisions by construction
The strongest reusable geometry rule is the alternating axial slab around coaxial half-barrels. Parent and child links occupy disjoint intervals along the joint axis, each with a matching half-barrel. A rotation maps each link into its own axial layer, preventing the adjacent pair from intersecting at any angle. The laptop introduces the idea with one barrel. The quadruped applies it across three-joint legs, and the spider extends it to twenty-four joints.
Different chains can still collide. A quadruped's front and hind legs may meet even when every joint is inside its individual limit. Of 300 random poses sampled uniformly within all twelve joint limits, seventeen had a leg-to-leg overlap, a 5.7 percent rate. All cases involved the same-side front and hind legs. The spider's yaw range was reduced to 22 degrees after a combined sweep found neighbor contact at 27.5 degrees. Single-joint checks cannot replace whole-chain tests.
| Experiment | Mechanism | Measured result | Remaining boundary |
|---|---|---|---|
| Laptop | One hinge, 0 to 135 degrees | 136 states, zero overlaps, 0.32 mm minimum clearance | Generated base lacks ports and has texture damage |
| Quadruped | Four legs, three joints each | Twelve sweeps and 311 action frames without overlap | 17 of 300 random valid poses collide |
| Spider | Eight legs, 24 joints, 26 parts | About 1,200 poses without overlap; 2.81 mm non-adjacent clearance | All generators returned six legs; carapace skin is rough |
Contacts, gaits, and seekable glTF clips
Walkers are planned analytically in world space and baked as linear FK keys. Blender retains IK as a posing aid, but the GLB needs no constraint or driver: a viewer seeks within a normal clip and receives the evaluated pose. Rig extras store joint axes, limits, controls, and action names. Each public control is a zero-to-one parameter, making the asset easier to drive from a web or game tool than an arbitrary skeleton hierarchy.
Contact needs an explicit model. Pinning the center of a spherical foot would rotate it in place and skate by about nine millimetres per stance. The quadruped instead compensates the center for radius times rotation and measures the material contact point. It achieves 0.014 millimetres of stance slip. The spider is exact at keyed footholds, but half-frame interpolation reaches 0.75 millimetres in Blender; after GLB re-import the sampled slip falls to 0.021 millimetres. Validators must inspect between keys because linear playback can depart from both authored poses.
The quadruped exports in-place and forward trot, idle, sit, and stand. The spider exports walk, idle, and crouch. Both preserve IK targets for external tools while delivering plain baked motion. Neither result includes balance control or ground dynamics.
Six experiments and what they prove
The laptop is the minimum complete loop: articulated reference, measured axis, rebuilt hinge, full sweep, clamped controls, export, and re-import. The quadruped extends that loop to a gait with measured rolling contact. The spider tests the same construction at eight chains and exposes the risk of trusting generated topology. Its continuous frame strip shows an alternating tetrapod handover, but the skin still has torn edges, a mirror seam, and texture blotches.
The Stilt demonstrates the cost of reference-first construction. It is 29.98 metres tall, with 160 parts, 104 bones, fourteen hydraulic actuators, three actions, and roughly 352,000 triangles. The script searches actuator anchors that stay within their stroke and maximize leverage. Walk, reach, and head-turn actions have no cross-part intersections. Hands, elbows, feet, chest layers, and cable routing remain simpler than their reference plates.
The hard-surface kit extends the method to the lifeboat, helicopter, twelve equipment pieces, nineteen lights, and three rifles. Real silhouette-changing parts stay as meshes; sub-eight-millimetre rivets, welds, and seams become bake-only detail. The props are accepted as game assets, not film-grade replicas. The helicopter has Blender renders and proposed collision boxes, but its notes say it has not been tested in the target game.
Soft goods: failures define the next interface
Backpacks show that hinges, sliders, wheels, and springs are not enough. Flaps need chains with lag and sag, zips need a path and pinned fabric, fill needs multiple deformers, straps need length constraints, and a roll-top needs a curvature law. These controls couple through contact. A lid drapes over fill, a buckle rides a bulging panel, and an open zip panel inherits deformation from its closed state.
The roll-top succeeds. Its forty-centimetre collar is a 3.2-millimetre tube, bent by sixty-seven bones through 2.5 Archimedean turns with a seven-millimetre pitch. An earlier coil produced about 3,500 self-intersecting triangle pairs. The final version passes all 159 states with zero penetration and zero collar self-intersection. By contrast, the rucksack lid reaches 11.6 millimetres into an empty collar, and the daypack panel falls 35 millimetres below the floor when fully open with zero fill.
| Bag | States | Outcome | Boundary revealed |
|---|---|---|---|
| Roll-top | 159 | Passed: zero penetration, zero collar self-intersection | Procedural collar is smoother than the generated body |
| Rucksack | 113 | Failed when lid, fill, and buckles interacted | Closed drape was solved for one fill state |
| Zip daypack | 159 | Zip works alone, fails with fill | Open empty panel is 35 mm below the floor |
The reusable method and its limits
The repeatable sequence is to establish a parts prior, measure from an articulated reference, keep generated detail as a skin, rebuild moving parts, isolate serial links, plan contacts in world space, bake FK, then test joint sweeps, random combinations, complete actions, half-frames, clamping, floor clearance, self-intersection, and GLB re-import. Every check answers a different failure mode. A valid .blend or a clean still cannot stand in for the exported file or the motion between keys.
Category knowledge remains essential: eight legs cannot be inferred from a six-leg mesh, and a laptop prior must provide its hinge range. There is still no common API or category database, no dynamics or friction, and no runtime soft-body solver. AnyMachine is best understood as a research record showing how generated surfaces become inspectable mechanisms. Its honesty is part of the value: random quadruped poses can collide, coupled backpacks still penetrate, spider skin is damaged, and one hero prop has not entered its game.
SOURCE LINKS