Skip to main content
B3D
SkillFreeBy GameSkillGameSkill original

AI Mesh Weapon Rig (split, rig, fire/reload, FPS viewmodel)

/ai-mesh-weapon-rig

A GameSkill original that turns one fictional prop mesh into a first-person viewmodel GLB. It splits the mesh by material or baked texture colour from a small parts spec, rigs rigid parts on root, slide, trigger and mag bones with muzzle, eject, mag and grip sockets, bakes fire, reload and inspect clips, measures the mechanism and checks the GLB. A three.js FPS viewer plays the clips and puts the muzzle flash on the socket. Prototype quality: generated meshes still need cleanup.

License
MIT
By
By GameSkill
Download ZIP

Tested by GameSkill

45/45 checks passed on Blender 5.2.3 LTS (background) + three.js r186 in Chrome 156 headless (2026-10-28): trigger, a runnable example, a screenshot and self-check, one job per skill, and English + Chinese docs. Trigger checks match prompts against skill descriptions; they are not a live agent run.

Test report

GameSkill's tested copy

Written and tested by GameSkill for gameskill.dev. The ZIP holds the whole skill: SKILL.md and its Chinese version, scripts, a runnable example, tests, the self-check list and our test report.

Download tested ZIP (1.5 MB)Roadmap: Art assets

A GameSkill original, released under MIT. The ZIP keeps LICENSE and CREDITS.md, which lists the workflow inspiration, the CC0 test assets and the third-party libraries with their licenses.

AI Mesh Weapon Rig (split, rig, fire/reload, FPS viewmodel)

Self-check

  • 道具是虚构的,名字、零件名和贴图里没有真实枪械、厂商或游戏 / The prop is invented; no real firearm, maker or game in names, parts or textures
  • check-spec 通过,颜色太接近的零件都有位置规则 / check-spec passes and close colours have a position hint
  • 机构检查全部通过:弹匣完整掉出、滑盖行程够、枪口在最前 / Mechanism check passes: mag clears, slide travels, muzzle at the front
  • validate-glb 通过:每个顶点只绑一根骨骼,三段动画和四个挂点都在 / validate-glb passes: one bone per vertex, three clips, four sockets
  • AI 网格看过补洞前后的开放边和渲染图,已经告诉用户要清理什么 / For an AI mesh, open edges and renders were read and the cleanup was named
  • 在 viewer 里开火、R、F 都播对了动画,枪口焰在喷嘴前 / In the viewer, shoot, R and F play the right clips and the flash is at the nozzle

Install

Tell your AI

Install the skill from https://gameskill.dev/skills/ai-mesh-weapon-rig/install.md

GameSkill's tested copy

Tested copy into .claude/skills/
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/ai-mesh-weapon-rig.zip -o /tmp/gameskill-ai-mesh-weapon-rig.zip
unzip -oq /tmp/gameskill-ai-mesh-weapon-rig.zip -d .claude/skills
rm /tmp/gameskill-ai-mesh-weapon-rig.zip

What you get

  • blender/rig_prop.py: split by colour, orient, rigid rig with sockets, fire / reload / inspect clips, mechanism check, GLB export
  • tools/check-spec.mjs: parts-spec linter (close colours, real-gun names, orientation) that prints the prompt colours
  • tools/validate-glb.mjs: dependency-free viewmodel GLB check (bones, sockets, clip lengths, rigid weights, budget)
  • viewer/: our Pier Range FPS example playing the clips on shoot, R and F with the flash on socket_muzzle
  • Fictional rivet launcher example, 10 Node tests, 11 Blender checks and 9 browser checks

Good fit

  • Gadget, tool or toy-weapon props for a first-person prototype or game jam
  • Turning an AI-generated prop into something with moving parts in an afternoon
  • Checking a viewmodel GLB before it goes into the engine

Not for

  • Hero weapons ready to ship: generated meshes need 30-60 minutes of cleanup each
  • Real firearms, manufacturer designs or another game's weapons
  • Recoil and gun feel: see threejs-fps-weapon-feel

Try this prompt

Prompt
I generated a toy rivet launcher with an image-to-3D model. Split it into body, grip, trigger, cover and cartridge, rig it for first person with fire and reload, and put it in my three.js FPS.

About this skill

A GameSkill original, prototype quality. One Blender script turns a fictional prop mesh into a rigged first-person viewmodel GLB. The mesh can be hand-built or generated from an image. Two Node tools check the parts spec and the GLB, and our Pier Range FPS example plays the clips.

Agent steps

  1. Spec: one flat, distinct colour and one bone per moving part, plus two strongly coloured part pairs for orientation and a position hint for colours that are too close. Run check-spec, and for the AI route put its colours in the image prompt.
  2. Build: run rig_prop.py with the hand-built primitives, or with --obj and --texture for a generated mesh.
  3. Read the report: fragments per part, open edges before and after capping, and the mechanism (the mag clears the body, the slide travels, the muzzle is at the front).
  4. Validate the GLB: bones, sockets, clip lengths, one bone per vertex, triangle budget.
  5. Hook it up: load it as the viewmodel, play fire per shot and reload on R, and put the muzzle flash on socket_muzzle.
  6. Name the cleanup for generated meshes: there is no interior, the cut seams are jagged, and the surface is blobby. Expect 30-60 minutes per prop.

Common errors it fixes

  • An OBJ that looks like thousands of loose pieces (unwelded UV seams), or that comes out 90° off (the importer's rotation).
  • Grey parts that get mixed up or tilt the orientation.
  • Smooth auto-weights that bend rigid parts, and a muzzle flash that floats away from the barrel.

Credits

The idea comes from a post by @Graalitoo (link only; no code, mesh or file was used). TripoSR (MIT) was used in testing and is not shipped. The viewer is adapted from our own threejs-fps-weapon-feel, and three.js is MIT. The code, the prop and the text are ours.

Requirements

  • Blender 4.2+ (tested on 5.2.3), run headless; no add-ons or Python packages
  • Node.js 20+ for the spec linter and GLB validator; Chrome for the optional viewer test
  • For the AI route: an image-to-3D model you may use (tested with TripoSR, MIT) and a part-coloured, fictional design

Topics

FAQ

Based on AI mesh split and rigged as a first-person weapon (post, link only) by @Graalitoo (no licence, idea only, no code, mesh or file used). Ideas only: GameSkill wrote the code and text; CREDITS.md in the ZIP lists every source. · Based on TripoSR (image-to-3D model used in our tests, not shipped) by Tripo AI & Stability AI (MIT). Ideas only: GameSkill wrote the code and text; CREDITS.md in the ZIP lists every source.

Works well with

Skills the author points to as related or as the better fit for neighbouring tasks.

Similar skills