discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Animation: What is your typical use.

M
MichaelAtOz
Thu, Dec 31, 2020 6:06 AM

I've been thinking of some changes to help with Animation.

First was just a keyboard shortcut, maybe a button, equivalent to
View/Animate, basically toggle it.

But then you still have to click on FPS & Steps and enter appropriate values
before it does anything.
I like to use the mouse where possible, gabbing the keyboard (unless I'm
already in an editing session) is annoying.
So I though a shortcut could set some default values, so it just starts and
stops.

Then I though maybe a few shortcuts with common FPS/Steps.

If you are an Animate user, what setting(s) do you typically use, and
briefly why?


OpenSCAD Admin - email* me if you need anything,  or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/

I've been thinking of some changes to help with Animation. First was just a keyboard shortcut, maybe a button, equivalent to View/Animate, basically toggle it. But then you still have to click on FPS & Steps and enter appropriate values before it does anything. I like to use the mouse where possible, gabbing the keyboard (unless I'm already in an editing session) is annoying. So I though a shortcut could set some default values, so it just starts and stops. Then I though maybe a few shortcuts with common FPS/Steps. If you are an Animate user, what setting(s) do you typically use, and briefly why? ----- OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... * on the Forum, click on my MichaelAtOz label, there is a link to email me. Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. -- Sent from: http://forum.openscad.org/
T
Troberg
Thu, Dec 31, 2020 9:05 AM

I use animation a lot to present "fly-around" views of an object, and to show
moving parts in motion.

My thoughts on it:

I never use it "live", my renderings are way too slow for that, so I
generate files and put them together to a GIF. This means that, for me, the
FPS is useless, I just want it all rendered as fast as possible.

Instead of having to use FPS to start/stop animation, I'd like to have a
simple play/pause button. A slider to set frame would also be nice, so you
can arrange the viewport in the "largest" frame.

A progress bar or text when exporting. It would be nice to know how many
frames are done when you have a two hour animation rendering.

--
Sent from: http://forum.openscad.org/

I use animation a lot to present "fly-around" views of an object, and to show moving parts in motion. My thoughts on it: I never use it "live", my renderings are way too slow for that, so I generate files and put them together to a GIF. This means that, for me, the FPS is useless, I just want it all rendered as fast as possible. Instead of having to use FPS to start/stop animation, I'd like to have a simple play/pause button. A slider to set frame would also be nice, so you can arrange the viewport in the "largest" frame. A progress bar or text when exporting. It would be nice to know how many frames are done when you have a two hour animation rendering. -- Sent from: http://forum.openscad.org/
W
Whosawhatsis
Thu, Dec 31, 2020 9:11 AM

I usually set 30 FPS, though mine generally animate much more slowly than this. Number of steps depends on what I'm animating, but when I'm exporting frames, 600 is most common. I never use the GUI for generating these frames though, because I need them generated at a much higher resolution. I generally use a shell script that exports frames at 8K resolution, which I then downscale to 1080p so that they will be nicely anti-aliased.

Doing it this way is slower than it should be, since it can't take advantage of caching from one frame to the next. On the other hand, it allows me to tweak my script to render multiple frames in parallel to take advantage of multiple processor cores, which the animate feature does not.

It would be nice if the animate function could be used to generate and export frames at an arbitrary resolution. This resolution, the default framerate, and the default number of frames should be configurable in preferences. Bonus points if it can output directly to a video encoder, rather than needing to convert from an image sequence. Making an animated gif would be another useful output option.
On Dec 30, 2020, 22:07 -0800, MichaelAtOz oz.at.michael@gmail.com, wrote:

I've been thinking of some changes to help with Animation.

First was just a keyboard shortcut, maybe a button, equivalent to
View/Animate, basically toggle it.

But then you still have to click on FPS & Steps and enter appropriate values
before it does anything.
I like to use the mouse where possible, gabbing the keyboard (unless I'm
already in an editing session) is annoying.
So I though a shortcut could set some default values, so it just starts and
stops.

Then I though maybe a few shortcuts with common FPS/Steps.

If you are an Animate user, what setting(s) do you typically use, and
briefly why?


OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...

  • on the Forum, click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I usually set 30 FPS, though mine generally animate much more slowly than this. Number of steps depends on what I'm animating, but when I'm exporting frames, 600 is most common. I never use the GUI for generating these frames though, because I need them generated at a much higher resolution. I generally use a shell script that exports frames at 8K resolution, which I then downscale to 1080p so that they will be nicely anti-aliased. Doing it this way is slower than it should be, since it can't take advantage of caching from one frame to the next. On the other hand, it allows me to tweak my script to render multiple frames in parallel to take advantage of multiple processor cores, which the animate feature does not. It would be nice if the animate function could be used to generate and export frames at an arbitrary resolution. This resolution, the default framerate, and the default number of frames should be configurable in preferences. Bonus points if it can output directly to a video encoder, rather than needing to convert from an image sequence. Making an animated gif would be another useful output option. On Dec 30, 2020, 22:07 -0800, MichaelAtOz <oz.at.michael@gmail.com>, wrote: > I've been thinking of some changes to help with Animation. > > First was just a keyboard shortcut, maybe a button, equivalent to > View/Animate, basically toggle it. > > But then you still have to click on FPS & Steps and enter appropriate values > before it does anything. > I like to use the mouse where possible, gabbing the keyboard (unless I'm > already in an editing session) is annoying. > So I though a shortcut could set some default values, so it just starts and > stops. > > Then I though maybe a few shortcuts with common FPS/Steps. > > If you are an Animate user, what setting(s) do you typically use, and > briefly why? > > > > > ----- > OpenSCAD Admin - email* me if you need anything, or if I've done something stupid... > > * on the Forum, click on my MichaelAtOz label, there is a link to email me. > > Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
NH
nop head
Thu, Dec 31, 2020 9:13 AM

Yes FPS doesn't make any sense as it does an F5 for every frame, so
struggles to do a frame a second. For my 3D printer it would be more than a
minute per frame, so FPH makes more sense!

On Thu, 31 Dec 2020 at 09:06, Troberg troberg.anders@gmail.com wrote:

I use animation a lot to present "fly-around" views of an object, and to
show
moving parts in motion.

My thoughts on it:

I never use it "live", my renderings are way too slow for that, so I
generate files and put them together to a GIF. This means that, for me, the
FPS is useless, I just want it all rendered as fast as possible.

Instead of having to use FPS to start/stop animation, I'd like to have a
simple play/pause button. A slider to set frame would also be nice, so you
can arrange the viewport in the "largest" frame.

A progress bar or text when exporting. It would be nice to know how many
frames are done when you have a two hour animation rendering.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Yes FPS doesn't make any sense as it does an F5 for every frame, so struggles to do a frame a second. For my 3D printer it would be more than a minute per frame, so FPH makes more sense! On Thu, 31 Dec 2020 at 09:06, Troberg <troberg.anders@gmail.com> wrote: > I use animation a lot to present "fly-around" views of an object, and to > show > moving parts in motion. > > My thoughts on it: > > I never use it "live", my renderings are way too slow for that, so I > generate files and put them together to a GIF. This means that, for me, the > FPS is useless, I just want it all rendered as fast as possible. > > Instead of having to use FPS to start/stop animation, I'd like to have a > simple play/pause button. A slider to set frame would also be nice, so you > can arrange the viewport in the "largest" frame. > > A progress bar or text when exporting. It would be nice to know how many > frames are done when you have a two hour animation rendering. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
T
TLC123
Thu, Dec 31, 2020 3:10 PM

Well I use it to visually analyse clearance during complex transformations.
I think it would be use full to have a play/pause button that toggle steps
between 0  and users value
[J][K][L] is commonly used in video editor to  play backwards, pause and go
forwards. i don't know.
Scrubbing a time line by mouse will probably be painful.
But i suppose reset time/go to first fram may be desirable.
Also beyond $t  also expose $fps and $frames /a.k.a. steps.
That's my five cents.

--
Sent from: http://forum.openscad.org/

Well I use it to visually analyse clearance during complex transformations. I think it would be use full to have a play/pause button that toggle steps between 0 and users value [J][K][L] is commonly used in video editor to play backwards, pause and go forwards. i don't know. Scrubbing a time line by mouse will probably be painful. But i suppose reset time/go to first fram may be desirable. Also beyond $t also expose $fps and $frames /a.k.a. steps. That's my five cents. -- Sent from: http://forum.openscad.org/
L
lar3ry
Thu, Dec 31, 2020 8:01 PM

I seldom use animation, but when I do, I really miss easy single-key or
buttons for step-forward and step-backward.

--
Sent from: http://forum.openscad.org/

I seldom use animation, but when I do, I really miss easy single-key or buttons for step-forward and step-backward. -- Sent from: http://forum.openscad.org/
W
Whosawhatsis
Thu, Dec 31, 2020 8:11 PM

A timeline running the full width of the preview window would be nice to have. You wouldn't be able to scrub, but at least being able to click around in it would be nice. Of course, it would be great if the caching WAS good enough to allow you to scrub, even if it was only over the range of frames that have already been rendered. Of course, if you don't rotate the view (or if you're controlling the view with the variables like $vpr and $vpt), the frames could be cached as images, which should make scrubbing easy. If you're NOT using those variables, of course, the cached frames would be invalidated as soon as you make any changes to the viewport. They would also be invalidated if you make any functional changes to the code (though edits only to comments and whitespace wouldn't need to invalidate them).
On Dec 31, 2020, 01:06 -0800, Troberg troberg.anders@gmail.com, wrote:

I use animation a lot to present "fly-around" views of an object, and to show
moving parts in motion.

My thoughts on it:

I never use it "live", my renderings are way too slow for that, so I
generate files and put them together to a GIF. This means that, for me, the
FPS is useless, I just want it all rendered as fast as possible.

Instead of having to use FPS to start/stop animation, I'd like to have a
simple play/pause button. A slider to set frame would also be nice, so you
can arrange the viewport in the "largest" frame.

A progress bar or text when exporting. It would be nice to know how many
frames are done when you have a two hour animation rendering.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

A timeline running the full width of the preview window would be nice to have. You wouldn't be able to scrub, but at least being able to click around in it would be nice. Of course, it would be great if the caching WAS good enough to allow you to scrub, even if it was only over the range of frames that have already been rendered. Of course, if you don't rotate the view (or if you're controlling the view with the variables like $vpr and $vpt), the frames could be cached as images, which should make scrubbing easy. If you're NOT using those variables, of course, the cached frames would be invalidated as soon as you make any changes to the viewport. They would also be invalidated if you make any functional changes to the code (though edits only to comments and whitespace wouldn't need to invalidate them). On Dec 31, 2020, 01:06 -0800, Troberg <troberg.anders@gmail.com>, wrote: > I use animation a lot to present "fly-around" views of an object, and to show > moving parts in motion. > > My thoughts on it: > > I never use it "live", my renderings are way too slow for that, so I > generate files and put them together to a GIF. This means that, for me, the > FPS is useless, I just want it all rendered as fast as possible. > > Instead of having to use FPS to start/stop animation, I'd like to have a > simple play/pause button. A slider to set frame would also be nice, so you > can arrange the viewport in the "largest" frame. > > A progress bar or text when exporting. It would be nice to know how many > frames are done when you have a two hour animation rendering. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
JB
Jordan Brown
Thu, Dec 31, 2020 9:20 PM

I've used it for three basic things:

  • Exploding an assembly into its print form and back again.  (But I
    think nophead's idea of showing assembled form for $preview and
    print form for !$preview may be better.)
  • Flythrough.
  • Seeing how moving parts interact.  (I was just animating shed doors
    opening and closing to make sure I had the hinge geometry right.)

I usually set 10 FPS and maybe a hundred frames.

A keyboard shortcut, mostly shrug.  Once I turn the UI on, it tends to
stay on.

Defaults would be nice, though I kind of doubt any one set of defaults
would make everybody happy.  Or maybe defaults could be configurable?

A pause button would be nice.  Step forward/back too, but less so.

It would be really nice if it cached the results so that the second
time through the loop could run at full speed.  But that's probably not
compatible with being able to change the view while the animation runs.

It would be nice if it directly generated a video file, rather than a
set of stills.  That doesn't need to be a built-in capability; it could
operate by invoking an external program like ImageMagick or ffmpeg that
you have to install separately.  I've only done video files a couple of
times, and I've had to go research how to do it each time.

I've used it for three basic things: * Exploding an assembly into its print form and back again.  (But I think nophead's idea of showing assembled form for $preview and print form for !$preview may be better.) * Flythrough. * Seeing how moving parts interact.  (I was just animating shed doors opening and closing to make sure I had the hinge geometry right.) I usually set 10 FPS and maybe a hundred frames. A keyboard shortcut, mostly shrug.  Once I turn the UI on, it tends to stay on. Defaults would be nice, though I kind of doubt any one set of defaults would make everybody happy.  Or maybe defaults could be configurable? A pause button would be nice.  Step forward/back too, but less so. It would be *really* nice if it cached the results so that the second time through the loop could run at full speed.  But that's probably not compatible with being able to change the view while the animation runs. It would be nice if it directly generated a video file, rather than a set of stills.  That doesn't need to be a built-in capability; it could operate by invoking an external program like ImageMagick or ffmpeg that you have to install separately.  I've only done video files a couple of times, and I've had to go research how to do it each time.
HL
Hans L
Sat, Jan 2, 2021 5:05 AM

As far as usage, I often use Animation to test/verirfy how a WIP module
behaves over a wide range of parametric values, or even for a finished
module as a demo of how it works and what different parameter values look
like.  In some cases the thing I'm working on is 2D-only or requires no
boolean CSG operations, in which case 60FPS is not an unreasonable target
to set.

The other big use for me is dumping pictures for making into an animated
GIF.  This might be to showcase a design from different angles or with
moving parts, exploding/assembling animations, illustrating some abstract
geometry problem, or even just for fun/artsy GIFs.
I do end up using GIMP to create the final GIF, so a way to export to GIF
directly from OpenSCAD would be great (or even better Animated PNG)

Here's my ideas for improvement:

  • A pause/play toggle button is probably the most sorely missed feature,
    add a button to the toolbar + assign a keyboard shortcut for it.  The one
    weird trick I've been using is to keep my text cursor in the FPS box, and
    append a - character to the end of the value, which makes it invalid and
    pauses the animation, then backspace to resume.

  • Instead of having some default presets of FPS and Steps or tucking the
    default away into the Preferences menu, I feel like it would be enough to
    just automatically save and restore those values from their last usage.

  • For more mouse-friendliness, make the FPS and step boxes into spinboxes
    with up and down arrows, much like the customizer.

  • An interactive timeline slider would also be great, and could possibly
    replace the "Time" input text box.

  • I could be wrong, but I think that last time I looked at the code, the
    FPS setting does something like a simple delay of (1000 / FPS) ms, and
    doesn't subtract the time taken to render the previous frame.  It should be
    more like delay(max(0, 1000/FPS - time_elapsed_since_last_frame)), that way
    if your animation can't keep up to target frame rate, at least it won't
    waste any time sleeping.  Sometimes I set FPS to an absurdly high number
    like 1e9 to make any added delay negligible, but doing that also can make
    the view flicker (I think the GLView may be getting cleared and repainted
    at the start of each frame's preview; would be best to just repaint only
    when the next frame is ready and don't clear it beforehand).

  • On that note, I've also kinda wanted to be able to see some feedback on
    the actual effective FPS vs the target FPS, which could possibly be
    displayed in the bottom status bar next to viewport settings.

Hans

On Thu, Dec 31, 2020 at 3:20 PM Jordan Brown openscad@jordan.maileater.net
wrote:

I've used it for three basic things:

- Exploding an assembly into its print form and back again.  (But I
think nophead's idea of showing assembled form for $preview and print form
for !$preview may be better.)
- Flythrough.
- Seeing how moving parts interact.  (I was just animating shed doors
opening and closing to make sure I had the hinge geometry right.)

I usually set 10 FPS and maybe a hundred frames.

A keyboard shortcut, mostly shrug.  Once I turn the UI on, it tends to
stay on.

Defaults would be nice, though I kind of doubt any one set of defaults
would make everybody happy.  Or maybe defaults could be configurable?

A pause button would be nice.  Step forward/back too, but less so.

It would be really nice if it cached the results so that the second time
through the loop could run at full speed.  But that's probably not
compatible with being able to change the view while the animation runs.

It would be nice if it directly generated a video file, rather than a set
of stills.  That doesn't need to be a built-in capability; it could operate
by invoking an external program like ImageMagick or ffmpeg that you have to
install separately.  I've only done video files a couple of times, and I've
had to go research how to do it each time.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

As far as usage, I often use Animation to test/verirfy how a WIP module behaves over a wide range of parametric values, or even for a finished module as a demo of how it works and what different parameter values look like. In some cases the thing I'm working on is 2D-only or requires no boolean CSG operations, in which case 60FPS is not an unreasonable target to set. The other big use for me is dumping pictures for making into an animated GIF. This might be to showcase a design from different angles or with moving parts, exploding/assembling animations, illustrating some abstract geometry problem, or even just for fun/artsy GIFs. I do end up using GIMP to create the final GIF, so a way to export to GIF directly from OpenSCAD would be great (or even better Animated PNG) Here's my ideas for improvement: - A pause/play toggle button is probably the most sorely missed feature, add a button to the toolbar + assign a keyboard shortcut for it. The one weird trick I've been using is to keep my text cursor in the FPS box, and append a `-` character to the end of the value, which makes it invalid and pauses the animation, then backspace to resume. - Instead of having some default presets of FPS and Steps or tucking the default away into the Preferences menu, I feel like it would be enough to just automatically save and restore those values from their last usage. - For more mouse-friendliness, make the FPS and step boxes into spinboxes with up and down arrows, much like the customizer. - An interactive timeline slider would also be great, and could possibly replace the "Time" input text box. - I could be wrong, but I think that last time I looked at the code, the FPS setting does something like a simple delay of (1000 / FPS) ms, and doesn't subtract the time taken to render the previous frame. It should be more like delay(max(0, 1000/FPS - time_elapsed_since_last_frame)), that way if your animation can't keep up to target frame rate, at least it won't waste any time sleeping. Sometimes I set FPS to an absurdly high number like 1e9 to make any added delay negligible, but doing that also can make the view flicker (I think the GLView may be getting cleared and repainted at the start of each frame's preview; would be best to just repaint only when the next frame is ready and don't clear it beforehand). - On that note, I've also kinda wanted to be able to see some feedback on the actual effective FPS vs the target FPS, which could possibly be displayed in the bottom status bar next to viewport settings. Hans On Thu, Dec 31, 2020 at 3:20 PM Jordan Brown <openscad@jordan.maileater.net> wrote: > I've used it for three basic things: > > - Exploding an assembly into its print form and back again. (But I > think nophead's idea of showing assembled form for $preview and print form > for !$preview may be better.) > - Flythrough. > - Seeing how moving parts interact. (I was just animating shed doors > opening and closing to make sure I had the hinge geometry right.) > > I usually set 10 FPS and maybe a hundred frames. > > A keyboard shortcut, mostly shrug. Once I turn the UI on, it tends to > stay on. > > Defaults would be nice, though I kind of doubt any one set of defaults > would make everybody happy. Or maybe defaults could be configurable? > > A pause button would be nice. Step forward/back too, but less so. > > It would be *really* nice if it cached the results so that the second time > through the loop could run at full speed. But that's probably not > compatible with being able to change the view while the animation runs. > > It would be nice if it directly generated a video file, rather than a set > of stills. That doesn't need to be a built-in capability; it could operate > by invoking an external program like ImageMagick or ffmpeg that you have to > install separately. I've only done video files a couple of times, and I've > had to go research how to do it each time. > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RD
Revar Desmera
Sat, Jan 2, 2021 11:35 AM

I would just like a way to configure animation from the command-line, and have it dump a bunch of animation frame PNG files. That way I can generate animations for my documentation generation scripts in a far less time consuming manner. I currently have to generate each frame with a separate OpenSCAD run.

-Revar

On Jan 1, 2021, at 9:06 PM, Hans L thehans@gmail.com wrote:


As far as usage, I often use Animation to test/verirfy how a WIP module behaves over a wide range of parametric values, or even for a finished module as a demo of how it works and what different parameter values look like.  In some cases the thing I'm working on is 2D-only or requires no boolean CSG operations, in which case 60FPS is not an unreasonable target to set.

The other big use for me is dumping pictures for making into an animated GIF.  This might be to showcase a design from different angles or with moving parts, exploding/assembling animations, illustrating some abstract geometry problem, or even just for fun/artsy GIFs.
I do end up using GIMP to create the final GIF, so a way to export to GIF directly from OpenSCAD would be great (or even better Animated PNG)

Here's my ideas for improvement:

  • A pause/play toggle button is probably the most sorely missed feature, add a button to the toolbar + assign a keyboard shortcut for it.  The one weird trick I've been using is to keep my text cursor in the FPS box, and append a - character to the end of the value, which makes it invalid and pauses the animation, then backspace to resume.

  • Instead of having some default presets of FPS and Steps or tucking the default away into the Preferences menu, I feel like it would be enough to just automatically save and restore those values from their last usage.

  • For more mouse-friendliness, make the FPS and step boxes into spinboxes with up and down arrows, much like the customizer.

  • An interactive timeline slider would also be great, and could possibly replace the "Time" input text box.

  • I could be wrong, but I think that last time I looked at the code, the FPS setting does something like a simple delay of (1000 / FPS) ms, and doesn't subtract the time taken to render the previous frame.  It should be more like delay(max(0, 1000/FPS - time_elapsed_since_last_frame)), that way if your animation can't keep up to target frame rate, at least it won't waste any time sleeping.  Sometimes I set FPS to an absurdly high number like 1e9 to make any added delay negligible, but doing that also can make the view flicker (I think the GLView may be getting cleared and repainted at the start of each frame's preview; would be best to just repaint only when the next frame is ready and don't clear it beforehand).

  • On that note, I've also kinda wanted to be able to see some feedback on the actual effective FPS vs the target FPS, which could possibly be displayed in the bottom status bar next to viewport settings.

Hans

On Thu, Dec 31, 2020 at 3:20 PM Jordan Brown openscad@jordan.maileater.net wrote:
I've used it for three basic things:
Exploding an assembly into its print form and back again.  (But I think nophead's idea of showing assembled form for $preview and print form for !$preview may be better.)
Flythrough.
Seeing how moving parts interact.  (I was just animating shed doors opening and closing to make sure I had the hinge geometry right.)
I usually set 10 FPS and maybe a hundred frames.

A keyboard shortcut, mostly shrug.  Once I turn the UI on, it tends to stay on.

Defaults would be nice, though I kind of doubt any one set of defaults would make everybody happy.  Or maybe defaults could be configurable?

A pause button would be nice.  Step forward/back too, but less so.

It would be really nice if it cached the results so that the second time through the loop could run at full speed.  But that's probably not compatible with being able to change the view while the animation runs.

It would be nice if it directly generated a video file, rather than a set of stills.  That doesn't need to be a built-in capability; it could operate by invoking an external program like ImageMagick or ffmpeg that you have to install separately.  I've only done video files a couple of times, and I've had to go research how to do it each time.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I would just like a way to configure animation from the command-line, and have it dump a bunch of animation frame PNG files. That way I can generate animations for my documentation generation scripts in a far less time consuming manner. I currently have to generate each frame with a separate OpenSCAD run. -Revar > On Jan 1, 2021, at 9:06 PM, Hans L <thehans@gmail.com> wrote: > >  > As far as usage, I often use Animation to test/verirfy how a WIP module behaves over a wide range of parametric values, or even for a finished module as a demo of how it works and what different parameter values look like. In some cases the thing I'm working on is 2D-only or requires no boolean CSG operations, in which case 60FPS is not an unreasonable target to set. > > The other big use for me is dumping pictures for making into an animated GIF. This might be to showcase a design from different angles or with moving parts, exploding/assembling animations, illustrating some abstract geometry problem, or even just for fun/artsy GIFs. > I do end up using GIMP to create the final GIF, so a way to export to GIF directly from OpenSCAD would be great (or even better Animated PNG) > > Here's my ideas for improvement: > > - A pause/play toggle button is probably the most sorely missed feature, add a button to the toolbar + assign a keyboard shortcut for it. The one weird trick I've been using is to keep my text cursor in the FPS box, and append a `-` character to the end of the value, which makes it invalid and pauses the animation, then backspace to resume. > > - Instead of having some default presets of FPS and Steps or tucking the default away into the Preferences menu, I feel like it would be enough to just automatically save and restore those values from their last usage. > > - For more mouse-friendliness, make the FPS and step boxes into spinboxes with up and down arrows, much like the customizer. > > - An interactive timeline slider would also be great, and could possibly replace the "Time" input text box. > > - I could be wrong, but I think that last time I looked at the code, the FPS setting does something like a simple delay of (1000 / FPS) ms, and doesn't subtract the time taken to render the previous frame. It should be more like delay(max(0, 1000/FPS - time_elapsed_since_last_frame)), that way if your animation can't keep up to target frame rate, at least it won't waste any time sleeping. Sometimes I set FPS to an absurdly high number like 1e9 to make any added delay negligible, but doing that also can make the view flicker (I think the GLView may be getting cleared and repainted at the start of each frame's preview; would be best to just repaint only when the next frame is ready and don't clear it beforehand). > > - On that note, I've also kinda wanted to be able to see some feedback on the actual effective FPS vs the target FPS, which could possibly be displayed in the bottom status bar next to viewport settings. > > > Hans > > > >> On Thu, Dec 31, 2020 at 3:20 PM Jordan Brown <openscad@jordan.maileater.net> wrote: >> I've used it for three basic things: >> Exploding an assembly into its print form and back again. (But I think nophead's idea of showing assembled form for $preview and print form for !$preview may be better.) >> Flythrough. >> Seeing how moving parts interact. (I was just animating shed doors opening and closing to make sure I had the hinge geometry right.) >> I usually set 10 FPS and maybe a hundred frames. >> >> A keyboard shortcut, mostly shrug. Once I turn the UI on, it tends to stay on. >> >> Defaults would be nice, though I kind of doubt any one set of defaults would make everybody happy. Or maybe defaults could be configurable? >> >> A pause button would be nice. Step forward/back too, but less so. >> >> It would be *really* nice if it cached the results so that the second time through the loop could run at full speed. But that's probably not compatible with being able to change the view while the animation runs. >> >> It would be nice if it directly generated a video file, rather than a set of stills. That doesn't need to be a built-in capability; it could operate by invoking an external program like ImageMagick or ffmpeg that you have to install separately. I've only done video files a couple of times, and I've had to go research how to do it each time. >> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org