[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: physics-based animator
From: "Louai Al-Khanji" <louai.khanji () gmail ! com>
Date: 2008-03-17 11:16:02
Message-ID: f4a2642e0803170416y571f6821pc5ae5784da134800 () mail ! gmail ! com
[Download RAW message or body]
On Mon, Mar 17, 2008 at 11:49 AM, Sebastian Kuegler <sebas@kde.org> wrote:
>
> On Thursday 13 March 2008 16:03:58 Rivo Laks wrote:
> > Ühel kenal päeval (neljapäev, 13. märts 2008) kirjutas Sebastian Kuegler:
> > > On Wednesday 12 March 2008 21:30:29 Riccardo Iaconelli wrote:
> > > > do you think it is ok to introduce an (optional?) dependency on Box2d
> > > > http://www.box2d.org/ for the animator
> > > > with physical equations? that's already a *good* engine we can use for
> > > > fun and profit, without having to worry
> > > > to implement a new one from scratch...
> > >
> > > I like the idea of having more natural animations. At the same time, I'm
> > > not so worried about Plasma, but about KWin. I think every single
> > > animation in KWin is purely linear (didn't look at the code yet, X11,
> > > OpenGL ... those are scary things to me ;-)).
> > >
> > > We could think of sharing that kind of stuff with KWin too, I think the
> > > distinction between large parts of Plasma and KWin are purely technical
> > > and not easily graspable from our users' POV.
> > >
> > > Did anyone actually think of making KWin use for example Plasma::Phase?
> > > Lubos, is that something you could support? Am I even right in stating
> > > that all (most?) animations in KWin are linear?
> > >
> > > I talked to Mirco Müller ("MacSlow") who is doing bling things with Cairo
> > > some time ago, and he basically said that linear animations feel
> > > unnatural, having things ease in and out makes it already feel much
> > > better. And if you look at the iPhone / iPod touch, I think having the
> > > KDE desktop 'obey the laws of physics' would make it feel a lot smoother.
> >
> > Something like Plasma::Phase would be useful indeed. You're right that all
> > KWin animations are currently linear. In addition to that, each effect
> > currently needs to take care of the animation itself which kinda sucks.
>
> I've hacked a bit on the minimize plugin and got it to 'use' QTimeLine.
> Actually, I'm creating the timeline and just adjust the progress for the
> frame in question to the value QTimeLine gives. It looks rather easy, but
> QTimeLine doesn't provide a whole lot of interesting physics. Still it's a
> beginning how this can be done.
>
> There's probably a better place to put this than one effect, but from a quick
> read of effects.(cpp|h) I didn't see where to do this for all effects at once
> (and if we want that).
>
> To make the effect more apparent (it's quite subtle otherwise) I multiplied it
> by itself. I think it's an improvement already, although it's far from
> organic still.
>
> Good enough for some feedback, anyway :-)
>
>
> > I remember we had a discussion about that a while ago. It would be really
> > nice if effect could just do something like
> > window->opacity->set(0.8, 250);
> > to set window's opacity to 80% in 250 milliseconds.
> >
> > Plasma::Phase doesn't really seem usable for KWin without some major
> > changes though. It looks like it's meant only for a few different
> > animations and only for usage with QGraphicsItems.
>
> I mainly found the signal-based approach to not fit nicely into KWin plugins.
> So I went the easier route and use QTimeLine directly. Phase doesn't add
> specific CurveShapes anyway, so I saw little gain.
>
>
> > What would be more suitable for KWin (IMHO) would be some kind of (probably
> > template) property class which stores current value as well as the target
> > value(s) of the property. Opacity, brightness, position, scale, etc would
> > then be converted into those properties so that effects can easily have
> > them animated. It would also make addition of new such properties very easy
> > as you wouldn't need to change any enums or similar in the
> > property/phase/animator class.
>
> Not sure I'm really grasping that ...
>
>
> --
> sebas
>
> http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
>
> _______________________________________________
> Kwin mailing list
> Kwin@kde.org
> https://mail.kde.org/mailman/listinfo/kwin
>
>
I thought about this last week as well. The idea I had was a class
where you can give the start and target values and duration. You could
then specify a curve type (linear, exponential, etc.) and specify some
parameters that affect the curve shape.
Just an idea, I might even do something with it.
-Louai
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic