Tuesday, March 15, 2005

3D-ish texture

Most of you know by now that I've been writing code to randomly generate blobs like this for some time now. The only new thing is the texture (most visible in the light areas above). I was led by a friend of mine to Ken Perlin's "Making Noise" tutorial, and sort of adapted the general ideas from that. My images are completely 2D; there is no Z dimension involved whatsoever. But Ken's noise algorithm (and my bastardization of it) can be applied to 3 or more dimensions, so what I'm doing is "lying" to it. I'm telling it that the original "un-noised" brightness of the pixel is its Z coordinate. So now the noise sort of warps itself over this dimension that never really existed in the first place, and gives the appearance of depth; your brain is left with the responsibility of interpreting whether bright is close and dark is far, or vice versa.

0 Comments:

Post a Comment

<< Home