我有一个包含超人类的序列文件,其中的动画已准备就绪。如何使用 python 将此序列呈现为 mp4 文件?如果我可以使用命令,是否有任何命令或流程?请给出如何解决的示例。
我在网络上找不到任何可用的东西。
谢谢!
以下是使用 Python 将虚幻引擎 5.2 序列渲染为 MP4 文件的潜在解决方案:
import unreal_engine as ue
import os
my_sequence = ue.load_asset("/Game/MySequence")
settings = ue.MovieSceneCaptureSettings()
settings.set_resolution(1920, 1080)
settings.set_frame_rate(30)
output_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "MySequence.mp4")
capture = ue.MovieSceneCapture()
capture.open_output(output_path)
capture.capture_settings = settings
capture.begin_capture()
my_sequence.play()
capture.end_capture()
capture.close_output()
请记住,这只是一种潜在的解决方案,可能还有其他方法可以做到这一点。我希望这可以帮助你!如果您还有其他问题,请告诉我。
如何安装unreal_engine模块?我在网上找不到任何东西,也不想冒险只做 pip install unreal_engine。
谢谢