In one example, an apparatus for generating a three-dimensional object includes an energy source to apply energy to a layer of build material to cause a first portion of the layer to coalesce and solidify, an agent distributor to selectively deliver a cooling agent onto a second portion of the layer, and a controller to control the energy source to apply energy to the layer to cause the first portion to coalesce and solidify in a first pattern and to control the agent distributor to selectively deliver the cooling agent onto the second portion of the layer in a second pattern independent of the first pattern.