7
$\begingroup$

I was hoping I could use Blender's compositor to merge multiple mirror ball exposures into an HDR.
I have 7 images, each with different exposures, all aligned, each square, 32-bit tiff format. Yet every time I run them through picturenaut it turns out to be ATROCIOUS. Is there a way to combine them into a HDR in the compositor?

I'm not looking for a tone mapped image; I'm looking for an actual HDR or exr for use as image based lighting.

$\endgroup$
  • $\begingroup$ I've used HDRShop for similar tasks in the past, but I believe it went completely commercial and then out of business. There are certainly still copies floating around the web, however. My old (copyright 2001) version of it could transform projections (unwrap those mirror balls) and combine LDR images into HDR images which worked fine for my purposes. $\endgroup$ – A C Sep 16 '16 at 3:19
4
$\begingroup$

Blender is not the right tool for this job. Not only will you have a hard time getting the functionality you need, but Blender's color management is fundamentally flawed, so even if you do get results, they'll be wrong.

A better tool would be Hugin. It's specifically designed for exactly the kind of thing you're trying to do (creating an HDR/EXR from a set of LDR images). It's free, open-source, and relatively well supported. Your task is smack-dab in the middle of what Hugin was made for, so you shouldn't have any trouble finding (modern) tutorials for that.

EDIT: If you REALLY want to do this in Blender, I'd be interested to see the results if you used them as textures on an emissive plane. If you ADD (not multiply) all the images together (mix node set to add, two images in; that mix node out to another mix node set to add, with another image in; and so on until you've added all the images together), you'll come up with... something. It'll definitely be higher dynamic range... and it'll definitely contain all the data.

Put that texture on an emissive plane, and render that out to an HDR. It's pretty kludgey, but I'd be interested to see what happens. Hugin is still the right answer, tho ;-)

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ "Blender's color management is fundamentally flawed" surprised you would state this @matt given that you know better. Anyways, PFStools. Add isn't a solution either. The trick is to identify the correct linearized values, and discard the rest from the remainder, filling with the other exposures. DCraw with -T -4 will deliver the normalized linear, the rest is evaluations of the camera's response. $\endgroup$ – troy_s Sep 15 '16 at 20:49
  • $\begingroup$ Meh, you know what I mean. $\endgroup$ – Matt Sep 16 '16 at 13:55
  • $\begingroup$ What is flawed about blender's color mangement? $\endgroup$ – user1853 Sep 16 '16 at 15:31
  • $\begingroup$ The way it maps colors from the scene-referred domain to the display-referred domain. $\endgroup$ – Matt Sep 16 '16 at 15:32
  • 1
    $\begingroup$ @Matt "Broken" would be software that hard codes this. However, given an imager can change this aspect at will, it is not one of the broken things in Blender. There certainly are a few points, but this is in no uncertain terms not one of them. $\endgroup$ – troy_s Sep 17 '16 at 7:56
4
$\begingroup$

There is a heck of a lot of complexity here, not the least of which is background theory.

First, you need to identify that a transform always happens between the scene referred domain and the display referred. Then you need to identify that the scene referred value set always needs to be aligned to your CGI attempt.

Given all of this, the proper solution is to not use a mirror ball, nor Blender. PFStools can generate linearized EXRs from cameras, but they will not be aligned for your scene, as you will have to scale the scene referred values properly, via strength for example, which is a simple uniform scale.

Also, more ideally is to capture your imagery via a lens, such as an 8mm fisheye. You can use longer focal lengths, but this will translate into more work stitching.

If you insist on trying to manually composite images in Blender:

  1. Import your footage linearized in 32 bit or 16 bit float ideally.
  2. Identify the near-linear response of your camera. It typically is a region below a nonlinear shoulder and above the nonlinear toe. Varies camera to camera.
  3. Use the "meatiest" runs of linear data per image, discard the rest. Fill in the missing portions with the meatiest portions from the other images. Assuming decent bracketing, you should have sufficient overlap that the transition between values is smooth.

This is effectively what PFS Tools does, so I would suggest to use it.

I would wager that the TIFF you are loading at 16 bpc is being loaded as nonlinear. Even if you flip it to linearized via the Properties in the UV, the result is still normalized to the display referred domain, so you would need to "decompress" it back to the scene referred values, in the context of your exposure for your scene.

Example: Exposure A at two stops down will have X number of pixels in the linear range. Exposure B will have Y. You will want to borrow the X pixels from A, and identify the same pixels in Y, which should have values very close to A after you multiply by 2^2, as the exposure is two stops hotter. Final image would be the portions of X composited with the portion from Y. Results will be scene referred, ranging from 0.0 to infinity.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.