summer-engine 2.0.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/{marketplace.json → .claude-plugin/marketplace.json} +3 -3
  2. package/.claude-plugin/plugin.json +37 -4
  3. package/.codex-plugin/plugin.json +38 -5
  4. package/.cursor-plugin/plugin.json +37 -4
  5. package/.factory-plugin/plugin.json +20 -0
  6. package/.opencode/INSTALL.md +9 -3
  7. package/.opencode/plugins/summer.js +0 -2
  8. package/AGENTS.md +51 -0
  9. package/CLAUDE.md +5 -0
  10. package/GEMINI.md +56 -0
  11. package/README.md +211 -61
  12. package/_persona/summer/SKILL.md +113 -0
  13. package/dist/commands/install.js +2 -2
  14. package/dist/commands/setup.js +4 -0
  15. package/dist/commands/skills.js +115 -2
  16. package/dist/lib/agent-config.d.ts +2 -2
  17. package/dist/lib/agent-config.js +171 -5
  18. package/dist/lib/skills-registry.d.ts +290 -26
  19. package/dist/lib/skills-registry.js +503 -1
  20. package/dist/mcp/tools/generate-tools.js +101 -0
  21. package/gemini-extension.json +2 -2
  22. package/package.json +9 -3
  23. package/skills/2d-assets/character-portrait/SKILL.md +196 -0
  24. package/skills/2d-assets/concept-art/SKILL.md +152 -0
  25. package/skills/2d-assets/pixel-art/SKILL.md +180 -0
  26. package/skills/2d-assets/skybox-panorama/SKILL.md +207 -0
  27. package/skills/2d-assets/sprite-sheet/SKILL.md +239 -0
  28. package/skills/2d-assets/tileable-texture/SKILL.md +205 -0
  29. package/skills/2d-assets/ui-graphics/SKILL.md +210 -0
  30. package/skills/3d-assets/character-model/SKILL.md +225 -0
  31. package/skills/3d-assets/environment-kit/SKILL.md +164 -0
  32. package/skills/3d-assets/organic-model/SKILL.md +192 -0
  33. package/skills/3d-assets/prop-model/SKILL.md +133 -0
  34. package/skills/3d-assets/vehicle-model/SKILL.md +202 -0
  35. package/skills/ai-and-npcs/design-npc/SKILL.md +3 -1
  36. package/skills/animation/animation-tree/SKILL.md +260 -0
  37. package/skills/animation/facial-and-lipsync/SKILL.md +282 -0
  38. package/skills/animation/generate-motion/SKILL.md +129 -0
  39. package/skills/animation/procedural-animation/SKILL.md +234 -0
  40. package/skills/animation/retarget/SKILL.md +172 -0
  41. package/skills/asset-pipeline/asset-strategy/SKILL.md +102 -212
  42. package/skills/audio/adaptive-music/SKILL.md +326 -0
  43. package/skills/audio/ambient-bed/SKILL.md +278 -0
  44. package/skills/audio/music-track/SKILL.md +268 -0
  45. package/skills/audio/sound-effect/SKILL.md +237 -0
  46. package/skills/audio/voice-line/SKILL.md +253 -0
  47. package/skills/catalog.yaml +249 -3
  48. package/skills/video/animated-loop/SKILL.md +200 -0
  49. package/skills/video/cinematic-cutscene/SKILL.md +204 -0
  50. package/skills/video/trailer-shot/SKILL.md +203 -0
  51. package/skills/visual-effects/_building-blocks/additive-billboard-particles.md +28 -0
  52. package/skills/visual-effects/_building-blocks/noise-3d-fbm.gdshaderinc +45 -0
  53. package/skills/visual-effects/_building-blocks/trauma-shake-snippet.md +51 -0
  54. package/skills/visual-effects/{vfx → game-feel}/SKILL.md +1 -1
  55. package/skills/visual-effects/recipes/dissolve/SKILL.md +349 -0
  56. package/skills/visual-effects/recipes/fire/SKILL.md +387 -0
  57. package/skills/visual-effects/recipes/hit-spark/SKILL.md +330 -0
  58. package/skills/visual-effects/recipes/lightning/SKILL.md +372 -0
  59. package/skills/visual-effects/recipes/magic-glow/SKILL.md +377 -0
  60. package/skills/visual-effects/recipes/muzzle-flash/SKILL.md +326 -0
  61. package/skills/visual-effects/recipes/smoke/SKILL.md +381 -0
  62. package/skills/visual-effects/recipes/water-ripple/SKILL.md +340 -0
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: ui-graphics
3
+ description: Use when generating UI elements — icons, buttons, panels, frames, HUD widgets, badges. Flat-design, transparent-background, game-UI style. Wires the result via TextureRect / NinePatchRect / AtlasTexture. Trigger on "UI icon", "button graphic", "HUD element", "panel frame", "menu background", "inventory slot", "ability icon", "badge".
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: 2d-assets
7
+ user-invocable: true
8
+ allowed-tools: Read Grep Glob Write Edit summer_generate_image summer_search_assets summer_import_from_url summer_set_resource_property summer_add_node summer_set_prop
9
+ paths: ["assets/**", "ui/**", "art/ui/**"]
10
+ ---
11
+
12
+ # ui-graphics — Icons, Buttons, Panels, HUD
13
+
14
+ This skill generates flat, game-UI-style graphics: icons (skill / item / status), buttons (idle / hover / pressed states), panels and frames (NinePatch-friendly), HUD widgets (health frames, minimaps, badges). Output is **transparent PNG** by default and wires via Godot's `TextureRect`, `NinePatchRect`, or `AtlasTexture`.
15
+
16
+ UI graphics succeed or fail on **two specific things**: a clean transparent background (no checkerboard residue) and a consistent visual language across the set (all icons share line weight, color treatment, lighting). This skill encodes both.
17
+
18
+ ## When to use
19
+
20
+ - "Generate a fire-spell icon for the ability bar."
21
+ - "I need a parchment panel background for the inventory."
22
+ - "Make a set of 8 status-effect icons (poison, burn, freeze, stun, ...)."
23
+ - "Create a button frame I can NinePatch."
24
+ - "HUD frame for the health bar."
25
+
26
+ ## When NOT to use
27
+
28
+ - The user wants a character portrait → `summer:2d-assets/character-portrait`.
29
+ - The user wants pixel-art UI → `summer:2d-assets/pixel-art` (UI in pixel style needs a different prompt pattern).
30
+ - The user wants a 3D HUD element → that's a 3D mesh job; route to `summer:asset-pipeline/asset-strategy`.
31
+ - The user wants a font → fonts aren't generated; use a `.ttf`/`.otf` and import via `FontFile`.
32
+
33
+ ## Steps
34
+
35
+ ### 1. Lock the UI style anchor
36
+
37
+ Check `.summer/ui-anchor.md`. If it doesn't exist, define it on the first UI asset and re-use:
38
+
39
+ ```
40
+ ## UI anchor
41
+
42
+ style: flat design with subtle gradient, soft inner shadow
43
+ line: 2px outline in deep navy (#1a2332)
44
+ fill palette: gold (#d4a24c), parchment (#f5e6c4), dark teal accent (#2c5f5d)
45
+ shape language: rounded rectangles, no sharp 90deg corners
46
+ mood: warm fantasy, slightly weathered
47
+ background: transparent PNG
48
+ ```
49
+
50
+ Every icon / button / panel re-uses this anchor verbatim. Skipping this step produces the most common UI failure: 12 icons that all look like they came from 12 different games.
51
+
52
+ ### 2. Search before generating
53
+
54
+ ```
55
+ summer_search_assets(query="<subject> icon", filter={ kind: "image" })
56
+ ```
57
+
58
+ ### 3. Pick the right pattern (icon vs button vs panel)
59
+
60
+ | Asset class | Image size | Wiring node | Notes |
61
+ |---|---|---|---|
62
+ | Icon (ability, item, status) | `square_hd` | `TextureRect` (or `AtlasTexture` if part of an icon sheet) | Centered subject, generous padding |
63
+ | Button (idle / hover / pressed) | `landscape_4_3` | `Button` with custom theme OR `TextureButton` | Generate 3 variants of the same shape |
64
+ | Panel / frame (NinePatch-friendly) | `square_hd` | `NinePatchRect` | Border + center MUST be visually separable for 9-slicing |
65
+ | HUD bar frame | `landscape_16_9` | `NinePatchRect` over `ProgressBar` | Frame only — bar fill is a separate gradient texture |
66
+ | Badge / emblem | `square_hd` | `TextureRect` | Symmetric, centered, no text |
67
+
68
+ ### 4. Build the prompt — subject + anchor + transparent
69
+
70
+ Pattern:
71
+
72
+ ```
73
+ <asset class> of <subject>, game UI, <anchor style>, flat design, clean edges, transparent background, centered, isolated
74
+ ```
75
+
76
+ `transparent background` and `isolated` are the load-bearing words. Without them, you get a square card with a textured background that defeats the purpose.
77
+
78
+ ### 5. Generate
79
+
80
+ **Icon example:**
81
+ ```
82
+ summer_generate_image(
83
+ prompt="ability icon for a fire spell, glowing flame in cupped hand, game UI, flat design with subtle gradient and soft inner shadow, 2px deep navy outline, gold and parchment palette, rounded square frame, transparent background, centered, isolated",
84
+ model="nano-banana-2",
85
+ style="none",
86
+ options={ image_size: "square_hd", negative_prompt: "photorealistic, 3D render, scene background, busy, multiple objects" }
87
+ )
88
+ ```
89
+
90
+ **Button (3 states in 3 calls):**
91
+ ```
92
+ summer_generate_image(prompt="<subject>, idle state, ...")
93
+ summer_generate_image(prompt="<subject>, hover state, slightly brighter glow, ...")
94
+ summer_generate_image(prompt="<subject>, pressed state, darker, slight inset shadow, ...")
95
+ ```
96
+
97
+ **Panel for NinePatch:**
98
+ ```
99
+ summer_generate_image(
100
+ prompt="parchment scroll panel frame, ornate gold border, weathered tan center, clear distinction between border and center area, game UI, fantasy, transparent background, square format, centered",
101
+ ...
102
+ )
103
+ ```
104
+
105
+ The "clear distinction between border and center" is the NinePatch hint — without it, the border bleeds into the center and 9-slicing produces artifacts.
106
+
107
+ ### 6. Import with transparency preserved
108
+
109
+ ```
110
+ summer_import_from_url(url="<fileUrl>", path="res://ui/icons/fire_spell.png")
111
+ ```
112
+
113
+ Verify in the import dock: `Mipmaps: off` (UI shouldn't mipmap), `Filter: Linear` for high-res UI (or `Nearest` if pixel-style).
114
+
115
+ ### 7. Wire into the scene
116
+
117
+ **Icon as TextureRect:**
118
+ ```
119
+ summer_add_node(parentPath="/root/UI/AbilityBar", type="TextureRect", name="FireSpellIcon")
120
+ summer_set_prop(path="/root/UI/AbilityBar/FireSpellIcon", property="texture", value="res://ui/icons/fire_spell.png")
121
+ summer_set_prop(path="/root/UI/AbilityBar/FireSpellIcon", property="expand_mode", value=1) # KEEP_SIZE → 1 = STRETCH
122
+ summer_set_prop(path="/root/UI/AbilityBar/FireSpellIcon", property="stretch_mode", value=5) # KEEP_ASPECT_CENTERED
123
+ ```
124
+
125
+ **Panel as NinePatchRect:**
126
+ ```
127
+ summer_add_node(parentPath="/root/UI", type="NinePatchRect", name="InventoryPanel")
128
+ summer_set_prop(path="/root/UI/InventoryPanel", property="texture", value="res://ui/panels/parchment.png")
129
+ summer_set_prop(path="/root/UI/InventoryPanel", property="patch_margin_left", value=24)
130
+ summer_set_prop(path="/root/UI/InventoryPanel", property="patch_margin_right", value=24)
131
+ summer_set_prop(path="/root/UI/InventoryPanel", property="patch_margin_top", value=24)
132
+ summer_set_prop(path="/root/UI/InventoryPanel", property="patch_margin_bottom", value=24)
133
+ ```
134
+
135
+ Tune patch margins to match the actual border width in the generated texture. Open the texture in the editor's NinePatch preview to verify.
136
+
137
+ **Multiple icons as AtlasTexture:**
138
+
139
+ If you generate a 4×4 grid of icons in one image, each icon becomes an `AtlasTexture` referencing the same source. Saves draw calls. Use a `Region` rect per icon.
140
+
141
+ ## Prompt patterns
142
+
143
+ | Goal | Prompt that works | Why |
144
+ |---|---|---|
145
+ | Ability icon | `ability icon for <effect>, <visual metaphor>, game UI, flat design, 2px outline, <palette>, rounded square frame, transparent background, centered, isolated` | Visual metaphor (cupped hand, swirling vortex) reads better than abstract |
146
+ | Item icon (potion) | `inventory icon of red health potion, glass bottle with red liquid, cork stopper, game UI, flat design, soft inner shadow, transparent background, centered, isolated, three-quarter view` | Three-quarter beats pure front for items |
147
+ | Status icon (poison) | `status effect icon, green skull with dripping liquid, game UI, flat, bold silhouette readable at 32px, 2px outline, transparent background` | "Readable at 32px" forces bold silhouette |
148
+ | Button frame | `wooden button frame, ornate corners, slight bevel, game UI fantasy, transparent background, no text, no icon inside, just the empty frame` | "No text, no icon" prevents the model adding fake labels |
149
+ | NinePatch panel | `parchment panel frame, ornate gold border, weathered tan center, clear border-vs-center distinction, transparent background, square` | "Clear border-vs-center" enables 9-slicing |
150
+ | Badge / rank emblem | `gold rank emblem, laurel wreath, central star, symmetric, game UI heraldry style, transparent background, centered` | Symmetry + centered is critical for emblems |
151
+ | HUD health frame | `decorative frame for a horizontal health bar, ornate metal border, hollow center for the bar to show through, transparent background, landscape format` | "Hollow center" is the key for frame-over-bar |
152
+
153
+ ### Bad prompts (and why)
154
+
155
+ | Bad | Failure mode |
156
+ |---|---|
157
+ | `cool button` | No subject, no anchor. Returns a generic button on a card background. |
158
+ | `transparent button with icon` (no negative prompt) | Model often renders a checkerboard "transparent" pattern as the actual fill. Add `no checkerboard pattern` to negative. |
159
+ | `8 ability icons in one image` | Inconsistent style across the 8. Generate one at a time with the same anchor. |
160
+ | `realistic 3D rendered button` | Conflicts with flat-UI. Stay flat. |
161
+ | `button with the word "Play"` on it | Models render text badly. Add text in Godot via a `Label` over the button, not in the texture. |
162
+
163
+ ## Anti-patterns
164
+
165
+ - **Skipping the anchor.** A 12-icon ability bar with no anchor looks like 12 unrelated games. Define the anchor on icon #1.
166
+ - **Letting the model render text.** Diffusion models can't render reliable text. Always overlay text in Godot via a `Label` node. The button texture is the frame; the label is the word.
167
+ - **Forgetting `transparent background` in the prompt.** Default is opaque. Without the keyword, you import an icon with a 200×200 white square around the actual icon.
168
+ - **Using `style: "realistic"` for UI.** UI is flat. `style: "none"` lets the prompt's "flat design" land cleanly.
169
+ - **NinePatch with no border-vs-center distinction.** The 9-slice scaling smears the border into the center.
170
+ - **Mipmaps on UI.** UI textures shouldn't mipmap — they're displayed at 1:1 or near it. Mipmaps waste memory and blur sharp edges.
171
+
172
+ ## Edge cases
173
+
174
+ - **User wants the same icon at multiple sizes (32, 64, 128).** Generate once at high res. Godot's `TextureRect` with `STRETCH_KEEP_ASPECT_CENTERED` scales it down cleanly. Don't generate three sizes.
175
+ - **User wants pixel-style UI.** Route to `summer:2d-assets/pixel-art` — different prompt pattern, different filter, different anchor.
176
+ - **User wants animated UI (spinning loading icon).** Generate the static frame here. Animate via `AnimationPlayer` rotating the `TextureRect`, not as a sprite sheet.
177
+ - **Transparency comes back as a checkerboard pattern in the image.** The model rendered the checkerboard literally. Regenerate with `no checkerboard pattern, true alpha transparency` in the negative prompt.
178
+ - **Icons need to read at very small size (16-24px in a packed bar).** Bias prompts toward bold silhouette + minimal interior detail. Ornate detail is invisible at 16px and adds noise.
179
+
180
+ ## Fallback (no MCP)
181
+
182
+ Print the call:
183
+
184
+ ```
185
+ summer_generate_image(
186
+ prompt="<asset + anchor + transparent>",
187
+ model="nano-banana-2",
188
+ style="none",
189
+ options={ image_size: "square_hd", negative_prompt: "scene background, photorealistic, 3D, busy" }
190
+ )
191
+ ```
192
+
193
+ User runs via the Summer dashboard, then `summer_import_from_url` to `res://ui/icons/<name>.png` and wires manually.
194
+
195
+ ## Handoff
196
+
197
+ After the UI graphic is wired:
198
+
199
+ - **More icons in the same set** → re-invoke this skill with the same anchor.
200
+ - **Button states (hover/pressed)** → re-invoke for each state.
201
+ - **Theme assembly (combining icons + panels into a Godot Theme resource)** → `summer:scene-composition` for the Theme resource wiring.
202
+ - **Pixel-art UI** → `summer:2d-assets/pixel-art`.
203
+ - **Dialogue UI with portraits** → `summer:2d-assets/character-portrait` for the portrait, then back here for the surrounding panel.
204
+
205
+ ## See also
206
+
207
+ - `summer:2d-assets/character-portrait` — for in-UI character images.
208
+ - `summer:2d-assets/pixel-art` — pixel-style UI.
209
+ - `summer:scene-composition` — Theme and Control hierarchy.
210
+ - `_shared/mcp-tools-reference.md` — `summer_generate_image` schema.
@@ -0,0 +1,225 @@
1
+ ---
2
+ name: character-model
3
+ description: Use when generating a humanoid character ready for animation — player avatar, NPC, enemy, boss, companion. Generates a T-pose reference image, gates an un-rigged preview past the user, then runs the Meshy auto-rig pass and wires the result as a CharacterBody3D (movement) or Node3D (cinematic). Trigger on "make a character", "generate the player", "I need an enemy model", "create an NPC", "rigged humanoid", "character with a skeleton", "model for animation".
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: 3d-assets
7
+ user-invocable: true
8
+ allowed-tools: Read Grep summer_search_assets summer_generate_image summer_generate_3d summer_import_from_url summer_add_node summer_set_prop summer_set_resource_property summer_inspect_node summer_inspect_resource summer_get_scene_tree summer_save_scene summer_check_job summer_generate_motion
9
+ paths: ["assets/characters/**", "assets/models/**", "**/*.tscn", "**/*.gd"]
10
+ ---
11
+
12
+ # Character Model — T-Pose to Rigged Humanoid, Gated
13
+
14
+ This is the **canonical Meshy auto-rig pipeline**. It produces a humanoid `.glb` with a Meshy-compatible skeleton that `summer:animation/generate-motion` can drive directly. The work is split into two paid passes with a **mandatory user-review gate between them** — the rig pass is more expensive and locks the topology, so the user must see the un-rigged preview and approve before you spend on the rig.
15
+
16
+ The whole flow:
17
+
18
+ ```
19
+ 1. T-pose reference image → summer_generate_image (~$0.05, ~10s)
20
+ 2. Un-rigged 3D mesh → summer_generate_3d(image-to-3d) (~$0.50, ~60s)
21
+ 3. ── USER REVIEW GATE ──
22
+ 4. Rigged .glb → summer_generate_3d(image-to-3d, rig: true) (~$1.00, ~90s)
23
+ 5. Import → editor RESTART → wire as CharacterBody3D / Node3D
24
+ 6. Hand off to summer:animation/generate-motion for clips
25
+ ```
26
+
27
+ The animation skill (`summer:animation/generate-motion`) requires a rigged humanoid; a static `.glb` won't drive motion.
28
+
29
+ ## When to use
30
+
31
+ - "Make a knight character for the player to control."
32
+ - "I need a goblin enemy."
33
+ - "Generate an old wizard NPC for the tavern."
34
+ - "Create a boss — a four-armed demon."
35
+ - The user is about to ask for animations and has nothing rigged yet.
36
+
37
+ ## When NOT to use
38
+
39
+ - Static statue / mannequin display piece (no rig needed) → `summer:3d-assets/prop-model`.
40
+ - Vehicle with a "driver" silhouette but no skeleton needed → `summer:3d-assets/vehicle-model`.
41
+ - Quadruped (wolf, horse, dragon) → Meshy auto-rig is humanoid-only. Generate the mesh here for visuals, but skip the rig step — animation will need a hand-authored skeleton or a quadruped-specific provider (out of scope for this skill).
42
+ - The user already has a rigged character and just wants a re-skin — that's a retexture pass, not this skill.
43
+ - Facial blendshapes / lipsync rig → `summer:animation/facial-and-lipsync`.
44
+
45
+ ## Polycount targets
46
+
47
+ | Role | Tris | Pass via |
48
+ |---|---|---|
49
+ | Hero character (player, close camera) | 8k–15k | `target_polycount: 12000` |
50
+ | Grunt enemy (mid-range, multiple onscreen) | 3k–6k | `target_polycount: 5000` |
51
+ | Crowd / background NPC (LOD-able) | 1k–2k | `target_polycount: 1500` |
52
+ | Mobile-game character | 1k–3k | `target_polycount: 2000` |
53
+ | Cinematic hero (no realtime constraint) | 20k–40k | `target_polycount: 30000` |
54
+
55
+ Pass at the **mesh-generation step** (step 2). The rig pass preserves the topology; you can't reduce polycount after rigging without breaking weights.
56
+
57
+ ## Steps
58
+
59
+ ### 1. Generate the T-pose reference image
60
+
61
+ The rig pass requires a **front-facing T-pose** with arms out and legs slightly apart. If the reference is in an action pose, the rig will bend wrong and locomotion clips will look broken (knees inverted, elbows snapped — common Meshy failure mode).
62
+
63
+ ```
64
+ summer_generate_image(
65
+ prompt="A fantasy knight in full plate armor, red cape, T-pose, arms straight out horizontal, legs slightly apart, front-facing, neutral expression. Game character asset, stylized, clean white background, soft studio lighting, full body in frame, ready for 3D mesh generation.",
66
+ model="nano-banana-2"
67
+ )
68
+ ```
69
+
70
+ The phrase `T-pose, arms straight out horizontal, legs slightly apart, front-facing` is load-bearing — drop any of those and the model will drift toward A-pose or a hero stance.
71
+
72
+ If the user already has a concept image in an action pose, re-pose it to T-pose via img2img without re-rolling the design:
73
+
74
+ ```
75
+ summer_generate_image({
76
+ referenceImageUrl: "<existing concept image>",
77
+ prompt: "<character> in T-pose, arms extended horizontally, neutral facing camera, white background, clean lighting"
78
+ })
79
+ ```
80
+
81
+ Show the image to the user:
82
+
83
+ > Generated the T-pose reference. [link]. Approve to proceed to mesh generation, or regenerate?
84
+
85
+ ### 2. Generate the un-rigged 3D mesh
86
+
87
+ ```
88
+ summer_generate_3d(
89
+ kind="image-to-3d",
90
+ imageUrl="<image url from step 1>",
91
+ model="hunyuan",
92
+ options={ target_polycount: 12000 },
93
+ wait=true
94
+ )
95
+ ```
96
+
97
+ Returns `{ asset: { fileUrl } }` — an un-rigged static `.glb`. Import it for preview only:
98
+
99
+ ```
100
+ summer_import_from_url(url="<fileUrl>", path="res://assets/characters/knight_unrigged.glb")
101
+ ```
102
+
103
+ ### 3. ⛔ USER REVIEW GATE — DO NOT SKIP
104
+
105
+ Before paying for the rig pass, surface the un-rigged mesh:
106
+
107
+ > Un-rigged knight mesh ready: `res://assets/characters/knight_unrigged.glb` (~12k tris, [preview link]).
108
+ >
109
+ > Next step is the **rig pass** (~$1.00, ~90s, Meshy auto-rig). It locks the topology and adds a skeleton compatible with `summer:animation/generate-motion`. Once you approve I'll run it.
110
+ >
111
+ > **Approve the mesh and proceed to rig?** Or regenerate the mesh first (different prompt, different polycount, different model)?
112
+
113
+ If the user wants changes, loop back to step 1 or 2. Do NOT silently run the rig pass — it doubles the cost and locks the design.
114
+
115
+ ### 4. Run the rig pass
116
+
117
+ ```
118
+ summer_generate_3d({
119
+ kind: "image-to-3d",
120
+ imageUrl: "<image url from step 1>",
121
+ options: { rig: true, polyTarget: 12000 } // polyTarget is best-effort; backend may use options.target_polycount
122
+ })
123
+ ```
124
+
125
+ Returns a job whose result includes `{ asset: { fileUrl }, rigAssetId }`. If you ran with `wait: false`, poll via `summer_check_job(jobId)`. The `rigAssetId` is the handle `summer:animation/generate-motion` needs — store it.
126
+
127
+ Import the rigged version, replacing the un-rigged file:
128
+
129
+ ```
130
+ summer_import_from_url(url="<rigged fileUrl>", path="res://assets/characters/knight.glb")
131
+ ```
132
+
133
+ ### 5. ⚠️ Restart the editor
134
+
135
+ **Known Godot 4.5 gotcha:** after importing a rigged `.glb`, the `Skeleton3D` node appears stale in the scene dock — bones are missing, `skeleton.get_bone_count()` returns 0, and `AnimationPlayer` libraries fail to bind. The fix:
136
+
137
+ > The rigged mesh is imported. Please restart the Summer Engine editor (close and reopen) so the Skeleton3D rebuilds correctly. Without the restart, animations will fail to bind.
138
+
139
+ There is no programmatic workaround as of Godot 4.5.x. Tell the user, wait, then continue.
140
+
141
+ ### 6. Wire as CharacterBody3D or Node3D — pick the right parent
142
+
143
+ | Use case | Parent type | Why |
144
+ |---|---|---|
145
+ | Player or enemy that moves with code, collides with walls, jumps | `CharacterBody3D` | `move_and_slide()` API, kinematic physics, slope handling |
146
+ | Cinematic NPC (talks, idles, never moves under physics) | `Node3D` | No physics overhead; cheaper for crowds |
147
+ | Pure-visual character (background extra, dialogue head) | `Node3D` | Same as above |
148
+ | Ragdoll-on-death enemy | `CharacterBody3D` while alive, swap to `RigidBody3D` skeleton on death | Two-mode rig; see `summer:animation/procedural-animation` |
149
+
150
+ **CharacterBody3D wiring (player / enemy):**
151
+
152
+ ```
153
+ summer_add_node(parent="./World", type="CharacterBody3D", name="Knight")
154
+ summer_set_prop(path="./World/Knight", property="position", value="Vector3(0, 0, 0)")
155
+ summer_add_node(parent="./World/Knight", type="Node3D", name="Mesh")
156
+ # Instantiate the imported scene as a child of the Mesh node
157
+ summer_set_prop(path="./World/Knight/Mesh", property="scene", value="res://assets/characters/knight.glb")
158
+ summer_add_node(parent="./World/Knight", type="CollisionShape3D", name="Collider")
159
+ # Add a CapsuleShape3D resource (height ~1.7m, radius ~0.4m) to the collider
160
+ summer_save_scene
161
+ ```
162
+
163
+ **Node3D wiring (cinematic NPC):**
164
+
165
+ ```
166
+ summer_add_node(parent="./World/Tavern", type="Node3D", name="OldWizard")
167
+ summer_set_prop(path="./World/Tavern/OldWizard", property="scene", value="res://assets/characters/wizard.glb")
168
+ summer_save_scene
169
+ ```
170
+
171
+ The imported `.glb` includes its own `Skeleton3D` and `AnimationPlayer` (empty library). The animation skill writes into that AnimationPlayer.
172
+
173
+ ### 7. Hand off to animation
174
+
175
+ > Knight is wired at `./World/Knight` with a Meshy-rigged skeleton. `rigAssetId` saved.
176
+ >
177
+ > Next: `summer:animation/generate-motion` to add idle / walk / run / attack clips. Example call: `summer_generate_motion(rigAssetId: "<saved id>", backend: "meshy-library", motionName: "walk")`. The animation skill uses Meshy's curated mocap library (~70 standard motions). Custom prompt-driven motion is on the roadmap; for one-off signature moves not on the curated list, fall back to hand-authoring in the Godot editor or importing from Mixamo.
178
+
179
+ ## Anti-patterns
180
+
181
+ - **Skipping the user-review gate.** Doubles cost, locks the design, and removes the user's chance to course-correct cheaply.
182
+ - **Generating the mesh from a non-T-pose image.** Locomotion will look broken (inverted knees, snapped elbows). Always re-pose first.
183
+ - **Forgetting the editor restart.** Animations will appear to bind successfully but play to a stale skeleton — the character T-poses motionless. The fix is always restart, never code.
184
+ - **Wrapping a cinematic NPC in CharacterBody3D.** Wastes physics ticks; use Node3D.
185
+ - **Wrapping the player in Node3D.** No `move_and_slide()`, no collision — the player walks through walls.
186
+ - **Picking the rig pass before approving the silhouette.** The mesh defines what the character looks like; once the rig is on, you can't cheaply iterate the design.
187
+ - **Using `meshy` model for the mesh step.** Legacy. `hunyuan` is the default and produces cleaner topology that Meshy's auto-rig handles better.
188
+
189
+ ## Edge cases
190
+
191
+ - **Multiple characters share a silhouette.** Generate the rig once, then re-skin via texture swap (cheaper than re-rigging). See `summer:3d-assets/character-model` retexture flow (TBD) — for now, route to `summer:asset-pipeline/asset-strategy`.
192
+ - **Character has wings, tail, extra limbs.** Meshy's humanoid rig only weights the standard skeleton — extras sag. Either prompt them as static (e.g. cape held by physics in-engine) or hand-rig in Blender post-export.
193
+ - **Child / dwarf / giant.** Generate at correct proportions in the T-pose; the rig retargets cleanly. Locomotion clips from `summer:animation/generate-motion` will retarget but stride length needs `playback_speed` tuning on the AnimationPlayer.
194
+ - **First-person hands-only character.** Generate just hands + forearms in T-pose; rig pass still works. See `summer:character-controllers/fps-controller` for first-person wiring.
195
+ - **Stylized non-human (goblin, orc, halfling).** Works fine as long as the silhouette is bipedal with two arms, two legs, one head. Quadrupeds and centaurs do not.
196
+
197
+ ## Fallback (no MCP)
198
+
199
+ 1. Generate the T-pose reference at the Summer dashboard (or any image gen — Midjourney, nano-banana web, DALL-E).
200
+ 2. Upload to Meshy at meshy.ai → Image to 3D → enable rigging.
201
+ 3. Download the `.glb`.
202
+ 4. Drop into `res://assets/characters/` — Godot's import dock picks it up.
203
+ 5. Restart the editor.
204
+ 6. Wire as CharacterBody3D / Node3D in the Godot editor manually.
205
+
206
+ The output is identical to the MCP path — same Meshy skeleton, same compatibility with `summer:animation/generate-motion` (which has its own dashboard fallback).
207
+
208
+ ## Handoff
209
+
210
+ After the rigged character is wired:
211
+
212
+ > `Knight` is at `./World/Knight` with a Meshy-rigged skeleton. Next:
213
+ > - **Animations:** `summer:animation/generate-motion` for idle / walk / run / attack. Pass the `rigAssetId` returned in step 4.
214
+ > - **State machine:** after a few clips exist, `summer:animation/animation-tree` for idle → walk → run blends.
215
+ > - **Player input:** if this is the player, wire WASD + mouse via `summer:character-controllers/fps-controller` or a third-person controller skill.
216
+ > - **NPC behavior:** if it's an NPC, `summer:ai-and-npcs/design-npc` for behavior trees and dialogue hooks.
217
+ > - **Re-skin variants** (palette swap, armor swap): retexture pass — generate new albedo, assign via material override. Avoid re-rigging.
218
+
219
+ ## See also
220
+
221
+ - `summer:animation/generate-motion` — the next-step animation skill that consumes the `rigAssetId` produced here.
222
+ - `summer:asset-pipeline/asset-strategy` — meta-router; this skill is the canonical drill-down of its "Image-to-3D for characters" path.
223
+ - `summer:3d-assets/prop-model` — for non-character props.
224
+ - `summer:scene-composition` — for the CharacterBody3D + Mesh + Collider parent pattern.
225
+ - `_shared/mcp-tools-reference.md` — full parameter schemas for `summer_generate_3d`, `summer_generate_image`, and `summer_generate_motion`.
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: environment-kit
3
+ description: Use when generating a modular environment kit — wall pieces, floor tiles, pillars, doors, arches, corner blocks that snap together to form a level. Multiple meshes that share a visual style. Trigger on "build a dungeon kit", "modular walls", "level kit", "tileset", "interior pieces", "snap-together pieces", "make a kit for the temple".
4
+ license: MIT
5
+ compatibility: [Cursor, Claude Code, Windsurf, Codex]
6
+ category: 3d-assets
7
+ user-invocable: true
8
+ allowed-tools: Read Grep summer_search_assets summer_generate_3d summer_generate_image summer_import_from_url summer_add_node summer_set_prop summer_inspect_node summer_get_scene_tree summer_save_scene
9
+ paths: ["assets/kits/**", "assets/models/**", "**/*.tscn", "**/*.gd"]
10
+ ---
11
+
12
+ # Environment Kit — Style-Locked Modular Pieces
13
+
14
+ A kit is a *family* of meshes — wall, floor, door, pillar, corner, arch — that the level designer snaps together to build interiors and exteriors. The skill exists to solve **one specific failure mode**: generating each piece with a fresh prompt produces six pieces that look like they came from six different games. The fix is the **style anchor pattern** — generate one piece first, lock its prompt suffix, and reuse that exact suffix for every subsequent piece.
15
+
16
+ The backing tool is `summer_generate_3d`, called multiple times. Each call costs ~$0.50, so a 6-piece kit is ~$3 and ~5 minutes. Confirm scope before starting.
17
+
18
+ ## When to use
19
+
20
+ - "Build me a dungeon kit — walls, floor, door, pillar."
21
+ - "I need modular wall pieces for a sci-fi corridor."
22
+ - "Make a tileset for a wooden tavern interior."
23
+ - "Generate the pieces for a stone temple — I'll assemble the level."
24
+ - The user wants to build a level out of repeating, snapping pieces.
25
+
26
+ ## When NOT to use
27
+
28
+ - A single hero prop (single chest, single throne) → `summer:3d-assets/prop-model`.
29
+ - Open-world terrain (rolling hills, forests) → use a heightmap + scattered organic models from `summer:3d-assets/organic-model`.
30
+ - Repeating flat surfaces only (just walls and floors, no decorative pieces) → `summer:asset-pipeline/asset-strategy` Pipeline 2 (textures + CSG) is cheaper and snaps perfectly to grid.
31
+ - Characters or vehicles in the scene — those are separate skills.
32
+
33
+ ## The style anchor pattern
34
+
35
+ This is the whole skill. Get this right and the kit looks unified. Get this wrong and you waste $3.
36
+
37
+ 1. **Generate the anchor piece first.** Pick the most visually defining piece — usually the wall or the door. Iterate the prompt until the user approves it visually.
38
+ 2. **Extract the style suffix.** Everything after the object description. Example anchor prompt:
39
+ ```
40
+ A stone dungeon wall section, mossy granite blocks with iron reinforcements,
41
+ torch-bracket sconce, weathered surface. Game asset, centered, stylized
42
+ low-poly game art, warm torchlight palette, white background, isolated object.
43
+ ```
44
+ The suffix to lock is everything from `Game asset, ...` onward, plus `mossy granite blocks with iron reinforcements, weathered surface, warm torchlight palette` — the material + palette tokens.
45
+ 3. **Reuse the suffix verbatim** for every other piece. Only change the object description at the front.
46
+
47
+ | Anchor: wall | `A stone dungeon wall section, ...` + LOCKED SUFFIX |
48
+ | Floor tile | `A stone dungeon floor tile, square, ...` + SAME LOCKED SUFFIX |
49
+ | Pillar | `A stone dungeon pillar, square base, fluted shaft, ...` + SAME LOCKED SUFFIX |
50
+ | Door | `A stone dungeon doorway, arched, heavy wooden door with iron studs, ...` + SAME LOCKED SUFFIX |
51
+ | Corner block | `A stone dungeon corner wall section, two walls joined at right angle, ...` + SAME LOCKED SUFFIX |
52
+ | Arch | `A stone dungeon archway with keystone, ...` + SAME LOCKED SUFFIX |
53
+
54
+ If the user says "the door doesn't match the rest", the answer is almost always: the suffix drifted. Check the exact strings.
55
+
56
+ ## Snap-grid alignment
57
+
58
+ Kit pieces only feel modular if they snap to a fixed grid. Pick the grid before generating and tell the user.
59
+
60
+ | Grid size | Use for | Notes |
61
+ |---|---|---|
62
+ | **1m** | Tight interiors (dungeons, ship corridors, cells) | Wall = 1×3×0.3m. Floor = 1×1m. Most common. |
63
+ | **2m** | Standard interiors (homes, taverns, offices) | Wall = 2×3×0.3m. Floor = 2×2m. Halves piece count. |
64
+ | **4m** | Exteriors and large halls (temples, warehouses, throne rooms) | Wall = 4×4×0.4m. Floor = 4×4m. Quarter the piece count for the same area. |
65
+
66
+ **Critical:** include the dimensions in the prompt. `summer_generate_3d` doesn't enforce them, but Hunyuan respects scale cues — `2 meter tall wall section` produces a mesh that imports near 2m tall. Then verify with `summer_inspect_resource` and scale-correct in the editor if needed.
67
+
68
+ ## Steps
69
+
70
+ ### 1. Confirm scope and pick the grid
71
+
72
+ > About to build a dungeon kit. Suggested pieces: wall, floor, pillar, door, corner, arch (6 pieces, ~$3, ~5 min). Snap grid: 2m (standard interior). OK?
73
+
74
+ ### 2. Generate the anchor (wall)
75
+
76
+ Use the prop-style prompt with explicit dimensions:
77
+
78
+ ```
79
+ summer_generate_3d(
80
+ prompt="A 2 meter wide by 3 meter tall stone dungeon wall section, mossy granite blocks with iron reinforcements, torch-bracket sconce, weathered surface. Game asset, centered, stylized low-poly game art, warm torchlight palette, white background, isolated object.",
81
+ model="hunyuan",
82
+ options={ target_polycount: 1500 },
83
+ wait=true
84
+ )
85
+ summer_import_from_url(url="<fileUrl>", path="res://assets/kits/dungeon/wall.glb")
86
+ ```
87
+
88
+ Show the result to the user. **Iterate the anchor until approved** — every other piece copies its style.
89
+
90
+ ### 3. Lock the suffix and generate the remaining pieces
91
+
92
+ Once the user says "yes, that's the look", store the locked suffix and crank through the rest. Same model, same polycount, same `options`. Only the object description changes.
93
+
94
+ ```
95
+ # Floor
96
+ summer_generate_3d(prompt="A 2 by 2 meter square stone dungeon floor tile, mossy granite blocks with iron reinforcements, weathered surface. Game asset, centered, stylized low-poly game art, warm torchlight palette, white background, isolated object.", model="hunyuan", options={ target_polycount: 800 })
97
+
98
+ # Pillar
99
+ summer_generate_3d(prompt="A 3 meter tall stone dungeon pillar, square base, fluted shaft, mossy granite blocks with iron reinforcements, weathered surface. Game asset, ...", model="hunyuan", options={ target_polycount: 1500 })
100
+
101
+ # Door, Corner, Arch — same pattern.
102
+ ```
103
+
104
+ Polycount targets per kit piece: walls/floors 800–1500 tris (placed dozens of times), decorative (pillar, arch) 1500–3000, doors 2000–3000.
105
+
106
+ ### 4. Import and stage in a kit scene
107
+
108
+ Don't dump the kit into the level scene. Make a `kit_dungeon.tscn` that holds one of every piece, labelled, positioned next to each other on the snap grid. The level designer instantiates from there.
109
+
110
+ ```
111
+ summer_add_node(parent="./KitRoot", type="Node3D", name="Wall")
112
+ summer_set_prop(path="./KitRoot/Wall", property="scene", value="res://assets/kits/dungeon/wall.glb")
113
+ summer_set_prop(path="./KitRoot/Wall", property="position", value="Vector3(0, 0, 0)")
114
+ # ...repeat for floor, pillar, door, corner, arch with positions Vector3(2,0,0), Vector3(4,0,0), ...
115
+ summer_save_scene
116
+ ```
117
+
118
+ ### 5. Verify scale and pivots
119
+
120
+ ```
121
+ summer_inspect_resource(path="res://assets/kits/dungeon/wall.glb")
122
+ ```
123
+
124
+ Check the AABB. If the wall is 1.85m tall when you asked for 3m, scale it in the editor (or re-import with `Scale` in the import dock). Pivots should sit at the *bottom-back* corner for walls and *bottom-center* for floors — that makes snapping to a 2m grid trivial. If pivots are wrong, use Godot's "Center to Origin" import option.
125
+
126
+ ## Anti-patterns
127
+
128
+ - **Drifting style suffix.** Each piece gets a slightly different suffix → the kit looks mismatched. Copy-paste the exact string.
129
+ - **Different polycount per piece.** A 5k-tri pillar next to a 500-tri wall reads as "the pillar is a hero piece" — wrong; they should feel like equal kit citizens. Match polycount within ~2× across the kit.
130
+ - **Skipping the anchor approval.** If you generate all six pieces in a batch, you bake in whatever the first call's interpretation of the style was — and the user may hate it after $3 of generation.
131
+ - **Generating walls / floors as individual meshes when you only need a tileable texture.** A flat wall section is cheaper as a textured `CSGBox3D`. Reserve the kit for pieces that need actual geometric detail (sconces, mouldings, doorways, arches).
132
+ - **No scale cue in the prompt.** Wall comes back 0.4m tall. Always include `2 meter wide by 3 meter tall` (or your chosen grid).
133
+ - **Forgetting the snap grid.** A 1.87m-tall wall with no scale fix → level looks crooked when tiled.
134
+
135
+ ## Edge cases
136
+
137
+ - **Curved or organic kit (cave, alien hive).** Modular geometry resists snapping. Generate longer pieces (4m walls, transition tiles) and accept some overlap. Or switch to procedural — `summer:level-design` can scatter cave pieces with rotation jitter.
138
+ - **Outdoor kit (cliffs, ruins, forest path).** Use the kit pattern but accept rotation/jitter at placement time. Mesh edges should fade naturally rather than snap cleanly. Pair with `summer:3d-assets/organic-model` for foliage scatter.
139
+ - **Sci-fi kit (corridors, doors, terminals).** The style suffix becomes critical — `clean panels, soft cyan emissive trim, brushed metal, white background, isolated object`. Hard surfaces drift more than organic ones; review every piece.
140
+ - **The user wants to add a piece later.** The locked suffix lives in the kit's notes (drop it in `assets/kits/dungeon/STYLE.md` if the user wants persistence). Reuse it verbatim for any addition — never re-derive.
141
+
142
+ ## Fallback (no MCP)
143
+
144
+ 1. Run each prompt at the Summer dashboard (or Hunyuan / Trellis web UIs), keeping the locked suffix.
145
+ 2. Download each `.glb`.
146
+ 3. Drop into `res://assets/kits/<kit-name>/`.
147
+ 4. Build the kit-display scene manually in Godot — one of each piece, snapped to grid.
148
+ 5. Hand to the level designer.
149
+
150
+ ## Handoff
151
+
152
+ After the kit is staged:
153
+
154
+ > Dungeon kit ready: `res://assets/kits/dungeon/` with wall, floor, pillar, door, corner, arch on a 2m snap grid. Display scene at `res://assets/kits/dungeon/kit_dungeon.tscn`.
155
+ >
156
+ > Next: hand off to the level-design step — instantiate kit pieces into `level_01.tscn`, snap to the 2m grid, dress with props (`summer:3d-assets/prop-model`) and foliage (`summer:3d-assets/organic-model`). For lighting, see `summer:3d-lighting`.
157
+
158
+ ## See also
159
+
160
+ - `summer:3d-assets/prop-model` — for the chests, statues, and decorative props that dress the kit.
161
+ - `summer:3d-assets/organic-model` — for foliage and rocks that break up modular repetition.
162
+ - `summer:asset-pipeline/asset-strategy` — Pipeline 2 (textures + CSG) is the cheaper alternative when pieces are flat.
163
+ - `summer:scene-composition` — how to organize the kit scene and the level scenes that consume it.
164
+ - `summer:3d-lighting` — interior kit pieces typically need warm point lights at sconce positions.