scenario-game-assets

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Scenario Game Assets

Scenario 游戏资产

Overview

概述

Scenario's public catalog carries purpose-trained models per asset type (sprites, icons, props, tilesets, isometric scenes, pixel art, concept art) plus utilities for background removal, upscaling, and pixel cleanup. Discover by asset type, inspect the schema, generate, post-process, export. A sheet whose cells are one character's animation frames, and any walk cycle, loop, or GIF, belongs to
scenario-sprite-animation
. Connection and core loop: see the
scenario
skill. If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add scenario-labs/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
Scenario的公共目录包含针对各类资产(Sprite、图标、道具、Tileset、Isometric场景、Pixel Art、概念美术)专门训练的模型,以及背景移除、超分辨率、像素清理等实用工具。你可以按资产类型查找、查看schema、生成、后处理、导出。如果一个表格的单元格是单个角色的动画帧,以及任何行走循环、循环动画或GIF,都属于
scenario-sprite-animation
的范畴。连接方式与核心流程请参考
scenario
Skill。如果你的可用Skill中缺少此处提到的兄弟Skill,请让用户安装(命令:
npx skills add scenario-labs/skills --skill <name>
);若处于无人值守模式,请根据工具schema继续操作并标记缺失项。

Quick reference

快速参考

TaskCall
Find a model by asset type
recommend
with the asset need in the user's own words (sprite, game icon, tileset, isometric, pixel art);
search
is for a member known by name
Inspect inputs
model_schema_get
(always before
model_run
)
Generate
model_run
(
dry_run=true
prices a batch; launch
wait=false
), then
jobs_wait
; on timeout re-call with
pending_job_ids
Transparent background
recommend
for a native-alpha generator first; else for background removal on the asset
Upscale or enhance
recommend
for upscaling (2x to 16x tools exist)
Pixel-art cleanup
recommend
for cleanup (grid snapping, palette reduction)
Parallax background planesSplit a painted background with the layer tool (
recommend
,
capability: "img2img"
), or generate one plane per run; see Parallax backgrounds
Export for an engine
asset_download
with format="png"
任务调用方式
按资产类型查找模型使用
recommend
并传入用户原话描述的资产需求(Sprite、游戏图标、Tileset、Isometric、Pixel Art);
search
用于查找已知名称的成员
检查输入参数
model_schema_get
(务必在
model_run
之前调用)
生成资产调用
model_run
(
dry_run=true
可估算批量生成的费用;启动时设置
wait=false
),然后调用
jobs_wait
;若超时,使用
pending_job_ids
重新调用
透明背景优先使用
recommend
查找原生支持alpha通道的生成器;否则查找用于该资产的背景移除工具
超分辨率或增强使用
recommend
查找超分辨率工具(现有2倍到16倍放大工具)
Pixel Art清理使用
recommend
查找清理工具(支持网格对齐、调色板精简)
视差背景平面使用图层工具拆分已绘制的背景(
recommend
,
capability: "img2img"
),或每次运行生成一个平面;参见视差背景部分
导出到游戏引擎使用
asset_download
并设置format="png"

Worked example: a transparent potion icon set

示例:透明药水图标集

Request: "four style-matched potion icons for an RPG inventory."
  1. recommend
    with the user's own words as
    prompt
    ("four style-matched potion icons for an RPG inventory"). Typical picks: cartoon icon LoRAs ("Stylized Game Icons & Props"). Confirm the pick with the user: catalogs differ per team; re-discover, never hardcode model IDs.
  2. model_schema_get
    model_id="<picked id>". Note the prompt field, size fields, and any sample-count parameter.
  3. model_run
    parameters={"prompt": "health potion, corked glass bottle, glowing red liquid, bold outline, centered, plain background"} (a plain field cuts cleanly in a removal pass; a native-alpha model wants the subject alone, never the word transparent). The schema's sample-count parameter repeats one prompt for variants of one item; different items are separate runs varying only the item ("mana potion", "stamina potion") with the wording template fixed. Price with
    dry_run=true
    first (one dry run prices one leg; multiply across the batch), then launch with
    wait=false
    .
  4. jobs_wait
    job_ids=["<returned job_id>"] (up to 32 ids, one call covers the batch); on timeout re-call with the returned
    pending_job_ids
    , never a second
    model_run
    . Then
    asset_display
    to review, one
    asset_id
    per call.
  5. Transparency:
    recommend
    for a native-alpha generator first, since it makes the icons transparent at the source and skips a billed removal pass per icon. Treat the pick as opaque unless its
    recommend
    entry or its schema says it outputs transparency. Fall back to a removal model only when the chosen generator lacks alpha:
    recommend
    for background removal (Photoroom, Pixelcut, 851 Labs at authoring time),
    model_schema_get
    the pick, then
    model_run
    with its image field set to the generated asset id.
  6. Optional: upscale keepers (
    recommend
    for upscaling,
    model_schema_get
    as always; upscalers go 2x to 8x and beyond).
  7. asset_download
    asset_id, format="png" (PNG keeps alpha). Follow redirects:
    curl -L -o potion.png "<url>"
    .
需求:「为RPG背包生成四个风格统一的药水图标。」
  1. 调用
    recommend
    ,将用户原话作为
    prompt
    ("four style-matched potion icons for an RPG inventory")。典型选择:卡通图标LoRA("Stylized Game Icons & Props")。请与用户确认选择:不同团队的目录可能不同;请重新查找,切勿硬编码模型ID。
  2. 调用
    model_schema_get
    ,传入model_id="<选中的id>"。注意prompt字段、尺寸字段,以及任何sample-count参数。
  3. 调用
    model_run
    ,传入parameters={"prompt": "health potion, corked glass bottle, glowing red liquid, bold outline, centered, plain background"}(纯色背景在背景移除步骤中可以干净地裁剪;原生alpha模型只需要主体描述,千万不要加「透明」这个词)。schema中的sample-count参数可以针对单个物品生成多个变体,只需重复同一个prompt;不同物品需要单独运行,仅修改物品名称("mana potion"、"stamina potion"),保持措辞模板固定。先使用
    dry_run=true
    估算费用(一次dry run估算一个环节的费用;批量生成需要乘以总数量),然后设置
    wait=false
    启动生成。
  4. 调用
    jobs_wait
    ,传入job_ids=["<返回的job_id>"](最多支持32个id,一次调用即可处理整个批次);若超时,使用返回的
    pending_job_ids
    重新调用,切勿再次调用
    model_run
    。然后调用
    asset_display
    查看结果,每次调用传入一个
    asset_id
    。
  5. 透明背景:优先使用
    recommend
    查找原生支持alpha的生成器,因为它可以直接生成透明图标,省去每个图标付费的背景移除步骤。除非
    recommend
    条目或其schema明确说明输出透明背景,否则请将所选模型视为不透明。仅当所选生成器不支持alpha时,才使用背景移除模型:调用
    recommend
    查找背景移除工具(撰写本文时可用的有Photoroom、Pixelcut、851 Labs),调用
    model_schema_get
    查看所选工具的schema,然后调用
    model_run
    ,将其image字段设置为已生成的资产id。
  6. 可选:对满意的结果进行超分辨率处理(使用
    recommend
    查找超分辨率工具,照常调用
    model_schema_get
    ;超分辨率工具支持2倍到8倍甚至更高的放大)。
  7. 调用
    asset_download
    ,传入asset_id和format="png"(PNG格式保留alpha通道)。请跟随重定向下载:
    curl -L -o potion.png "<url>"
    。

Style consistency

风格一致性

  • The cheap levers first: reuse one
    seed
    across the batch, and pin the model's prompt-expansion flag off where the schema has one; an expander rewrites each prompt independently and defeats a fixed template.
  • Reference images:
    upload_asset
    the art direction images, then pass the asset ids (never local paths) to the model's image or reference parameters.
  • asset_describe
    turns one on-style asset into a promptable style synthesis reusable across prompts (catalog tool, billed,
    dry_run: true
    prices it: run via
    scenario_tools_search
    +
    scenario_tool_execute_read
    ; see the
    scenario
    skill).
  • search
    target="assets" images={like: ["asset_..."]} finds assets already matching the target look.
  • For a locked-in project style, train a custom LoRA on the project's own art (the
    scenario-model-training
    skill); trained models use the same generation loop.
  • 优先使用低成本调整方式:整个批次复用同一个
    seed
    ,如果schema中有prompt-expansion开关,请将其关闭;prompt扩展器会独立重写每个prompt,会破坏固定模板的一致性。
  • 参考图像:调用
    upload_asset
    上传美术风格参考图,然后将资产id(切勿使用本地路径)传入模型的image或reference参数。
  • asset_describe
    可以将一个符合风格的资产转换为可用于prompt的风格合成描述,可在多个prompt中复用(目录工具,需付费,使用
    dry_run: true
    可估算费用:通过
    scenario_tools_search
    +
    scenario_tool_execute_read
    运行;参见
    scenario
    Skill)。
  • 调用
    search
    ,设置target="assets",传入images={like: ["asset_..."]},可以查找已有的符合目标风格的资产。
  • 对于固定的项目风格,可以基于项目自有美术训练自定义LoRA(使用
    scenario-model-training
    Skill);训练后的模型使用相同的生成流程。

Preparing a variation-batch reference

批量变体参考图的准备

Restyling one approved component into a set (button, panel, popup well, icon family) fails on the reference more often than the prompt: the model treats everything composited onto the object as the object.
  • Crop to the object's own bounds. Transparent padding reads as composition: scale and offset drift every run, so sprite-measuring code gets a different box. Trim the alpha, generate, re-pad to a fixed canvas. When the model's supported aspect ratios exclude the source's, aspect also drifts per run; reconcile UI components with a nine-slice-aware rescale (stretch middle bands, keep corners and lettering undistorted) before re-padding.
  • Strip baked effects before generating. A drop shadow, outer glow, or bevel in the reference reads as silhouette and comes back thickened, doubled, or fused to the object. Feed flat art and re-apply the effect in engine, where it stays adjustable. For a final PNG matching a shadowed source, lift the source's effect layer by alpha (on a transparent source the shadow is semi-transparent and the object opaque, but so is the object's antialiased rim: take the shadow as the semi-transparent pixels outside a 1 to 2 px dilation of the opaque mask, and keep the rim with the object) and composite it under each output.
  • Say which parts are functional. A nine-slice panel needs stretchable middles and fixed corners; diffusion has no concept of either. Name the constraint in the prompt, then check that it held.
  • One object, plain field, no scene. Several objects in one reference get recombined into a hybrid.
  • Check the alpha edge on any transparent output. Removed shadows leave a semi-transparent fringe; native-alpha models can ship a large semi-transparent glow around the object. Both read as a halo on a colored UI background. Check interior alpha too: a native-alpha model can punch one item's see-through surface (empty glass) to alpha 0 while painting the next item's opaque, so the set disagrees in an engine slot.
Verify the set by measurement, not by eye: compare each output's alpha bounding box against the source before accepting the batch.
将一个已确认的组件重绘为一组(按钮、面板、弹窗槽、图标家族)时,参考图的问题比prompt更多:模型会把叠加在物体上的所有内容都视为物体本身的一部分。
  • 裁剪到物体自身的边界。 透明内边距会被识别为合成内容:每次运行的缩放和偏移都会漂移,导致Sprite测量代码得到的边框不一致。请先修剪alpha通道,再生成,最后重新填充到固定画布大小。如果模型支持的宽高比不包含源图的宽高比,每次运行的宽高比也会漂移;对于UI组件,请先使用支持九切片的缩放方式调整(拉伸中间区域,保持角落和文字不变形),再重新填充内边距。
  • 生成前移除烘焙效果。 参考图中的投影、外发光或斜角效果会被识别为轮廓,生成后会变粗、重复或与物体融合。请提供扁平化美术素材,然后在引擎中重新添加效果,这样更便于调整。如果最终PNG需要匹配带阴影的源图,请通过alpha通道提取源图的效果层(对于透明源图,阴影是半透明的,物体是不透明的,但物体的抗锯齿边缘也是半透明的:将不透明蒙版向外扩张1到2像素后,外部的半透明像素即为阴影,边缘部分保留在物体中),然后将其合成到每个输出的下方。
  • 说明哪些部分是功能性的。 九切片面板需要可拉伸的中间区域和固定的角落;diffusion模型对这两者都没有概念。请在prompt中说明这些约束,然后检查生成结果是否符合要求。
  • 单个物体,纯色背景,无场景。 一张参考图中有多个物体会被重新组合成混合体。
  • 检查所有透明输出的alpha边缘。 移除阴影后会留下半透明的边缘;原生alpha模型可能会在物体周围生成大面积半透明光晕。这两种情况在彩色UI背景上都会显示为光晕。还要检查内部alpha:原生alpha模型可能会将一个物品的透明表面(空玻璃杯)设为alpha 0,而另一个物品的相同部分则是不透明的,导致整套资产在引擎槽位中显示不一致。
请通过测量而非肉眼来验证整套资产:在接受批次之前,比较每个输出的alpha边界框与源图是否一致。

Isometric tiles and masked fills

Isometric瓦片与遮罩填充

Choose the grid before the style. A 2:1 diamond is a common game projection; a projected hex is a different footprint. Share one projection, placement anchor, light direction, and shadow side across a set. A tile's ground footprint is not its full sprite silhouette: trees and buildings rise above it and may overlap the tile behind. Never clip a tall object through the ground mask. Check a small assembled map for joins, path connections, occlusion, and visual quality before scaling the batch; a clean alpha boundary alone is not acceptance.
Use the isometric template guide to choose a neutral ground or slab reference and separate ground, side, and object regions. The JSON manifest records their geometry, filenames, and source hashes. The template builder, run by a maintainer or an agent needing local geometry, creates the PNGs and manifest. It generates geometry only, not finished game art. Keep the geometry reference separate from the approved style reference; neutral geometry must not force a palette or faceted look. Resolve uploaded assets and publish new versions through the
scenario
skill's shared asset lifecycle; upload local inputs only when no matching asset is accessible.
Dedicated isometric members exist in the public catalog.
recommend
with the user's tile need, then
model_schema_get
. Read the reference, mask, seed, and strength fields instead of assuming they exist or that low strength preserves geometry: conventions vary. Keep the camera and lighting wording fixed while varying the subject. Reuse a seed only when supported. If the model drifts in projection or light despite a consistent reference, use
scenario-consistency
, then consider
scenario-model-training
on approved tiles.
For a ground fill or content explicitly bounded to a shape, use masked
img2img
. If the specialty pick has no mask field,
recommend
again with
capability: "img2img"
and the mask need. Read mask polarity and any required base-image field from
model_schema_get
(
scenario-image
covers model-specific conventions). Template region images are white inside; adapt them to the model's convention, including alpha if required. The base canvas must match the mask dimensions and placement; an approved style reference does not replace it. When that canvas is opaque, preserve its background during the edit: asking for transparent output simultaneously contradicts the protected-canvas constraint. Extract transparency afterward. Use the ground region for terrain, and the taller object region for trees or buildings; the latter is editing space, never a final silhouette mask.
Run one tile first. Measure changes outside the edit region against the source canvas and inspect the result. A few-pixel overrun on a deliberately bounded ground fill can be clipped to its mask; extensive drift needs diagnosis of polarity, base canvas, and consumed references before retrying. For taller sprites, preserve the object silhouette with native alpha or background removal and verify the ground anchor separately. A deterministic ground mask cannot repair a wrong camera or a poor composition.
A "low-poly" look and a low-poly mesh are different deliverables. The look is a 2D style word on an image model. The mesh is
scenario-3d
: whether the image-to-3D pick (
recommend
,
capability: "img23d"
) exposes a polycount target or a topology choice is read off
model_schema_get
, never assumed, and when it exposes neither a separate remesh utility (its own billed run, found with
recommend
,
capability: "3d23d"
) brings the count down afterwards. Either way the concept image feeding it wants flat shading, a clean silhouette, and a plain background so the geometry reads.
先选择网格,再确定风格。2:1菱形是常见的游戏投影方式;投影六边形的占地面积则不同。整套资产请使用统一的投影方式、放置锚点、光照方向和阴影朝向。瓦片的地面占地面积不等于其完整Sprite轮廓:树木和建筑会高出地面,可能会与后方的瓦片重叠。切勿让高物体穿过地面遮罩被裁剪。在扩大批量生成规模之前,请先检查一小部分拼接好的地图的接缝、路径连接、遮挡和视觉质量;仅靠干净的alpha边界不足以作为验收标准。
请使用isometric模板指南选择中性的地面或平台参考,并区分地面、侧面和物体区域。JSON清单记录了它们的几何形状、文件名和源哈希值。模板构建器由维护者或需要本地几何数据的Agent运行,用于生成PNG和清单文件。它仅生成几何形状,不生成成品游戏美术。请将几何参考与已确认的风格参考分开存放;中性几何形状不应强制使用某种调色板或多面体风格。请通过
scenario
Skill的共享资产生命周期来处理上传的资产并发布新版本;仅当无法找到匹配的资产时,才上传本地输入文件。
公共目录中有专门的isometric模型成员。请根据用户的瓦片需求调用
recommend
,然后调用
model_schema_get
。请查看reference、mask、seed和strength字段,不要假设它们存在,也不要假设低strength就能保留几何形状:不同模型的约定不同。在改变主体时,请保持相机和光照的描述措辞固定。仅在模型支持时才复用seed。如果参考一致但模型的投影或光照仍有漂移,请使用
scenario-consistency
,然后考虑使用
scenario-model-training
Skill基于已确认的瓦片进行训练。
对于地面填充或明确限定在某个形状内的内容,请使用带遮罩的
img2img
。如果所选的专用模型没有mask字段,请使用
capability: "img2img"
和遮罩需求再次调用
recommend
。请通过
model_schema_get
查看mask极性和任何必需的base-image字段(
scenario-image
涵盖了特定模型的约定)。模板区域图像的内部是白色的;请根据模型的约定进行调整,必要时包括alpha通道。基础画布必须与mask的尺寸和位置匹配;已确认的风格参考不能替代它。如果画布是不透明的,请在编辑过程中保留其背景:同时要求透明输出会与受保护画布的约束相矛盾。请在之后再提取透明背景。地面区域用于地形,更高的物体区域用于树木或建筑;后者是编辑空间,绝不能作为最终的轮廓遮罩。
请先生成一个瓦片。对照源画布测量编辑区域外的变化,并检查结果。对于有明确边界的地面填充,超出几个像素的话可以裁剪到mask范围内;如果漂移严重,则需要在重试前诊断极性、基础画布和使用的参考是否有问题。对于更高的Sprite,请使用原生alpha或背景移除来保留物体轮廓,并单独验证地面锚点。确定性的地面遮罩无法修复错误的相机角度或糟糕的构图。
「low-poly风格」和「low-poly网格」是不同的交付物。风格是图像模型上的2D风格描述词。网格则属于
scenario-3d
Skill的范畴:所选的图像转3D工具(
recommend
,
capability: "img23d"
)是否支持面数目标或拓扑选择,需要从
model_schema_get
中查看,切勿假设;如果两者都不支持,则需要使用单独的重网格化工具(需单独付费运行,通过
recommend
查找,
capability: "3d23d"
)在之后降低面数。无论哪种方式,输入的概念图都需要是平涂着色、干净轮廓、纯色背景,这样几何形状才能被正确识别。

