I started out trying to make a particle system to render snow falling. And I actually had pretty good results (post on that later). But in the process I wanted to add a bit of "randomness" to the snowflakes, so I started investigating Perlin noise.
In this linked movie, you can see the background cycle through the different noise maps:
- The first background (in color), is the combined map, which is the 'x-map' in the red channel, the 'y-map' in the green channel, and the 'z-map' (speed) in the blue channel.
- The second background is the "x-map": Lighter values move particle the the right, darker values move particle to the left.
- The third background is the "y-map": Lighter values move the particles up, and darker values move the particles down.
- The fourth background is the 'speed map' Lighter values speed the particles up, darker values slow the particues down.
- The fifth background is... no background at all.
- And finally, it loops back to the first background.
If I get a chance to advance the code, I'm going to try to have it calculate the noise on the fly (rather than pre-generating it and saving it as multiple maps) allowing me to animate the noise over time, giving it an even more varied look.
Find source code on my Processing Wiki
Find three other movies on Flickr
No comments:
Post a Comment