Jump to content
  • Advertisement


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


algorithm for photoshop's render clouds

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

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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 this post

Link to post
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]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!