Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

threejs-model-generate

/threejs-model-generate

Generuje nowe modele 3D z tekstu lub obrazu przez API Tripo, z teksturami, auto-riggingiem i konwersją formatów.

Repozytorium
threejs-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/threejs_3d_asset.py

Co robi i kiedy

Generuje nowe modele 3D z tekstu lub obrazu przez API Tripo, z teksturami, auto-riggingiem i konwersją formatów.

Oryginalny opis (EN)

Text-to-3D and image-to-3D model generation through the Tripo API, with texturing, auto-rigging, animation retargeting and format conversion. Use when a project needs a new GLB mesh that does not exist yet. Not for rebuilding a photo as code (`img2threejs`). Hands off to `threejs-model-inspect`.

Jak działa

  1. Before spending credits
  2. References
  3. API key
  4. Commands
  5. Resuming and Recovery
  6. Rigging and animation
  7. Quality
  8. After download
  9. Anti-patterns
  10. Done when
Sekcje z nagłówków SKILL.md, w oryginale · 151 linii, 1 413 słów
Podgląd SKILL.md
---
name: threejs-model-generate
description: "Text-to-3D and image-to-3D model generation through the Tripo API, with texturing, auto-rigging, animation retargeting and format conversion. Use when a project needs a new GLB mesh that does not exist yet. Not for rebuilding a photo as code (`img2threejs`). Hands off to `threejs-model-inspect`."
metadata:
  source: "https://github.com/majidmanzarpour/threejs-game-skills (skills/threejs-3d-generator, MIT, commit 8286774)"
---

# Three.js Model Generate

Generate production 3D assets for three.js through a paid API, then hand them to the model skills. Provider: Tripo.

Resolve `<this-skill-dir>` from the loaded skill file; do not assume a home directory.

## Before spending credits

Every `text`, `image`, rig and retarget task costs credits. Confirm the prompt, model version and quality settings
with the user before the first paid submission in a session, and use `--stop-after` checkpoints so each dependent
stage is inspected before paying for the next. Free calls (`probe`, `status`, `download`, `animate_prerigcheck`)
need no confirmation.

Prefer something else when it fits better:

- A model already exists (asset store, the user's files, Sketchfab, Poly Haven): use it and go to `threejs-model-inspect`.
- The user wants a procedural, code-only model rebuilt from a photo: the external `img2threejs` skill.
- Simple geometry (crates, terrain tiles, primitives): build it in code with `threejs-geometry`.

## References

| File | Read it when |
| --- | --- |
| `references/api-notes.md` | endpoint and task decisions, model versions, polling, postprocess, conversion, rigging, animation, downloads |
| `references/threejs-integration.md` | loading outputs in three.js, GLB/FBX, root motion, animation wiring |
| `references/reference-images.md` | preparing a 2D input for image-to-3D |

## API key

The script reads `--api-key` or `TRIPO_API_KEY`. Keys never go in skill files, project code, or reports.

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py probe   # TRIPO_API_KEY=SET|MISSING
```

Keys defined only in a shell profile can be absent from the process environment. If the probe prints MISSING
unexpectedly, ask the user to export the key in the session rather than reading their profile files.

Download URLs expire quickly: download immediately after a task succeeds.

## Commands

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py --help
```

Text to 3D, the default for a hero model:

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py text \
  --prompt "game-ready sci-fi hover bike, sleek armored panels, strong readable silhouette, layered hard-surface detail, PBR materials, clean topology, centered pivot, front facing, no text" \
  --model-version v3.1-20260211 --texture-quality detailed --geometry-quality detailed \
  --checkpoint artifacts/hover-bike-job.json \
  --wait --download --out-dir assets/models/hover-bike
```

Image to 3D from a generated concept:

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py image \
  --image assets/concepts/hover-bike-front.png --model-version v3.1-20260211 \
  --enable-image-autofix --texture-alignment original_image --texture-quality detailed \
  --wait --download --out-dir assets/models/hover-bike
```

Status, download, and postprocess (`texture_model`, `animate_prerigcheck`, `animate_rig`, `animate_retarget`, `conversion`, `stylize_model`):

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py status TASK_ID
python3 <this-skill-dir>/scripts/threejs_3d_asset.py download TASK_ID --out-dir assets/models
python3 <this-skill-dir>/scripts/threejs_3d_asset.py postprocess --type conversion \
  --original-task-id TASK_ID --format GLTF --face-limit 20000 --wait --download --out-dir assets/models/gltf
```

Animated character pipeline: generation, prerigcheck, validated rig with bounded retries, retargets, and downloads, routed by body plan. Use checkpoints and stop between stages to inspect before spending on dependent work:

```bash
python3 <this-skill-dir>/scripts/threejs_3d_asset.py character-pipeline \
  --prompt "stylized cyber runner character, T-pose, full body, game-ready outfit, readable silhouette" \
  --animations preset:idle,preset:walk,preset:run,preset:jump \
  --checkpoint artifacts/cyber-runner-job.json --stop-after model \
  --out-dir assets/models/cyber-runner

# After inspecting the downloaded model/preview:
python3 <this-skill-dir>/scripts/threejs_3d_asset.py resume artifacts/cyber-runner-job.json --stop-after rig
# After inspecting the validated rig:
python3 <this-skill-dir>/scripts/threejs_3d_asset.py resume artifacts/cyber-runner-job.json --stop-after animations

python3 <this-skill-dir>/scripts/threejs_3d_asset.py character-pipeline \
  --prompt "stylized wolf, quadrupedal stance, all four legs planted and separated, full body" \
  --rig-type quadruped --animations preset:quadruped:walk \
  --checkpoint artifacts/wolf-job.json --stop-after model --out-dir assets/models/wolf
```

## Resuming and Recovery

`--checkpoint PATH` is optional on `text`, `image`, `postprocess`, and `character-pipeline`. It records accepted task IDs immediately, stage status, and downloaded file fingerprints; no API keys or signed output URLs go in the checkpoint. Use a separate checkpoint per job. Existing checkpoints must be resumed, not overwritten, and concurrent use is locked.

For background single-task generation omit `--wait`, retain the printed task ID/checkpoint, and run `resume CHECKPOINT` later. Single-task resume waits/downloads that task only; it does not add rigging. Character resume reuses completed stages and continues through animations unless `--stop-after model|rig|animations` limits this invocation. Credentials still come from the current environment. The checkpoint records absolute local paths, so keep its referenced files in place.

The helper retries safe status/download reads with bounded backoff, never paid task submissions. Missing credentials, exhausted credits, invalid input, transient errors, and uncertain submissions are reported distinctly. On interruption, resume the existing job rather than starting over. If a POST may have succeeded but no task ID was received, find it in provider history and use `resume CHECKPOINT --task-id RECOVERED_ID`; do not invent an ID or submit a replacement blindly. Without a recoverable ID, report the uncertainty before any potentially duplicate charge.

Explicitly procedural or no-external-service requests override generated-asset defaults. Record pending jobs and
user corrections in the project notes, preserving completed assets instead of repeating generation.

## Rigging and animation

These rules prevent nearly every expensive failure. Full parameter tables and the measurements behind them are in `references/api-notes.md`.

- Generate characters as one fused mesh: keep `--quad` and `--generate-parts` off (`generate_parts` disables texturing, `quad` forces FBX output).
- Require full-body T-pose or A-pose, arms away from the body, symmetric, no props fused to the silhouette. Check the rendered preview really is in that pose before rigging; regenerate if not.
- Run `animate_prerigcheck` first (it takes no model version, costs nothing) and use the detected `rig_type`. `riggable=false` means regenerate with a clearer pose, not force a rig.
- **Rig version is routed by body plan.** Humanoids use `v1.0-20240301` — the anatomical skeleton with twist bones and the large `preset:biped:*` library. The v2.x limb-chain rigger went 0/16 on humanoid meshes, armored or not, always producing asymmetric chains. Creatures use `v2.5-20260210`. `character-pipeline` routes this automatically.
- `riggable=true` does not guarantee a usable rig. Validate the skeleton before retargeting — `validate-rig rig-model.glb --rig-type biped` — checking both bone presence and chain depth, since a 1-bone leg warps every clip. A missing or malformed rig GLB is a failure, including with `--force-rig`. Auto-rigging is nondeterministic: on failure retry the rig task (~25 credits) within the chosen budget before regenerating the model. Armored hard-surface characters need the most retries.
- `animate_retarget` takes the **rig** task ID, not the generation task ID. Non-biped rigs batch up to 5 presets per task; batched clips come back as `NlaTrack`, `NlaTrack.001`, … in request order, so map by index and rename after import.
- Retarget v1.0 rigs with `--model-version default` — the enum rejects an explicit `v1.0-20240301` with HTTP 400 code 2017, but the server default handles them.
- v1.0 retargets must use `--out-format fbx` (the script enforces it): Tripo's GLB bake on this path writes twist-bone transforms in the wrong space and limbs collapse into the torso. v2.5 creature retargets are fine as GLB.
- **Never pass `--animate-in-place`.** It corrupts the bake — mirrored and crossed limbs on v1.0, exploded skinning on v2.5. Keep root motion baked and strip it at import instead; the engine snippet is in `references/threejs-integration.md`.
- Creatures get one locomotion preset each, and there is no `preset:attack` (use `preset:slash` or `preset:shoot`). A creature's mesh stance drives how a preset reads — a quadruped walk on an upright dragon looks like a person walking, so generate creatures in the stance the animation expects.
- Multi-mode creatures (a dragon that crawls and flies) need the same model rigged twice: the ground rig type for locomotion, `avian` for wing chains.
- Use `--spec tripo` (default) when Tripo presets will be retargeted; `--spec mixamo` rigs cannot be retargeted by Tripo and are for external pipelines only.
- After download, run `validate-animation clip.glb` (flags scale tracks, limb-stretching translation, extreme rotations, per-clip duration and channel coverage), then check `gltf.animations` names and counts before wiring the `AnimationMixer`.

## Quality

Improve the user's prompt with material, silhouette, camera readability, scale, and use-case constraints. Request
GLB/PBR with face limits and texture quality matched to the performance budget; for mobile, favor `smart_low_poly`,
`face_limit`, or a later low-poly postprocess.

## After download

1. `threejs-model-inspect` on every downloaded GLB: confirm scale, clip names, bones and texture sizes.
2. `threejs-model-optimize`: generated textures are usually 2048-4096 px and uncompressed. Use the `animated`
   preset for rigged output so clips and bone names survive.
3. `threejs-model-animate` to wire clips; watch the motion unpaused (transitions, foot sliding, deformation). A
   successful download or skeleton check is not proof of good animation.

## Anti-patterns

- Submitting a paid task before the user agreed to the prompt and settings.
- Rigging a model whose preview is not in a T-pose or A-pose.
- Passing `--animate-in-place`, or `--quad`/`--generate-parts` on characters.
- Starting a new job after an interruption instead of `resume CHECKPOINT`.

## Done when

- The GLB (and clips) are downloaded into the project with task IDs and the checkpoint path recorded.
- `threejs-model-inspect` shows sane scale, the expected clips and no error findings.
- The report lists model version, quality settings, animations, conversion settings and anything that failed.
Pliki w paczce (6)
  • SKILL.md 11 KB
  • agents/openai.yaml 1 KB
  • references/api-notes.md 14 KB
  • references/reference-images.md 2 KB
  • references/threejs-integration.md 6 KB
  • scripts/threejs_3d_asset.py 71 KB

Wersje

W bazie nie ma innych skilli o nazwie threejs-model-generate.

Migawka bazy z 13.11.2026 · wersja paczki 26f733c9f6be (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100threejs-3d-generator
    Generuje, teksturuje i animuje modele 3D do gier Three.js przez API Tripo, także z tekstu lub obrazu.
  • 100tripo-3d
    Generuje modele 3D przez API Tripo z tekstu, obrazu lub wielu widoków, dodaje tekstury, szkielet i eksportuje pliki GLB, FBX lub OBJ.
  • 100model-maker
    Generuje model 3D w formacie GLB z opisu tekstowego lub zdjęcia przez Tripo, z teksturami, limitem wielokątów i materiałami PBR dla Blendera, Unity czy Unreal.
  • 90tripo-3d
    Tworzy zasoby 3D przez API Tripo: siatki z tekstu lub zdjęć, modele low-poly do gier, tekstury, szkielety, animacje i eksport do silników, z wyceną kredytów.
  • 95image-to-3d
    Zamienia zdjęcie pojedynczego przedmiotu w siatkę 3D w formacie GLB przez API Tripo, do Blendera, Unity lub Unreal.
  • 100mesh-from-prompt
    Generuje siatkę 3D z opisu lub obrazu przez Tripo lub Meshy, wprowadza ją do MetaForge i opcjonalnie zapisuje jako STL lub 3MF do druku.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.