code to make a perlin noise 3d texture?
I need to make some animating cloud affects, and I know it can be done by generating a 3D texture from perlin noise, and then viewing 1 slice of the texture at a time. So a texture of 256x256x60 would produce 60 frames of animation. But I cant find any good places online or any source code on how you would produce such a texture. I have searched the web for perlin noise and such, but havent found anything good, or they are extremely to complex in that they go through the rendering of the whole sky box and all that extra crap. I just need to make the 3D texture and nothing else because I already have the code written to render it.
So could anyone lead me to a website that covers this indepth?
Possibility
Dude...
Get it straight from the source. Some of the sites linked from there might go a little more into detail for the particular effect that you''re looking for.
pwd
---
What makes you think I''m not going to like a goatse pic on my window? - nes8bit
![](http://www.actioninternet.net/users/penguin/pics/EARE.jpg)
E.A.R.E. To keep your children away from elephants!
Get it straight from the source. Some of the sites linked from there might go a little more into detail for the particular effect that you''re looking for.
pwd
---
What makes you think I''m not going to like a goatse pic on my window? - nes8bit
![](http://www.actioninternet.net/users/penguin/pics/EARE.jpg)
E.A.R.E. To keep your children away from elephants!
Yah, I actually have that original noise.c file from perlin, but how do you use it? There is not a single comment or instruction on what to do with it.
How do you go about filling a structure like this?
typedef struct
{
unsigned short r, g, b;
} Color;
and say I want to make a 256x256x60 3d texture
Color Cloud[256][256][60];
So how do you go about filling this structure so that it looks like a bunch of clouds in it?
Possibility
Edited by - Possibility on April 9, 2001 2:01:40 PM
How do you go about filling a structure like this?
typedef struct
{
unsigned short r, g, b;
} Color;
and say I want to make a 256x256x60 3d texture
Color Cloud[256][256][60];
So how do you go about filling this structure so that it looks like a bunch of clouds in it?
Possibility
Edited by - Possibility on April 9, 2001 2:01:40 PM
Did you check out any of the links on that site? Especially the one to Hugo Eliass page? He deals with just that, and has a little cloud program w/pseudocode.
The easiest way to actually fill your cloud color buffer would be to use a color map. Clamp the noise values between 0 and 1 and assign color values based on where they fall (probably want to include alpha). Basically 0.0 = r0 g0 b0, .5 = r180 g180 b180, 1.0 = r255 g255 b255 or something like that. Then either weight the color values depending on the value of your noise, or set it explicitly depending on where it falls (eg between 0.0 and 0.5 = r0 g0 b0).
pwd
---
What makes you think I''m not going to like a goatse pic on my window? - nes8bit
![](http://www.actioninternet.net/users/penguin/pics/EARE.jpg)
E.A.R.E. To keep your children away from elephants!
The easiest way to actually fill your cloud color buffer would be to use a color map. Clamp the noise values between 0 and 1 and assign color values based on where they fall (probably want to include alpha). Basically 0.0 = r0 g0 b0, .5 = r180 g180 b180, 1.0 = r255 g255 b255 or something like that. Then either weight the color values depending on the value of your noise, or set it explicitly depending on where it falls (eg between 0.0 and 0.5 = r0 g0 b0).
pwd
---
What makes you think I''m not going to like a goatse pic on my window? - nes8bit
![](http://www.actioninternet.net/users/penguin/pics/EARE.jpg)
E.A.R.E. To keep your children away from elephants!
Here is my code to create a cloud plasma effect:
|
Gandalf the Black
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement