I’m working on a project where I need to create a lot of stone walls. This can be done procedurally to ease the workload. Is’s also useful to use few assets, but this can make the stonewall look repetitive. The solution I have made here is to randomly scale each brick in the length direction of the wall, and randomly rotate the rocks 180 degrees in all 3 axis. I have also made the scalings of the rocks sum up to 100% in each row, so that each row is of the same length. The tutotial became a bit longer than I expected, so I have broken it down to 6 parts.
Part 1. Introduction and demonstration of what I will create
Part 2. Creating the function that creates a array with random numbers
Part 3. Creating the function that scales the array so that it’s sum is equal to the target sum
Part 4. Create function that calculates the position of each brick.
Part 5. Create a wall with a single row of bricks.
Part 6. Create the final wall with randomized use and rotation of meshes
Hope this is of use…