Pages: [1]   Go Down

Author Topic: Rawtherapee integration in LR  (Read 2075 times)

StephaneB

  • Full Member
  • ***
  • Offline Offline
  • Posts: 148
    • http://www.lumieredargent.com
Rawtherapee integration in LR
« on: November 16, 2015, 06:24:47 pm »

When I first got my Fuji X-T1 in September 2014, X-Trans processing in LR was not satisfactory for most of my landscape pictures. I looked at other solutions and came away impressed with Photo Ninja and RawTherapee.

I bought Photo Ninja because it was pretty good and ingeniously integrated in an LR-based workflow. You define Photo Ninja as an external editor. LR produces a TIF file and sends it to Photo Ninja. Photo Ninja can go and retrieve the corresponding RAW file, and when you save your work, Photo Ninja replaces the TIF files LR sent with the result of its own demosaicing and treatment.

As time passed, I came to like RawTherapee more and more, but it is not as well integrated in LR.

So I wrote a Powershell script to call RT so that it mimics PHoto Ninja's file handling :

Param(
     [string]$filepath
)

$tiff_file = Get-ChildItem "$filepath"
$save_location = $tiff_file.DirectoryName
$file_basename = $tiff_file.BaseName
$file_basename = $file_basename.Substring(0,8)
$raf_filename = $save_location + '\' + $file_basename + '.raf'
$ArgList = @('-o ' + $tiff_file, $raf_filename, '-w')
$cmd = 'C:\Program Files\RawTherapee\rawtherapee.exe'
Start-Process -FilePath $cmd -ArgumentList $ArgList -Wait -WindowStyle Maximized
$ArgList = @('-o ' + $tiff_file, '-S', '-b16', '-t', '-Y', '-c ' + $raf_filename, '-w')
Start-Process -FilePath $cmd -ArgumentList $ArgList -Wait


Since LR cannot run a Powershell script but can run a .bat script, I wrote the following little .bat to call the other script:

rem lr_rt.bat
@echo off
powershell.exe -File D:\usr\bin\lr_rt.ps1 %*


In LR, you declare lr_rt.bat as the external editor.

What the main script does is the following:

1. get all the information about the tif file produced by LR
2. from there get the path to the corresponding RAW file
3. build an argument list for RT so that it opens the RAW file
4. run RT a first time, in interactive mode. There, you get RT with your RAW file and you do all your settings. The settings are automatically saved in a .pp3 file that RT will automatically associate with the RAW file in the future.
5. run RT a second time in batch mode to replace LR's tif file with a rendering of your settings in RT.

When you edit your file in RT, there is no need to save anything. When you're finished, just close RT. The .pp3 file will keep all your settings automatically.

In the mean time, LR's processing of Fuji RAW files has been considerably improved. I do not find that it lack in the fine details department anymore. RT is still maybe a bit better for that, but most of the time it comes down to sharpening.

However, RT still gives way more fine grained control on the processing and that can be useful. One thing that I find major is that RT allows to set the contrast and lightness in Lab mode, meaning I can increased the contrast without getting more saturated colours. RT has excellent film simulations as well, much much better than in LR. There are other things, but more marginally useful to me.

Hope this can be useful to someone :)
Logged

Stéphane  [url=http://www.lumieredargen

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1854
    • Frank Disilvestro
Re: Rawtherapee integration in LR
« Reply #1 on: November 17, 2015, 05:22:54 am »

Hi Stéphane

That is great! Thanks for sharing.

Just a note for those who want to try this script (besides having to install powershell)

1) The script is coded for .raf files, so you have to change it if you want to process other kind of raw files (such as .nef, cr2, etc.)

The line to change is the fifth one:

$raf_filename = $save_location + '\' + $file_basename + '.raf'

Just change the three letters in bold

2) Raw Therapee sometimes install within a folder that has the version number as part of the folder name. Just make sure you are pointing to the right folder (in my case it was C:\Program Files\RawTherapee-4.2.363\rawtherapee.exe)

3) Call the powershell script from the batch file: The last line should have the path to the .ps1 file (powershell file), in the example posted:

powershell.exe -File D:\usr\bin\lr_rt.ps1 %*

Change the path in bold to the one you used (and the name you assigned to the powershell script)

It worked like a charm

Regards,

john beardsworth

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4755
    • My photography site
Re: Rawtherapee integration in LR
« Reply #2 on: November 17, 2015, 06:17:04 am »

Had you tried my OpenDirectly plugin? I don't test against specific third party apps, but it's free for one external app, and is cross platform.

John
Logged

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1854
    • Frank Disilvestro
Re: Rawtherapee integration in LR
« Reply #3 on: November 17, 2015, 07:06:48 am »

Had you tried my OpenDirectly plugin? I don't test against specific third party apps, but it's free for one external app, and is cross platform.

John

That is a very cool plugin. What I like about Stéphane script is that you end up with the tiff file stacked in the LR database, which you can acomplish with a couple of extra steps if using the plugin. On the other hand the plugin is much easier to install and use.

StephaneB

  • Full Member
  • ***
  • Offline Offline
  • Posts: 148
    • http://www.lumieredargent.com
Re: Rawtherapee integration in LR
« Reply #4 on: November 17, 2015, 04:58:03 pm »

What I like about Stéphane script is that you end up with the tiff file stacked in the LR database, which you can acomplish with a couple of extra steps if using the plugin. On the other hand the plugin is much easier to install and use.

Thanks Francisco. That is exactly what I liked so much about Photo Ninja and tried to replicate.

John, I have used your plugin, it is great, of course, and well beyond what I am able to do becuase it is genralized and very easy to use by being integrated in LR's UI. Thank you so much.
Logged

Stéphane  [url=http://www.lumieredargen
Pages: [1]   Go Up