Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code for final rendering #27

Open
kam1107 opened this issue Apr 19, 2021 · 1 comment
Open

code for final rendering #27

kam1107 opened this issue Apr 19, 2021 · 1 comment

Comments

@kam1107
Copy link

kam1107 commented Apr 19, 2021

Hi,
Can you also provide the code for rendering the final video? Many thanks :)

@Kai-46
Copy link
Owner

Kai-46 commented Jun 23, 2021

Once you render the camera path, you can use the following script to create a video.

import imageio
import os

render_dir = '/path/to/rendered/camera/path'

frames = []
fps = 10

for item in sorted(os.listdir(render_dir)):
    if item.endswith('.png'):
        im = imageio.imread(os.path.join(render_dir, item))
        frames.append(im)

# rewind
frames = frames + frames[::-1]

imageio.mimwrite(render_dir + '.mp4', frames, fps=fps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants