Commit ·
3008a5d
0
Parent(s):
Duplicate from Isabellaliu/RigAnything
Browse filesCo-authored-by: Isabella Liu <Isabellaliu@users.noreply.huggingface.co>
Files changed (5)
- .gitattributesAdded+1
- LICENSE.mdAdded+13
- README.mdAdded+131
- config.yamlAdded+47
- riganything_ckpt.ptAdded+3
1*.pt filter=lfs diff=lfs merge=lfs -text12345678910111213Copyright © 2025, Adobe Inc. and its licensors. All rights reserved.
ADOBE RESEARCH LICENSE
Adobe grants any person or entity ("you" or "your") obtaining a copy of these certain research materials that are owned by Adobe ("Licensed Materials") a nonexclusive, worldwide, royalty-free, revocable, fully paid license to (A) reproduce, use, modify, and publicly display the Licensed Materials; and (B) redistribute the Licensed Materials, and modifications or derivative works thereof, provided the following conditions are met:* The rights granted herein may be exercised for noncommercial research purposes (i.e., academic research and teaching) only. Noncommercial research purposes do not include commercial licensing or distribution, development of commercial products, or any other activity that results in commercial gain.* You may add your own copyright statement to your modifications and/or provide additional or different license terms for use, reproduction, modification, public display, and redistribution of your modifications and derivative works, provided that such license terms limit the use, reproduction, modification, public display, and redistribution of such modifications and derivative works to noncommercial research purposes only.* You acknowledge that Adobe and its licensors own all right, title, and interest in the Licensed Materials.* All copies of the Licensed Materials must include the above copyright notice, this list of conditions, and the disclaimer below.
Failure to meet any of the above conditions will automatically terminate the rights granted herein.
THE LICENSED MATERIALS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK AS TO THE USE, RESULTS, AND PERFORMANCE OF THE LICENSED MATERIALS IS ASSUMED BY YOU. ADOBE DISCLAIMS ALL WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, WITH REGARD TO YOUR USE OF THE LICENSED MATERIALS, INCLUDING, BUT NOT LIMITED TO, NONINFRINGEMENT OF THIRD-PARTY RIGHTS. IN NO EVENT WILL ADOBE BE LIABLE FOR ANY ACTUAL, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, INCLUDING WITHOUT LIMITATION, LOSS OF PROFITS OR OTHER COMMERCIAL LOSS, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE LICENSED MATERIALS, EVEN IF ADOBE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131---language:- entags:- Animation- Auto-rigging- Graphics---# RigAnything: Template‑Free Autoregressive Rigging for Diverse 3D Assets (SIGGRAPH TOG 2025)
[](https://arxiv.org/abs/2502.09615)[](https://www.liuisabella.com/RigAnything/)[](https://github.com/Isabella98Liu/RigAnything)[](https://huggingface.co/Isabellaliu/RigAnything/tree/main)
RigAnything predicts skeletons and skinning for diverse 3D assets without a fixed template. This repository provides inference scripts to rig your meshes (.glb or .obj) end‑to‑end and export a rigged GLB for use in DCC tools (e.g., Blender).
## Environment setup
Recommended: create a fresh Conda env with Python 3.11.
```bashconda create -n riganything -y python=3.11conda activate riganything```
Install PyTorch per your CUDA/CPU setup (see https://pytorch.org/get-started/locally/). Example (adjust CUDA version as needed):
```bash# GPU example (CUDA 12.x) — pick the right wheel from PyTorch website
# 1) Install PyTorch that matches your systempip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
# 2) Install project dependenciespip install -r requirements.txt```
Notes- The scripts import Blender’s Python API (`bpy`). The `bpy` PyPI package works in headless environments; alternatively, you may use a system Blender installation. If you run into OpenGL/GLX issues on a server, consider an off‑screen setup (e.g., OSMesa/Xvfb) and ensure libGL is available.- `open3d`/`pymeshlab` may require system GL libraries on Linux (e.g., `libgl1`).
## Checkpoint
Download the pre‑trained checkpoint and place it under `ckpt/`.
```hf download Isabellaliu/RigAnything --local-dir ckpt/```
## Quick start
Use the provided script to simplify your mesh (optional) and run inference. The tool accepts either `.glb` or `.obj` as input.
```bashsh scripts/inference.sh <path_to_mesh.(glb|obj)> <simplify_flag: 0|1> <target_face_count>```
Example:
```bashsh scripts/inference.sh data_examples/spyro_the_dragon.glb 1 8192```
### What the arguments mean- mesh_path: path to your input mesh (.glb or .obj)- simplify_flag: whether to simplify the mesh before rigging (0 = no, 1 = yes)- target_face_count: the target number of faces after simplification (only used when simplify_flag = 1)
### OutputsResults are written under `outputs/<asset_name>/` with these key files:- `<name>_simplified.glb`: the simplified input mesh used for inference- `<name>_simplified.npz`: intermediate results (joints, weights, etc.)- `<name>_simplified_rig.glb`: the final rigged mesh you can import into Blender- `inference.log`: logs from all steps
## Advanced: run inference directly
You can call the Python entry points used by the script. Minimal example equivalent to the shell script flow:
```bash# 1) Optional: simplifypython inference_utils/mesh_simplify.py \ --data_path data_examples/spyro_the_dragon.glb \ --mesh_simplify 1 \ --simplify_count 8192 \ --output_path outputs/spyro_the_dragon
# 2) Inference (uses config.yaml + checkpoint)python inference.py \ --config config.yaml \ --load ckpt/riganything_ckpt.pt \ -s inference true \ -s inference_out_dir outputs/spyro_the_dragon \ --mesh_path outputs/spyro_the_dragon/spyro_the_dragon_simplified.glb
# 3) Visualize / export rigged GLBpython inference_utils/vis_skel.py \ --data_path outputs/spyro_the_dragon/spyro_the_dragon_simplified.npz \ --save_path outputs/spyro_the_dragon \ --mesh_path outputs/spyro_the_dragon/spyro_the_dragon_simplified.glb```
## Supported inputs- `.glb` is supported directly.- `.obj` is supported and will be converted to `.glb` internally (without textures).
## Tips & troubleshooting- GPU memory: inference uses the first CUDA device (`cuda:0`). Ensure sufficient VRAM; otherwise consider simplifying the mesh (higher simplification ratio / lower face count).- Headless servers: if `bpy` complains about display/GL, install the necessary GL libraries and/or use an off‑screen context. Using the `bpy` PyPI wheel typically helps for server environments.
## Citation
If you find this work useful, please cite:
```@article{liu2025riganything, title = {RigAnything: Template-free autoregressive rigging for diverse 3D assets}, author = {Liu, Isabella and Xu, Zhan and Wang, Yifan and Tan, Hao and Xu, Zexiang and Wang, Xiaolong and Su, Hao and Shi, Zifan}, journal = {ACM Transactions on Graphics (TOG)}, volume = {44}, number = {4}, pages = {1--12}, year = {2025}, publisher = {ACM}}```
---
Questions or issues? Please open a GitHub issue or reach out via the project page.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647inference: falseinference_out_dir: outputmodel: class_name: model.ar_rig_diffusion.RigARDiffusion diffusion: d: 3 grad_checkpointing: false num_sampling_steps: '300' w: 1024 joints_tokenizer: in_channels: 3 middle_channels: 512 n_joints: 64 pc_tokenizer: in_channels: 6 middle_channels: 512 n_points: 1024 transformer: d: 1024 d_head: 16 n_layer: 12training: amp_dtype: bf16 batch_size_per_gpu: 12 beta1: 0.9 beta2: 0.95 checkpoint_dir: ckpt/ckpt.pt checkpoint_dir_s3: None grad_accum_steps: 1 grad_checkpoint_every: 1 l2_warmup_steps: 500 lpips_loss_weight: 0.0 lr: 0.0001 max_fwdbwd_passes: 100000 num_epochs: 100000 perceptual_loss_weight: 0.5 pointsdist_loss_weight: 0.0 reset_lr: false reset_training_state: true reset_weight_decay: false resume_ckpt: ckpt/ckpt.pt use_amp: true use_tf32: true wandb_exp_name: None warmup: 500 warmup_pointsdist: false weight_decay: 0.05123version https://git-lfs.github.com/spec/v1oid sha256:84c00971ed5c07f2906495bb4a23891058e7e1ee2afe687ada2011cd082a187asize 2344595770.gitattributesAdded+1
LICENSE.mdAdded+13
README.mdAdded+131
config.yamlAdded+47
riganything_ckpt.ptAdded+3