mcpField
M
motion-graphics

motion-graphics

github.com/rohitg00创意与媒体30971 次安装39 周前更新
代码仓库

关于 motion-graphics

用于制作标题、片头等动画内容的动态图形技能,提供设计原则、时序与缓动参考、配色方案,以及基于 Manim 的模板。

主要功能

  1. 01动态图形设计原则与基础
  2. 02动效文字与时序规则
  3. 03可复用的 Manim 动画模板
  4. 04缓动函数参考
  5. 05配色方案示例

适用场景

  1. 01制作动画标题序列和片头
  2. 02逐词制作文字动画
  3. 03构建 Logo 揭示和故障效果
  4. 04设计带缓动与运动效果的计数器

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/rohitg00/manim-video-generator --skill motion-graphics

安装后在 Claude Code 中输入/motion-graphics确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

presets/
animation-presets.py
color-palettes.py
thumbnail-presets.py
rules/
audio-sync.md
brand-consistency.md
community-edition-patterns.md
kinetic-typography.md
opengl-renderer-patterns.md
timing-and-easing.md
visual-hierarchy.md
web-export.md

详细介绍

动态图形技能

动态图形技能可创建视觉效果出众、注重美感的动画,非常适合标题、片头和吸引眼球的内容。

设计原则

动态图形的 4 个 S
  • 风格(Style):始终保持一致的视觉语言
  • 惊喜(Surprise):带来愉悦感的意外动作
  • 流畅(Smoothness):流畅的过渡和缓动
  • 简洁(Simplicity):设计清爽,不堆砌视觉元素
动态设计基础
  • 预备动作(Anticipation):主要动作前的小幅移动
  • 跟随动作(Follow-through):元素停止后继续移动
  • 过冲(Overshoot):越过目标位置,再回到合适的位置
  • 挤压与拉伸(Squash & Stretch):强调重量感和冲击力

规则

rules/kinetic-typography.md

创建富有感染力、能够传达情绪的文字动画。

rules/timing-and-easing.md

专业的缓动曲线和时序模式。

rules/visual-hierarchy.md

通过尺寸、颜色和动作引导注意力。

rules/brand-consistency.md

在动画中保持风格一致。

模板

动态排版——逐字呈现
from manim import *

class KineticTypography(Scene):
    def construct(self):
        self.camera.background_color = "#1a1a2e"

        words = ["The", "Future", "Is", "NOW"]
        colors = [WHITE, BLUE, WHITE, YELLOW]

        for word, color in zip(words, colors):
            text = Text(word, font_size=96, color=color, weight=BOLD)

            # Dramatic entrance
            text.scale(0)
            self.add(text)
            self.play(
                text.animate.scale(1),
                rate_func=rate_functions.ease_out_back,
                run_time=0.4
            )
            self.wait(0.3)

            # Exit with style
            self.play(
                text.animate.shift(UP * 2).set_opacity(0),
                rate_func=rate_functions.ease_in_cubic,
                run_time=0.3
            )
            self.remove(text)

        # Final combination
        final = Text("THE FUTURE IS NOW", font_size=48, color=GOLD)
        self.play(Write(final), run_time=1)
        self.play(Indicate(final, scale_factor=1.1, color=WHITE))
Logo 揭示——粒子组装
from manim import *
import random

class LogoReveal(Scene):
    def construct(self):
        self.camera.background_color = "#0a0a0a"

        # Create logo text
        logo = Text("BRAND", font_size=120, color=WHITE, weight=BOLD)

        # Create particles that will form the logo
        particles = VGroup()
        for _ in range(100):
            dot = Dot(
                point=[random.uniform(-7, 7), random.uniform(-4, 4), 0],
                radius=0.05,
                color=random_color()
            )
            particles.add(dot)

        self.add(particles)

        # Swirl particles
        self.play(
            *[Rotating(p, radians=PI * 2, about_point=ORIGIN)
              for p in particles],
            run_time=1.5,
            rate_func=rate_functions.ease_in_out_sine
        )

        # Converge to logo position
        self.play(
            FadeOut(particles),
            FadeIn(logo, scale=0.5),
            run_time=0.8
        )

        # Glow effect
        glow = logo.copy().set_color(BLUE).set_opacity(0.5)
        self.play(
            glow.animate.scale(1.2).set_opacity(0),
            run_time=0.5
        )
        self.remove(glow)

        self.wait()
标题序列——滑入并堆叠
from manim import *

