16bit workflow with hugin
This tutorial doesn't cover reasons why you might want to shoot with RAW and stitch in 16bit format. It is a simple HOWTO listing the tools available and how to use them with hugin.
Preparing the 16bit images
Start by using dcraw to read the RAW files and batch convert them into portable 16bit per channel PPM files. RAW pictures from my Nikon 8700 have a .nef extension, so the command looks something like this:
dcraw -v -w -4 dscn*.nef
Note that although hugin, nona and enblend support HDR floating-point data, there is no real loss converting RAW data to 16bit colour depth as RAW images are typically only 12bit in the first place. If you need a greater dynamic range than found in RAW images, it is possible to combine bracketed exposures in a HDR workflow with hugin.
convert -rotate 270 -gamma 2.2 dscn3088.ppm dscn3088.tif convert -rotate 270 -gamma 2.2 dscn3089.ppm dscn3089.tif ...
Note that I rotated them at the same time since these are portrait shots. Gamma correction is also applied at this stage since RAW data is generally linear and difficult to view without colour profile management (not yet supported by hugin).
Though you may find that you get better results leaving the gamma correction until after the final blending with enblend.
You can now delete the intermediate PPM files.
Stitching with hugin
EXIF information about the field of view was lost during the PPM stage, so the field of view will need to be re-entered manually, re-optimised with PTOptimizer or transfered from the RAW file using exiftool:
exiftool -tagsfromfile DSCN3088.nef -overwrite_original_in_place -exif:all DSCN3088.tif
This TIFF file is in 16bit per channel RGBA format, which is not viewable in most image viewers or web-browsers, so there is an extra step needed to create portable images:
tifficc -i mycamera.icm myproject.tif output.tif
If you are not working with gamma corrected data, then you can apply this now:
mogrify -gamma 2.2 output.tif