Communitygithub.com

ido6/ai-video-skills

在Blender中构建pawn风格的预览/遮黑场景(方箱躯干+球体头部角色,搭配纯色基本几何体集合),并将其作为AI视频(Seedance、idoGen、Kling)的动态/结构参考导出。

ai-video-skills 是什么?

该技能专为AI视频创作工作流设计,允许用户在Blender中快速搭建极简的“pawn”风格角色(由方箱躯干和球体头部组成,无四肢、面部或额外细节)及其纯色基本几何体环境。它支持两种视觉风格:“previs”(哑光粉彩,柔和工作室照明)和“toy”(饱和团队色,柔和阴影),满足不同参考需求。该技能可将场景导出为完整的AI视频参考包,包括MP4(动态与结构参考)、首帧和尾帧图像、关键帧截图及.blend文件。它同时提供后台批处理模式(无需打开Blender即可运行)和实时视口交互模式(适用于即时调整),并支持多种宽高比(16:9、9:16等)及5-10秒短视频。输出内容可直接用于Seedance、idoGen、Kling等平台,作为视频到视频、运动控制或多帧参考输入。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ido6/ai-video-skills/tree/HEAD/skills/blender-blockout-pawns

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Blender 遮黑 Pawn → AI 视频预览

此技能完成两项工作:

  • 在 Blender 中重现 Ido 的参考预览效果:纯 pawn 角色(方箱躯干加球体头部,无四肢、无面部、无多余细节)置于纯色基本几何体环境中。
  • 将每个场景导出为 AI 视频的参考包:MP4 文件、首帧和尾帧、关键帧截图以及 .blend 文件。

渲染使用 Workbench(视口风格),因此速度足够快,适合动画分镜。

设置(请根据你的机器调整路径)

  • Blender 5.2 位于 <BLENDER_EXE>。用户环境变量 BLENDER_PATH 指向该路径。
  • 工具包文件 位于 <BLOCKOUTS_DIR>\_kit\blockout_kit.py。其内容与下面的 KIT 部分相同。如果该文件缺失或过时,请将 KIT 部分的内容写回该路径。
  • 输出根目录 为 <BLOCKOUTS_DIR>\<SceneName>\。文件夹 <BLOCKOUTS_DIR> 必须已连接至会话。如果未连接,请使用 device_request_folder_access 请求访问权限。
  • 场景脚本 位于 <BLOCKOUTS_DIR>\_scripts\<SceneName>.py。

运行模式 — 默认使用 A 模式

A. 后台模式(已验证可行;Blender 无需打开)

  1. 将场景脚本写入容器。脚本应以以下内容开头:
    import math
    exec(open(r'<BLOCKOUTS_DIR>\_kit\blockout_kit.py', encoding='utf-8').read())
    
    然后添加构建调用,接着调用 r = export_for_ai() 或 render_still(),最后执行 print("RESULT", r)。
  2. 将脚本复制到 _scripts\<SceneName>.py。将其暂存至 /mnt/user-data/outputs/,然后使用 device_commit_files。
  3. 通过 PC 上的 Desktop Commander shell 运行: & '<BLENDER_EXE>' --background --factory-startup --python '<BLOCKOUTS_DIR>\_scripts\<SceneName>.py' 2>&1 | Select-String 'RESULT|Error|Traceback' 设置约 300 秒的超时时间。一个 5 秒、720p 的镜头渲染时间远低于 1 分钟。
  4. 使用 device_stage_files 拉回 preview.png 或 first.png/last.png,并使用 Read 查看。然后迭代调整。

Blender 连接器的 execute_blender_code_for_cli 会读取 BLENDER_PATH。此功能仅在设置该变量后重新启动 Claude 桌面应用后才有效。如果提示找不到可执行文件,请使用上述 shell 路径。

B. 实时模式(在已打开的 Blender 内部运行)(连接器的 execute_blender_code,需 MCP 插件服务器运行)。当 Ido 想在视口中观看或调整时使用此模式。

  • 在第一次调用中,运行 exec(open(r'<BLOCKOUTS_DIR>\_kit\blockout_kit.py', encoding='utf-8').read()),然后执行构建调用。
  • new_scene() 总是创建新场景,因此永远不会改动 Ido 自己的场景。
  • 如果后续调用引发 NameError,请再次运行 exec 行。

两种视觉效果

look="previs"(默认)look="toy"
感觉哑光粉彩色。每个物体颜色不同饱和团队色,如同棋盘游戏棋子
头部光滑球体,悬浮于躯干上方约 6 厘米处低多边形球体(16×10),放置于/略微沉入躯干
颜色头部颜色与躯干颜色不同头部和躯干共享一个团队色(white/black/red/blue/yellow/orange/green)
光照工作室灯光,无阴影,柔和世界空腔工作室灯光加柔和投射阴影,无空腔(空腔会在低多边形头部绘制网格线)
典型布景房间,深李子色天花板、床、桌子和门;雕塑基座上的模型大厅、圆形毛毡桌、椅子、栏杆;按角色着色的群体
曝光度+0.45+0.75

Pawn 躯干尺寸为 0.48 宽 × 0.40 深 米,标准高度(含头部)为 1.86 米。儿童约 1.2 米,巨人约 3 米。seated=True 可生成一个缩短至座椅高度的躯干,以便与 chair() 配合使用。Ido 的规则:保持 pawn 的纯粹性。 仅可变换颜色、height= 和 seated=True。切勿添加鼻子、四肢、帽子或附加道具。

当 Ido 未指定时,使用 previs。当他提到团队、赌场、游戏、人群或强烈颜色时,使用 toy。

构建一个镜头

  1. 调用 new_scene(name, look, aspect="16:9")。宽高比选项:16:9=1280×720、9:16=720×1280(Reels/TikTok)、1:1、4:5、21:9。与你正在制作的 AI 视频的宽高比保持一致。
  2. 使用 room() 构建布景,然后使用 block()、bed()、table()、chair() 和 cylinder() 添加家具。使用 10-40 个物体;这种风格需要很少的细节。使用 open_walls=(1,) 以便摄像机可以放置在房间内部。
  3. 使用 character() 添加 pawn。使用 move() 为它们制作动画,该函数会使它们平滑移动并在拐角处转向。规划绕过道具的路径,因为 pawn 会直接穿过家具。
  4. 使用 camera(loc, look_at, lens=20–28) 在视线高度 1.5-1.7 米处添加摄像机,略微偏离轴线,如同手持预览摄像机。两种其他构图:从高处 3/4 视角俯视模型,或越过两个 pawn 的肩膀视角。对于摄像机运动,在起始帧和结束帧对 cam.location 和 cam.rotation_euler 设置关键帧。保持运动简单(推近、平移、环绕),因为 AI 模型最擅长复制简单的运动。
  5. 设置时长。一个镜头通常为 5-10 秒:KIT["scene"].frame_end = 120(24 fps 下为 5 秒)。move() 已会自动延长 frame_end 以覆盖行走动作。
  6. 调用 render_still() 并审查。构图满意后,调用 export_for_ai()。
  7. 报告场景名称、输出文件夹以及首帧和尾帧。

来自参考视频的构图规则

  • 墙壁、地板和天花板各有其颜色。在 previs 中,天花板为非常深的李子色 (#3A3442),因此在画面顶部形成一条深色带。
  • 摄像机通常 位于 房间 内部。使用 open_walls 移除摄像机背后的墙壁。
  • 门是微微敞开的薄板。room() 的 door= 参数会切割出门洞并添加门板。
  • 杂物由扁平薄盒子构成,例如散落在桌子上的纸张或墙上的便利贴(随机粉彩色的 0.15 × 0.01 × 0.2 盒子)。
  • 人群:将 pawn 围绕桌子排列成圈,在柜台后排列成行,或成对作为守卫。在 toy 风格中,按角色着色。
  • 道具与 pawn 的比例保持一致,因此 pawn 的头部大致与门的上三分之一处齐平。

AI 视频交接

export_for_ai(every=24) 将以下文件写入 Videos\Blockouts\<Scene>\:

  • <Scene>.mp4 是运动和结构参考。用于视频到视频、运动控制,或 Seedance 或 idoGen 中的“参考视频”输入。
  • first.png 和 last.png 是构图输入。对于逼真工作,它们会提供图像模型以构建真实的起始/结束帧(参见下方的覆写规则);仅在草稿测试中直接使用。
  • keys/key_####.png 是每秒一张的静帧。用于全参考多帧输入(@Image1…)或故事板。
  • <Scene>.blend 是场景文件,保留以供后续编辑。

编写生成提示时,告诉模型 保留参考中的布局、遮挡和摄像机运动。然后描述最终效果:用真人替换 pawn,附上材质、光照和服装。将每个 pawn 颜色映射到一个角色,例如“粉红色身体的人物 = 穿红裙子的女人”。对于多帧 Seedance 提示,请交接给 seedance-25 技能。

逼真 AI 视频交接:剧照覆写规则(2026-10-06)

上述视觉效果适用于动画分镜。当片段是 用于逼真 Seedance 2.5 / idoGen 的控制片段 时,Ido 预览剧照中的以下规则具有最高优先级(完整详情:idogen-video-brain → references/previs-to-seedance-playbook.md;镜头选择:cinematography → references/camera-directing-playbook.md):

  • 中性灰色布景。 彩色墙壁/天花板会向生成区域渗入色调 [field]。仅在主要 pawn 和故事道具上保留纯色。
  • 每个代理角色须有两个可识别线索(颜色 + 高度/形状/位置);仅凭颜色映射不可靠 [field]。如果 pawn 颜色可能渗入服装,则将 pawn 着色为服装颜色 [unverified]。
  • 故事关键道具(瓶子、托盘、眼镜)使用其自身简单的基本几何体。
  • 真实比例,地面存在,不应移动的物体不动,无叠加(路径、操纵器、网格、帧计数器、文字)且无音轨。
  • 每个镜头一个主导摄像机运动,每个片段一个镜头。 仅保留慢速肩膀浮动;快速抖动通过文本请求或在编辑中添加。
  • 镜头选择属于摄影决策,而非固定的 20-28 毫米默认值:它被烘焙到片段中。对于 9:16,将传感器设置为 36.7 毫米(旋转的 ALEXA Mini LF 片门),使 Blender 毫米等于真实毫米。
  • 片段规格: 24 fps、输出宽高比、整秒时长、≥4 秒(Seedance 最低要求)、片段时长 = 生成时长,并在可用部分之后保留一段真实动画的尾部。
  • first.png 不是起始帧。 它是图像模型的构图输入,图像模型会结合样本来构建逼真的起始帧。仅用于草稿测试时直接使用。
  • 还需为每个摄像机方向导出空场景的静帧以及一张俯视图(布局平面图)。

KIT — blockout_kit.py 的内容

# ---- 遮挡工具包(每个会话粘贴一次,然后调用辅助函数) ----
import bpy, math, random, os, glob
from mathutils import Vector

OUT_ROOT = os.path.join(os.path.expanduser("~"), "Videos", "Blockouts")
ASPECTS = {"16:9": (1280, 720), "9:16": (720, 1280), "1:1": (1080, 1080), "4:5": (1080, 1350), "21:9": (1680, 720)}

PREVIS = ["#9C7393", "#8DB59A", "#88BDB0", "#C48DAA", "#ADB277", "#88A2B5",
          "#8E78AA", "#BFAE94", "#7FA393", "#B28AA1", "#A2C0AA", "#D6A9B8",
          "#B3A28A", "#7E5A70", "#9FA6C2"]
TOY = {"white": "#E8E8E2", "black": "#0B0C0E", "blue": "#1667A8", "yellow": "#C9A20E",
       "red": "#B0122E", "orange": "#C27A12", "green": "#2E6B4A", "felt": "#2A6A48",
       "cream": "#E6DDC4", "wood": "#5A3218", "brass": "#9C8240", "floor": "#E3D2B0",
       "wall_teal": "#4E7468", "wall_wine": "#5C3740", "wall_taupe": "#6B5E4C"}
KIT = {"look": "previs", "rng": random.Random(7), "col": None}

def _rgba(h):
    h = h.lstrip("#"); c = [int(h[i:i+2], 16) / 255 for i in (0, 2, 4)]
    lin = [x / 12.92 if x <= 0.04045 else ((x + 0.055) / 1.055) ** 2.4 for x in c]
    return (*lin, 1.0)

def _mat(hexcol, rough=0.85):
    name = "BK_" + hexcol.lstrip("#")
    m = bpy.data.materials.get(name)
    if m: return m
    m = bpy.data.materials.new(name); m.diffuse_color = _rgba(hexcol); m.roughness = rough
    m.use_nodes = True
    b = m.node_tree.nodes.get("Principled BSDF")
    if b: b.inputs["Base Color"].default_value = _rgba(hexcol); b.inputs["Roughness"].default_value = rough
    return m

def _pick(color):
    if color is None:
        return KIT["rng"].choice(PREVIS) if KIT["look"] == "previs" else TOY["cream"]
    return TOY.get(color, color)

def _link(ob):
    for c in ob.users_collection: c.objects.unlink(ob)
    KIT["col"].objects.link(ob); return ob

def new_scene(name="Blockout", look="previs", seed=7, fps=24, aspect="16:9", res=None):
    """look: 'previs' (video 1-2: Workbench, muted random pastels, no cast shadows)
             'toy'    (video 3: saturated team colours, soft shadows, low-poly heads)"""
    KIT["look"] = look; KIT["rng"] = random.Random(seed)
    sc = bpy.data.scenes.new(name); KIT["scene"] = sc
    if bpy.context.window: bpy.context.window.scene = sc
    col = bpy.data.collections.new(name + "_SET"); sc.collection.children.link(col); KIT["col"] = col
    sc.render.fps = fps; sc.render.resolution_x, sc.render.resolution_y = res or ASPECTS[aspect]
    sc.render.resolution_percentage = 100; sc.frame_start = 1; sc.frame_end = 1
    sc.render.engine = "BLENDER_WORKBENCH"
    sh = sc.display.shading
    sh.light = "STUDIO"; sh.show_specular_highlight = False
    if look == "previs":
        sh.color_type = "MATERIAL"          # palette is baked into materials (stable across renders)
        sh.show_shadows = False; sh.show_cavity = True
        sh.cavity_type = "WORLD"; sh.cavity_ridge_factor = 0.3; sh.cavity_valley_factor = 0.6
        sh.show_object_outline = False
    else:
        sh.color_type = "MATERIAL"; sh.show_shadows = True; sh.shadow_intensity = 0.35
        sc.display.shadow_focus = 0.6; sc.display.light_direction = (0.35, -0.45, 0.82)
        sh.show_cavity = False             # cavity draws grid lines on the faceted heads
    sc.view_settings.view_transform = "Standard"
    sc.view_settings.exposure = 0.45 if look == "previs" else 0.75   # matched to reference frame brightness
    return sc

def block(name, size, loc, color=None, rot_z=0.0, bevel=0.0):
    """Axis-aligned box. size=(x,y,z) in metres, loc = centre of the BOTTOM face."""
    bpy.ops.mesh.primitive_cube_add(size=1, location=(loc[0], loc[1], loc[2] + size[2] / 2))
    ob = bpy.context.active_object; ob.name = name; ob.scale = size; ob.rotation_euler.z = rot_z
    bpy.ops.object.transform_apply(scale=True)
    if bevel:
        m = ob.modifiers.new("Bevel", "BEVEL"); m.width = bevel; m.segments = 3
        bpy.ops.object.shade_auto_smooth(angle=math.radians(35))
    ob.data.materials.append(_mat(_pick(color))); return _link(ob)

def cylinder(name, r, h, loc, color=None, verts=32):
    bpy.ops.mesh.primitive_cylinder_add(radius=r, depth=h, vertices=verts, location=(loc[0], loc[1], loc[2] + h / 2))
    ob = bpy.context.active_object; ob.name = name; ob.data.materials.append(_mat(_pick(color))); return _link(ob)

def room(name="Room", w=6, d=5, h=2.8, t=0.1, ceiling=True, door=None, floor_color=None, wall_colors=None, open_walls=()):
    """Each wall is its own object so every wall gets its own colour.
    door=(wall_index 0..3, offset_along_wall, width, height) cuts an opening by splitting that wall."""
    fc = floor_color or ("#8EBFAE" if KIT["look"] == "previs" else TOY["floor"])
    block(name + "_floor", (w, d, t), (0, 0, -t), fc)
    if ceiling: block(name + "_ceiling", (w, d, t), (0, 0, h), "#3A3442" if KIT["look"] == "previs" else "#5A5650")
    specs = [((w, t), (0, d / 2)), ((w, t), (0, -d / 2)), ((t, d), (w / 2, 0)), ((t, d), (-w / 2, 0))]
    for i, ((sx, sy), (x, y)) in enumerate(specs):
        if i in open_walls: continue   # 0=+Y back, 1=-Y front, 2=+X right, 3=-X
        …

[后续代码被截断以用于翻译]

Individual skills in this repo

This repo contains 3 individual skills — each has its own dedicated page.

ido6/ai-video-skills

Design cinematic image and video prompts for genmedia. Use this for shot language, camera movement, lighting, lens choices, color grade, film texture, scene blocking, and production-ready visual direction.

ido6/ai-video-skills

Elite cinematic-video-prompt discipline for idoGen (mcp__idogen__generate_video, WaveSpeed/fal/poyo Seedance 2.0 and 2.5, Veo 3.1, Kling 3.0). Adapted from a production studio's CINEDANCE prompt-director system, folded together with GenHQ classroom technique (camera-movement library, Seedance 2.0-vs-2.5 dialect split, Kling 3.0 burger + @tag binding, Omni Flash video-to-video lock/preserve-list, storyboard mode, UGC/organic mode). Use this WHENEVER writing or fixing a prompt for mcp__idogen__generate_video, or when the user wants a cinematic/consistent/high-budget-looking video shot, camera control, a specific lens feel, spatial blocking across multiple shots, a scene that must match a previous shot's geography/lighting/character, a named camera move, a Kling multi-shot sequence, an edit of existing footage (Omni-style), or an organic/UGC/phone-shot look. Trigger even without the word "CINEDANCE" — any idoGen video-prompt build or repair task qualifies. Companion skills: idogen-image-brain (references/plat...

ido6/ai-video-skills

Generate Seedance 2.5 prompts for **multishot omni reference mode** — sequences where multiple reference images (@Image1, @Image2, etc.), and optionally videos and audio, are assigned across different shots. Use this skill when the user says "multishot", "omni reference", "omniref", uploads multiple references for a shot sequence, or asks for a multishot Seedance prompt. Do NOT use for single-shot, first+last frame, or generic Seedance prompts — those are separate skills. If the user just says "Seedance prompt" without indicating multishot, ask first.

相关技能