class TitleSequence(Scene):
    def construct(self):
        self.camera.background_color = "#16213e"

        # Main title
        title = Text("EPISODE ONE", font_size=72, color=WHITE)
        subtitle = Text("The Beginning", font_size=36, color=BLUE_C)

        # Slide in from sides
        title.shift(LEFT * 10)
        subtitle.shift(RIGHT * 10)

        self.add(title, subtitle)

        self.play(
            title.animate.move_to(UP * 0.5),
            subtitle.animate.move_to(DOWN * 0.5),
            run_time=0.8,
            rate_func=rate_functions.ease_out_cubic
        )

        # Add decorative lines
        line_left = Line(LEFT * 3, LEFT * 0.5, color=GOLD, stroke_width=2)
        line_right = Line(RIGHT * 0.5, RIGHT * 3, color=GOLD, stroke_width=2)

        lines = VGroup(line_left, line_right).next_to(title, UP, buff=0.3)

        self.play(
            Create(line_left),
            Create(line_right),
            run_time=0.5
        )

        # Fade all together
        self.wait(2)
        self.play(
            FadeOut(VGroup(title, subtitle, lines), shift=UP),
            run_time=0.6
        )
文字故障效果
from manim import *

class GlitchText(Scene):
    def construct(self):
        self.camera.background_color = "#000000"

        text = Text("GLITCH", font_size=96, color=WHITE, weight=BOLD)

        # Create glitch copies
        red_copy = text.copy().set_color(RED).shift(LEFT * 0.05 + UP * 0.02)
        blue_copy = text.copy().set_color(BLUE).shift(RIGHT * 0.05 + DOWN * 0.02)

        self.add(red_copy, blue_copy, text)

        # Glitch animation
        for _ in range(5):
            # Random offset
            self.play(
                red_copy.animate.shift(RIGHT * 0.1),
                blue_copy.animate.shift(LEFT * 0.1),
                run_time=0.05
            )
            self.play(
                red_copy.animate.shift(LEFT * 0.1),
                blue_copy.animate.shift(RIGHT * 0.1),
                run_time=0.05
            )

        # Settle
        self.play(
            red_copy.animate.move_to(text.get_center()),
            blue_copy.animate.move_to(text.get_center()),
            run_time=0.2
        )

        self.remove(red_copy, blue_copy)
        self.wait()
计数器动画
from manim import *

class CounterAnimation(Scene):
    def construct(self):
        self.camera.background_color = "#1a1a2e"

        # Value tracker
        counter = ValueTracker(0)

        # Dynamic text
        number = always_redraw(lambda: Text(
            f"{int(counter.get_value()):,}",
            font_size=120,
            color=WHITE,
            weight=BOLD
        ))

        label = Text("SUBSCRIBERS", font_size=32, color=BLUE_C)
        label.next_to(number, DOWN, buff=0.5)

        self.add(number, label)

        # Animate count
        self.play(
            counter.animate.set_value(1000000),
            run_time=3,
            rate_func=rate_functions.ease_out_cubic
        )

        # Celebration effect
        self.play(
            Indicate(number, scale_factor=1.2, color=GOLD),
            run_time=0.5
        )

缓动函数参考

效果速率函数使用场景
平滑smooth通用场景
戏剧性入场ease_out_back弹出效果
柔和退场ease_in_cubic淡出
弹跳ease_out_bounce活泼的动作
干脆ease_out_expo快速且有冲击力
自然ease_in_out_sine自然流畅的移动
线性linear匀速移动

配色方案

霓虹赛博朋克
NEON_PINK = "#ff00ff"
NEON_BLUE = "#00ffff"
NEON_GREEN = "#00ff00"
DARK_BG = "#0a0a0a"
专业商务
CORP_BLUE = "#0066cc"
CORP_GRAY = "#333333"
CORP_WHITE = "#ffffff"
CORP_ACCENT = "#ff6600"
极简现代
MIN_BLACK = "#1a1a1a"
MIN_WHITE = "#f5f5f5"
MIN_GRAY = "#888888"
MIN_ACCENT = "#3366ff"

最佳实践

  1. 少即是多——克制能让关键时刻更有冲击力
  2. 时序决定一切——时序不当会毁掉出色的动画
  3. 一致性建立信任——始终保持相同的风格
  4. 声音设计很重要——设计时要考虑音频
  5. 在目标平台上测试——不同设备,体验各异

评论

支持 Markdown