An apparatus for generating a three-dimensional object, the apparatus comprising: an energy source to apply energy to a layer of build material to cause a first portion of the layer to coalesce and solidify; and an agent distributor (202, 206) to selectively deliver a cooling agent onto a second portion of a layer of build material; 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 control the agent distributor (202, 206) to selectively deliver the cooling agent onto the second portion of the layer in a second pattern, the first and second patterns being independent of each other; wherein the controller is to determine, based on a temperature distribution of the build material prior to the selective delivery of the cooling agent, an amount of and location of the cooling agent to selectively deliver to achieve a target temperature distribution, wherein the apparatus further comprises a temperature sensor to obtain temperature feedback representing a measured temperature distribution from the layer of build material prior to delivering the cooling agent, wherein the cooling agent is selectively delivered based on the measured temperature distribution, and/or wherein the controller is to determine, prior to controlling the agent distributor (202, 206) to deliver the cooling agent, the temperature distribution of the layer of build material based on a thermal process model, wherein the controller is to control the agent distributor (202, 206) to selectively deliver the cooling agent based on the temperature distribution. an energy source to apply energy to a layer of build material to cause a first portion of the layer to coalesce and solidify; and an agent distributor (202, 206) to selectively deliver a cooling agent onto a second portion of a layer of build material; 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 control the agent distributor (202, 206) to selectively deliver the cooling agent onto the second portion of the layer in a second pattern, the first and second patterns being independent of each other; wherein the controller is to determine, based on a temperature distribution of the build material prior to the selective delivery of the cooling agent, an amount of and location of the cooling agent to selectively deliver to achieve a target temperature distribution, wherein the apparatus further comprises a temperature sensor to obtain temperature feedback representing a measured temperature distribution from the layer of build material prior to delivering the cooling agent, wherein the cooling agent is selectively delivered based on the measured temperature distribution, and/or wherein the controller is to determine, prior to controlling the agent distributor (202, 206) to deliver the cooling agent, the temperature distribution of the layer of build material based on a thermal process model, wherein the controller is to control the agent distributor (202, 206) to selectively deliver the cooling agent based on the temperature distribution. control the energy source to apply energy to the layer to cause the first portion to coalesce and solidify in a first pattern; and control the agent distributor (202, 206) to selectively deliver the cooling agent onto the second portion of the layer in a second pattern, the first and second patterns being independent of each other; wherein the controller is to determine, based on a temperature distribution of the build material prior to the selective delivery of the cooling agent, an amount of and location of the cooling agent to selectively deliver to achieve a target temperature distribution, wherein the apparatus further comprises a temperature sensor to obtain temperature feedback representing a measured temperature distribution from the layer of build material prior to delivering the cooling agent, wherein the cooling agent is selectively delivered based on the measured temperature distribution, and/or wherein the controller is to determine, prior to controlling the agent distributor (202, 206) to deliver the cooling agent, the temperature distribution of the layer of build material based on a thermal process model, wherein the controller is to control the agent distributor (202, 206) to selectively deliver the cooling agent based on the temperature distribution. wherein the apparatus further comprises a temperature sensor to obtain temperature feedback representing a measured temperature distribution from the layer of build material prior to delivering the cooling agent, wherein the cooling agent is selectively delivered based on the measured temperature distribution, and/or wherein the controller is to determine, prior to controlling the agent distributor (202, 206) to deliver the cooling agent, the temperature distribution of the layer of build material based on a thermal process model, wherein the controller is to control the agent distributor (202, 206) to selectively deliver the cooling agent based on the temperature distribution.