Question

I would like to render volumetric clouds in OpenGL. I found an interesting paper that describes a simple technique to render volumetric clouds. (http://www.inframez.com/events_volclouds_slide18.htm) However I don't know how to create their "fractal cube" (or perlin-noise cube).

My question is: how to create the 6 tileable fractal textures of a cube?

Edit: my aim is to make a volumetric cloud object, not a cloud skybox.

Was it helpful?

Solution

A nice introduction to Perlin noise, written by Ken Perlin himself, is here. He talks about generating a one or two dimensional noise function in some detail, and then generalises it to show how it would work in 3D, to generate a solid cube of noise like you want.

OTHER TIPS

When using a 2D billboarded cloud texture, you create an alpha-blended 2D texture where the transparency looks cloud-like. What they're asking you to do is almost the same thing, only the texture wraps around a cube seamlessly (like a skybox). The perlin-noise filter looks like an algorithm to make something look cloud-like.

My shortcut approach to this would be to use Photoshop's cloud filter to create your texture. Follow the basic concept of this tutorial for the alpha blending, but don't do the circular gradient. Cut it into a seamless skybox-like grid (i.e. so it has 6 sides and folds properly around a cube).

I think the 'fractal cube' texture they refer to is an FBM (Fractal Brownian Motion) fractal generated from a number of octaves of Perlin noise. This Game Programming Gems Chapter discusses how they are formed. The basic idea is to combine multiple 'octaves' of Perlin noise, with each octave having around twice the frequency of the previous octave. You can make this seamlessly tiling by modifying the noise function. Photoshop's cloud filter is basically FBM noise and is seamlessly tiling so you can just use that if you have access to Photoshop.

If you're really interested in nice cloud rendering, then Mark Harris's algorithm is quite good albeit complicated: http://www.markmark.net/clouds/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top