Skip to main content
Jeff A. Goulden
Inspiring
August 31, 2022
Open for Voting

P: Include Subject Distance Metadata

  • August 31, 2022
  • 35 replies
  • 3298 views

I'm sure this has been discussed before but I was not able to find any previous posts.  Since the Fall of 2013 Lightroom no longer captures the subject distance into the Lightroom metadata.  I remember hearing that subject distance was not considered to be accurate data and that's why it was dropped.  I reviewed a bunch of my older images and subject distance seems reasonably accurate to me.  I'd like to know who and why the decision was made to drop this data.  And what it would take to once again start capturing it upon import.  If the camera records data, it should be captured by Lightroom during import.

35 replies

Jeff A. Goulden
Inspiring
January 3, 2023

The oldest picture I have that has Subject Distance was from December 23, 2009.  I have a picture I took on December 8, 2009 that does not have Subject Distance.  Both pictures were taken with my Nikon D200 and an 18-200 lens.  I must have upgraded Lightroom between those dates.  All pictures going forward from December 23, 2009 had Subject Distance until after October 7, 2013 when I must have upgraded Lightroom again.  It's a shame that Adobe quit supporting Subject Distance after initially supporting it.  I found it a somewhat useful data field.

johnrellis
Legend
January 3, 2023

Jeff confirms that when he reimports the two sample photos into his LR 12 catalog, neither displays Subject Distance in the Metadata panel, while previously one showed it and the other didn't. He's pretty sure that photos taken with the same camera (D200) on 10/7/13 or earlier had Subject Distance and photos taken after didn't.  

 

I've tested LR 4.0 (released on 3/5/12) and LR 5.7.1 (12/13/14) and neither reads Subject Distance from those photos.  So most likely one or more LR releases between 4.0 and 5.7.1 were reading MakerNotes:FocusDistance into the catalog Subject Distance.

 

 

johnrellis
Legend
January 3, 2023

Forgot to mention: Jeff sent me two sample photos from his Nikon D200, one that displayed Subject Distance in his LR's Metadata panel and one that didn't. Neither contained EXIF:SubjectDistance, and neither displayed Subject Distance in my LR 12.1.

 

It could be that some earlier versions of LR tried to import MakerNotes:FocusDistance into the catalog's Subject Distance, while later versions gave that up.

johnrellis
Legend
January 3, 2023

The LR Focus Distance field, available via the Customize button in the Metadata panel, is very curious.

 

It was added to LR 11, and it appears to sometimes display MakerNotes:FocusDistance.  I believe it's the only Metadata panel field that displays a MakerNotes field.  It's not accessible via the plugin SDK nor in smart collections or in library filters.

 

However, the Focus Distance field is often blank even though the photo contains MakerNotes:FocusDistance.  Of the various camera models in my test catalog that have MakerNotes:FocusDistance, these show blank Focus Distance:

 

- The Nikon Z series.

- Several models of Leica.

- Several models of Olympus, except the E-M5 and E-M5 III.

- The OM Digital Solutions OM-1.

 

Only the non-Z Nikons appear to map MakerNotes:FocusDistance to Focus Distance consistently.  (Other camera makes use differently named fields in MakerNotes to record focus distance, and I haven't tested them.)

johnrellis
Legend
January 3, 2023

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

I added more Nikon pics to my test catalog, and it now has 42 different Nikon models:

 

 

But of those, just 3 models, from 2009 and earlier, have recorded EXIF:SubjectDistance:

 

 

And 26 models, many of them recent, record MakerNotes:FocusDistance:

 

 

Of the 432 photos, only 4 have infinity stored in the LR Subject Distance field:

 

 

And for all 4, EXIF:SubjectDistance is also infinity. For these photos, MakerNotes:FocusPosition is some small value that isn't 0x0f.

 

It appears that MakerNotes:FocusPosition represents a lens-specific focus setting, whose interpretation is specific to the lens:

 

(FocusPosition is in decimal here.) The Z series only sometimes records MakerNotes:FocusPosition:

 

 

All the other models record FocusPosition whenever they record FocusDistance.

 

This spreadsheet has all the data and was generated by the Any Filter plugin's Sort command:

https://www.dropbox.com/s/77f3zd0b03xar2h/nikon-subject-distance.2023.01.02.csv?dl=0 

 

 

 

 

 

 

Legend
January 3, 2023

"I think this occurs when the camera has written infinity into the EXIF:SubjectDistance field. I'm fairly confident that LR is just displaying whatever is in that field."

 

John, I think that you will find that Nikon does not have EXIF:SubjectDistance in its files, so LrC can't be using it.

I have examined my catalog and in the Helper databases there is a table that has extracted metadata from LrC images. Two columns in that table are com_adobe_SubjectDistance and com_adobe_approximateFocusDistance. Out of 10.5k images shot over that past 18 years, only 4 original NEF files have values in both columns and they were taken in 2009.

 

For the first three images, the values in the distance columns match the Maker:FocusDistance as reported by exiftool, but the fourth image does not. LrC has set infinity for this image, whereas the Maker:FocusDistance is 7.94 m.


Here are three shots taken within a minute of each other using the same camera and lens and includes the first image in the list above, yet their LrC Focus Distance and Subject Distance values are very different.

 

Exiftool reports Maker:FocusDistance for each one as 5.96 m, 14.96 m and 10.59 m respectively. The Maker:FocusPosition for these are 0x99, 0x0f and 0xdd. I'm almost convinced that any image with Maker:FocusPosition 0x0f is set by LrC to infinity regardless of the value in Maker:FocusDistance. The last image, DSC_412.NEF, in the list above also has a Maker:FocusPosition of 0x0f.

 

johnrellis
Legend
January 2, 2023

"It's all a bit strange and ultimately, totally unreliable and meaningless."

 

Yeah, I don't understand the technical issues of why cameras don't or can't record the focus distance reasonably reliably.  Physically, it seems each focus position of a lens in a given camera body corresponds to an easily calculated distance.  

 

"There seems to be some point where Adobe assumes the distance is focussed at infinity, even though there is a value in the Maker:FocusDistance field."

 

I think this occurs when the camera has written infinity into the EXIF:SubjectDistance field. I'm fairly confident that LR is just displaying whatever is in that field.

Jeff A. Goulden
Inspiring
January 2, 2023

Thanks for looking into this.  It is all very confusing and the end result is that I'm probably not going to get what I want or need in my custom metadata panel.  I included Subject Distance but it only shows for older files.  Thanks anyway.  I appreciate it.

Legend
January 2, 2023

I have looked into this a bit.

 

Recently, Adobe made the Subject Distance and Focus Distance metadata available in the Custom metatdata panel, but just enabling it doesn't display the information for all images in the catalog. For my Nikon D50/D80/D90/D750, some of the images in my catalog have values in Subject Distance, while others have values in Focus Distance. Most have nothing in either field. The raw files have values in the Maker:FocusDistance field, but Exif:SubjectDistanceRange is always Unknown. Newly imported images get the Focus Distance field filled, not the Subject Distance. There seems to be some point where Adobe assumes the distance is focussed at infinity, even though there is a value in the Maker:FocusDistance field. There is also a Maker:FocusPosition field and I think this comes into play somehow too.

 

Doing some tests, I found the Maker:FocusDistance for an image shot with my Nikon AF-S 70-200mm lens @12566224 had a value of 56.22m, yet taking a shot focussed on the same subject with my Nikon AF-S 24-70mm lens @34mm had a value of 5.01m. In LrC, the first image's Focus Distance was infinity, while the second image's Focus Distance was 5.01m.

 

It's all a bit strange and ultimately, totally unreliable and meaningless.

 

Jeff A. Goulden
Inspiring
January 1, 2023

Thanks John, I guess I'll have to use Any Filter if I need to do a deep dive into a photo or photos.  It would have been so convenient to have that data displayed on my metadata panel.  We'll have to blame Adobe for taking that feature away from us.