-
Notifications
You must be signed in to change notification settings - Fork 65
Generating Videos
Joy Alice Gu edited this page Apr 28, 2020
·
2 revisions
Once you've rendered all the frames of your video, you can combine them into a video by using:
ffmpeg -r 60 -f image2 -s 800x600 -i ./Video_[TIME]_%4d.png -vcodec libx264 out.mp4
Where [TIME]
should be replaced by the timestamp in each frame's filename (they should all be identical). If you don't have ffmpeg installed on your system, you can get it through most package managers, or you can download it directly, or use your own video creation program
Courtesy of former TA Zach Pomper in Spring 2019:
Hey guys, if you're interested in raytracing your animations, you can try adding this line to your
application.cpp
. Note that this feature hasn't been tested extensively, and will therefore not be going on github in the immediate future, so use at your own peril.
void Application::raytrace_video() {
static string videoPrefix;
if (action == Action::Raytrace_Video) {
if (pathtracer->is_done()) {
char num[32];
sprintf(num, "%04d", timeline.getCurrentFrame());
pathtracer->save_image(videoPrefix + num + string(".png"));
timeline.step();
if (timeline.getCurrentFrame() == timeline.getMaxFrame()) {
timeline.action_stop();
timeline.action_rewind();
cout << "Done rendering video!" << endl;
action = Action::Object;
return;
}
pathtracer->stop();
pathtracer->clear();
set_up_pathtracer();
pathtracer->start_raytracing();
scene->render_splines_at(timeline.getCurrentFrame(), // <- Added
timeline.isCurrentlyPlaying(), useCapsuleRadius); // <- Added
}
} else {
- Task 1: Camera Rays
- Task 2: Intersecting Primitives
- Task 3: BVH
- Task 4: Shadow Rays
- Task 5: Path Tracing
- Task 6: Materials
- Task 7: Environment Light
Notes:
- Task 1: Spline Interpolation
- Task 2: Skeleton Kinematics
- Task 3: Linear Blend Skinning
- Task 4: Physical Simulation
Notes: