Saturday, April 13, 2024
HomeTechnologyProducing As a substitute Of Storing Meshes

Producing As a substitute Of Storing Meshes

The 64kB is a class within the demoscene the place the whole executable dimension should be lower than 65,536 bytes, and at that dimension, storing vertexes, edges, and regular maps is a waste of house. [Ctrl-Alt-Test] is a French Demoscene group that has been doing unimaginable animations for the final 13 years. They’ve written an wonderful information on how they’ve been procedurally producing the meshes of their demos.

All of it begins with cubes. By stacking them, overlaying them, reusing them, and tiling them you will get higher compression than uncooked vertexes. Revolution was the subsequent trick, because it makes use of just some factors, plotting it through Catmul-Rom splines, and revolving round an axis. The numbers are pairs of 32-bit floats and earlier than compression, an in depth pawn on a chess board can weigh in at simply 40 bytes. Simply these few methods can take you surprisingly far (as seen within the image above).

They later labored on deforming cubes and putting them right into a semi-randomized column, which occurred to look so much like vegetation. This isn’t the first generated vegetation we’ve seen, and the demoscene method centered extra on getting the form and setting the temper slightly than being correct.

Signed distance fields are one other helpful trick that means that you can generate a mesh by implementing a signed distance perform after which operating a marching cubes algorithm on it. In a nutshell, a signed distance perform simply returns the gap to the closest level on a floor from a given level. This implies you possibly can describe shapes with only a single mathematical equation. As you possibly can think about, this can be a common method within the demoscene world as a result of it’s so house environment friendly by way of code and knowledge. [Ctrl-Alt-Test] even has a deep dive into considered one of their initiatives, Immersion, with a breakdown of the place the house is allotted.

There are many different ideas and methods right here, akin to producing textures and creating a C++ sizzling reload system for quicker iteration. It’s simply unimaginable that the executable that performs the entire video is smaller than only a JPEG screenshot of the video. It’s a reminder that the demoscene continues to be fascinating with new methods and experiences even because the {hardware} stays the identical.



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments