Yeah you're right, my patch has a flaw that it doesn't set position to 0 when skipping the first frame.
Thanks for the patch, I will make some minor changes to it and report back. I don't think we want to skip steps if their size is larger than duration, this could cause problems as you said (not showing a frame window at all if framerate is too low because it has animation subscribed to "Shown", etc...).
Generic animation support for CEGUI::Window
Moderators: CEGUI MVP, CEGUI Team
Re: Generic animation support for CEGUI::Window
I used ideas from your patch and made a more powerful version. It allows skipping and clamping of step deltas. Unfortunately it's a joint patch, it includes new checks and exception throws for animation name collisions, etc... I hope that isn't that big of a deal, I don't feel like hand splitting them. I gave it testing and it seems to work OK, clamping solves longer fps drops whilst skipping solves short term fps drops. Both default to never clamp and never skip so it doesn't break any existing code. The skip next frame defaults to true since user usually wants to start the animation after the next step, not before the next step. The difference is unnoticeable in most cases.
http://harcov.czenet.com/kulik/CEGUI/anim_cleanup.patch
http://harcov.czenet.com/kulik/CEGUI/anim_cleanup.patch
Re: Generic animation support for CEGUI::Window
really cool, works great - thanks!
regards
rob
regards
rob
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Generic animation support for CEGUI::Window
Just to confirm that this patch is now in CEGUI svn branches/v0-7
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Re: Generic animation support for CEGUI::Window
hi, and thanks for this great library
i have a question... i altered the taharezlook looknfeel and i 've added this animation definition to the titlebar
then i noticed that if i change the order of the AnimationDefinition tags i get a different visual result if i pass quickly over the titlebar of a framewindow
the behavior is something like this ...
the color fadein to white (FFFFFFFF) and then suddenly goes to (80FFFFFF)
thank you
i have a question... i altered the taharezlook looknfeel and i 've added this animation definition to the titlebar
Code: Select all
<Animations>
<AnimationDefinition name="FadeIn" duration="0.3" replayMode="once">
<Affector property="CaptionColour" interpolator="colour">
<KeyFrame position="0.0" value="80FFFFFF" />
<KeyFrame position="0.3" value="FFFFFFFF" />
</Affector>
<Subscription event="MouseEntersArea" action="Start" />
</AnimationDefinition>
<AnimationDefinition name="FadeOut" duration="0.3" replayMode="once">
<Affector property="CaptionColour" interpolator="colour">
<KeyFrame position="0.0" value="FFFFFFFF" />
<KeyFrame position="0.3" value="80FFFFFF" />
</Affector>
<Subscription event="MouseLeavesArea" action="Start" />
</AnimationDefinition>
</Animations>
then i noticed that if i change the order of the AnimationDefinition tags i get a different visual result if i pass quickly over the titlebar of a framewindow
the behavior is something like this ...
the color fadein to white (FFFFFFFF) and then suddenly goes to (80FFFFFF)
thank you
Re: Generic animation support for CEGUI::Window
xdinos: The reason for this is quite simple, when you pass a mouse quickly, at one point, 2 animations are running.
To quickly fix this, pause (if you stop, you could theoretically get a one frame flicker, pausing is safer for this) the offending animation at the events of the right animation starting.
The reason for a different visual result is that when 2 animations are started at once to the same property, the latter actually overrides the former.
To quickly fix this, pause (if you stop, you could theoretically get a one frame flicker, pausing is safer for this) the offending animation at the events of the right animation starting.
Code: Select all
<Animations>
<AnimationDefinition name="FadeIn" duration="0.3" replayMode="once">
<Affector property="CaptionColour" interpolator="colour">
<KeyFrame position="0.0" value="80FFFFFF" />
<KeyFrame position="0.3" value="FFFFFFFF" />
</Affector>
<Subscription event="MouseEntersArea" action="Start" />
<Subscription event="MouseLeavesArea" action="Pause" />
</AnimationDefinition>
<AnimationDefinition name="FadeOut" duration="0.3" replayMode="once">
<Affector property="CaptionColour" interpolator="colour">
<KeyFrame position="0.0" value="FFFFFFFF" />
<KeyFrame position="0.3" value="80FFFFFF" />
</Affector>
<Subscription event="MouseLeavesArea" action="Start" />
<Subscription event="MouseEntersArea" action="Pause" />
</AnimationDefinition>
</Animations>
The reason for a different visual result is that when 2 animations are started at once to the same property, the latter actually overrides the former.
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 6 guests