2D Sprite Generation
Generate 2D sprite (Sprite) assets: game icons, item images, character avatars, skill icons, UI elements, etc. Output PNG automatically imported as Sprite (Texture2D), saved by default to Assets/TJGenerators/History/.
Getting Started
Start from GUI
Menu: AI > Generate > Generate Sprite, or refer to the beginning section of Generate 3D Models.
Start from CLI
Use the generate_sprite tool to generate sprites. After generation is complete, the sprite is automatically saved to the project and can be used in the scene.
Input Modes:
| Mode | Parameters | Description |
|---|---|---|
| Text-to-Sprite | prompt | Pure text description |
| Image-to-Sprite | image_path (can add prompt) | Reference image + text guidance |
Provide at least one of
promptorimage_path.
Common Models
Sprite generation provides 3 models, selected via generator_id:
Frontier Game Design (Default Model)
- generator_id:
frontier-game-design(default) - Use Cases: Game icons, item images, concept-oriented game assets, comes with gamified prompt templates
- Key Parameters:
prompt: Sprite descriptionimage_path: Reference image pathimageSize:square_hd(default) /square/portrait_4_3/portrait_16_9/landscape_4_3/landscape_16_9outputFormat:png(default) /jpeg
-
When using this model,
type_id/style_idare not supported; use descriptive prompts for guidance.
Huoshan SeeDream
- generator_id:
huoshan_seedream(switch when user says "use Huoshan model" / "use SeeDream") - Use Cases: General sprite generation, supports content type/art style/background segmentation
- Key Parameters:
prompt: Sprite descriptionimage_path: Reference image pathtype_id: Content type ID (31 types, see below)style_id: Art style ID (29 types, see below)size: Output size (default2048x2048, 8 presets)is_segmentation: Whether to automatically remove background (default true)q_value: Compression quality after segmentation 1–100 (default 75)resize_width: Output maximum width (px), 0 = no scaling
Frontier (Stylized Effects)
- generator_id:
frontier-effect - Use Cases: Stylized, artistic effect sprites
- Key Parameters:
prompt/image_pathresolution:0.5K/1K(default) /2K/4Kaspect_ratio:auto(default) /16:9/9:16/1:1, etc.output_format:png(default) /jpeg
Content Type IDs (type_id, SeeDream only)
Weapons (weapon_melee/weapon_ranged/weapon_magic), Armor & Accessories (armor_head/armor_body/armor_shield/armor_accessory), Consumables (consumable_hp/consumable_mp/consumable_buff), Materials (material_common/material_rare/material_epic), Special (key_item/quest_item), Tools (tool_gathering/tool_crafting), Characters (mount/pet/character_hero/character_npc/monster), Scenes (furniture/decoration), UI (ui_button/ui_icon/ui_frame), Skills (skill_active/skill_passive), Effects (effect_buff/effect_debuff).
Art Style IDs (style_id, SeeDream only)
Pixel types (pixel/pixel_8bit/pixel_16bit), Cartoon/Anime (cartoon/anime/chibi), Realistic (realistic/semi_realistic), Design styles (flat/vector/minimalist), Painting styles (watercolor/oil_painting/sketch/lineart/hand_drawn), cell_shading, low_poly, Perspectives (isometric/top_down/side_scroller), Themes (cyberpunk/steampunk/fantasy/sci_fi/horror/cute/gothic/medieval).
Output Sizes (size, SeeDream only)
2048x2048 (default, 1:1), 2304x1728 (4:3), 1728x2304 (3:4), 2560x1440 (16:9), 1440x2560 (9:16), 2496x1664 (3:2), 1664x2496 (2:3), 3024x1296 (21:9).
Optimization
Model & Parameter Combinations
- Default Frontier Game Design is suitable for game icons/items, no need to select content type and style, use descriptive prompts directly
- SeeDream for precise control: Combining
type_id+style_idguides direction better than pure text - Describe item features specifically:
"a glowing blue crystal sword with intricate rune engravings">"a sword"
Size & Precision (SeeDream)
- Minimum size approximately 1920×1920 (about 3,686,400 pixels), below this returns 400 error
- Common
2048x2048, balances quality and file size - Enable
is_segmentation: truewhen automatic background removal is needed
Sprite Scaling
- Default scaling ratio 2048px / 100 PPU ≈ 20.48 units wide
- When placing in scene, must explicitly set
localScale:0.05f≈ 1 unit wide,0.10f≈ 2 units wide - Not setting scale will cause sprites to appear abnormally large in the scene
Parallel Generation
- Maximum 5 concurrent tasks, can submit multiple sprite generation requests simultaneously
Notes
- ⚠️ Default model is Frontier Game Design; parameters like
type_id/style_id/size/is_segmentationare only effective for SeeDream (huoshan_seedream) - ⚠️ At least one of
promptorimage_pathis required - ⚠️ SeeDream minimum size approximately 1920×1920, requesting smaller size may trigger 400 error
- ⚠️ Sprite default scaling is abnormally large (2048px/100PPU ≈ 20.48 units), must set
localScale - ⚠️ Generation time 60–180 seconds
- ⚠️ Difference between Sprite and Image: Sprites are for in-game 2D assets (transparent background, icons, avatars), Images are for concept art, background images, etc.
- ⚠️ Output path: Default
Assets/TJGenerators/History/ - ⚠️ Domain Reload: Do not write
.csfiles to disk during generation, useexecute_csharp_scriptinstead