Currently textures in Minetest are repeating, for example here all cobblestone nodes are visually made up of the same small stones positioned in the same way everywhere:
Here is the same image with stochastic texture sampling used for all nodes:
Whether stochastic texture sampling looks good depends on the texture, some parameters and opinion. In this case, it looks bad for the mese lamp (in my opinion) because the mese lamp texture should repeat.
I partly implemented stochastic texture sampling in Minetest some time ago and didn't continue because I don't know if it's worth the code complexity.
More screenshots: viewtopic.php?p=423224#p423224
The code can be found on this branch in my Minetest fork: https://github.com/HybridDog/minetest/t ... Fem_rebase
I tried to rebase it (m_stochastic_texture_sampling_broken_after_rebase branch) but made some mistake somewhere.
In addition to stochastic texture sampling in Minetest, I have implemented a demonstration program in a single HTML page: https://hybriddog.github.io/stochastic_ ... ling_demo/
(source: https://github.com/HybridDog/stochastic ... ling_demo/)
It allows testing the algorithm with any SDR texture, for example default_stone.png:
With stochastic texture sampling, it is possible to re-use only high frequency details of textures, which makes nodes look more natural, adds visual variety, and prevents artifacts which are visible when a wall of the same node is watched from far away.Stochastic Texture Sampling
- Hybrid Dog
- Member
- Posts: 2852
- Joined: Thu Nov 01, 2012 12:46
- GitHub: HybridDog
Stochastic Texture Sampling
Re: Stochastic Texture Sampling
Looks cool! I know there is also seed related textures, called global textures, but MTG doesn't use them.