Skip to content

About

🦴 Zero-Click Autonomous 3D Mesh Rigging Engine. Browser-local ONNX vision model + dual-pipe zero-copy Web Workers for instant procedural character rigging.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

143 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Project Banner

πŸ€– auto-rig-web

Browser-Local ONNX Character Rigging & CCDIK Kinematics Pipeline

Lunar Paradox License: Apache 2.0 TypeScript ONNX Runtime Three.js

Upload a static .gltf mesh. Instantly get a fully rigged, IK-ready SkinnedMesh.
No server-side processing. No manual bone placement. No weight painting.

The Problem Β· Architecture & Workflow Β· Tech Stack Β· API Usage


The Problem: Manual Rigging is a Bottleneck

In interactive 3D web platforms (metaverses, configurators, UGC gaming), empowering users to upload custom avatars usually requires a massive compromise:

  1. Force manual rigging: Users spend days in Blender placing bones and painting weights.
  2. Server-side pipelines: Send meshes to a cloud service running Mixamo or Maya scripts (slow, expensive, high latency).

The Solution

auto-rig-web shifts the entire pipeline to the client. Using a lightweight, browser-local ONNX vision model, it analyzes mesh topology, predicts joint locations, constructs a skeletal hierarchy, and computes biharmonic skin weights procedurally using Three.jsβ€”all within milliseconds.


Live Demo

Try the interactive demo directly in your browser: Edit auto-rig-web Demo

Live Browser Sandbox: Launch the live interactive WebGPU / ONNX rigging runtime directly in your browser:
πŸ‘‰ Run Live Sandbox on CodeSandbox or run locally via npm run dev.

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  [LIVE THREE.JS / WEBGPU VIEWER]                                       β”‚
  β”‚                                                                        β”‚
  β”‚     (o) Head Node                                                      β”‚
  β”‚      |                                                                 β”‚
  β”‚  [===+===] Shoulder / Clavicle Arc                                     β”‚
  β”‚    / | \                                                               β”‚
  β”‚   O  |  O  Elbow Joints (CCDIK Constraints Enabled)                    β”‚
  β”‚      |                                                                 β”‚
  β”‚     ( )    Pelvic Root Coordinate [x: 0.00, y: 1.02, z: 0.00]          β”‚
  β”‚     / \                                                                β”‚
  β”‚    O   O   Knee / Biharmonic Heat Skinning Weight Transfer             β”‚
  β”‚                                                                        β”‚
  β”‚  Status: 60 FPS Steady Β· 0 Heap Allocations Β· 18ms Inference           β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    auto-rig-web                            β”‚
β”‚                                                            β”‚
β”‚  1. Ingestion        2. AI Inference       3. Topology     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Static     β”‚      β”‚ ONNX Runtimeβ”‚       β”‚ Procedural β”‚  β”‚
β”‚  β”‚ THREE.Mesh │─────>β”‚ (WebGPU)    │──────>β”‚ Skinning   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚ Joint Predictβ”‚      β”‚ (Weights)  β”‚  β”‚
β”‚                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                   β”‚        β”‚
β”‚  4. Output           5. Animation                 β”‚        β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚        β”‚
β”‚  β”‚ SkinnedMeshβ”‚<─────│ CCDIK Solverβ”‚<β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚  β”‚ (Ready)    β”‚      β”‚ (Real-Time) β”‚                       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
  1. Voxelization & Tensor Prep: The input geometry's vertices are mapped to a 3D occupancy grid tensor.
  2. ONNX Inference: A quantized spatial CNN runs via onnxruntime-web (WebGPU accelerated) to predict 3D coordinates for a standard 19-joint bipedal hierarchy.
  3. Procedural Skinning: Bones are instantiated. Skin indices and skin weights are computed per-vertex using inverse distance weighting with exponential falloff (approximating heat-diffusion/geodesic distance).
  4. IK Constraints: A built-in Cyclic Coordinate Descent (CCDIK) solver allows instant dynamic posing by pulling end-effectors (e.g., wrists, ankles).

Skeleton Layout (19-Bones)

       [Head]
         |
       [Neck]
         |
    --[Chest]--
   /     |     \
[L.Sh] [Spine] [R.Sh]
  |      |       |
[L.Arm] [Hips] [R.Arm]
  |     /    \    |
[L.FA] /      \ [R.FA]
  | [L.UpLeg] [R.UpLeg] |
[L.Hnd]  |      |   [R.Hnd]
      [L.Leg] [R.Leg]
         |      |
     [L.Foot] [R.Foot]

Tech Stack

This library is engineered for performance at the edge:

  • AI Inference: onnxruntime-web leveraging the WebGPU execution provider. This allows complex spatial CNNs to run directly on the client's GPU without WebGL overhead or CPU blocking.
  • 3D Pipeline: Three.js is used for matrix math, hierarchy construction, and upgrading standard BufferGeometry to skinning-ready buffers (skinIndex, skinWeight).
  • Procedural Algorithms:
    • Weight Calculation: Custom multi-threaded fallback algorithms for distance-based bone influence mapping.
    • Kinematics: Integrated CCDIK solver to handle complex joint rotations avoiding gimbal lock via Quaternion slerp chains.

API Reference

The primary export of auto-rig-web is the AutoRigger class.

AutoRigger

import { AutoRigger } from 'auto-rig-web';

const rigger = new AutoRigger({ skinningFalloff: 2.5 });
await rigger.init();

AutoRigger.rig(mesh: THREE.Mesh): Promise<THREE.SkinnedMesh>

Analyzes the input static mesh, predicts joint locations, constructs a skeleton, and calculates procedural skin weights. Returns an IK-ready SkinnedMesh.

AutoRigger.setIKTarget(target: IKTarget): void

Assigns a 3D target for a specific joint to pull towards.

rigger.setIKTarget({ joint: JointType.LeftHand, position: new THREE.Vector3(1, 2, 0), influence: 1.0 });

AutoRigger.animate(): void

Solves the Inverse Kinematics chains for the current frame. Call this inside your requestAnimationFrame loop.

Framework Integration

React + Three.js (@react-three/fiber)

import { useFrame } from '@react-three/fiber';
import { AutoRigger } from 'auto-rig-web';

const rigger = new AutoRigger();
// ... inside component ...
const riggedMesh = await rigger.rig(staticMesh);
useFrame(() => rigger.animate());

Vue + Three.js (TresJS)

<script setup>
import { useRenderLoop } from '@tresjs/core';
import { AutoRigger } from 'auto-rig-web';

const rigger = new AutoRigger();
const riggedMesh = await rigger.rig(staticMesh);
useRenderLoop().onLoop(() => rigger.animate());
</script>

Vanilla JS

import { AutoRigger } from 'auto-rig-web';

const rigger = new AutoRigger();
await rigger.init();
const riggedMesh = await rigger.rig(mesh);

function animate() {
  requestAnimationFrame(animate);
  rigger.animate();
  renderer.render(scene, camera);
}
animate();

πŸ“„ License

Apache 2.0 Β© n1khy


A component of the Lunar Paradox applied systems & graphics laboratory. Engineered by n1khy.

About

🦴 Zero-Click Autonomous 3D Mesh Rigging Engine. Browser-local ONNX vision model + dual-pipe zero-copy Web Workers for instant procedural character rigging.

Topics

Resources

Contributing

Security policy

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages