What's new in post-0.2.7 version

Sounds great. I’m looking forward to this feature.

I used to use HDRMerge in the past but some of its limitations made things too complicated and unpredictable at times. For example - its limited auto alignment mechanism as explained here, and bugs like this.

Most of my HDR work is handheld, and for these cases the auto alignment has to be pretty good and flexible. It will be great if your solution will allow a more advanced algorithm that takes into account automatic rotation or perspective corrections.

Besides, I think HDRMerge’s approach of creating automatic masks over the exposures is great, since it allows the user to choose what part will be taken from each exposure. This can help to mitigate ghosting easily. It would be nice if Photoflow will show a similar user interface - where it shows masks that are created automatically like HDRMerge does, and allow the user to play with them as needed.

I don’t know what type of UI + implementation you’ve been thinking of already, but in my view it can be thought of as a multi-exposure RAW developer filter that acts like the Wavelet’s ‘split details’ filter. That is, a filter that generates multiple layers - one for each different exposure that is read from the disk - and sit inside a group where the layers are organized above it (exactly like the Wavelet’s preset works). For each layer there will be an exposure slider for normalizing its brightness and an automatically created mask. So for example if we are merging 3 exposures of +2, 0 -2 EV, the +2 EV layer will be normalized to 0 by decreasing its brightness by 2 stops, and vice versa for the -2 EV layer. The masks will be created like in HDRMerge - to utilize the brightest exposure as much as possible, In parts where the brightest is clipped, the next brightest (i.e. darker) exposure is used.

I am actually thinking about something more integrated, which takes several RAW files, gives adjustable exposure values for each RAW, computes the optimal blending masks internally, and outputs the already combined HDR image.

But this is still a conceptual idea, and very little code has been already written…

One more UI improvement idea, this time to simplify the use of masks.

What I propose (based on some idea from @chroma_ghost, if I remember correctly) is to have two predefined tabs in the layers list, one for the “normal” layers and the second which always contains the “mask layers” of the currently selected “normal” layer.

No need to double-click on the rectangle near the layer name in this case, just select the second layer tab:

What do you think?

1 Like

It sounds fine too, but maybe it will be helpful to make the masks adjustable or at least viewable. Anyway, I think the more important thing is to have a good auto-alignment algorithm that supports rotation and projection correction. I believe that Hugin has such an algorithm.

The mask layers can already be visualized by clicking on the corresponding push-pin button…

What do you mean by “adjustable”?

By the way, concerning the mask visualization my idea would be to introduce a global button to toggle the mask visibility on/off, instead of having a separate button for each mask layer…

my idea would be to introduce a global button to toggle the mask visibility on/off

There you go globalization hitting photoflow, damm it!!! A global switch to turn Earth’s lights on/off, that would be fun. Just one question though, if one’s not able to toogle mask by mask visibility (I hope we’re talking about the same, the mask itself and not the “wireframe”) how are we going to check each mask contribution to the image? :hibiscus:

 
PD
BTW looking forward the tab thingie… who’s picking the tab? {just flies}

my last optically corrected photoflowER =)

1 Like

Let’s assume that we have an object that one part of it is very bright and due to that the default mask arrangement decides to render this part from exposure A and another part of it is very dark so this part is rendered from exposure B. Now if this object is moving and the exposures are, say, 0.5s apart, the object will suffer from ghosting. In different words, the default strategy for maximizing the SNR might come at the expense of deformed/blurred objects. So it would be nice if the user will be able to adjust the default masks and, for example, render the whole object from exposure B - scarifying the SNR on that object but avoiding the ghosting.

I think it’s a nice feature.

I also wanted to ask about offering a simplified toolbox for the masks tab. Normally I find myself needing binary operations on mask layers - combining them, intersecting them, inverting them, etc. I watched the youtube video that shows how to do these things, but I think it’s not intuitive in this way, and hard to remember which layer type is needed for which operation.

In my opinion it will be more convenient and straightforward for the user to express the relations between mask layers using operators like “unite”, “intersect” and “invent”.For example, assuming that we have mask layers l1,l2 and l3, it will be handful for the user to be able to define something like “~(l1+l2)^l3” (which stands for “invert the union of m1 and m2) and intersect it with m3”) using some toolbox of operators rather than layers types.

Yep, though I personally have slightly different “issues” with masks itself (ok so lighter combines masks); I fully agree with @assaft’s suggestion , pretty standard in compositing and for most pips will be much easier to use. But we are not most people!! {a coakroach to another}

The visibility would till be on a mask-by-mask level, but not on a “layer-by-layer-within-a-mask” level…

It would work like this:

  • when an image layer is selected, the “Layer mask” tab is pre-filled with the mask layers associated to the selected layer
  • when switching to the “Layers mask” tab, there is a button to toggle on/off the visibility of the combined result of all mask layers in the tab

The current way of doing this is:

  • insert l1
  • add l2 above l1 and set the blend mode to lighten
  • add an invert layer
  • add l3 and set the blend mode to darken

I’m not really sure how a toolbox could be introduced at this level, unless one adds a node-based representation of the layers structure (something I’ve been already discussing in the past, but which would require a lot of UI programming…)

It would work like this:

when an image layer is selected, the “Layer mask” tab is pre-filled with the mask layers associated to the selected layer
when switching to the “Layers mask” tab, there is a button to toggle on/off the visibility of the combined result of all mask layers in the tab

Ok I see, like the straightforwardness :smile_cat:
 

For my own mental health I did a quick squeme with just 2 masks, it seems that when the upper mask opacity modes is

  • Lighten ============== adds only outside mask below
  • Lighten + invert ======= adds only inside mask below
  • Darken ============== intersects below mask //1
  • Darken + inverts ====== substracts only inside mask below

//1 – only region present in both masks will be visible

 
When below mask is inverted, despite being a bit confusing 4 the brainz, behaviour stays the same, but inverted :carousel_horse:

You can think of it like this:

  • lighten is equivalent to a logical OR
  • darken corresponds to a logical AND
  • the logical 0 corresponds to the mask being completely red

Ok, got it… if I ever have a son I’m gonna call him logical zero… then my grandson logical zero junior, beauty!!

1 Like

What I’m trying to say is that this knowledge (that lighten is eq. to logical OR, darken is eq. to AND, etc, and how to arrange the layers in order to utilize the blending modes correctly) is far from being intuitive and straightforward for inexperienced users. I think it will be helpful if the mask layers tab will be organized in a different way, which exposes a set of boolean operators directly.

I have done some more work trying to simplify the use of masks in photoflow.

The idea is to have a specific list of blend modes for mask layers, which are more suited for combining opacity masks together.
The new blend modes are the following:

  • Mix: equivalent to Normal, it combines the mask with this simple formula: mask = opacity x top + (1 - opacity) x bottom
  • Intersection: it takes the darkest pixel between the top and bottom layers; sort-of a logical AND
  • Multiply: it multiplies the top and bottom mask values. Similar to Intersection, but with a slightly different output when combining feathered edges
  • Union: it takes the lightest pixel between the top and bottom layers; sort-of a logical OR
  • Exclusion: it produces a sort-of exclusive OR of the two masks

Here is an example of the new blend modes in action, when combining two path masks:

Bottom mask:

Top mask:

Mix mode at 50% opacity:

Intersection mode:

Multiply mode:

Union mode:

Exclusion mode:

What do you think?

3 Likes

it’s wonderful it’s wonderful *

One problem I still need to solve before I can publish the code is backward compatibility: at the moment, it is not possible to correctly read files which are using the standard definition of blend modes for masks…

I can dig the graves :radioactive: {a death emoji would suit better)