1. A method comprising: receiving a set of boundaries for an object portrayed in a raster-based image; utilizing a processor that is a component of a computer to generate an initial gradient mesh of the object, the initial gradient mesh bounded by the set of boundaries and including control points, wherein the initial gradient mesh comprises a grid of two-dimensional control points; calculating a residual energy between the object in the raster-based image and the initial gradient mesh, wherein the residual energy is indicative of differences between the raster-based image and the initial gradient mesh; and generating an optimized gradient mesh by modifying one or more of the control points from the initial gradient mesh based on the residual energy.