views:

691

answers:

4

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.

A: 

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).

bkritzer
Thanks for your "Particle Effects Tutorial" link.
Soubok
A: 

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.

mattnewport
A: 

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

Eric
look at this: http://www.youtube.com/watch?v=C9CfhyajVjY
Soubok
To be honest, those clouds are just mediocre. I would guess it's some cellular automata-based cloud simulation coupled with something like the Perlin noise cloud rendering.
Eric
A: 

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.

Tartley
this is what I was looking for: http://www.noisemachine.com/talk1/16.html
Soubok
my implementation: http://code.google.com/p/jslibs/source/browse/trunk/src/jsprotex/noise.cpp
Soubok