Nebulaes ( cont: strange attractors )

Published August 13, 2006
Advertisement
In the past days i've been working on the strange attractors in order to get nice looking nebulaes. First, let me say that, like any procedural algorithm, it's easy as hell to code the basics, but hard as hell to find the good parameters so that "it looks good". So although in "amounts of code" i haven't done much, i've been very busy testing.

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:





Previous Entry Strange attractors
Next Entry Nebulaes, part II
0 likes 10 comments

Comments

blue_knight
Since you are rendering this into the skybox anyway, would it be possible to do a small seperable guassian blur or something along those lines. Basically you just want to get rid of the graininess without losing too much detail right? You should be able to find a blur size that accomplishes this without too much extra cost.
August 14, 2006 12:08 AM
wackatronic
Very nice! caek for you!
August 14, 2006 06:05 AM
Ysaneya
Different color themes (2 line to change):





And some photoshopping by Betelgeuze (compositing nebulae pics with older planets pics):




August 14, 2006 12:45 PM
swiftcoder
Wow! That last photoshop picture is just incredible!
August 14, 2006 12:52 PM
Ysaneya
Hey Pier,

Thanks for the proposal, it might be handy. I might (or not) need it later this month, or in the future for other releases. 1 TB would be enough for quite some time i guess :)
August 15, 2006 01:08 PM
sushbone
I too add an request to provide us a high-res picture, this would so so well for a wallpaper.

This looks so incredible, unbelievable that this is all done by algorithms.

Just imagine what might be possible in a couple of years with computerperformance increasing. Your planet engine and then these nebulaes finally added as volumetric stuff, where you can go to, in and through, i think then we are really there.

I have a question, are you going to change the skybox during gametime and travelling somehow? Because, you are creating a so large world with lots of different planets, and you are sticking so much effort into the creation of the nebulaes.
I think this really needs a change in the look of the skybox. Travelling from planet to planet and the skybox with the nebulaes not changing (even the nebulae size) would look strange somewhen i think.
And different skyboxes could create so much different athomsphere, just image what strange type of worlds you could create.

sketch
August 18, 2006 07:01 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement