Texture tiles with variation

In most games, the terrain texture is made by many different tile types (dirt, grass, rocks etc) and each tile type also has many different variations, ex.: 10 different images for the “grass” tile type instead of only 1 image tileing over and over. All for the visual variation that gives a more natural look to the terrain. I have two questions about how to do this on blender:

  1. How do I generate such texture images in the first place? Those 10 different images for the grass tile type are all seamlessly tiled together. I know gimp has some tools and plugins to make a single texture image tile seamlessly with itself. I know how to generate textures by rendering a blender scene and paying attention to the corners to make sure they match. I can manually make a single image seamless by sloowly using the clone tool in gimp or texture painting directly in the model in blender. But how do I make 10 different images tile seamlessly with each other?

I have a couple ideas of how to do this, such as manually putting all combinations together and manually edit them with clone tool. But all my ideas seem to consume an astronomical amount of time that would make it unviable. Is there some smart and quick technique that I’m not aware of?

  1. Suppose I already made through step 1 and I have the 10 different images. How do I put them together on a blender material? My only idea would be using lots and lots and lots of stencil maps on either texture or material nodes. One stencil map for each tile variation plus another stencil map for each tile type. But that would also be a very lengthy process and really hard to mantain. Maybe I could also bake it all into one really astronomically huge texture. But that doesn’t seem viable as well and would proly blow up my computer memory.

Maybe there is already a tool inside blender to do this quickly that I’m not aware of?

One way to do it is to use a particle emitter to scatter planes across the surface of another plane/terrain.

Create 10 planes with each of your varied textures. But don’t think of them as square tiles that need to but up against each other. Think of them a circular with an alpha radial falloff. This way you can place them where ever and they will just blend in. Add those 10 planes to a group. Call it “grass_elements”

Now make your master terrain plane and apply a dirt texture to that. Make it a particle emitter. Enable render emitter so your ground plane does not disappear on render. Under particle visualization type choose group and type in “grass elements” into the group name field. Select the option to choose randomly from the group.

At this point, you need to tweak it till you get what you need, but you with the above mentioned setup, you would have a system where you can scatter various image maps across another material.

That is one way to approach it.