Lightroom brush mask is actually a vector brush?!

I always thought Lightroom did a raster mask. It always felt so smooth, well blended, Photoshop/Gimp like that I never really cared to check it.

Turns out, they save all the brush strokes in the metadata! It’s not saved as a raster at all!

So Darktable does a similar thing, it also saves the points in the sidecar, albeit hashed. But why can’t it be as good as Lightroom? Why does Darktable brush feel so vectory and why can’t it have a flow setting or brush opacity setting and blend brush strokes to increase opacity when multiple strokes are drawn over the same pixels. And why can’t it have a negative brush like an eraser?

We were always talking about raster masking and how impossible is it to make in Darktable but as far as I know now, Lightroom doesn’t even have a raster mask, it does everything like Darktable does just with some more/better options and UI/UX.

With this newly found info, I have to ask again. Can Darktable have the same vector brush masking as Lightroom has?
Please, don’t be snarky telling me to go learn C, I’m immune to those comments. I know it’s a lot of work and you don’t know that I’m not willing to sell my house an pay someone to do it.
I’m just asking in theory. Is this now more possible then the raster masking?

Sample raw and xmp sidecar from Lightroom:
IMG_1522.CR2 (27.3 MB)
IMG_1522.xmp (71.2 KB)

The same? no. Similar/even better working? Yes. “Patches welcome!”

Since Lr saves brush strokes as vector but hides that from user that’s not so great :wink:

There are ways to make “negative brush” that would work as eraser without modifying vecotr paths… This is just a quite a bit of coding work that someone would have to do. Nothing like learning C and then doing it yourself :slight_smile:

Is there something wrong with their brush system?

Well, it’s supposed to be a brush, not a line tool or path tool. So it’s best if it feels like a brush too.

Besides collecting some serious funds for somebody to do it. Maybe it brings in some outside help :slight_smile:

It’s copyrighted, proprietary code, that we have no access to and copying it directly to dt is impossible :wink: I was being literal: we can’t have the same (as in bit by bit identical) brush system :stuck_out_tongue:

The brush stuff could very well be improved and work nicely, just there has to be somebody to do it :slight_smile:

What am I to say to this xD?
Well, obviously when I said if Darktable could have the same brush as Lr I didn’t mean it literally bit by bit I meant it if it could could offer (at least) the same features and be as nice as the one Lr has.

I guess what I’m asking is if this would still require the entire app to be on the GPU like vkdt? In which case I won’t even bother with this because we’ve already established that that would be an insane amount of work and a dirty hack to to develop it in the current Dakrtable.

But if this now changes the whole conversation and this means that the vector brush in DT could be as nice and performant as the one in Lr then this changes the whole ball game.
Just imagine if we could finally dodge and burn like everybody else and use a Wacom tablet to do the brushing like everybody else. I’m getting tears already just thinking about the possibility of that. How much potential that would bring to DT, it would be a complete app then, capable of replacing Lightroom 100% for any use case.

It’s not really that big of a problem, just need to design a brush layering and unlayering, then make it “go fast” via simd+openmp/opencl and it’ll work nice. It’s just “a bit” complex…

Hm, but you know what. Darktable brush doesn’t render the effect while you draw, it renders the placeholder and when you let go of the brush it renders the effect.
Does this create the same problem as the raster masking we were talking about in the previous threads about this?

What if the vector brush didn’t have the placeholder and instead the view would update with the correct effect as you draw?
Would this behavior create the same problem that we discussed in the raster brush convos? In that it would need the whole app to be on the gpu like vkdt?

fwiw: i think the boundaries between raster and vector masks are fluent here. vkdt also stores a long list of vertices and re-rasterises all of them every frame. you could write a ui that lets you move these data points vector style after the fact. so i think most of this discussion is really about ui.

writing a CPU/simd rasteriser for this purpose sounds incredibly tedious. i mean this is pretty much exactly what GPUs were built for some 25 years ago. they are really good at rasterising a lot of stuff in pretty much no time.

displaying the masked render as you draw is a matter of performance. very easy to do if it’s fast enough. an older version of vkdt also displayed a polygon line instead of the mask directly. it was a 1-2 line of code change to show the final render. not sure this will be a viable option for a slow CPU rasteriser.

2 Likes

So in layman’s terms, it’s the same problem be it vector or raster so just say your good byes to that idea? :sweat_smile:

I think I’m still gonna craft a few feature request for the layering, eraser and edge detection improvement of the brush tool if anyone ever wants to pick those up but if it’s the same problem like the raster brush then I’m done bugging everyone about that feature. At least in the current Darktable. Now vkdt… that’s another story, get ready :joy: :rofl: :sweat_smile:
Jk, I’ll be respectful :sweat_smile:

1 Like