Roof
The roof is made of two main parts: the ridges and the peaks.
For each position the distance to both the nearest ridge and the nearest peak is calculated.
These values are multiplied by random weights and added together to make the final value.
This "final value" is then passed through a transformation function to get the actual roof height.
Block Palette
There are some number of block palettes that the houses can use.
These palettes determine which blocks are used for the different parts of the house.
For example, the roof of this building is made of bricks.