Texture synthesis with histogram-preserving blending
Use this tool to synthesize a new texture of arbitrary size from a provided example stochastic texture, by splatting random tiles of the input to the output using histogram-preserving blending. It works on all random-phase inputs, as well as on many non-random-phase inputs which are stochastic and non-periodic, typically natural textures such as moss, granite, sand, bark, etc.
- High-Performance By-Example Noise using a Histogram-Preserving Blending Operator, HPG 2018
- Procedural Stochastic Textures by Tiling and Blending, GPU Zen 2
Disclaimer: this is a CPU implementation that runs in javascript.
The GPU implementation presented in the paper is orders of magnitude faster.
1. Import example texture:
2. Is your example a tileable texture ?
Tileable textures allow more varied random tile sampling.
3. Select tile size in input image (0-50%):
Larger tile size allows preserving lower frequencies in the example.
The blue tiles drawn below illustrate a possible random sampling of the input with the chosen tile size.
4. Select output image resolution (width, height):
5. Random seed:
2. Is your example a tileable texture ?
Tileable textures allow more varied random tile sampling.
3. Select tile size in input image (0-50%):
Larger tile size allows preserving lower frequencies in the example.
The blue tiles drawn below illustrate a possible random sampling of the input with the chosen tile size.
4. Select output image resolution (width, height):
5. Random seed:
6. Generate output:
7. Output:
The output display might be rescaled. Use the button above to download.
7. Output: