Rigbake
Sign in
Open the editor

Rigbake › Guides › A "Rig it" button for your 3D generator

A "Rig it" button for your 3D generator

Your users leave with a static model. One link sends it to a free auto-rigger in their browser, where it gets a skeleton, skin weights and a walk, and the file never touches our servers.

Try the auto-rigger

Rigging needs no account. Downloading the result uses a free one.

The link

Put the address of a model after ?model= and the auto-rigger opens with that model already in the box. The visitor presses Rig it, sees the character walking on the result, and downloads it with a free account.

The model address goes in URL-encoded: encodeURIComponent(url) in JavaScript, urllib.parse.quote(url, safe="") in Python. The same parameter opens the animal rigger for four-legged models.

Link

https://rigbake.com/tools/auto-rig/?model=https%3A%2F%2Fexample.com%2Fcharacter.glb

What the model address needs

  • https. Plain http is accepted only for localhost, while you test.
  • A server that lets other sites read the file. The visitor's browser fetches it, so the response has to allow that (CORS). Hugging Face Spaces, files in Hugging Face model and dataset repos, and raw GitHub files already do.
  • A model file. GLB, GLTF, FBX, OBJ, DAE, STL, PLY, VOX or VRM, or a zip with the model and its textures, up to 512 MB.
  • Still there when the link is opened. A temporary file works as long as it has not been deleted by then.

If the model cannot be opened, the page says why in one line (the address, the format, or the server refusing the request) and the drop box still takes a file.

The badge

Link it with this badge, or with words of your own. Replace MODEL_URL with the encoded address of the model.

Rig it in Rigbake
https://rigbake.com/badges/rig-it.svg

Markdown

[![Rig it in Rigbake](https://rigbake.com/badges/rig-it.svg)](https://rigbake.com/tools/auto-rig/?model=MODEL_URL)

HTML

<a href="https://rigbake.com/tools/auto-rig/?model=MODEL_URL" target="_blank" rel="noopener">
  <img src="https://rigbake.com/badges/rig-it.svg" alt="Rig it in Rigbake" height="28">
</a>

In a Gradio app or a Hugging Face Space

Gradio already serves every file it shows, so the button only has to point at it. This function builds the link for the GLB on screen and shows the badge under it. It works on Gradio 4, 5 and 6 and was tested end to end: the button appears, and the link opens the model in the auto-rigger.

Python

import os
import urllib.parse

import gradio as gr

# Gradio 4 serves files at /file=, Gradio 5 and later at /gradio_api/file=.
_FILE_ROUTE = "file=" if gr.__version__.startswith("4.") else "gradio_api/file="


def rigbake_button(glb, request: gr.Request):
    if not glb:
        return gr.update(value="", visible=False)
    space = os.environ.get("SPACE_HOST")  # set on Hugging Face Spaces
    base = f"https://{space}" if space else f"http://{request.headers.get('host')}"
    model = f"{base}/{_FILE_ROUTE}{glb}"
    href = "https://rigbake.com/tools/auto-rig/?model=" + urllib.parse.quote(model, safe="")
    return gr.update(
        value=(
            f'<a href="{href}" target="_blank" rel="noopener">'
            '<img src="https://rigbake.com/badges/rig-it.svg" alt="Rig it in Rigbake" height="28"></a>'
        ),
        visible=True,
    )

Wiring it in

rig_it = gr.HTML(visible=False)

# after the event that fills the GLB, e.g. a DownloadButton called download_glb:
extract_btn.click(extract_glb, inputs=..., outputs=[model_output, download_glb]).then(
    rigbake_button, inputs=download_glb, outputs=rig_it
)

Give the function the component that holds the finished GLB: a DownloadButton, a File or a Model3D. Gradio passes it the path it serves the file from, which is exactly what the link needs.

What your users get

The model opens on the auto-rig page with nothing to install. Rigging needs no account: they see their character walking on the result before anything is asked of them. Downloading the rigged GLB uses a free account. The bones carry Mixamo names, so Mixamo clips play on the result, and five ready-made animations come with the free account.

The model is read in the visitor's browser. Our servers never receive it, and your server sees one ordinary download.

Frequently asked questions

Does it cost anything?

No. The link, the badge and rigging are free. Downloading the rigged model uses a free account, which takes three rigs a month; Pro takes as many as you like.

Do I need to register my app or get a key?

No. Any page can link to the auto-rigger. There is nothing to sign up for on your side.

What if the model already has a skeleton?

The page asks whether to keep the skeleton and solve only the skin weights again, or to build a new skeleton and carry the animations over.

Can I link to the animal rigger?

Yes: https://rigbake.com/tools/auto-rig-animal/?model=MODEL_URL opens the rigger for four-legged models.

Related