layer-environments

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Layer Environments

Layer 环境

Overview

概述

An environment is the art the player looks through, not at. It has to hold depth, sit behind gameplay without competing with it, and, for a parallax background, come apart into layers that move at different speeds and still line up.
Generation mechanics (model discovery, the estimate gate, uploads, polling) are in the
layer
skill; prompt craft is in
layer-image
. Characters and props are in
layer-game-assets
, isometric and hex tiles in
layer-tilesets
, and tiling surfaces in
layer-textures
.
If a sibling skill named here is missing from your available skills, ask the user to install it (
npx skills add layerai/skills --skill <name>
); unattended, proceed from tool schemas and flag the gap.
环境是玩家从中看过去的美术,而不是供玩家直接关注的对象。它必须营造纵深,位于游戏玩法之后且不与之争夺注意力;对于视差背景,还需拆分为以不同速度移动且仍能对齐的图层。
生成机制(模型发现、估算确认门槛、上传、轮询)位于
layer
skill 中;提示词设计位于
layer-image
中。角色和道具位于
layer-game-assets
中,等距和六边形地块位于
layer-tilesets
中,平铺表面位于
layer-textures
中。
如果这里提到的某个同级 skill 未出现在可用 skills 中,请让用户安装它(
npx skills add layerai/skills --skill <name>
);无人值守时,则根据 tool schemas 继续操作,并标记这一缺失项。

Quick reference

快速参考

DeliverableHow
Environment concept art
text_to_image
; name camera height and depth tiers
Parallax backgroundGenerate one scene, then
execute_forge
with
parallax
on an
inpainting
or
erase_object
model
Parallax for an engine
export_parallax
on the split's output, engine
GODOT
,
UNITY
or
JSON
360 skybox
use_case: "create_skybox"
with
projection: "EQUIRECTANGULAR"
World
use_case: "text_to_world"
or
"image_to_world"
; iterate with
draft: true
where the model offers it
交付物方法
环境概念艺术
text_to_image
;指定相机高度和深度层级
视差背景生成一个场景,然后在
inpainting
或
erase_object
模型上使用带
parallax
的
execute_forge
引擎用视差背景对拆分输出使用
export_parallax
,引擎设为
GODOT
、
UNITY
或
JSON
360° Skybox
use_case: "create_skybox"
,并设置
projection: "EQUIRECTANGULAR"
世界
use_case: "text_to_world"
或
"image_to_world"
;如果模型支持,则使用
draft: true
进行迭代

Environment concept art

环境概念艺术

Name the camera height and the depth tiers, because these decide whether a background sits behind gameplay. Say which tier the art belongs to: foreground silhouette, midground playable band, far background. Keep contrast and saturation deliberately low where characters will stand. The most common note on generated game backgrounds is that they are too busy to read characters against.
指定相机高度和深度层级,因为它们决定背景是否位于游戏玩法之后。说明美术资源所属的层级:前景剪影、中景可玩区域或远景背景。角色站立区域应刻意保持低对比度和低饱和度。生成的游戏背景最常见的问题,是画面过于繁杂,导致角色难以从中凸显。

Parallax: one scene, split by depth

视差:生成一个场景,再按深度拆分

Do not generate parallax layers one at a time. Separate runs never share a horizon, a light, or a vanishing point, and
export_parallax
refuses them: it takes only the output of a parallax split.
The split is one
execute_forge
run with the finished scene as
init_image
and
parallax
set, on a model found with
list_base_models
and
filter.use_case: "inpainting"
or
"erase_object"
. That model fills in what each nearer layer hides. Given no prompt, an inpainting model is told to continue the scenery, which is usually what you want.
parallax
takes three fields:
  • layers
    : 2 to 6, default 5.
  • cuts
    : where to slice, as ascending nearness values between 0 and 1, one fewer than
    layers
    . Omit it to cut at the gaps in the scene's own depth, which is the right default.
  • loop
    : every layer repeats left to right, each plate healed across its wrap.
The output is one layered PSD, farthest layer at the bottom, with each layer's scroll speed recorded. Pass its
file_id
to
export_parallax
with the engine:
GODOT
writes a Parallax2D scene for Godot 4.3 or later,
UNITY
writes sprites with their
.meta
and a
parallax.json
of scroll factors, and
JSON
writes the images and
parallax.json
for any engine. Every layer is written at the background's full size, so placed at one point they line up. The export spends no Creative Units.
A split bills one run of the model per layer except the nearest, and
loop
adds one heal per plate. Estimate it with exactly the inputs the run will get,
parallax
included, before deciding.
不要逐个生成视差图层。分别运行生成的内容不会共享同一个地平线、光照或消失点,而
export_parallax
也会拒绝这些结果:它只接受一次视差拆分的输出。
拆分是一次
execute_forge
运行:将完成的场景作为
init_image
,设置
parallax
,并使用通过
list_base_models
找到且
filter.use_case
为
"inpainting"
或
"erase_object"
的模型。该模型会补全每个较近图层所遮挡的内容。未提供提示词时,inpainting 模型会被指示延续场景,这通常正是所需效果。
parallax
包含三个字段:
  • layers
    :2 到 6,默认值为 5。
  • cuts
    :切分位置,以 0 到 1 之间按升序排列的接近度值表示,数量比
    layers
    少一个。省略时,按照场景自身的深度空隙进行切分;这是正确的默认行为。
  • loop
    :每个图层都从左到右重复,每个拼板都会跨接缝进行修复。
输出是一个分层 PSD,最远图层位于底部,并记录每个图层的滚动速度。将其
file_id
传给
export_parallax
并指定引擎:
GODOT
为 Godot 4.3 或更高版本写入 Parallax2D scene;
UNITY
写入 sprites、对应的
.meta
以及包含滚动因子的
parallax.json
;
JSON
为任意引擎写入图像和
parallax.json
。每个图层均按背景的完整尺寸写入,因此放置到同一锚点时即可对齐。导出不会消耗 Creative Units。
一次拆分会按每个图层收取一次模型运行费用,但最近图层除外;
loop
还会为每个拼板增加一次修复。作出决定前,应使用此次运行将收到的完全相同输入(包括
parallax
)进行估算。

Compose the scene for splitting

为拆分设计场景

The split can only separate what the scene already separates. Prompt the source for it:
  • Side-on camera, wide frame. A side-scroller background is landscape; filter for
    landscape_16_9
    when choosing the model.
  • Distinct depth bands with air between them: sky, far range, midground, near foreground. A single tree that runs from the near edge into the far hills will be cut through.
  • A quiet gameplay band. Low contrast where characters stand, detail kept to the far layers and a sparse foreground silhouette.
  • For a loop, no unique landmark. A lone castle on one plate repeats every screen width.
拆分只能分离源场景中已经彼此分离的内容。应在提示词中为此进行设计:
  • 侧面相机,宽幅画面。 横版游戏背景应为横向;选择模型时筛选
    landscape_16_9
    。
  • 彼此分离且之间留有空隙的深度带:天空、远景山脉、中景和近处前景。一棵从近处边缘延伸至远山中的树会被从中间切断。
  • 安静的可玩区域。 角色站立处保持低对比度,细节集中在远景图层,前景仅保留稀疏剪影。
  • 循环时不要设置独特地标。 位于某个拼板上的独立城堡,会每隔一个屏幕宽度重复出现。

Skyboxes

Skybox

A skybox is a 2:1 equirectangular panorama whose left and right edges meet and whose poles settle. Find a model with
filter.use_case: "create_skybox"
and pass
projection: "EQUIRECTANGULAR"
. Do not also set
tileability
; the projection already makes the wrap. Leave
width
and
height
unset to get the model's largest 2:1 preset, or use one of the presets
get_base_model
lists. Prompt the sky and the horizon, not a subject: anything framed as a focal point is stretched across the poles.
Skybox 是一个 2:1 的 equirectangular 全景图,其左右边缘能够衔接,两极也能正确收束。查找
filter.use_case
为
"create_skybox"
的模型,并设置
projection: "EQUIRECTANGULAR"
。不要同时设置
tileability
;投影本身已经实现环绕。不要设置
width
和
height
,以获取模型最大的 2:1 预设;也可以使用
get_base_model
列出的某个预设。提示词应描述天空和地平线,而不是主体;任何被构图为焦点的主体都会被拉伸到两极。

Worlds

世界

A world is its own modality, found with
filter.use_case: "text_to_world"
or
"image_to_world"
. Where
get_base_model
reports
capabilities.draft
, iterate on cheap drafts with
draft: true
, then complete only the one you keep:
execute_forge
with
base_model_id
set to the draft's
draft.completion_base_model_id
,
batch_size: 1
, and the draft's
file_id
as a guidance file of type
draft_world
, with no prompt. The completion keeps the draft's scene, has a flat price, and can happen once. Check
draft.status
first: an
EXPIRED
draft must be generated again.
World 是一种独立模态,可通过
filter.use_case: "text_to_world"
或
"image_to_world"
查找。
当
get_base_model
报告
capabilities.draft
时,先使用
draft: true
迭代生成低成本草稿,然后只完成最终保留的一个:调用
execute_forge
,将
base_model_id
设置为草稿的
draft.completion_base_model_id
,设置
batch_size: 1
,并将草稿的
file_id
作为类型为
draft_world
的 guidance file,且不提供提示词。完成过程会保留草稿场景,价格固定,并且只能执行一次。先检查
draft.status
;如果草稿状态为
EXPIRED
,则必须重新生成。

Worked example

实操示例

"A looping four-layer forest background for our Godot platformer."
  1. list_base_models
    with
    filter.use_case: "text_to_image"
    and
    filter.capabilities: {landscape_16_9: true}
    (an object of booleans). Take the first result.
  2. Prompt the source: "Side-on view of a misty pine forest for a 2D platformer background, wide landscape. Four distinct depth bands with clear space between them: pale sky, distant blue mountains, a midground of pine trunks, a sparse dark foreground of ferns along the bottom edge. Low contrast and muted greens in the middle band where characters run. No buildings, no single landmark." Estimate, execute with
    batch_size: 4
    , poll at
    poll_interval_seconds
    , pick one.
  3. list_base_models
    with
    filter.use_case: "inpainting"
    . Take the first result.
  4. estimate_forge_price
    with that model, the chosen scene's
    file_id
    as
    init_image
    ,
    batch_size: 1
    , no prompt, and
    parallax: {layers: 4, loop: true}
    . The estimate prices the per-layer runs and the loop heals together. Above 20 CUs, show the price and wait for an explicit yes.
  5. execute_forge
    with the same input; poll at
    poll_interval_seconds
    . Report any degraded reference set.
  6. export_parallax
    with the PSD's
    file_id
    ,
    engine: "GODOT"
    , and a
    name
    . Hand back the zip link and point the user at its README.
“为我们的 Godot 平台跳跃游戏制作一个可循环的四层森林背景。”
  1. 使用
    filter.use_case: "text_to_image"
    和
    filter.capabilities: {landscape_16_9: true}
    (一个布尔值对象)调用
    list_base_models
    。选择第一个结果。
  2. 为源场景编写提示词:“用于 2D 平台跳跃游戏背景的朦胧松林侧视图,宽幅横向画面。四个清晰的深度层带,彼此之间留有明显空隙:浅色天空、远处蓝色山脉、中景松树干,以及沿底边分布的稀疏深色蕨类前景。角色奔跑的中景层带采用低对比度和低饱和度绿色。不要建筑,不要单一地标。”进行估算,以
    batch_size: 4
    执行,在
    poll_interval_seconds
    时轮询,然后选择一个结果。
  3. 使用
    filter.use_case: "inpainting"
    调用
    list_base_models
    。选择第一个结果。
  4. 使用该模型、所选场景的
    file_id
    作为
    init_image
    、
    batch_size: 1
    、不提供提示词,并设置
    parallax: {layers: 4, loop: true}
    调用
    estimate_forge_price
    。估算会合并计算各图层运行和循环修复的费用。如果费用超过 20 CUs,展示价格并等待用户明确同意。
  5. 使用相同输入调用
    execute_forge
    ;在
    poll_interval_seconds
    时轮询。报告任何出现质量降级的参考集。
  6. 使用 PSD 的
    file_id
    、
    engine: "GODOT"
    和一个
    name
    调用
    export_parallax
    。返回 zip 下载链接,并引导用户查看其中的 README。

Common mistakes

常见错误

  • Generating each parallax layer as a separate run. They will not line up, and
    export_parallax
    refuses them.
  • Running the split on a plain generation model instead of an
    inpainting
    or
    erase_object
    one.
  • A source scene with one object spanning several depth bands, which the split cuts in half.
  • Passing
    cuts
    with the wrong count: it is always one fewer than
    layers
    .
  • A busy, high-contrast gameplay band that characters cannot read against.
  • A unique landmark in a looping background.
  • Setting
    tileability
    on a skybox, or framing a focal subject that stretches across the poles.
  • Completing a world draft with a new prompt, or completing an expired one.
  • 将每个视差图层作为单独一次运行生成。它们无法对齐,而且
    export_parallax
    会拒绝这些结果。
  • 在普通生成模型上运行拆分,而不是使用
    inpainting
    或
    erase_object
    模型。
  • 源场景中的某个对象跨越多个深度层带,导致拆分将其切成两半。
  • 传入的
    cuts
    数量错误:它始终比
    layers
    少一个。
  • 可玩区域过于繁杂且对比度过高,使角色难以从中凸显。
  • 在循环背景中设置独特地标。
  • 在 Skybox 上设置
    tileability
    ,或构图为焦点的主体并使其拉伸到两极。
  • 使用新提示词完成 World 草稿,或完成已经过期的草稿。