Hi,
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
http://youtu.be/I77b_soLtsk
Part 2. Creating the function that creates a array with random numbers
http://youtu.be/cDEOnDQl1Ec
Part 3. Creating the function that scales the array so that it’s sum is equal to the target sum
http://youtu.be/AhDvv3eiaBE
Part 4. Create function that calculates the position of each brick.
http://youtu.be/EWprHQ7TqyE
Part 5. Create a wall with a single row of bricks.
http://youtu.be/_mDF7ME1mkU
Part 6. Create the final wall with randomized use and rotation of meshes
http://youtu.be/Ub1w9nHpvXg
Hope this is of use…
Cheers !
Morten