layer-motion-graphics

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Layer Motion Graphics

Layer 动态图形

Overview

概述

Motion graphics on Layer split into two jobs that must not be mixed. Pictures that move (a logo assembling, an emblem catching light) are a generation with a video model. Words are never generated: video models misspell, cannot use a font file, and drift between frames. Words go on as text items in a
render_video_timeline
edit, set in the brand font.
Generation mechanics are in the
layer
skill and motion prompting in
layer-video
. Timeline assembly basics (cutting, safe areas, audio length) are in
layer-video-timeline
, and exact text on stills is
layer-typography
. Reusing one motion design for many variants is
layer-motion-templates
; a shared colour and texture finish is
layer-video-looks
.
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 上的动态图形分为两类必须分开处理、不可混用的工作。会动的画面(Logo 组装、徽标捕捉光线)通过视频模型生成。文字绝不能生成:视频模型会拼错文字,无法使用字体文件,而且会在帧与帧之间发生漂移。文字应作为
text
项加入
render_video_timeline
编辑,并使用品牌字体排版。
生成机制位于
layer
skill 中,运动提示词位于
layer-video
中。时间线编排基础(剪切、安全区域、音频时长)位于
layer-video-timeline
,静帧中的精确文字排版位于
layer-typography
。将同一套动态设计复用于多个变体请使用
layer-motion-templates
;统一的色彩与纹理风格处理请使用
layer-video-looks
。
如果这里提到的某个同级 skill 不在可用 skill 列表中,请让用户安装(
npx skills add layerai/skills --skill <name>
);在无人值守模式下,则根据工具 schema 继续操作,并明确说明这一缺失。

Quick reference

快速参考

JobRoute
Logo reveal
image_to_video
, exact logo as
last_frame
, an abstract or empty plate as
first_frame
Idle logo loop
image_to_video
, the logo as both
first_frame
and
last_frame
,
loop
capability
Title, lower third, CTATimeline
text
item with
font_file_id
, never a prompt
Text entering or leavingA transition between items:
slide
,
wipe
,
iris
,
clockWipe
,
flip
,
fade
Word-by-word kinetic typeConsecutive
text
items, one word or phrase each, stepped on
start_frame
Shaped reveal of an image
mask
on an
image
or
video
item:
circle
,
ellipse-horizontal
,
ellipse-vertical
Plate behind typeA
solid
item under the text, or the text item's own
background_color
工作路径
Logo 揭示
image_to_video
,将准确的 Logo 文件作为
last_frame
,将抽象画面或空白底板作为
first_frame
Logo 待机循环
image_to_video
,将 Logo 同时作为
first_frame
和
last_frame
,使用具备
loop
能力的模型
标题、下三分之一字幕、CTA时间线
text
项,使用
font_file_id
,不要通过提示词生成
文字入场或离场条目之间的转场:
slide
、
wipe
、
iris
、
clockWipe
、
flip
、
fade
逐词动态排版连续的
text
项,每项一个单词或短语,并按
start_frame
依次错开排列
图像的形状揭示在
image
或
video
项上使用
mask
:
circle
、
ellipse-horizontal
、
ellipse-vertical
文字背后的底板文字下方的
solid
项,或文字项自身的
background_color

Reveals and loops: generate the picture, pin the frame

揭示动画与循环:生成画面,锁定帧

A reveal is judged on its last frame, which is the one the viewer reads. Filter
list_base_models
with
filter.use_case: "image_to_video"
and
filter.guidance_file_types: ["first_frame", "last_frame"]
, take the first result, and
get_base_model
for its durations and trigger word. Pass the exact logo file as
last_frame
, so the landing frame is the artwork rather than the model's memory of it.
first_frame
is what the reveal grows from: an empty plate in the brand colour, an abstract shape, or particles, from an existing still or one
text_to_image
run (
layer-image
), sized with
width
and
height
to the reveal's frame. Describe only the transition in the prompt ("gold shards converge and lock into the emblem, light sweep across it at the end"), never the logo's letters.
render_video_timeline
takes
{workspace_id, template, videos, images, audios}
.
template
is
{width, height, fps, tracks: [{id, name, items, transitions}]}
; an item is
{id, type, start_frame, duration_in_frames}
plus
file_id
or
slot
, and optionally
layout {left, top, width, height}
,
effects
,
start_from_in_seconds
to trim a clip's head, and
volume
; a
solid
takes
color
{red, green, blue, alpha}
. The render returns a
generation_id
for
get_generation_run
.
An idle loop takes the logo as both
first_frame
and
last_frame
, and a model with the
loop
capability where the clip must repeat without a jump. Keep its motion small (a breathing glow, a slow rim light) so the mark never leaves its own silhouette.
Set
duration_seconds
on a model filtered with
fixed_duration: true
when the sting must land on a beat. Estimate with
estimate_forge_price
using the same files, then execute and poll
get_forge_run
at
poll_interval_seconds
.
揭示动画以最后一帧为评判依据,因为这一帧是观众最终看到的画面。使用
filter.use_case: "image_to_video"
和
filter.guidance_file_types: ["first_frame", "last_frame"]
筛选
list_base_models
,取第一个结果,再调用
get_base_model
获取其可用时长和触发词。将准确的 Logo 文件作为
last_frame
传入,使落点帧直接采用原始设计稿,而不是模型凭记忆重绘的结果。
first_frame
则是揭示动画的起点:可以使用品牌颜色的空白底板、抽象形状或粒子效果,素材既可来自现有静帧,也可来自一次
text_to_image
生成(
layer-image
),并通过
width
和
height
调整为揭示动画的画幅尺寸。提示词中只描述过渡过程(“金色碎片向内汇聚并锁定到徽标中,最后扫过一道光线”),绝不要描述 Logo 的字母。
render_video_timeline
接收
{workspace_id, template, videos, images, audios}
。
template
的结构为
{width, height, fps, tracks: [{id, name, items, transitions}]}
;条目结构为
{id, type, start_frame, duration_in_frames}
,并包含
file_id
或
slot
,还可选择包含
layout {left, top, width, height}
、
effects
、
start_from_in_seconds
(用于裁剪片段开头)和
volume
;
solid
条目需设置
color
{red, green, blue, alpha}
。渲染后会返回
generation_id
,供
get_generation_run
使用。
待机循环将 Logo 同时作为
first_frame
和
last_frame
,并选用具备
loop
能力的模型,确保片段重复播放时没有跳变。让运动幅度保持较小,例如呼吸式光晕或缓慢移动的轮廓光,使 Logo 始终不突破自身轮廓。
当品牌动画短片(sting)必须精准落在节拍上时,应在通过
fixed_duration: true
筛选出的模型上设置
duration_seconds
。使用相同文件调用
estimate_forge_price
估算价格,然后执行任务,并以
poll_interval_seconds
为间隔轮询
get_forge_run
。

Type: set it, then move it with cuts

文字:先设置,再用切换赋予运动

A timeline
text
item takes
text
,
font_file_id
(an uploaded .ttf or .otf; upload local fonts with
request_file_upload_url
) or
font_family
,
font_size
,
font_weight
,
letter_spacing
,
line_height
,
text_align
,
color
,
stroke
(
{color, width}
),
shadow
(
{color, x, y, blur}
),
background_color
, and a
layout
box
{left, top, width, height}
in composition pixels.
The timeline has no keyframes. An item's position, opacity and effects hold for its whole span. Motion comes from two sources only:
  • Transitions on a track's
    transitions
    , each
    {id, type, from_item_id, to_item_id, duration_in_frames, easing}
    , with
    direction
    (
    from-left
    ,
    from-right
    ,
    from-top
    ,
    from-bottom
    ) on
    slide
    ,
    wipe
    and
    flip
    .
    easing: "spring"
    gives the overshoot that reads as designed motion;
    ease-out
    suits an entrance,
    ease-in
    an exit. A transition joins two adjacent items on one track, so a title that slides in needs a
    solid
    or empty-looking item before it.
  • Stepped items. Kinetic type is a run of
    text
    items on one track, each one word or phrase, back to back on
    start_frame
    with no overlap. Hard cuts on the beat read as rhythm; a short
    fade
    or
    wipe
    between them reads as flow.
Anything that must glide continuously (a slow push on the title, a sweep of light across the type) is a generated clip of the type rendered as an image, not a timeline effect:
render_text
the line, then animate that still with
image_to_video
as both frames and a "light sweep only, letters unchanged" prompt, and check every frame for warping. Report the gap rather than promising a keyframe move.
时间线中的
text
项支持
text
、
font_file_id
(已上传的 .ttf 或 .otf 文件;使用
request_file_upload_url
上传本地字体)或
font_family
、
font_size
、
font_weight
、
letter_spacing
、
line_height
、
text_align
、
color
、
stroke
(
{color, width}
)、
shadow
(
{color, x, y, blur}
)、
background_color
,以及以合成画布像素为单位的
layout
框
{left, top, width, height}
。
时间线没有关键帧。条目的位置、不透明度和效果会在其整个时长内保持不变。运动只能来自以下两种方式:
  • 轨道
    transitions
    中的转场,每个转场为
    {id, type, from_item_id, to_item_id, duration_in_frames, easing}
    ;
    slide
    、
    wipe
    和
    flip
    可设置
    direction
    (
    from-left
    、
    from-right
    、
    from-top
    、
    from-bottom
    )。
    easing: "spring"
    会产生过冲,形成经过设计的运动感;
    ease-out
    适合入场,
    ease-in
    适合离场。转场连接同一轨道上的两个相邻条目,因此滑入的标题前需要一个
    solid
    条目或视觉上为空的条目。
  • 分段条目。 动态排版由同一轨道上一连串
    text
    条目组成,每个条目包含一个单词或短语,并依据
    start_frame
    紧密衔接且互不重叠。跟随节拍硬切可形成节奏感;条目之间使用短
    fade
    或
    wipe
    则可形成流畅感。
任何需要持续平滑移动的内容,例如标题缓慢推近或光线扫过文字,都应采用将文字渲染为图像后生成的动画片段,而不是使用时间线效果:先用
render_text
渲染该行文字,再以
image_to_video
将该静态图同时作为两帧输入,并使用“仅扫过光线,字母保持不变”的提示词制作动画,然后逐帧检查是否发生字形扭曲。如果无法实现,应如实报告这一限制,而不要承诺支持关键帧移动。

Reading time and placement

阅读时间与位置

Hold a title at least as long as it takes to read twice aloud, and convert that to frames at the template's
fps
. A lower third holds for the whole time its speaker is on screen. Keep type and logos well inside the frame edges, since social players overlay their own UI top and bottom; check the platform's current safe-area spec rather than guessing a margin. Tracks composite in reverse order: Track 1 is on top, so type goes on the first track and plates below it.
标题的停留时间至少要足够朗读两遍,再按模板的
fps
将其换算为帧数。下三分之一字幕应在说话者出现在画面中的整个时段内保持显示。文字和 Logo 应远离画面边缘,因为社交平台播放器会在顶部和底部叠加自己的 UI;应查阅平台当前的安全区域规范,而不是凭经验猜测边距。轨道按反向顺序合成:Track 1 位于最上层,因此文字应放在第一条轨道,底板放在其下方轨道。

Worked example

实例

"A 4-second logo sting for our trailer, then a lower third naming the studio."
  1. The logo PNG and the brand font are on the user's machine: upload both with
    request_file_upload_url
    .
  2. list_base_models
    with
    filter.use_case: "image_to_video"
    ,
    filter.guidance_file_types: ["first_frame", "last_frame"]
    and
    filter.capabilities: {fixed_duration: true}
    . Take the first result;
    get_base_model
    for its durations.
  3. estimate_forge_price
    with a dark brand-colour plate as
    first_frame
    , the logo as
    last_frame
    ,
    duration_seconds: 4
    , and the prompt "embers drift inward and fuse into the emblem, a single light sweep across it in the last half second, camera locked". Above 20 CUs, ask first.
  4. execute_forge
    , poll
    get_forge_run
    , and step to the last frame of each output against the logo file. Reject any that changed the mark.
  5. Timeline at 30 fps: Track 1 holds a
    solid
    (8 frames) then a
    text
    item "Studio Name" in the brand font, joined by a
    slide
    transition
    direction: "from-left"
    ,
    easing: "spring"
    ,
    duration_in_frames: 12
    . Track 2 holds the sting video item.
  6. estimate_video_timeline_price
    with that template; then
    render_video_timeline
    with the same arguments and poll
    get_generation_run
    . Watch it end to end.
“为我们的预告片制作一个 4 秒的 Logo 品牌动画短片,然后添加一条显示工作室名称的下三分之一字幕。”
  1. Logo PNG 文件和品牌字体都在用户机器上:使用
    request_file_upload_url
    上传两者。
  2. 调用
    list_base_models
    ,设置
    filter.use_case: "image_to_video"
    、
    filter.guidance_file_types: ["first_frame", "last_frame"]
    和
    filter.capabilities: {fixed_duration: true}
    。取第一个结果,再调用
    get_base_model
    获取其时长。
  3. 调用
    estimate_forge_price
    ,将深色品牌色底板作为
    first_frame
    ,将 Logo 作为
    last_frame
    ,设置
    duration_seconds: 4
    ,并使用提示词“余烬向内飘移并融合成徽标,最后半秒有一次单次光线扫过,镜头锁定”。若价格超过 20 CUs,先询问用户。
  4. 调用
    execute_forge
    ,轮询
    get_forge_run
    ,并逐一查看每个输出的最后一帧,与 Logo 文件进行比对。拒绝任何改变 Logo 的结果。
  5. 时间线帧率为 30 fps:Track 1 先放置一个持续 8 帧的
    solid
    ,随后放置使用品牌字体的
    text
    条目“工作室名称”,二者通过
    slide
    转场连接,设置
    direction: "from-left"
    、
    easing: "spring"
    、
    duration_in_frames: 12
    。Track 2 放置品牌动画短片视频条目。
  6. 使用该模板调用
    estimate_video_timeline_price
    ;然后使用相同参数调用
    render_video_timeline
    ,并轮询
    get_generation_run
    。完整观看渲染结果。

Common mistakes

常见错误

  • Prompting the logo's name or letters into a video model instead of pinning the logo as
    last_frame
    .
  • Generating titles, lower thirds or CTA copy as video rather than setting them as text items.
  • Expecting a keyframe slide or scale on one timeline item; motion is transitions or stepped items.
  • A transition with only one item on the track, so there is nothing to transition from.
  • Overlapping items on one track instead of stacking them on separate tracks.
  • Titles cut before they can be read twice, or set outside the platform's safe area.
  • A logo loop with motion big enough to break the mark's silhouette.
  • 在视频模型的提示词中输入 Logo 的名称或字母,而不是将 Logo 固定为
    last_frame
    。
  • 将标题、下三分之一字幕或 CTA 文案生成为视频,而不是设置为文字条目。
  • 期望单个时间线条目支持关键帧滑移或缩放;运动应使用转场或分段条目。
  • 在轨道上只放置一个条目就设置转场,导致不存在转场来源。
  • 在同一条轨道上让条目相互重叠,而不是将它们堆叠到不同轨道上。
  • 标题在能够朗读两遍之前就被切掉,或被设置在平台安全区域之外。
  • Logo 待机循环的运动幅度过大,破坏了 Logo 的自身轮廓。