9 ms·
At the hardware level, the author of BSNES recently wrote up an excellent rant on sources of latency in modern machines https://byuu.org/articles/latency/ https
by corysama 10y ago
At the hardware level, the author of BSNES recently wrote up an excellent rant on sources of latency in modern machines https://byuu.org/articles/latency/ https://byuu.org/articles/latency/
But, most of what you are talking about is software latency. At 1/30th of a second each, software pipelining systems seem cheap individually but pile up very quickly. Hit a button, read the button, react in AI, react in animation, react in physics, react in graphics, process in the GPU, process in the display device. These can easily add up to 5/30ths of a second with poorly planned software. In the middle of all that, the animation and audio has aesthetic requirements for smooth transitions that can insert a 1/2 second lag in the middle of that process. Now we're up to 20/30ths.
Regarding animations: I've been in convos with managers requesting character animations to be "Smoother, but more poppy!" because of the conflicting needs of aesthetics and control latency. The best compromise I've found is to design a smooth transition, but have the underlying representation pop and the visuals skip immediately to mid-way through the animation.
- makecheck 10y agoI can see the it-adds-up argument but there are also plenty of techniques to deal with that. (Maybe it is an education issue for developers.) For instance, in a lot of cases, a human cannot reasonably observe a particular type of change on every frame so you can skip frames. What I mean is, suppose you have tasks A, B, C and D to perform “each frame”: you might be able to perform tasks A and B on odd-numbered frames and C and D on even-numbered frames, with the user no wiser, as long as the result seems fine. Another technique is to prioritize the start and finish but not in-between. Often, intermediate frames are relatively crappy from a “niceness” or even correctness standpoint, and nobody really notices because the frames go by quickly. As long as the end frame looks as nice as possible and everything is in exactly the right place, you can get away with a lot of short-cuts for the steps taken to get there.
- smallnamespace 10y ago> Another technique is to prioritize the start and finish but not in-between. The problem with techniques like these is that it's almost impossible to fully generalize them (e.g. in the case of intermediate frames, if some of them are really wrong then you get sudden clipping or jumpiness). So if your 'fast' technique only works for a certain set of parameters, then you have just introduced an implicit dependency into your system: things are fast enough while the app looks like X, but go a bit beyond that and it suddenly breaks.
- corysama 10y agoIn games, everything works in frames. Usually, AI, animation and physics can be completed in a single frame. But, it is very common to pipeline graphics to a separate thread that runs a frame behind everything else. The GPU frame and display frame (multiple frames on some TVs...) are pretty much impossible to eliminate. Ideally, a game would sample input multiple times per frame, go with wide parallelism for every step (very difficult for graphics until DX12/Vulkan came along), start some GPU work before physics is completed, render in less than 1/60th of a second and the users would enable no-processing "game mode" on their lag-optimized TVs. But, that's all not common practice.
- taeric 10y agoI'm not sure what you are referring to about skipping halfway through a transition, but a sinusoidal transition is almost always what you want anyway. Possibly a power distribution, one. That is, it should not just evenly slide from point A to B. You want some acceleration.
- noblethrasher 10y agoAcceleration is important, but the “pop” that they wanted was probably some form of the “squash and stretch” effect that we all subconsciously associate with good quality animation[1]. [1] https://en.wikipedia.org/wiki/Squash_and_stretch https://en.wikipedia.org/wiki/Squash_and_stretch
- taeric 10y agoThat makes sense. Curious that we think it is quality animation.
- crooked-v 10y agoWhy is it "curious"? It's a direct consequence of attempting to emulate how non-rigid bodies (including people) move in the real world. For a contrast of what happens when there's no squash and stretch in animation, take a look at pretty much everything ever made by Hanna-Barbera before 1990. Everything remains almost pathologically on-model all the time to reduce animation costs.
- taeric 10y agoMost rigid things do not snap and stretch. Phones, paper, books. People will act that way. Some things will compress. Certainly not all things, though. So, is curious if it is always seen as better.
- noblethrasher 10y agoBut, in animated media, "people" can include things like phones, papers, and books.