News‎ > ‎

First layer of nebula.

Well, it's been a very frustrating 10 days or so. I've gone from knowing nothing about perlin noise, simplex noise, GLSL, pixel and vertex shaders, to knowing more than I wished to and still being totally confused.
View of the whole universe (you'll be inside looking out)
I started trying to get generated content in to darkvoid with some simple stars as noted in my last blog entry. The next step is to add in some nice nebula effects. I knew I would need some noise for this, a lot of complex generated content uses noise somewhere in the algorithm, clouds, water and even whole planets.

I had assumed this would be fairly easy. Ardor3D has noise classes in it. I first tried to use the 3D simplex noise, but found that creating 3D textures to apply to spheres failed. I knew there were GLSL shaders around that did what I wanted to do, so I figured it was time to learn something new (which is why I do this!!).

I managed to find a few examples of shaders for generating noise, but they were either broken, in C, or had issues in the maths that caused odd artefacts in the output.

I eventually managed to persuade a shader I found from the author of simplex noise demystified , unfortunately I didn't understand it and I got several problems with the output.

I spent a few days playing and finally managed to come up with a solution, so I now have Java using Ardor3D and GLSL to produce some noise, added a bit of fbm and I'm now happy with layer 1 of the nebula. Watch this space