In this tutorial you'll learn to use the Random Tiles engine. The Random Tiles engine takes a series of images, and distributes them in a seamless tileable random pattern.
The Random Tiles engine is used by two nodes:
For this tutorial we'll a set of autumn leaves from cgbookcase.com that have been combined in a grid in PixaFlux.
The default grid distribution type places the tiles in a rectangular grid pattern.
The Random attributes randomize the individual tiles.
The Poisson distribution type places the tiles in a random pattern that guarantees that no two tiles are closer than a defined radius. The poisson radius is relative to the size of the image, and iterations is how many times the algorithm tries to find a new placement from a previous placement before discarding it.
The Poisson distribution is affected by the random seed attribute.
The Random Tiles engine is designed to randomize the transform and color of the tiles without affecting the current distribution. Explore with different distribution and random values and find a pattern that you like.
All attributes in the Random Tiles nodes are relative, i.e. you can find a pattern you like in a low resolution image, and then increase the output size to render a better quality image. Just keep in mind to keep the same aspect ratio, which affects the Poisson distribution and the scaling of the images.
The Material Random Tiles node takes as input a material and an optional height image input to distribute and randomize the tiles. The height image is used to represent the ground where the tiles are laying on, and it provides ways to blend and deform the tiles.
The tiles baker engine composes the tiles using their opacity and height values, with higher tiles occluding lower tiles. This composition can produce intersections, which can be desirable or not depending on the project. You can see in the previous image how some leaves are cutting through other leaves, which would not occur in the real world.
The tiles baker engine runs a collision algorithm on the tiles and stacks them in a way that avoids intersections. The stack attribute lowers the tiles to the ground allowing the artists to control the way the tiles intersect with each other.
These images show a side view of the tiles and how stack affects the way they intersect with each other:
The height image input represents the ground where the tiles are laying on. In the previous section we set the height of the tiles to 0.2. We'll add as height input a Perlin noise image that ranges from 0.0 to 1.0. The tile baker will generate an image with a height value between 0.0 and 1.2.
This image shows a side view of the ground defined by the height input image, and how the tiles are positioned on this ground.
The deform attribute bends the tiles to make them conform to the ground.
These images show a side view of the deform effect:
The stack and deform attributes can be combined. This will deform the tiles and push them up to avoid collisions.