网站系统下载,西安网络建设公司,金华网站制作案例,简历表格 个人简历手机版项目效果演示 项目描述 很多小朋友在学习绘画的过程中#xff0c;创作出来很多比较有创意的作品#xff0c;那么怎么让这些作品#xff0c;动起来#xff0c;甚至是和拍摄的视频进行互动呢#xff0c;今天分享的这个项目#xff0c;能够完美解决这个问题。 项目地址http:…项目效果演示 项目描述
很多小朋友在学习绘画的过程中创作出来很多比较有创意的作品那么怎么让这些作品动起来甚至是和拍摄的视频进行互动呢今天分享的这个项目能够完美解决这个问题。 项目地址http: //www.fairanimateddrawings.comgithub:https://github.com/facebookresearch/AnimatedDrawings
安装环境该项目已在 macOS Ventura 13.2.1 和 Ubuntu 18.04 上进行了测试。如果您在其他操作系统上安装则可能会遇到问题。我们强烈建议在安装 Animated Drawings 之前激活 Python 虚拟环境。Conda 的 Miniconda 是一个不错的选择。
安装步骤 # create and activate the virtual environment conda create --name animated_drawings python3.8.13 conda activate animated_drawings # clone AnimatedDrawings and use pip to install git clone https://github.com/facebookresearch/AnimatedDrawings.git cd AnimatedDrawings pip install -e .现在一切都已设置完毕让我们为一些绘图制作动画吧首先请按照下列步骤操作打开终端并激活animated_drawings conda环境~ % conda activate animated_drawings确保您位于 AnimatedDrawings 的根目录中(animated_drawings) ~ % cd {location of AnimatedDrawings on your computer}启动Python解释器(animated_drawings) AnimatedDrawings % python将以下两行复制并粘贴到解释器中from animated_drawings import renderrender.start(./examples/config/mvc/interactive_window_example.yaml)如果一切都安装正确屏幕上应该会出现一个交互式窗口。使用空格键暂停/取消暂停场景使用箭头键及时前后移动使用 q 关闭屏幕。 这里的幕后发生了很多事情。角色、动作、场景等都由配置文件控制例如interactive_window_example.yaml. 下面我们展示如何通过改变配置文件来实现不同的效果。您可以在此处了解有关配置文件的更多信息。
导出 MP4 视频假设您想将动画保存为视频文件而不是直接在窗口中查看。通过将这些行复制到 Python 解释器中来指定不同的示例配置from animated_drawings import renderrender.start(./examples/config/mvc/export_mp4_example.yaml)动画不是保存在交互式窗口中而是保存到文件 video.mp4 中该文件位于与脚本相同的目录中。
导出透明.gif
也许您想要透明的 .gif 而不是 .mp4在 Python 解释器中复制这些行from animated_drawings import renderrender.start(./examples/config/mvc/export_gif_example.yaml)
无头渲染如果您想无头生成视频例如在通过 ssh 访问的远程服务器上则需要USE_MESA: True在view配置文件的 部分中指定。 view: USE_MESA: True将多个角色添加到场景中 通过在配置场景的“ANIMATED_CHARACTERS”列表中指定多个条目可以将多个角色添加到视频中。要亲自查看请从 AnimatedDrawings 根目录中的 Python 解释器运行以下命令from animated_drawings import renderrender.start(./examples/config/mvc/multiple_characters_example.yaml)添加背景图片假设您想向动画添加背景。您可以通过在配置中指定图像路径来完成此操作。从 AnimatedDrawings 根目录中的 Python 解释器运行以下命令 from animated_drawings import renderrender.start(./examples/config/mvc/background_example.yaml)感兴趣的小伙伴们抓紧行动起来吧。