#### Archived

This topic is now archived and is closed to further replies.

# algorithm for photoshop's render clouds

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i know how to make an image similiar to clouds, using some perlin noise techniques, but i need to know how to reproduce the effect that photoshop has, being you can use two colors... in regular noise generation, you have frequency, persistance, and octaves, normally but im not sure on how to add colors into the mix, in photoshop it works like a range, if you specify colors 100,100,100 and 101,101,101, in photoshop, your going to get a picture that has two colors randomly situated around each other (through some algorithm) for my world making utility, i need to generate a large number of height maps, using this same technique, without having to go into photoshop and do it my self does anyone know this algorithm?

##### Share on other sites
To get this effect, i'd take the standard linear interpolation formula between two colours, and feed the interpolation factor with the output of your perlin noise generator (between 0 and 1).

So say you wanted red->green clouds, you would have

output = green*factor + red*(1-factor)
where factor = perlin noise output

[edited by - Thraddash on November 11, 2003 7:24:05 AM]

##### Share on other sites
If you are making a height map just use the values returned from the Noise() function and scale them.

So if your Noise() function returns 0.0...1.0 just multiply it by whatever height you want, there is no need to use colors because a height map is usually greyscale. All you need is a two-dimensional array with floating point height values.

You can also scale it so that negative values are below sea level (with 0.0 being sea level.)

I did it that way and the terrain looks very nice.

[edited by - Endemoniada on November 11, 2003 1:57:03 PM]

1. 1
2. 2
3. 3
4. 4
frob
14
5. 5

• 16
• 13
• 20
• 12
• 19
• ### Forum Statistics

• Total Topics
632167
• Total Posts
3004533

×