Communitygithub.com

aminghaseminia/manim-animation

Manim Community로 수학, 과학, 기술 애니메이션 제작 — 방정식, 증명, 그래프, 좌표계, 기하학, 알고리즘, 자료구조, 정밀한 다이어그램 변환. 수학적 관계의 정확성이 핵심일 때, 교육용 설명 영상, 연구 또는 컨퍼런스 시각 자료, 모든 요소가 정확히 배치되어야 하는 애니메이션 유도 과정에 적합합니다. uv를 사용한 설치, 씬 디자인, LaTeX/MathTex, 카메라 및 3D 씬, 렌더링 품질 프리셋, 다른 도구와의 합성을 다룹니다.

manim-animation란 무엇인가요?

이 스킬은 수학, 과학 및 기술 애니메이션을 제작하기 위한 Python 엔진인 Manim Community를 사용하는 방법을 상세히 안내합니다. Manim의 가장 큰 장점은 정확성입니다. 디자인 도구에서의 근사치가 아닌 수학적으로 정의된 객체로 공식, 그래프, 구조물을 애니메이션화합니다. 주요 사용 사례로는 방정식 증명, 좌표계 및 기하학적 구조, 알고리즘 시각화, 정밀한 라벨링이 필요한 다이어그램 등이 있습니다. 이 스킬은 `uv`를 사용한 격리된 환경 설치, 씬 디자인 규칙, `-ql`(저화질)부터 `-qk`(4K)까지의 렌더링 품질 프리셋 사용법, LaTeX/MathTex를 이용한 수식 표현, 카메라 움직임 제어, 그리고 Remotion이나 Blender와 같은 다른 도구와의 합성 방법을 다룹니다. 또한 일반적인 오류(예: LaTeX 누락, 네이티브 라이브러리 부재)에 대한 문제 해결 가이드와 최종 렌더링 검증 단계를 제공하여, 교육용 영상, 연구 프레젠테이션, 컨퍼런스 자료 제작 시 수학적 정확성을 보장합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/aminghaseminia/blender-animation-skill/tree/HEAD/skills/manim-animation

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Manim 애니메이션 — 수학 및 기술 비디오

Manim은 설명적인 시각 자료를 위한 Python 애니메이션 엔진입니다. 그 강점은 정확성입니다. 공식, 그래프, 또는 구조물을 디자인 도구에서의 근사치가 아닌 수학적으로 정의된 객체로 애니메이션화할 수 있습니다.

패턴과 코드는 references/MANIM-PLAYBOOK.md를 읽어보세요. 설치된 버전에 맞게 플래그를 확인하세요: https://docs.manim.community/en/stable/

1. Manim을 선택해야 하는 경우

다음과 같은 경우 Manim을 선택하세요:

  • 방정식, 기호 또는 증명이 주제인 경우.
  • 좌표계, 그래프, 벡터 또는 기하학적 구조가 정확해야 하는 경우.
  • 알고리즘, 자료구조 또는 프로세스를 단계별 시각적으로 설명해야 하는 경우.
  • 라벨이 수학적 객체에 정렬되어야 하며, 수동으로 배치된 프레임 위치가 아닌 경우.
  • 스타일이 절제되고 도식적이어야 하며, 영화적이지 않아야 하는 경우.

Manim을 선택하지 말아야 하는 경우: 영화적 3D, 브랜드 중심의 프로모션 비디오, 모션 그래픽 타이포그래피, 또는 인터랙티브 결과물. 이러한 작업은 Blender, Remotion 또는 웹 그래픽에 적합합니다.

2. 설치 (격리되고 재현 가능하게)

uv --version                     # uv가 없으면 먼저 설치
uv init --python 3.12 manim-project
cd manim-project
uv add manim
uv run manim --version

Linux는 종종 네이티브 라이브러리가 필요합니다:

sudo apt update
sudo apt install build-essential python3-dev pkg-config libcairo2-dev libpango1.0-dev ffmpeg
sudo apt install texlive texlive-latex-extra texlive-fonts-recommended   # MathTex/Tex 용

macOS: brew install cairo pango pkg-config ffmpeg 및 MathTex를 사용하는 경우 MacTeX과 같은 TeX 배포판. Windows: FFmpeg 및 MiKTeX/TeX Live 설치; Cairo/Pango 휠에 Microsoft C++ Build Tools가 필요할 수 있습니다.

확인:

uv run manim --version
uv run python -c "import manim; print(manim.__version__)"

프로젝트 환경을 사용할 수 있다면 Manim을 시스템 Python에 설치하지 마세요. 버전을 프로젝트 README에 기록하세요.

3. 렌더링 명령어

# 저화질 미리보기 (빠름)
uv run manim -pql scenes/explain.py ExplainScene

# 중간 화질
uv run manim -qm scenes/explain.py ExplainScene

# 고화질 / 프로덕션
uv run manim -qh scenes/explain.py ExplainScene

# 4K
uv run manim -qk scenes/explain.py ExplainScene

# 투명 배경
uv run manim -qh -t scenes/explain.py ExplainScene

# 특정 섹션
uv run manim -qh scenes/explain.py ExplainScene -n 12,20

품질 프리셋: -ql 480p15, -qm 720p30, -qh 1080p60, -qk 2160p60. 설치된 버전에서 확인하세요. 출력은 media/videos/<file>/<quality>/에 저장됩니다.

ffprobe -v error -show_entries stream=width,height,r_frame_rate,duration \
  -of json media/videos/explain/1080p60/ExplainScene.mp4

4. 씬 디자인 규칙

  • 씬 당 하나의 아이디어. Scene 서브클래스로 나누고, 하나의 거대한 씬 대신 연결을 통해 긴 비디오를 구성하세요.
  • 팔레트와 폰트는 한 번만 모듈(theme.py)에서 설정하고 가져와서 사용하며, 16진수 값을 반복하지 마세요.
  • 카메라를 절제하세요. Manim의 MovingCameraScene은 강력하고 남용하기 쉽습니다; 시청자가 달리 볼 수 없는 구조를 드러내기 위해서만 줌을 사용하세요.
  • 지속 시간을 존중하세요. 3분에 잘 읽히는 공식 유도는 40초에 서둘러 진행하면 어색하게 느껴집니다. 머무는 시간은 직관이 아닌 읽기 속도로 계산하세요.
  • 라벨을 설명하는 객체에 연결(Tex + next_to)하여, 이후 레이아웃 변경이 정렬을 조용히 깨뜨리지 않도록 하세요.
  • **의미 전달에는 Transform/ReplacementTransform**을, 존재감 전달에는 FadeIn/FadeOut을 사용하세요. 관련 없는 모양을 변형하면 시청자를 혼란스럽게 합니다.
  • 모든 요소를 독립적으로 애니메이션화하지 마세요. VGroup으로 그룹화하고 의도적으로 간격을 두세요.

5. 구성 레시피

from manim import *

class ExplainScene(Scene):
    def construct(self):
        title = Text("왜 도함수가 극한인가", font="Inter").scale(0.7)
        self.play(Write(title), run_time=1.2)
        self.wait(0.6)
        self.play(title.animate.to_edge(UP).scale(0.8), run_time=0.9)

        formula = MathTex(r"f'(x) = \lim_{h \to 0} \frac{f(x+h)-f(x)}{h}")
        formula.scale(1.2)
        self.play(Write(formula), run_time=1.6)
        self.wait(1.2)

        self.play(formula.animate.set_color_by_tex(r"h \to 0", YELLOW), run_time=0.8)
        self.wait(1.5)

6. 내보내기 및 인계

  • -qh는 높은 비트레이트의 1080p60을 생성합니다; 중간 파일을 그대로 사용하지 말고 전달용으로 다시 인코딩하세요.
  • 투명도: -t는 알파 채널이 있는 .mov(또는 --format=png를 사용한 PNG 시퀀스)를 작성합니다. 합성하기 전에 체커보드 위에서 알파를 확인하세요.
  • Manim을 Remotion/Blender와 결합하려면: FPS와 해상도를 일치시킨 다음 FFmpeg 또는 Remotion에서 조립하세요. Manim은 -qh에서 기본적으로 60FPS로 설정됩니다; config.frame_rate를 변경하거나 의도적으로 변환하세요.
  • 브랜드 인트로/아웃트로 및 자막의 경우, Manim 씬을 깔끔하게 렌더링하고 Remotion에서 합성하세요 — 브랜드 레이아웃을 위해 Manim의 타이포그래피 시스템과 싸우지 마세요.

7. 검증

  • 고화질 렌더링 전에 저화질 렌더링을 시청하세요; 수학 오류는 480p에서도 보입니다.
  • 어떤 공식도 프레임 가장자리에서 잘리지 않고 어떤 라벨도 다른 라벨과 겹치지 않는지 확인하세요.
  • LaTeX이 자동 대체 없이 컴파일되었는지 확인하세요(콘솔에서 빨간색 텍스트 경고를 찾으세요).
  • ffprobe로 최종 지속 시간과 프레임 속도를 확인하세요.
  • 의도한 수학에 맞게 모든 기호를 소리 내어 읽어보세요; 부호가 반대이면 스타일 선택이 아니라 정확성 버그입니다.

8. 일반적인 오류

증상원인해결책
latex: command not foundTeX 배포판 없음TeX Live/MiKTeX 설치, 또는 MathTex 대신 Text 사용
Cairo/Pango 빌드 오류네이티브 라이브러리 누락위에 나열된 개발 패키지 설치
공식이 빨간색 오류 텍스트로 렌더링됨LaTeX 구문 또는 패키지 누락콘솔 확인; TexTemplate 패키지 추가
모든 것이 흐릿해 보임낮은 품질 프리셋최종본은 -qh/-qk로 렌더링
그리스어/아랍어 텍스트 깨짐폰트에 글리프 또는 쉐이핑 부족쉐이핑 가능 폰트 사용, 스틸 이미지 테스트, 또는 텍스트 래스터화
렌더링 매우 느림60FPS + 4K + 복잡한 패스-ql로 미리보기, 패스 단순화, 씬 분할
투명도 손실잘못된 형식-t와 알파 지원 컨테이너 사용; 확인

9. 공식 참고 자료

Individual skills in this repo

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

aminghaseminia/blender-animation

Build 3D animations in Blender headlessly with Python (bpy) — scene setup, materials, lighting, camera rigs, keyframe and procedural animation, Geometry Nodes, particles and simulations, EEVEE/Cycles rendering, and MP4/PNG-sequence output. Triggers include "animate in Blender", "blender python", "bpy script", "3D logo animation", "cinematic render", "particle animation", "product turntable", "render an .blend", "blender headless", or any 3D scene, camera move, or motion graphics job that needs real geometry, light, and depth.

aminghaseminia/motion-design

Art direction and motion-design craft for animation projects — creative briefs, storyboards, style frames, colour and type systems, composition, timing and easing, transition vocabulary, sound direction, accessibility, and right-to-left (Persian/Arabic) typography. Use before building scenes, when a video looks amateur or generic, when choosing palette and fonts, when a request says "make it feel premium/cinematic/modern", or when text, rhythm, or hierarchy is not landing. Tool-agnostic; pairs with blender-animation, remotion-motion-graphics, and manim-animation.

aminghaseminia/motion-studio

End-to-end animation and motion-graphics production from a natural-language brief. Routes work to Blender (3D), Remotion (2D/typography/data), Manim (math/science), motion-design craft, and FFmpeg (encode/composite/validate), then builds, previews, inspects, revises, and delivers an editable project plus final MP4. Use for any request to "make an animation", "create a video", "animate this logo", "render a motion graphic", "vibe-code an animation", or produce a promo, explainer, title sequence, or social clip.

aminghaseminia/remotion-motion-graphics

Create 2D motion graphics as code with Remotion and React — kinetic typography, logo reveals, explainers, animated charts, UI demos, social clips, subtitles, and data-driven or batch-rendered video. Use when the deliverable is primarily layout, text, and 2D graphics rather than real 3D; when a video must be generated from data or a template; or when a Blender 3D pass needs titles, captions, and transitions composited on top. Covers project setup, deterministic frame-based animation, easing, typography, audio, rendering, and licensing.

aminghaseminia/video-composition

Assemble, mix, normalize, and validate finished video from Blender, Remotion, Manim, screen capture, and audio sources using FFmpeg and FFprobe — concatenation, overlays, alpha compositing, subtitle burn-in, loudness, fades, speed ramps, GIF/thumbnail export, and platform-specific encodes. Use when combining scenes, fixing mismatched resolutions or frame rates, adding music/voice-over, burning captions, converting formats, or verifying that a rendered file is actually correct.

관련 스킬