Shooting model trains: Tilt-shift lenses and depth-of-field.
Well, I've been bucking for an assignment from MRH Magazine to show some fabulous examples, but so far they haven't called. One piece of gear that's particularly applicable to shooting trains is a tilt-shift, or perspective-control lens (i.e., "PC-lens"). These things are fairly expensive, but you can buy a bargain brand that's still capable of producing super-sharp images, such as those from Rokinon and Samyang. For example, a 24mm f/3.5 maximum-aperture tilt-shift lens from Rokinon costs about $800, while Nikon's version is over $2,000.
What does a tilt-shift lens do? Its principle benefit is being able to shoot long skinny things (like trains), or large flat things (like a layout), while still being able to keep the entire train or layout in focus, without having to stop-down to an ultra-small aperture. Instead of the normal plane-of-focus being parallel to the image-plane, a tilt-shift lens can alter the angle of the plane-of-focus, enabling lines or planes not completely parallel to your image-plane, to be completely in focus.
So, instead of stopping your lens down to f/32 to get a whole train in focus (which starts to erode sharpness due to diffraction), you would only need a few inches of depth-of-field if using a tilt-shift lens to change the angle of the plane-of-focus to the same angle as the train or layout (this is known as the Scheimpflug principle).
In the photo below, the line of the train is parallel to the camera's image-plane (sensor), making this the easiest way to keep an entire train in focus when using a fixed-mount lens. However, when the train isn't parallel to the image-plane (and you're not using a tilt-shift lens), you need a ton of depth-of-field to keep everything in focus.
The photo below was shot with a 60mm macro lens on a full-frame DSLR. The depth-of-field is fairly shallow even though the aperture was set to a relatively high numerical value of f/16. This is mainly due to the fact that the lens is just a few inches away from the subject, and the closer the focus (i.e., the shorter the subject-to-camera distance is), the less depth-of-field you get. Unfortunately, I can't show the "after" picture since I don't own a tilt-shift lens (but as soon as I get that call from MRH, I'm buying one!).
Since most of us don't own a tilt-shift lens, here's the general procedure for getting the most stuff in-focus:
1. Set your camera on a tripod.
2. Set your camera's exposure mode to "manual."
3. Set your lens' aperture to f/22-f/32.
4. Adjust ISO and shutter-speed to enable proper exposure.
5. Determine your lens' hyperfocal distance and set your focus to this distance.
For starters, try an ISO of 200-400, and a shutter-speed of two seconds. If too dark, extend your shutter-speed; if too light, reduce your shutter-speed. Exact exposure depends on the amount of ambient light on your layout, but with a few test-exposures, you should be able to nail it. If you don't know your lens' hyperlocal distance, the general rule is to focus approximately one-third of the way into your scene.
Since your shutter speed is likely to be several seconds at that small of an aperture, you'll also need to set your camera to its self-timer setting so that you don't mar the image when touching the camera to release its shutter. Using the camera's built-in self-timer takes the place of an old-school cable-release, or use an IR-remote to enable more precise timing of your shutter-release. IR-remotes are inexpensive and handy to have: For Nikon-owners, you can get the Nikon ML-L3 IR-release for just $17.95, or the Canon RC-6 if you own a Canon DSLR for only $19.89.