Parallax backgrounds

视差背景

A parallax background is a stack of depth planes the engine scrolls at different speeds: an opaque sky or far plane, then two or three cutout planes with transparent gaps the planes behind show through. Two routes produce the stack; writing "layers" or "parallax" into one generation prompt produces neither, it returns a single picture of stacked layers, and on a style-trained model it returns several layers painted into one image.
  • Split a painted background you already have. The layer extractor is a contested lane (Scenario's own tool competes with third-party splitters), so
    recommend
    with
    capability: "img2img"
    and the need in the user's words ("separate this background into depth planes for parallax"), then
    model_schema_get
    the pick. The purpose-built tool at authoring time took a
    separationInstruction
    , a splitting rule and not a scene description ("four planes, front to back: foreground bushes, near trees, far hills, sky"), a
    maxLayers
    cap that moves the price, and an inpaint choice for filling the hole each cut leaves, also priced. It returns the cutouts plus a rebuilt background (the rearmost plane), one asset each, so review them one at a time with
    asset_display
    . A plane cut from a viewport-sized painting is only as wide as the viewport, and a scrolling plane needs bleed past the camera on both sides. Canvas-expansion tools repaint an opaque image and would fill a cutout's transparent gaps, so widen the painting before splitting it (
    recommend
    with
    capability: "img2img"
    and the expand need; size the painting for the largest required scroll range; all split planes inherit that width), or take the second route for the near planes.
  • Generate one plane per run. Fix the camera, horizon line, light direction and palette words, then vary only the plane's content: the sky and far plane as an ordinary opaque image, each nearer plane as a cutout (a native-alpha generator, or a plain field plus the removal pass above; never the word transparent at a diffusion model). Say what the plane must not contain ("no ground, no sky") so the planes do not repeat each other, and size each plane for the viewport plus its full horizontal scroll-offset range; larger offsets need more bleed, while looping requires seamless edges.
Check the stack before exporting:
model_scenario-compose-image
(a fixed first-party id, Scenario's single deterministic image compositor, so discovery would only re-derive it) takes the planes as
layers
, each with
source
(the asset id) and
zIndex
in depth order, over
canvasMode: "custom"
with numeric
canvasWidth
and
canvasHeight
and
backgroundColor: "transparent"
. Use the camera viewport dimensions, preserve each plane's source size, and position the shared canvas so bleed lies outside both viewport edges. Equal-width split planes work when that bleed covers each plane's offset range. A second composite with the near planes shifted a few percent in
x
(a percent string) within its available bleed previews the parallax offset the engine will produce; a seam, a doubled horizon or a plane whose cutout edge shows a halo is visible here, before any engine work. Verify actual alpha, not just the thumbnail. Reject a stack with cutout seams, missing scenery, or foreground objects left in the rebuilt background: shifting the planes exposes those duplicates. Revise the separation or inpaint settings, or use the one-plane-per-run route, within the user's budget; otherwise report a failed preview instead of an engine-ready set.
asset_download
each accepted plane with
format="png"
(the far plane too, so the set shares one format), tag them with their depth order, and leave scroll speeds and looping to the engine.
视差背景是一组深度平面的堆叠,引擎会以不同的速度滚动它们:一个不透明的天空或远景平面,然后是两到三个带透明缺口的裁剪平面,后方的平面可以透过缺口显示。有两种方法可以生成这组平面;在一个生成prompt中写「layers」或「parallax」并不能得到正确的结果,它只会返回一张堆叠了图层的图片,对于风格训练过的模型,它会返回一张画了多个图层的单图。
  • 拆分已有的绘制背景。 图层提取是一个竞争激烈的领域(Scenario自有工具和第三方拆分工具都有提供),因此请调用
    recommend
    ,传入
    capability: "img2img"
    和用户原话描述的需求("separate this background into depth planes for parallax"),然后调用
    model_schema_get
    查看所选工具的schema。撰写本文时的专用工具需要传入
    separationInstruction
    (拆分规则而非场景描述,例如"four planes, front to back: foreground bushes, near trees, far hills, sky")、影响价格的
    maxLayers
    上限,以及用于填充每个裁剪后留下的空洞的修复选项(也需付费)。它会返回裁剪后的各个平面加上重建的背景(最后方的平面),每个都是单独的资产,因此请使用
    asset_display
    逐个查看。从视口大小的画作中裁剪出的平面宽度只有视口那么宽,而滚动平面需要在相机两侧都有溢出区域。画布扩展工具会重绘不透明图像,会填充裁剪平面的透明缺口,因此请在拆分前先加宽画作(调用
    recommend
    ,传入
    capability: "img2img"
    和扩展需求;将画作尺寸调整为所需的最大滚动范围;所有拆分后的平面都会继承这个宽度),或者对近景平面使用第二种方法。
  • 每次运行生成一个平面。 固定相机、地平线、光照方向和调色板描述词,然后仅改变平面的内容:天空和远景平面作为普通的不透明图像,每个更近的平面作为裁剪图(使用原生alpha生成器,或纯色背景加上述的背景移除步骤;切勿在diffusion模型的prompt中使用「transparent」这个词)。请说明平面中不能包含的内容("no ground, no sky"),这样平面之间就不会重复;每个平面的尺寸要包含视口加上其全部水平滚动偏移范围;偏移越大需要的溢出区域越多,而循环滚动则需要无缝边缘。
导出前请检查这组平面:调用
model_scenario-compose-image
(一个固定的官方ID,是Scenario唯一的确定性图像合成工具,因此查找工具只会得到同一个结果),将平面作为
layers
传入,每个图层包含
source
(资产id)和按深度顺序排列的
zIndex
,同时设置
canvasMode: "custom"
,以及数值型的
canvasWidth
、
canvasHeight
和
backgroundColor: "transparent"
。请使用相机视口尺寸,保留每个平面的源尺寸,并调整共享画布的位置,使溢出区域位于视口两侧之外。当溢出区域覆盖每个平面的偏移范围时,等宽的拆分平面可以正常工作。将近景平面在其可用溢出范围内沿
x
方向移动几个百分点(使用百分比字符串),进行第二次合成,可以预览引擎将产生的视差偏移效果;接缝、重复的地平线或裁剪边缘有光晕的平面,都可以在引擎工作之前在这里被发现。请验证实际的alpha通道,而不仅仅是缩略图。如果存在裁剪接缝、缺失的景物或重建背景中残留的前景物体,请拒绝这组平面:移动平面时这些重复内容会暴露出来。请在用户预算内调整拆分或修复设置,或者使用每次生成一个平面的方法;否则请报告预览失败,而不是提供一套可用于引擎的资产。调用
asset_download
下载每个已确认的平面,设置
format="png"
(远景平面也一样,这样整套资产使用统一格式),按深度顺序标记它们,滚动速度和循环设置交给引擎处理。

Common mistakes

常见错误

  • Prompting "transparent background" at a diffusion model: outputs are opaque. Cut the background afterward with a removal tool, or pick a native-alpha model.
  • Exporting JPG sprites: JPG has no alpha channel; keep format="png".
  • Shipping AI pixel art with off-grid pixels or noisy palettes: post-process with a pixel cleanup tool (found with
    recommend
    ) for grid snapping and a strict palette.
  • Skipping
    model_schema_get
    : specialty models (the pixel-art family) are txt2img-only with their own fields; generic parameters get rejected.
  • Asking one generation for "the layers" of a parallax background: one image comes back; depth planes are a split of a finished painting or one run per plane (see Parallax backgrounds).
  • Hand-stitching tilesets: dedicated seamless tileset generators exist (find one with
    recommend
    ); texture-specific upscalers preserve tiling.
  • Single-sampling lettered assets: the same recipe can render one word and fail another (dark embossed text, not the reference typography). Generate several samples per run (schema's sample-count parameter) and pin exact hex colors in the prompt when the palette drifts.
  • 在diffusion模型的prompt中写「transparent background」:输出会是不透明的。请在生成后用背景移除工具裁剪背景,或者选择原生支持alpha的模型。
  • 导出JPG格式的Sprite:JPG没有alpha通道;请保持format="png"。
  • 交付的AI生成Pixel Art存在像素偏离网格或调色板杂乱的问题:请使用像素清理工具(通过
    recommend
    查找)进行后处理,实现网格对齐和严格的调色板约束。
  • 跳过
    model_schema_get
    :专用模型(pixel-art系列)是仅txt2img的,有自己的字段;通用参数会被拒绝。
  • 要求一次生成视差背景的「所有图层」:只会返回一张图片;深度平面需要通过拆分成品画作或每次运行生成一个平面来得到(参见视差背景部分)。
  • 手工拼接Tileset:已有专门的无缝Tileset生成器(通过
    recommend
    查找);纹理专用的超分辨率工具可以保留平铺特性。
  • 带文字的资产只生成单个样本:同一套参数可能渲染一个词正常,另一个词就失败(比如深色浮雕文字,不符合参考的排版风格)。请每次运行生成多个样本(使用schema的sample-count参数),如果调色板漂移,请在prompt中固定精确的十六进制颜色。