Skip to content
←Back to Open Source

OPEN SOURCE DEEP DIVE

3D GenerationMechanical RiggingProcedural AnimationArticulated Objects

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.

apekshik/anymachine925PythonMIT9 min read

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.

Reference and rebuilt model of the AnyMachine thirty-metre walker
A concept view and the rebuilt walker. One script owns the parts, rig, actuators, actions, export, and checks.

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.

Rebuilt laptop with a working lid hinge in AnyMachine
The generated keyboard skin is kept, while the shell, lid, and hinge are rebuilt. A 136-state sweep found zero overlaps and 0.32 mm minimum clearance.

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.

Knee reference and rebuilt articulated mechanism for the AnyMachine walker
The knee includes a pin, fork, tongue, drum housing, flange, cables, and hydraulic actuator. Close-up pairs expose missing structure that a whole-body render can hide.

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.

ExperimentMechanismMeasured resultRemaining boundary
LaptopOne hinge, 0 to 135 degrees136 states, zero overlaps, 0.32 mm minimum clearanceGenerated base lacks ports and has texture damage
QuadrupedFour legs, three joints eachTwelve sweeps and 311 action frames without overlap17 of 300 random valid poses collide
SpiderEight legs, 24 joints, 26 partsAbout 1,200 poses without overlap; 2.81 mm non-adjacent clearanceAll 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.

AnyMachine quadruped executing a trot gait
Diagonal groups drive the trot. The 311-frame action set has no overlaps, and rolling contact keeps material-point stance slip at 0.014 mm.

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.

Frame strip of the AnyMachine eight-legged robot walking
Eight legs and 24 joints produce a stable kinematic walk. The count comes from an explicit prior because every generator drew six.

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.

Reference sheet, clay model, and textured helicopter from AnyMachine
The helicopter was modeled part by part rather than kept as an image-to-3D hero mesh. Rotor, cabin, cockpit, gear, and tie-downs are separate parts, though the result is still blockier than the sheet.

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.

AnyMachine roll-top backpack with a procedurally coiled collar
The only backpack that passes every check. Its 67-bone collar follows a radius-dependent spiral through 159 validation states.
BagStatesOutcomeBoundary revealed
Roll-top159Passed: zero penetration, zero collar self-intersectionProcedural collar is smoother than the generated body
Rucksack113Failed when lid, fill, and buckles interactedClosed drape was solved for one fill state
Zip daypack159Zip works alone, fails with fillOpen 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.

Related Projects

ahujasid/mcp-for-blenderMIT

MCP for Blender: 32 tools that make Blender a 3D workspace an LLM can drive

Formerly blender-mcp, a third-party community plugin (the README states on its first screen that it is not made by Blender), MIT licensed, Python, and the highest-starred entry among 3D MCP servers. The PyPI package is now mcp-for-blender, yet uvx blender-mcp still runs and existing configs need no change. Two components only: an addon inside the Blender process runs a socket server that actually executes commands (the only place with bpy, the current scene and the UI thread), while a separate MCP server process translates protocol, joined by JSON over TCP on localhost:9876 by default. The source defines 32 @mcp.tool() decorators across four layers - perception (get_scene_info, get_object_info, get_viewport_screenshot returning an MCP Image, closing an act-then-look loop), reference lookup (bpy_api_lookup and describe_node_type so the model queries instead of guessing socket order and enum names), execution (execute_blender_code as the escape hatch, set_texture, export_scene to GLB/FBX), and asset retrieval and generation (Poly Haven with semantic search, importing the .blend source and writing attribution properties; Poly Pizza with about 10,600 low-poly models, size normalisation and automatic CC-BY credit; Sketchfab; Hyper3D Rodin text-to-3D and image-to-3D; Tencent Hunyuan3D distinguishing the mainland ai3d endpoint from the international hunyuan one). On security, arbitrary code execution is the design rather than a bug: an optional safe mode (BLENDER_MCP_SAFE_MODE=1) statically validates scripts before running, blocking file access, subprocesses, network and persistent code while modelling, rendering, saving, import and export pass normally, and blocked scripts return to the model with the reason so it can retry. Content telemetry is off by default, and a dedicated disable_telemetry tool can only turn collection off. 29.2k stars. Not run with Blender locally yet, so this is graded as pending reproduction.

MCPBlender
lightningpixel/modlyNOASSERTION

Modly: Local, Open-Source Image-to-3D Mesh Generation Desktop App

Modly is an open-source desktop app from Lightning Pixel (Windows, Linux, Apple Silicon macOS; v0.4.3; MIT plus an attribution clause) that turns a photo into a usable 3D mesh with open models running on your own GPU, so inference never leaves the machine. An Electron shell supervises a Python FastAPI backend bound to 127.0.0.1:8765. The default model is TripoSR (about 2.4 GB); Hunyuan3D 2 Mini, TripoSG and Trellis2 GGUF arrive as extensions, where an extension is a GitHub repo with a manifest.json that can declare multi-repo model_sources, shared weight_groups and separately installable weight_variants carrying size_gb and vram_gb. Generation is expressed as a node-graph workflow (Image to Generate Mesh to Add to Scene), scenes follow the modly.scene-manifest.v1 contract, and export covers glb/stl/obj/ply with a dedicated stl/obj printing path that scales to millimetres for OrcaSlicer. Three agent surfaces ship in the repo: a stdlib-only JSON-first CLI with its own SKILL.md, an MCP server exposing nine modly_* tools, and an in-app tool-calling agent that can run on a local llama.cpp GGUF pool or an external model endpoint. AMD ROCm auto-detection, memory-budgeted Apple Silicon workflows and headless Jetson runs are documented with measured numbers.

Image-to-3D3D Generation
neilsonnn/image-blasterMIT

image-blaster: blast one image into a collidable 3D world

A set of Claude Code skills that turns one image into an explorable Gaussian-splat environment with a collider mesh and metric scale, plus interactable object meshes and sound effects, in under five minutes.

3DGenerationWorldModel

As an Amazon Associate, we earn from qualifying purchases.