Dealing with motion when shooting HDRIs

This post continues from our main HDRI workflow article:

Some of my favorite HDRIs were shot in busy streets with crowds of people around, or with dramatic fast-moving clouds and rapid sunsets that might seem impossible to capture to those unfamiliar with the magic of masking.

Contrary to what you might initially think, these things are in fact fairly trivial to deal with as long as you’re aware of them and shoot carefully.

In a nutshell, you have four tools at your disposal:

  1. Timing your shots and planning for masking
  2. Shooting in order of priority
  3. Controlling control points
  4. Manual layer blending

Plan to Mask

When shooting in a busy street, tourist attraction, or any other location where there are people/cars/cats outside of your control, the easiest way to get rid of these elements is to shoot the same angle multiple times with the intention of masking out anything you don’t want.

If you can, take your time and be patient. Chances are those pesky tourists are going to move away after a while. Heck, maybe you could even ask them to step aside for a few seconds while you get that shot.

In a city street example, that traffic light is going to change sometime and you might get a lucky clean shot. But even if you can’t get a single clean shot, you can get a couple shots with fewer cars in them. With enough shots, you’ll likely be able to capture every part of your image cleanly, even if no single image is empty.

Worst case scenario, you may have some small areas that were never empty, but those can easily be filled in with inpainting.

Prioritize the Sky

For most HDRIs, the sky is what’s most important – it’s the part that’s generally most visible (not covered up by foreground CG elements) and emits the most light.

By the time you finish shooting the panorama, the light might be quite different than when you started, for example at sunset.

Maybe the clouds light up bright pink for only a few seconds, and you don’t want to miss that opportunity.

Start by shooting your upward rotation to capture the sky, and then work your way down. If the sunset happens to get even prettier while you are shooting, you can always stop and start again from the top.

By the time you finish, the sun may have completely set and the ground could now be darker than before. This is mostly unavoidable, but it’s better if the ground in your final HDRI is slightly inaccurate (which most people won’t be able to tell) than missing the glorious sunset entirely.

In the same example as shown above, you can actually see the sunlight is quite different between these photos, since I had to wait a few minutes for the parked car to move. But can you tell in the final pano?

Delete Moving Control Points

In case it’s not obvious, having control points on moving objects will likely confuse PTGui and introduce visible seams or even massive alignment issues.

If you notice seams in your panorama, the first place to look is your control point table, and sort by distance value. You probably have some control points with high distances (i.e. PTGui sees a disparity between the control point location and its “expected” location if the object were static).

The three control points in the clouds have massive distance/error values, since the clouds moved a lot between these shots.

Often simply deleting control points that appear on moving objects is enough to resolve the issue.

In some cases though, such as for moving clouds, it may not actually be bad to have control points between them, it may be your only option, as long as you don’t also have control points between static objects in the same images as well. It’s the relative difference that causes the seams.

Naturally, this might mean you have some high distance-value control points in your table, but as long as you know why they’re there and how you’re going to deal with them that’s totally fine.

Having control points on moving clouds can help stitch those more seamlessly, just be careful to avoid introducing seams on static things because of that. As usual, masking is your friend, and you can simply mask out everything except the sky for your upward-facing shots.

Manual Layer Blending

In some cases, such as clouds flying by overhead in high winds, you may not be able to avoid some stitching artifacts. These could be obvious seams or strange patches of inconsistent contrast. In one photo, the hillside might be in the sun, but in the next, it might be in the shade of a cloud.

Recent versions of PTGui (v12+) have some different ways of blending images together, and an “optimum seam” finder:

In my experience, the default (Zero-overlap with optimum seams) is usually the best overall, but can sometimes cause dark and bright spots, especially near the zenith or when you have many small masked areas such as lens flares, birds, or moving people.

One of the common artifacts with zero-overlap blending, a dark patch

In those cases, the other blending mode, “multiband” (and without optimum seams), might do better. So I find I often export both a zero-overlap version and a multiband version, then overlay them in Affinity Photo and paint a mask to get the best of both and avoid their artifacts.

Multiband fixes that particular issue, though it also subtly darkens the sky behind the clouds

However, if you still have problems caused by significant motion, you may even need to blend the images yourself by hand.

To do this, after exporting the HDRI normally, simply check the “Individual HDR Layers” output box to save a separate pano for each image.

You will probably also want to enable only the images you think you’ll need so that only panos for those images are saved:

After doing this, you’ll end up with a set of images like this:

Now you can open the original HDRI in your editor of choice and drag the new layers on top of it.

From here it’s just a matter of manually creating masks for each image one by one until you’ve fixed all your problems.

HDR Ghosting

“Ghosting” is what happens when there is motion within the same HDR bracket set.

One major feature of most professional HDR merging software is the removal of these ghosts. My little script doesn’t have this feature, but most of the time you’ll be masking out moving things completely anyway so it doesn’t matter what they look like.

In some rare cases, however, you might actually want to keep some moving objects in the HDRI. For example, this kitten:

Ghosting artifacts caused by moving kitty
Fixed ghosting by choosing one of the brackets to take priority at the cost of more noise

To get this result, I had to manually modify the masks for the compositing nodes in the blend file that my script created so that it used one of the darker frames (hence all the noise) for the whole cat.

If anyone knows of a good HDR merging tool that can output linear unbiased 32-bit images that also handles ghosting, please do let me know!

If you have any other struggles with motion when stitching HDRIs, let me know in the comments below and I can try to help you find a good solution đŸ™‚

1 thought on “Dealing with motion when shooting HDRIs”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.