More TSBK03 demos

Here are a few demos from later lectures


Metaballs

Skärmavbild 2024-10-04 kl. 14.43.18


Simple demo showing how metaballs can be implemented without any optimizations, doing to much work in the CPU and checking all-to-all. And it still runs.


download


Scrolling textures

Skärmavbild 2024-10-04 kl. 14.45.01


Maybe the most meaningless screen shot? Sorry for saying that things are simple, but an effect done in two not very complicated lines of shader code is not really what I would call advanced. But it looks nice!


download


Plain ASSIMP loaders


Loading ASSIMP files can be a daunting task. My tests on skinning data are not yet good enough to share but the plain loaders of geometry work pretty well. It comes in two versions, one using C++ Vectors and one using GLUGG. They are pretty similar since the extra features of GLUGG does not matter much here.


Both are based on the immediate more sample code “Sample_SimpleOpenGL.c”.


download



Simple GPU particle systems


This is a bare bones particle system in three variations. They are GPU accelerated, using fragment shaders and ping-ponging for calculations. They are just above 200 lines of code, including the function DrawModelInstanced() that is a minimal variation of DrawModel from LittleOBJLoader.


Tested on Mac and Linux. Linux makesfiles are included.


Skärmavbild 2025-09-25 kl. 10.49.06

8-bit particles


The 8-bit particle system uses RGBA8888 format for the textures which limits it to 256 steps of resolution. It still does a pretty good job, but is mainly here for studying the limitations. Note that I must make a 0.5 offset to center the values, since the RGBA8888 only allows positive values.


Skärmavbild 2025-09-25 kl. 10.49.41

Particle system with no initialization


This particle system has full FP32 resolution, which gives us much more freedom in positions and velocities, and we no longer have to resort to tricks due to the 0-255 range.


However, I did no initialization which means that the particles start wherever the systemn wants, with zeroes or arbitrary values.


Skärmavbild 2025-09-25 kl. 10.50.12

Particle system with initialization


This particle system adds a decent (not necessarily perfect) initialization which makes it more controlled fromn the start.


download

This page is maintained by Ingemar Ragnemalm.