New Sigmoid Scene to Display mapping

@RawConvert If you have already added the remote upstream:

$ git fetch upstream
$ git rebase upstream/master

You are absolutely correct this time, it converges towards white and never clips. But, as you noted, there will be a point where it is white as in (255, 255, 255) because of 8-bit unsigned integers. I hope the continued story up to +10 EV makes it clear for most users on what to expect.

I think the Shanghai HDRI in post 357 is a pretty good torture test. Happy to try others as well if you find any nice ones!

The default norm is the ā€œpower normā€ which behaves like a mix between ā€œeuclidianā€ (around achromatic) and ā€œmaxā€ (when approaching ā€œsingle primary colorsā€, i.e. red, green, or blue). ā€œLuminanceā€ works really poorly in filmic atm due to blue being greatly undervalued which causes gamut mapping problems.

It started out with the method present in RT. Kinda developed into its own thing now with control over the amount of correction as well as taking the ā€œenergyā€ of the output into account. Do you btw know anything more about the Adobe reference? There isnā€™t any paper or similar linked in the codeā€¦

2 Likes

Thanks. So would the whole sequence be this please? -

$ git remote add jandren https://github.com/jandren/darktable.git
$ git remote add upstream https://github.com/darktable-org/darktable.git
$ git fetch jandren
$ git fetch upstream
$ git rebase upstream/master
$ git checkout -b sigmoid_tone_mapping --track jandren/sigmoid_tone_mapping

Please note, I donā€™t want to store code from one build to the next, I donā€™t want any ongoing complexities. That is, in one build session, starting from scratch, I just want to download everything I need, build, then subsequently do some housekeeping and e.g. delete the code.

This wonā€™t work unless you invert the last 2 commands.

Moreover this is not at all a complete build session. However that should work if you have already a darktable build chain running.

Thatā€™s a good question - multiple documents reference it being Adobe-like, but itā€™s not actually in the DNG spec.

Might have been reverse engineered by observing behavior with controlled inputs? I get the impression Anders Torger did a lot of that in figuring out some of the low-level details needed for dcamprof. Heā€™s got a bit of a rant on Adobeā€™s vagueness with DNG: Yet some DNG comments (from a raw software developer)

2 Likes

image

Format should be only set as ā€œ%ā€ ?

1 Like

Unrelated: do you have another font? It looks different, especially the tall 1.

Recent change on current master ?

I tried the remote addā€™s in my new empty folder but of course they didnā€™t work! What do I need to do, starting from nothing, please? E.g.

mkdir -p ~/sigmoid/darktable-code
cd ~/sigmoid/darktable-code
What next?

Just clone it (Jandren) and checkout that branch (sigmoid tone mapping) and do a separate build in a folder called sigmoidā€¦

My regular build dir is under home\darktable and my sigmoid one is home\sigmoid\darktableā€¦so build in home\sigmoid\darktable\buildā€¦

Just use the generic instructionsā€¦

Iā€™m on Windows so i create packages and then install and use a custom config directory to keep them separateā€¦

Pretty straightforward

EDIT there may be a slicker way but this works and I keep both separateā€¦any updatesā€¦git pull build again

That may be possible to do this way but I only know the other way around. First you have to set up the normal darktable build chain. As you want a one shot build you can do this:

$ git clone https://github.com/darktable-org/darktable.git
$ cd darktable
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/darktable_or_what_you_want ../.
$ sudo make install

This should give you a running darktable master branch. Then, you grab the jandrenā€™s work:

$ git remote add jandren https://github.com/jandren/darktable.git
$ git fetch jandren
$ git checkout -b sigmoid_tone_mapping --track jandren/sigmoid_tone_mapping
$ git rebase master
$ sudo make install

EDIT: Iā€™ve forgotten the usual submodules before the cmake:

$ git submodule init
$ git submodule update

@phweyland , thanks again. It all seemed to go ok down to ā€œgit rebase masterā€ but when I did ā€œsudo make installā€ plus my password, I got the following -

make: *** No rule to make target 'install'. Stop.

Any thoughts please?

If it helps, this is what I did in total -

mkdir -p ~/DT-top/sigmoid5/darktable-code
cd ~/DT-top/sigmoid5/darktable-code
git clone https://github.com/darktable-org/darktable.git ~/DT-top/sigmoid5/darktable-code
git checkout master
git config submodule.src/tests/integration.update none
git submodule init
git submodule update
./build.sh --prefix $HOME/DT-top/sigmoid5 --build-type Release --jobs 5
cmake --build "/home/bill/DT-top/sigmoid5/darktable-code/build" --target install -- -j5
git remote add jandren https://github.com/jandren/darktable.git
git fetch jandren
git checkout -b sigmoid_tone_mapping --track jandren/sigmoid_tone_mapping
git config --global user.email "rawconvert@pixls.us"
git config --global user.name "RawConvert"
git rebase master
sudo make install

You should be in build folder to run make install, shouldnā€™t you ?

The build script will create and or go there but to do the commands coming after that would you not have to back out first and then go back in to build sigmoid ?? Could this be the issueā€¦ you are using the actual commands and he is using the script??

So I did
cd ~/DT-top/sigmoid5/darktable-code/build
sudo make install
This seemed to work ok, then I did
$HOME/DT-top/sigmoid5/bin/darktable --cachedir $HOME/.cache/sigmoid-5 --configdir $HOME/.config/sigmoid-5

but this had no Sigmoid module in it. 3.9.0+869~g07d86ce04
But the timestamp on the file looks right.

Thereā€™s also a darktable in $HOME/DT-top/sigmoid5/darktable-code/build/bin but itā€™s the same version and has no sigmoid module.

Sorry to be a pain with this! Any further steers please?!

I gave you my best adviceā€¦If you can set up regular DT master and build that okayā€¦then just repeat the same processā€¦ Just this time clone Jandrenā€™s repo and use a separate directory called sigmoid. Use the exact same process as building the master. No merge , remote , rebase etcā€¦as I said maybe not elegant but its simple and it works ā€¦

@RawConvert we are polluting the thread. Letā€™s continue on private.
@priort, yes your way is simpler, but for some reason there is a problem with dng file for this version. The issue seems to have gone when rebased against master.

1 Like

Or, you could create a new thread for that, which is preferable, since other people could benefit from the discussion.

2 Likes

@phweyland has been very helpful (and patient!) and Iā€™ve just built 3.9 with sigmoid, and it doesnā€™t crash importing raws, so RESULT. Iā€™ve a busy weekend ahead and will post something up next week in a new thread.

Glad you guys got it sortedā€¦I had never had any issues but I always kept the builds separateā€¦never noticed any crashes with any raws that I tried to use with the sigmoid buildā€¦all good now your all set