A three-dimensional object may be generated. Energy may be applied to a layer of build material to cause a first portion of the layer to coalesce and solidify in a first pattern. A cooling agent may be selectively delivered on a second portion of the layer of the build material to reduce a temperature of the second portion in a second pattern, the first and second patterns being independent of each other.