Protect the floor with dropcloths or builder's paper.
Add a few drops of grease-cutting dishwashing detergent to a bucket filled with warm water. Dampen a cloth with the mixture. Wipe down the water pipes to remove surface oil and grime.
Cover shut-off valves with paper and masking tape.
Spray the entire ceiling and pipes with oil- or shellac-based primer, using an airless sprayer; water-based primer is an option for PVC pipes. If you're only painting the water pipes, use a short-handled 6-inch roller and paintbrush.
Allow the primer to dry as indicated on the label. Shellac- and water-based primers typically need about two hours of drying time, while oil-based primer requires at least eight hours.
Spray the entire ceiling and pipes with two coats of water-based paint, using the airless sprayer. If you're only painting the water pipes, use the roller and brush.