The software uses various cartographic mapping thingies to account for the distortion in photographic images. However, I'd like to stitch together several images that don't have this problem (backgrounds from animation).
How do you do this?
The only variables that should be optimized when stitching a flat background are the translation variables:
It sounds like you may be optimizing yaw (y), pitch (p), and roll (r), which use the irrelevant lens parameters in the calculations and will introduce the distortion you're referring to by trying to "fix" the lens distortion.
To optimize for translation only, first you need to select Custom parameters in the Hugin expert interface » Photos tab » Optimize » Geometric:
Then go to the new Optimizer tab that appeared:
Here, ensure only the rows of the X, Y, and Z columns are checked, except for the anchor image's row. You can do this by right-mouse clicking each of those columns and then clicking Select all:
Make sure your control points are accurately set. Finally, you can click Optimize now!, and you should see a pretty low error:
You can hit Ctrl+Shift+p to open the Fast Panorama preview. Under the Projection tab, make sure to select Rectilinear as the projection:
Once you're satisfied with the preview and have configured the stitcher, go ahead and stitch!