On another forum I frequent, someone posted a link to a fake tilt-shift video and asked how it was done.
Previously I had seen still tilt-shift images and googled around to figure out how to create them using Gimp. Lots of references like this one at Gimparoo, or various blogs. One thing in common these had was using a gradient mask to blend a blurred copy with a non-blurred copy, or in the case of fancier efforts that use the focal blur plugin, a gradient to drive that plugin.
To me, these efforts left a bit to be desired, as the gradient would leave odd artifacts of focused bits of objects crossing in front of the focal plane gradient point. I figured a good way to get around this would be to construct a complete mock depth map based on the image. Here is an example of a before image, and the fake tilt shift.
Keep reading for the how-to...
Starting with the source image, I added a bunch of horizontal guides at all the ground point of all spots that have vertical objects. This is because the image distance is vertical. If this was done with a horizontal DOF you would rotate everything 90 degrees:
Create a new layer, and fill it with a white-black gradient:
Now create a new transparent layer above that. Using the guides and the image, sample the gradient layer with the eyedropper tool to get the colour at the ground of each vertical object. Using the polygon tool, select the area that would be at that depth (i.e. the flat surface of a building) and fill it with the sampled colour. Also make sure you fill the entire area you want in focus with a solid colour. This shows the solid blocks representing the different depths in the image:
Here I have turned on the gradient layer's visibility to show how the bottom of each solid (parallel to the focal plane) block matches up with the gradient at its base:
Now copy visible and paste as a new layer (or just merge them together) then use an upwards motion blur (in this case). The motion blur should in the same direction as the gradient, light to dark. This will blend the gradient with the blocks to make the transition less dramatic, but preserve vertical lines like the edges of the buildings.
:
Run the focal blur plugin. Remember to set the "focus" slider to match the area from the depth field you want in focus. Here I used a focal blur of 30. Now boost the saturation and play with the levels to make it look more toy like, if desired. Once again, the final result:
This technique can also be used for scenes that fade horizontally into the distance. Here I started with a train image from Wiki Commons. Here is the depth field I used:
and the result:
This is one of my first experiments in the field of tilt-shift photography. The expert eye will have recognized immediately that this seems to be a photo of a miniature model of Ålesund … actually it is not, it was just faked to look like one ...
Tracked: Jan 26, 05:03
After a welcome to the (hopefully) lots of new viewers from the Miro Guide, I continue to shrink a real building site to a model train scale. An important tool for this is the Focus Blur plugin. The homepage needs some assistance in translation from Ja...
Tracked: Apr 07, 16:32
This post was mentioned on Twitter by john_elkins: [delicious] added: A Better Fake Tilt-Shift with the Gimp - Rob A's (Im)personal Blog http://bit.ly/hjCU9
Tracked: Feb 24, 03:54
Tracked: Jan 16, 02:26