It's still far from perfect, but it's improving. Instead of rendering points, i'm now generating true particles ( billboards, always facing the camera ). About a million of them, to be exact. So, as you can imagine, the framerate isn't very high, but i don't care ( yet ), because in the future the nebulae will be rendered to a sky box instead of being rendered every frame. As long as it looks good and takes less than one second to generate, i'm happy.
Yesterday i added a "glow" effect which is done by taking some particles randomly, expanding them and lowering their alpha value. I then tuned the parameters so that it looked good in my test attractor, and it did. The problem was that as soon as i switched to another attractor, because the distribution of points was different ( more dense, less dense ), the overall "brightness" of the glow effect changed a lot. Using the same parameters, in a second test nebulae, instead of having a nice subtle glow effect, i basically had a white mess due to oversaturation of the additively-blended particles.
Today, i implemented a grid and split particles into this grid. I then discarded all the particles in a cell of that grid except the first one, giving a more or less uniform distribution of particles. Thanks to that, the set of parameters i then choose ( particles size, particles alpha ) is coherent, whatever the attractor is.
I've experimented the "unravel" equation ( kindly given by the chaoscope author ), and he warned me that it was next to impossible to get "nebulae" shapes. To be more specific, you can get nebulae shapes but only in specific 2D views; the attractor, seen from another angle, looks crap, or simply in a plane. I'm going to stick to the "pickover" equation. The generation of the cloud point isn't a bottleneck anyway, so i don't mind the many sin/cos instructions in it.
The main problem that remains at the moment is to lessen the "grainy" effect. If you look carefully at the screenshots, you'll notice that the whole cloud seems to be made of circular blobs. Increasing the size of the particles only leads to over saturation of the colors, and you get a white mess, so it's not a possible solution. I've been thinking of rendering it to a floating point texture and then use a tone mapping operator to avoid the white mess, but the problem is, ATI cards such as the X800 do not support additive blending with floating point textures, so i'm out of luck.
Another solution is to increase the number of points in the cloud, but it takes more time, and since the particles are statically stored in a vertex buffer in video memory ( VBO ), their size is limited. I'm probably already using around 200 MB of video memory just for my particles right now. I should maybe render them dynamically instead of statically, but it'll slow down the rendering even more..
Anyway, here are a new set of screenshots, they're all coming from the same nebulae, seen from various angles: