Nvidia GeForce 4090, Restricted Chaos Game Cube, 100 Million points
2024-12-17. Playing the "Restricted Chaos Game" using a cube of 8 vertices, disallowing the same random vertex to be chosen twice. The result is this incredible fractal.
CHAOS GAME
The chaos game involves starting with a point, and then moving partway to one of the random vertices. In this case, we move 50% of the way. Repeat ad infinitum.
RESTRICTED CHAOS GAME
One restriction was imposed for this cube rendering. Without it, the chaos game just produces an evenly distributed point cloud within the cube -- cool colors (see below for how it is colored), but no shape; no fractal. The restriction is that you cannot pick the same vertex twice in a row. A little but more order within the randomness. This is what brings out the fractal pattern you see. Order from Chaos.
DISTANCE FADE
Real-time distance fade and brightness is applied. The further a dot is away from the camera, the darker it is. The closer, the brighter it is. It LERPs toward black and white, though not very much towards white when close. This gives it more visual appeal, though it does make everything darker when the entire fractal is further away to visualize it all at once.
RENDERING
Rendering is real-time. 100,000,000 single pixel dots on the 4090 GPU. Resolution is 1920x1080. We render 50x more dots than the screen has pixels! The rendering produces both a color and depth render target buffer. Post processing takes these buffers and enlarges the pixels to 5x5 pixels in size, using depth to ensure proper Z ordering. Dot enlargement size does not vary according to distance. For video upload, I upscale the result to 4K to preserve the fidelity during video compression.
COLORS
Each vertex has its own color, and when moving towards a vertex, the distance travelled is taken into account when LERPing towards that vertex's color. An additional change is that colors closer to the center of the fractal are darker. This helps give realism to this virtual object. I am considering to produce some kind of global illuminance for future videos, but that may be overkill. There is actually several caves within the fractal, including a large one at the center. But I couldn't get the coloring to bring out the details, and it also wasted time entering and exiting. I have difficulties keeping these videos short while showing everything I want to display.
CAMERA
Control is manually controlled with an Xbox 360 controller, 6 degrees of freedom, using the two proportional thumbsticks, two proportional triggers, and two bumpers. It is a challenge to keep all 6 inputs under control, with smooth motion, and keep the rotational / roll appropriate.
CODE
MonoGame C# with custom HLSL shaders.
INSPIRATION
Demo scene! Graphics demos during the 1990's VGA days showed many demos asking the viewer "how many dots?" to show off real-time rendering speed. No GPUs back then. Just a 320x200 linear frame buffer, 1 byte per pixel. It was non-trivial to plot even a single pixel quickly, with lookup-tables and bitwise operators to avoid the slow multiply-by-320 requirement (in case you're wondering: 256 + 64 = 320, and powers of two are just bit-shifts).
HARDWARE
Alienware m18 R2 + 4090 GPU. Purchased the first day Dell made it available: January 23, 2024.
NVIDIA GeForce RTX 4090 16GB GDDR6 (laptop version)
14th Gen Intel Core i9 14900HX (24-Core, 36MB L3 Cache, up to 5.8GHz Max Turbo Frequency) (16 E-Cores, and 8 P-Cores hyperthreaded = 32 V-Cores total)
64 GB: 2 x 32 GB, DDR5, 5200 MT/s, non-ECC, dual-channel
18" FHD+ (1920 x 1200) 480Hz, 3ms, ComfortView Plus, NVIDIA G-SYNC + DDS, 100% DCI-P3, FHD IR Camera
AlienFX RGB backlit Alienware CherryMX ultra low-profile mechanical keyboard
4 TB, M.2, PCIe NVMe, SSD
PLAYLISTS
Xona System 8: • Game Dev Engine #1. A New Beginning.
Voxel: • Voxel Engine #8 - Correct Peripheral ...
Nvidia 4090: • Nvidia GeForce 4090, 3D Sierpiński Ca...
Road: • Pseudo 3D Road #8 - infinite vegetati...
Wave Function: • A.I. Texture Generation, High Res (Wa...
Graph-All: • #1 Graph-All Equation Renderer - Mult...
Ray Cast: • 3D Ray Casting Engine: #4 (Global Gam...
Scroll Shmup: • The First Pixel: Devlog #9 - Enemies,...
Arena Shmup: • Arena Shmup Demo #3 - Object Pool Opt...
3D Polygon: • 3D Polygon Engine #9 - Multiple Mater...
GW-BASIC: • GW-BASIC - Escape From Monster Cavern...
WEBSITES
GitHub: https://github.com/JDoucette
Blog: http://thefirstpixel.com/
Studio: http://xona.com/