创建低帧率的精美动画

发布于 2024-07-14 02:47:11 字数 681 浏览 6 评论 0原文

好吧,这可能听起来像一个愚蠢的问题,但我想知道当您知道帧速率较低时,是否有关于如何尽可能平滑、快速地制作对象动画的建议。

我的动画所做的是,我在 x 和 y 方向上移动大约 10 个 2d 矩形(每个矩形包含一个纹理)约 500 像素,并且还将它们从大约 1000*1000 像素缩小到大约 30%。 我希望动画在 200 毫秒左右完成。 我估计帧率可能是20-30fps。

我尝试过不同的时间和移动速度,但它们看起来都很糟糕。 如果你的速度很高,你几乎看不到动画,如果你的速度很慢,它看起来很流畅,但需要很多时间。

有没有研究过如何制作一个看起来仍然运行流畅的快速动画? 我在想你也许可以让加速度在开始时缓慢,然后在结束时跳跃,或者反过来? 我自己的实验看起来既跳跃又缓慢:P

我们人类认为看起来不错的像素/帧必须有一些限制。 我在哪里可以找到这样的指南?


我为什么想知道这个?

我制作了一个窗口切换应用程序,可以执行一些很酷的动画,但问题是,当我没有运行任何图形密集型应用程序时,我的显卡会进入某种低功耗模式。 这会导致我的应用程序(一次运行时间不超过 3 秒)性能非常差,因为 gfx 卡永远没有时间加速。

(如果你有笔记本电脑和vista,你可以自己尝试一下:按win+tab,你会发现动画有点断断续续,然后开始播放电影并再次按win+tab,这次动画更加流畅)。

Ok, this might sound like a stupid question but i want to know if there is any recommendations on how to animate objects as smoothly and quickly as possible when you know you will have low framerate.

What my animation does is that i move approximately 10 2d-rectangles(containing a texture each) about 500 pixels in both x and y and i also scale them down to maybe 30% from about 1000*1000px. I want the animation to complete in around 200ms. I estimate the framerate to be maybe 20-30fps.

I have tried different timings and movement-velocities but they all look like crap. If you have high speed you barely see the animation and if you have slow speed it looks smooth but it takes way to much time.

Has there been any research done on how to do a quick animation that still looks like it's running smooth. I was thinking that you maybe could have acceleration that goes slow in the beginning and then jumpy at the end, or maybe the other way around? My own experiments all look both jumpy and slow :P

There has to be some limit in pixels/frame that we humans think look good. Where can i find guidelines like this?


Why do i want to know this?

I've made a window-switching app that does some cool animations but the problem is that when i'm not running any graphic-intense application my graphic-card goes down into some low power mode. This causes my application, that doesn't run for more than 3secs at a time, to perform very poorly because the gfx-card never has time to speed up.

(You can probably try this yourself if you have a laptop and vista: press win+tab and you will see that the animation is a bit choppy, then start a movie and press win+tab again, this time the animation is much more smooth).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

浅忆 2024-07-21 02:47:12

如果动作很小,您应该能够以 15 fps 左右的速度获得合理的动画效果。 意识到将高带宽图形信息(大量运动和形状/颜色变化)融入低带宽介质(低 fps)中存在限制,但运动模糊等技术会有所帮助。

另外,考虑双缓冲或三缓冲,最好与显示器的垂直刷新同步,这都有助于减少可能分散动画注意力的闪烁和撕裂。

You should be able to get reasonable looking animation at around 15fps, if the movements are small. Realise that there is a limit on fitting high-bandwith graphics information (lots of movement and shape/color change) into a low-bandwidth medium (low fps), but techniques like motion blur will help.

Also, look into double- or triple- buffering, ideally sync'd to the monitor's vertical refresh, which will all help to reduce flicker and tearing that can distract from the animation.

刘备忘录 2024-07-21 02:47:12

如果您的动画是纯二维的(例如,窗口内容的刚性移动),那么您可以通过将它们像素锁定到视频帧来提高其平滑度。 即使在非常低的帧速率下,每帧正好 N 个像素的运动看起来也很平滑,而如果有一些像素的剩余部分,您会从像素采样中获得明显的混叠。

理论上,运动模糊是使运动看起来平滑的方法,但适当的运动模糊是昂贵的,因此,如果您已经在帧速率方面遇到问题,那么运动模糊可能只会让事情变得更糟。 但可能有某种方法可以降低成本,例如,如果运动方向和速度恒定,那么您可以渲染单个模糊图像并使用它。 或者可能多次过度绘制运动图像的部分透明副本以获得“轨迹”。

If your animations are purely two-dimensional (for example, rigid shifts of window content), then you can improve their smoothness by pixel-locking them to the video frame. A motion of exactly N pixels per frame looks smooth even at very low framerates, whereas if you have some left-over fraction of a pixel, you get aliases from the pixel sampling which can be noticeable.

Motion blur is in theory the way to make motions look smooth but proper motion blur is expensive, so if you're already having trouble with the framerate then motion blur is probably only going to make things worse. But there may be some way of reducing the cost, for example if the motion is in a constant direction and speed then you could render a single blurred image and use that. Or maybe overdraw partially-transparent copies of the moving image several times to get a "trail".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文