Quantcast

Animation manually triggered

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Animation manually triggered

Parkinbot
Hi folks,

I don't have tell you that OpenSCAD's animations are a very great tool for many things. Like many others here I use it frequently to study the "dynamics" of multi object designs, or to capture the "3D-ness" of a design into a film sequence. Today I found a nice feature, which I had always missed. Seems to be a bug, but a very useful one, especially for debugging purposes.

Setting any steps value and FPS=0 lets you interactively "trigger" the time increment by any translation or rotation (but not with a scale) of the view with the mouse. Until we get a slider for FPS (and a wheel for the time) this method is quite practical when debugging or studying animations.

Rudolf
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

MichaelAtOz
Administrator
Interestingly, typing characters in the edit pane also triggers it.
Go to a blank line and hit the space bar.

A Play/pause and single step set of buttons would be a good thing.
Admin - PM me if you need anything,
or if I've done something stupid...

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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

kintel
Administrator
Another way of achieving this would be to type e.g.n “$t = 0.1;” into the editor, position the cursor on the number and press alt-up/down arrow.
Only works in a development snapshot
 
 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

thehans
I often end up wanting to alternate between running the FPS as fast as
it will compute, or pause on demand, so I end up putting a value like
"1e10" into FPS, then adding/deleting a minus sign to pause it:
"1e-10"

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

Greg Frost
I often use animation for models that aren't even animated, just so the preview automatically updates as I work on the design. I have always thought that it's a bit of a pain how clunky it is to enable animation. I would prefer if there were some defaults for the rates and steps so that it was one click or one menu item to enable it.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

thehans
I completely agree with Greg.  One way I think it could be made more
accessible would be:
  a) display the animation toolbar by default
  b) include reasonable default FPS and steps (maybe 30fps, 100steps) ?
  c) add a play/pause button to enable/disable on the fly

Then you would have a single button to start animation, that doesn't
have to be enabled from any dropdown menu, and no other values to fill
in.

On Mon, Apr 24, 2017 at 1:41 AM, Greg Frost
<[hidden email]> wrote:

> I often use animation for models that aren't even animated, just so the
> preview automatically updates as I work on the design. I have always thought
> that it's a bit of a pain how clunky it is to enable animation. I would
> prefer if there were some defaults for the rates and steps so that it was
> one click or one menu item to enable it.
>
>
>
> --
> View this message in context: http://forum.openscad.org/Animation-manually-triggered-tp21347p21363.html
> Sent from the OpenSCAD mailing list archive at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

thehans
Actually, thinking slightly more about the problem, the default
animation FPS and steps values would probably be best placed as
settings in the preferences menu.

On Mon, Apr 24, 2017 at 10:12 AM, Hans L <[hidden email]> wrote:

> I completely agree with Greg.  One way I think it could be made more
> accessible would be:
>   a) display the animation toolbar by default
>   b) include reasonable default FPS and steps (maybe 30fps, 100steps) ?
>   c) add a play/pause button to enable/disable on the fly
>
> Then you would have a single button to start animation, that doesn't
> have to be enabled from any dropdown menu, and no other values to fill
> in.
>
> On Mon, Apr 24, 2017 at 1:41 AM, Greg Frost
> <[hidden email]> wrote:
>> I often use animation for models that aren't even animated, just so the
>> preview automatically updates as I work on the design. I have always thought
>> that it's a bit of a pain how clunky it is to enable animation. I would
>> prefer if there were some defaults for the rates and steps so that it was
>> one click or one menu item to enable it.
>>
>>
>>
>> --
>> View this message in context: http://forum.openscad.org/Animation-manually-triggered-tp21347p21363.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

tp3
I'd suggest adding the specific ideas to the existing issue
https://github.com/openscad/openscad/issues/891

Most of the ideas can't be solved without a slightly bigger
change anyway, e.g. right now animation is active as soon
as the panel is visible. So I think the best option is to
untangle the existing logic and then we can add more features
too.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

doug.moen
In reply to this post by thehans
I'm playing with some 3D modelling software that has a slightly different UI for animation.

For interactive use, there is a "start/stop animation" button (no numeric parameters required): it looks the same as the start/stop video button on YouTube. This is a familiar and convenient interface.

The $time variable is set to elapsed seconds since the beginning of animation, which is suitable for realtime animation, and there is a separate variable for the current frame number, although that is less commonly used.

With this kind of interface, you would only need to specify numeric parameters when exporting an animation (eg, # of seconds and FPS).

On 24 April 2017 at 11:19, Hans L <[hidden email]> wrote:
Actually, thinking slightly more about the problem, the default
animation FPS and steps values would probably be best placed as
settings in the preferences menu.

On Mon, Apr 24, 2017 at 10:12 AM, Hans L <[hidden email]> wrote:
> I completely agree with Greg.  One way I think it could be made more
> accessible would be:
>   a) display the animation toolbar by default
>   b) include reasonable default FPS and steps (maybe 30fps, 100steps) ?
>   c) add a play/pause button to enable/disable on the fly
>
> Then you would have a single button to start animation, that doesn't
> have to be enabled from any dropdown menu, and no other values to fill
> in.
>
> On Mon, Apr 24, 2017 at 1:41 AM, Greg Frost
> <[hidden email]> wrote:
>> I often use animation for models that aren't even animated, just so the
>> preview automatically updates as I work on the design. I have always thought
>> that it's a bit of a pain how clunky it is to enable animation. I would
>> prefer if there were some defaults for the rates and steps so that it was
>> one click or one menu item to enable it.
>>
>>
>>
>> --
>> View this message in context: http://forum.openscad.org/Animation-manually-triggered-tp21347p21363.html
>> Sent from the OpenSCAD mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> [hidden email]
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

Parkinbot
In reply to this post by tp3
If some bigger change is made to brush up the animation interface, please also provide a possiblity to programmatically set the physical framesize. The method I use now is to set the viewport size with the mouse, which is very cumbersome. Or did I miss something?

I'd expect something like:

$vps = [1280, 720]; // set viewport size
and a conditional expression to set it:

$animation =true;  // maintained by the animation interface like $t
$vps = $animation?[55, 0, 25]:$vps;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

Parkinbot
In reply to this post by kintel
This is also a nice - and so far unknown - new feature in general context. Congratulations.
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

tp3
In reply to this post by Parkinbot
> If some bigger change is made to brush up the animation
> interface, please also provide a possiblity to programmatically
> set the physical framesize. The method I use now is to set
> the viewport size with the mouse, which is very cumbersome.
> Or did I miss something?
>
That's unfortunately a different can of worms as it needs an
off-screen renderer driven by the GUI application. So while
related, it's probably better to leave that separate. This
also would help with simple image export too (I think there's
also an issue for that already).

As this is a bigger topic, the workaround for now is to at
least show the actual viewport size in the status bar.

> I'd expect something like:
> > $vps = [1280, 720]; // set viewport size
> and a conditional expression to set it:
>
No, I don't think that's a good idea. It will potentially
break pretty much any export option that is not just single
image files. So I'd say this should be an option in the
export dialog or something, but not available in the script.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

Parkinbot
tp3 wrote
That's unfortunately a different can of worms as it needs an
off-screen renderer driven by the GUI application.
You are right, an offscreen renderer would be the technically most perfect way to realize it, because it would even allow for 4K output in batch mode. But I didn't mean it like that.
Why not restrict it to GUI sessions and directly control the viewport size - exactly in the way, it is done with the mouse. Wouldn't it then be just like setting $vpt, $vpr and $vpd, which I guess also doesn't have any effect when used in batch mode?
For now I have to fidget with the mouse to first adjust the console pane and then the editor pane to adopt the viewport size for image export. $vps = [1280,720]; could have exactly this semantics.

BTW, the size information is already displayed in the status line.
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

tp3
On 04/25/2017 05:36 PM, Parkinbot wrote:
> Why not restrict it to GUI sessions and directly control the viewport size -
> exactly in the way, it is done with the mouse. Wouldn't it then be just like
> setting $vpt, $vpr and $vpd, which I guess also doesn't have any effect when
> used in batch mode?
>
I tried that, but it did not really work reliable to force a specific
viewport size without messing up the rest of the UI. Maybe someone with
more Qt knowledge could give it a try...

We actually have an Off-Screen context which is used in command line mode,
so the challenge is to make this usable for the GUI too.

ciao,
  Torsten.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Animation manually triggered

Parkinbot
tp3 wrote
I tried that, but it did not really work reliable to force a specific
viewport size without messing up the rest of the UI. Maybe someone with
more Qt knowledge could give it a try...
have a look at this http://stackoverflow.com/questions/10758267/how-to-force-layout-update-resize-when-child-it-manages-resizes

tp3 wrote
We actually have an Off-Screen context which is used in command line mode,
so the challenge is to make this usable for the GUI too.
I don't think that an Off-Sceen context will be a good solution. Being sized differently it will show a different szene and you run into trouble to synchronize the views to get at least some WYSIWG.
Loading...