5
\$\begingroup\$

I have a growing sphere in space, and I thought of having a procedural generated texture over it. Since it is growing, I thought a fractal would be a great choice, because more details would be visible the larger the sphere get (and I could mess with some parameter over time to have it animated).

A quick Mandelbrot implementation in GLSL showed it would be too expensive to have it in the devices I am targeting; also, I don't know how to map a cool looking fractal over complex plane onto a sphere without distortions (I expect the players to fly around this sphere in every direction, so there should be no "glued" edges or collapsed points), neither I have the background to devise/project a fractal over the spherical surface myself (probably was done before, but I could not find).

So weighting the requisites of the procedural texture:

  • Fast to run, for low-end/mobile GPU;
  • Over a spherical surface domain;
  • Growing in details with growing in size;
  • Possible to animate (BONUS);
  • Cool looking (of course);

then I thought it might be impossible within the constraints. But since I am no expert in this fractal thing, I thought I could ask it here first before scraping out the idea.

Maybe it is really not a fractal I need, and there is some other kind of noise with growing details I could use. Do you know of such noise generation procedure?

Do you know of any noise generator with uniform distribution over spherical sufaces, or any fractals whose domain is a sphere?

Can you suggest any alternatives for my situation?

\$\endgroup\$
1
  • \$\begingroup\$ Perlin can be run in 3D (not just 2D like you normally see) and the expanding edge of your sphere can move through that space. I'm unsure of the computation cost but you could both animate the parameters and there are quite a number of tricks to get different looks from this kind of noise. Certainly worth a quick experiment in any case. \$\endgroup\$ Feb 10, 2012 at 22:37

1 Answer 1

4
\$\begingroup\$

A very common way of generating noise on the surface of a sphere is to use 3D Perlin noise. I'm not sure how feasible it is to evaluate 3D Perlin noise in real-time on a low-end GPU, though. It is possible to implement it directly in a pixel shader, as this article shows. It's also possible to precompute it and store it in a volume texture, although this will take a lot of memory for a reasonably high-res texture.

Perlin noise is band-limited (its features are all about the same size in 3D space), so it is not in itself fractal. However, if the sphere grows larger then the noise features will get smaller relative to the sphere, which may give you the effect of increasing detail that you want.

Another way to get detail is to sum several Perlin noise functions at different scales and amplitudes to create a kind of fractal noise. In this context, each noise function in the sum is called an "octave". The way this is normally done, the smaller-scale octaves have much lower amplitudes than the larger-scale ones, so if you zoom in it will become featureless. To fix this you might try increasing the amplitudes as you zoom in, while repeatedly fading out the largest octave and fading in a smaller octave to maintain a constant amount of visible detail.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .