f3d
f3d copied to clipboard
Support saving multiple file when using `--animation-autoplay` and `--output`
When using --animation-autoplay
and --output
, write multiple png files, and rely on filename templating to writing different files.
Actually, it may be out of scope of f3d.
If someone wants to generate a video, the camera, and the animation frame should be specified through the future libf3d API or via command line arguments, and generate a fixed image, with a script. Then the animation with ffmpeg by combining the images.
Wdyt @mwestphal?
I agree, but you mean that this should be another application, not F3D ?
By using command line argument to generate a series of images is very slow, it would be nice to have some parameters for f3d to generate a video file directly:
- speed of the rotation
- maybe some inbuilt fancy camera routes, circling should be one of them.
needs https://github.com/f3d-app/f3d/issues/741 first
Supporting writing multiple pngs would already be great
related to #1194 and #10 as well.
Here is my idea for this.
With autoplay
and output
, generate numbered screenshot with manipulating the time based on a new output-fps
option.
What do you think @snoyer @Meakk ?
I think there are three different use cases:
- Animated model with a fixed camera
- Fixed model with animated camera path
There could be a third use case with both but I'll omit it for now.
Case 1: We just need the --autoplay
argument and find a way to export several files. Maybe we could support things like --output /tmp/export_%t.png
and substitute %t
with the time step index?
Case 2: Some file formats like glTF and USD support camera animation so specifying --camera-index
should support the given camera path. Otherwise, just like we define a fixed camera by default, we could have an option --camera-path=[orbit,zoom_in,whatever]
which will define a new animated camera path (having a --fps
defaulted to 30 would be useful here too). Then we could use the same %t
substitution as in case 1.
Not sure what you mean, animated camera and animated model is exactly the same code path in F3D. Creating an animated camera like an orbit would be nice, but this is a different issue.
In any case, the code we are talking about would need autoplay
in both cases.