Skip to content

How to export camera animation to video or image sequence? #191

Answered by Tom94
NcMasters asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there, I think this answer will help you: #31

Pasted from there

The Python bindings allow this. Here's a relevant excerpt from our internal scripts. (We're working on pushing more of them public in the future.)

def render_video(resolution, numframes, spp, fps, exposure=0):
	for i in tqdm(list(range(min(numframes, last_frame+1))), unit="frames", desc=f"Rendering"):
		testbed.camera_smoothing = i > 0
		frame = testbed.render(resolution[0], resolution[1], spp, True, float(i)/numframes, float(i + 1)/numframes, fps, shutter_fraction=0.5)
		common.write_image(f"{i:04d}.jpg", np.clip(frame * 2**exposure, 0.0, 1.0), quality=100)

testbed.load_camera_path(<path to camera_path.json>)

n_seconds …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@NcMasters
Comment options

@bycloudai
Comment options

@DuckyBlender
Comment options

@thoi86
Comment options

Answer selected by Tom94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #177 on February 20, 2022 07:36.