Posts

Showing posts from May 13, 2019

Generating seamless repeated 3D-textures (repeated voxel objects)

When creating 3D textures (voxel objects), it's may be required to make it "seamless repeated", that means that if the textures placed joined together, the gap between them are smooth (invisible). For example, it's useful for filling the whole 3D space with repeated texture in a raymarching-based project. Hint: Such whole 3D space filling by a repeated 3D texture gives feeling of repeating in the space and may be desirable. But, if you need to eliminate such repeatng feeling, for example, for rendering clouds using 3D-texture, you may mix two same textures but with different scales (1 and 1.2225) and shifted. Maximal color -  max(texture1, texture2) works good for the clouds. Here we explain method for making any 3D texture (voxel object) seamless repeated. Note, the resulted object will be smaller due this procedure. It's based on idea of mixing border voxels with changed mixing value. Normally such technique is used for creating smooth music lo