luca115 commited on
Commit
d5d4335
·
verified ·
1 Parent(s): 04be539

Takes only GLB, OBJ, PLY and STL: each upload is read with trimesh, which cannot read FBX or a .gltf without its files (from 3dvalley spaces/make-it-animatable)

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +4 -2
README.md CHANGED
@@ -19,7 +19,7 @@ short_description: "Rig a humanoid 3D character: skeleton and skin weights."
19
 
20
  # Make-It-Animatable - Free AI Auto Rigging
21
 
22
- Upload a humanoid 3D character (GLB, OBJ, FBX, PLY or STL) and get it back rigged: a Mixamo-compatible skeleton with finger bones, skin weights painted on every vertex, and the model reset to a T-pose, as a GLB and an FBX ready for Blender, Unity, Unreal, Godot or any Mixamo animation.
23
 
24
  Make-It-Animatable (CVPR 2025) predicts the joints, the blend weights and the pose of a character from a point cloud of its surface in a few seconds, whatever its proportions or style.
25
 
 
19
 
20
  # Make-It-Animatable - Free AI Auto Rigging
21
 
22
+ Upload a humanoid 3D character (GLB, OBJ, PLY or STL) and get it back rigged: a Mixamo-compatible skeleton with finger bones, skin weights painted on every vertex, and the model reset to a T-pose, as a GLB and an FBX ready for Blender, Unity, Unreal, Godot or any Mixamo animation.
23
 
24
  Make-It-Animatable (CVPR 2025) predicts the joints, the blend weights and the pose of a character from a point cloud of its surface in a few seconds, whatever its proportions or style.
25
 
app.py CHANGED
@@ -38,7 +38,9 @@ CODE = os.path.join(HERE, "mia")
38
  TOKEN = os.environ.get("HF_TOKEN")
39
  os.environ["GRADIO_TEMP_DIR"] = os.path.join(tempfile.gettempdir(), "gradio")
40
  MAX_INPUT_FACES = 300_000
41
- INPUT_TYPES = [".glb", ".gltf", ".obj", ".fbx", ".ply", ".stl"]
 
 
42
 
43
  # The upstream code reads its files relative to its own folder: the three
44
  # v2 checkpoints (Apache-2.0) and the Mixamo skeleton template (from the
@@ -168,7 +170,7 @@ with gr.Blocks(title="Make-It-Animatable - Free AI Auto Rigging for 3D Character
168
  ))
169
  with gr.Row():
170
  with gr.Column():
171
- model_in = gr.File(label="3D model (GLB, OBJ, FBX, PLY or STL)", file_types=INPUT_TYPES)
172
  with gr.Accordion("Settings", open=False):
173
  rest_in = gr.Radio(list(REST_POSES), value="As it stands", label="The pose it stands in")
174
  fingers_in = gr.Checkbox(value=True, label="Finger bones")
 
38
  TOKEN = os.environ.get("HF_TOKEN")
39
  os.environ["GRADIO_TEMP_DIR"] = os.path.join(tempfile.gettempdir(), "gradio")
40
  MAX_INPUT_FACES = 300_000
41
+ # What trimesh reads from one uploaded file: the input is loaded with it to merge duplicate vertices (below).
42
+ # FBX it cannot read, and a .gltf usually keeps its data in files of its own.
43
+ INPUT_TYPES = [".glb", ".obj", ".ply", ".stl"]
44
 
45
  # The upstream code reads its files relative to its own folder: the three
46
  # v2 checkpoints (Apache-2.0) and the Mixamo skeleton template (from the
 
170
  ))
171
  with gr.Row():
172
  with gr.Column():
173
+ model_in = gr.File(label="3D model (GLB, OBJ, PLY or STL)", file_types=INPUT_TYPES)
174
  with gr.Accordion("Settings", open=False):
175
  rest_in = gr.Radio(list(REST_POSES), value="As it stands", label="The pose it stands in")
176
  fingers_in = gr.Checkbox(value=True, label="Finger bones")