Since a couple of months I take weekly photographs of my girlfriend. Every week she looks a bit different. Guess why - she is pregnant ;) Last week she asked if she can have a copy of one of our favorite shots to share with family and friends. 'Nothing easier than that!' - I thought. It is so easy to be so wrong sometimes.
To ease-up post-processing, I always photograph her in front of a white cotton sheet. This allows later separation from background (if needed) in case we want to put her in front of a neater backdrop. However, when I searched for fitting backgrounds that matched my camera angle and perspective, I couldn't find any. What I found were mostly nice background tiles of brick walls and tapestry. But those I couldn't use. I photographed her full-shape, which means there was also some floor material needed in the shot and not just wall.
That was the moment when I started to play around with Blender to create my own artificial backdrop setup. This way I could use whatever background wall and floor tiles I liked best and render those in the perspective that matched my original setup.
What I wanted to achieve:
- Create a flattering background from tiles downloaded from the web
- Render the photograph with the background to create realistic shadows and color bounces
- Montage the final backdrop render with the cut out photograph in e.g. Photoshop
In the following I describe the process in Blender version 2.76b for the Cycles Engine (not the Blender render engine).
1. Build your setup in Blender
At this stage I tried to mimic my studio setup as closely as possible. As a result, I get similar perspective and angle in the end that helps to transfer the believability and realism. One of my goal was to avoid a fake looking shot were my girlfriend was simply montaged into.
In Figure 2 you can see how this mock-up looks like. All distances are one to one copies from the setup (Enable metric scaling in the world settings of your scene). I used two flashes in the original photo without ambient light and both flashes were softened for more decent lighting: the one on the left was a 60x60cm softbox, the one on the right a slightly bigger light-through umbrella. The angles of both lights were chosen to create nice contrast between light and dark areas on her belly.
If you look closely you can see the casted shadows on the white background, which I also wanted to have in my final picture to increase realism.
Another thing that is very important is to match the focal length and camera chip size in Blender to your camera. In my case I used my 50mm lense (Sony SEL-50f18) and I have an APS-C sensor with approx. 23.5mm width (36mm full format multiplied with 2/3).
2. Texturing the planes
For the rendered image's textures I chose a wooden floor material that I found on Textures and a plain white wall in the back. Even if it is never visible from that angle in my shot, I made the effort to apply a bit of proper texturing for sake of realism. To create the normal, occlusion and specularity map of of the downloaded texture I used the good old CrazyBump.
The built-in add-on 'Import images as planes' relieves you from the burden to add a plane by hand and UV-unwrap it. It does it for you and also adapts the plane's ratio to the image size. However, make sure you tick the option Use alpha in the add-on's tool-shelf. Otherwise the image loses its alpha channel and cannot be recovered.
Switch to the node editor and add all the different computed image layers.
In my case I only used Normal map and specularity.
3. Add the image and make the alpha areas transparent
Next add the model's image. I did the masking of the background previously in Photoshop. The white background proved not to be perfect, but better than nothing.
Next thing is to make sure that transparent areas in the picture also get rendered transparently in Blender. The following node setup in Figure 5 achieves that.
After positioning the model's image in the correct position we are ready for a first test render.
So good so far. If you are good with the result - you are done.
I wanted to only render the background in Blender and combine my girlfriend's masked image with the background later in Photoshop.
4. Adjust Blender layers and render background
The result I was going for was the plain background with rendered shadows, but without the actual foreground (Figure 6). To achieve that you need to push the model to another Blender layer (e.g. layer 2) and adjust the Blender rendering (in Cycles Engine) as can be seen in Figure 7.
We are done. Simply safe the result and head over to Photoshop (or your favorite tool) and combine the background with the lovely foreground.