banner ad
Thursday, March 08, 2007
Perlin Noise v3

In the last post  I used a Perlin Noise to generate a movieClip where the b&w gradient shifts continually through the manipulation of the random seed number.  As an alternative, to generate different pseudo-random results, I decided follow mouse position and assign them to the offset to affects each specific octave noise. 

I also added the channelOptions to create a color gradient. The channelOptions property is number that indicates one or more color channels.  1 (red), 2 (green), 4 (blue), and 8 (alpha). You can combine the channel values by using the logical OR operator ex: 1 | 2. 

		// mouse position
xpos += Math.floor(_xmouse);
ypos += Math.floor(_ymouse);

var p:Point = new Point(xpos, ypos);
offsetArray = [p, p, p, p, p]


»comments

Dustin said...

Very cool man. I could see that being useful to generate clouds.


Lopez said...

So Great!!!!!!!!


Annette said...

not that sings - better than grey version


vinay said...

Really usefull for me thanks


cleverkabel said...

Nice, I'll try this tomorrow in Flex3.


Name
URL
Email
*email address is not published
Remember Me
Comments

CAPTCHA






banner ad