algorithm for photoshop's render clouds

Started by
1 comment, last by fireking 20 years, 5 months ago
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?
--FirekingOwner/LeaderFiregames Development &Blackdragon Studios
Advertisement
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]
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]

This topic is closed to new replies.

Advertisement