Hey!
I recently released a resource pack that does just what you are describing, feel free to download and browse the files:
Subtle VariantsThe process is fairly easy though, and uses blockstates. Refer to my files in the resource pack above for examples, but in short:
- You extend the original blockstate json file (blockstates folder in the texture pack) of the block you want to add the variations to, by adding more entries to the "variants" array. You generally want to copy the original blockstate file from the default minecraft assets to your resource pack and work on that.
- For each new variant you add in the blockstate file, you have to create a new model which is going to point to your custom variant texture. Each variant requires its own model, but you can just copy / paste the default model file and simply replace the texture name. No big deal.
- Add your textures to the textures folder and you are done. The names should obviously match the ones you specified in the models.
The variants are totally random, but in the blockstate file you can specify a weight, which is basically a way to define the probability of a given model to be displayed. In my pack for example, the bookshelves have 3 variants with no weight, meaning that all textures (including the default) have the same probability. The oak planks also have 3 variants, but the probabilities are 10 / 16 for the default, and 2 / 16 for each variant, meaning that on average 37.5% of the oak planks will be variants.
I suggest looking for tutorials or guides on blockstates if you find any (I didn't), since that's the key feature used for this.