Tuesday, June 11, 2013

Perlin Noise Bump Maps

Perlin noise is a method for generating pseudo-random numbers. Normally a purely random number generator produces a very noisy image that doesn't give us much value.









Pure static, no real useful properties.














However, using a smoothing function, we can use the above image to give us something less random. Eventually we can use the generated randomness to produce interesting images.








A smoother image, still too random for our purposes however. As we use a larger mixture of smoothing, we get closer to a desired image. 

















Now it's almost starting to look like a marble surface.



















Several layers down we have a very nice, and smooth image. 


















Here is a colored image produced from the above noise.


While I could go a few steps further to produce a more realistic sky, I believe this image demonstrates our purpose for Perlin noise.










Moving on to the raytracer: I use this noise to jitter an object's normal across its surface to produce image like this.


As you can see on the sphere, the shading on the objects changes based on the bump map. The sphere was given a marble-like bump map, the box on the right has a wood-based map, and the left is a checker pattern wobbled around a bit.


The maps are "maps" so much that they are sampled during the render time, though they don't exist in physical memory.



The bump maps interact strangely with reflective or refractive materials. Though the checkered bump map gives a nice etched glass appearance for mirrors.







Not global illumination this time. Takes too long to render.









That's all the features I have for my raytracer right now. I might work on it this summer, if I do I'll update this blog with any changes.

No comments: