Tuesday, 27 March 2012

Procedural 3D Texturing

This mixes 3D Perlin Noise Turbulence with a 2D detail image to attempt to create an appearance of rocks covered in moss.

I've fixed my filtering issues =)
They were cause by the way I was storing the fragment positions. I resolved the issue by changing to recreating them from the depth buffer.
This combined with the previously mentioned dFdx/y functions creates perfect deferred texture filtering.

Also I've altered and simplified my compression it now uses fixed size run length codes (unsigned short (2 bytes)) which has reduced file sizes by a few megabytes.

This "landscape" consists of 512 * 512 * 300 = 78,643,200 voxels.
Its file is 1.56MB = 1,643,755 bytes.
Therefore, a 78 times reduction.