A 1024x1024x1 texture is one meg. One byte per texel should give enough precision for the clouds
That's only for opacity. Don't forget the shading.
2. It all depends on your *texture* resolution, perspective projection, and scale. If I take out only one octave, I lose considerable detail. Look: let's start with a 16*16 texture as primary octave. 8 octaves would give you a 2048² texture, where every pixel has been 'fractalized'. That's more or less the resolution I use. If you cut down to 5 octaves, the maximum you will get out of your fractal function is a 256² texture. That is clearly not enough.
3. You can't combine one octave per colour channel. But you can preprocess 3 to 4 octaves into the alpha channel, by pre-adding them. The more ocvtaves you preprocess, the larger the texture will have to be. 3 octaves would be a 64² texture, that is acceptable to update every frame. It could even be created in realtime by using render-to-texture feedback.
Anyway, we're getting into very complex tricks here. Getting this to work and to look good will probably take a LONG time
I implemented it yesterday evening. It works, with the exception of a slight flaw in the exponentiation pass that required an additional texture shader (you can't address a texture on per-fragment level using the RGB result from a regcom, I didn't thought of that).
"Hugo writes: 'The secret behind Terragen's beauty: rather than going for all out brute force and mathematical accuracy, Matt just writes algorithms that produce good results, rather than trying to exactly model the physics. The clouds are essentially a beautiful bodge.'" Do you have any idea which algorithms they're talking about? I tried to find more details, but couldn't
Well, hmm, yes and no. Some time ago, and friend and I had a discussion with Matt about a realtime version of TerraGen, and he went briefly over his algorithms. But I guess details are his private 'professional secret'. In a nutshell, he means that the clouds look like 3D, but are really just a 2D plane. The trick is to make them look like 3D through the shading.
[edited by - Yann L on May 22, 2002 10:47:36 AM]