4 ms·
After watching a lot of demoscene stuff and reading about how it's done, you start understanding the limits, and things like the sheep (and especially those con
by userbinator 3y ago
After watching a lot of demoscene stuff and reading about how it's done, you start understanding the limits, and things like the sheep (and especially those conical sections for legs) become obvious how they can be expressed as very compact equations and similarly animated. However, it's interesting that AFAIK the majority of these demos rely on the GPU and its powerful 3D acceleration capabilities, but 2D (Japanese)anime-style demos seem to be rare and nonexistent in the smaller sizes. Is 3D animation actually easier?
As a side-note, "mouton" is the French word for "sheep", and thus "mutton".
- lifthrasiir 3y agoGiven that most 2D animations would still depict events in 3D space, it would be far easier to describe 3D events directly in general.
- throwaway17_17 3y agoI think the way you described it explains the prevalence of 3D for demos. Geometric shapes in 3D can be described in closed form equations requiring a minimum of storage, however, the only ‘mathematical’ way to store 2D style animation is as SVG curves for outline and then a space filling algorithm for the coloring of those areas. The curves are, I am making a back of the envelope guess, going to require as much storage for a single arc/line as the description of a geometric volume in total. Then there is the issue of storing the animation of those curves which is going to require even more space, compared to the relatively small transformation matrix for the 3D volume. I would also guess the complexity of the rendering algorithm would increase (both in actual algorithmic and space complexity). — Caveat: one could argue that storing a series of bitmaps and then playing them back like a flip book could be ‘mathematical’, especially if some procedural uncompressing algorithm was used to generate full frames from on some change differential, but I don’t think that exists and the space requirement would be huge compared to 3D volumetric descriptions.
- nine_k 3y agoI don't see why interesting 2D animation could not be made using closed forms. A rectangle takes 2 parameters for shape, and 2 for position; 3 if you rotate it. Similarly for an ellipse. Realistically you also need a Z-index. The soft-min function mentioned in the post would allow to merge 2D shapes the same way as 3D shapes, at the expense of one additional parameter. An approach similar to the signed depth field and ray marching can be used to determine boundaries, and thus the kind of painting inside. This would require to start a scan line at a position which is guaranteed to be outside of any of the shapes; this must be easy. Texturing would be harder, but, knowing the position inside the shape relative to its center, it would be possible to procedurally generate nice gradients, regular textures like bricks or scales, or noisy textures like fur. Using the same trick with calculating the gradient would allow to create nice thick / styled outlines. Doing this on a CPU would, of course, be pretty slow, so this would need to be written as a bunch of shaders somehow. I don't see why it won't work though: each shader could take one scanline, they would share the same geometric model, and shaders are good at doing a lot of FPU math in parallel.