New feature: support for CTL scripts

Thank you!

Just for info: I successfully compiled ART with CTL functionality on Xubuntu 23.04 in a virtual machine.

Hi,
Is there any way to add tool tips or comment messages on UI of ART with CTL?

No, sorry. I considered it but then decided it was not worth the effort. I can reconsider though if people think they might be useful…

I will appreciate if you could reconsider it. Thank you.

+1

Thanks

2 Likes

Hi,
it should be on master now. Example:

// @ART-param: ["ev", "Exposure compensation (Ev)", -10, 10, 0, 0.01, "", "Applies the given exposure compensation, <b>measured in Ev stops</b>.\nThis is a long tooltip <i>with markup</i>"]
void ART_main(varying float r, varying float g, varying float b,
              output varying float rout,
              output varying float gout,
              output varying float bout,
              float ev)
{
    const float f = pow(2.0, ev);
    rout = r * f;
    gout = g * f;
    bout = b * f;
}

The documentation on the wiki is not up to date yet – contributions are welcome though :slight_smile:

2 Likes

Oh, Thank you very much. It’s great!!

How can we contribute?

Just a warning though: the new format for parameters is not backwards compatible with 1.21. so if you plan to redistribute your ctl scripts it’s better to not use tooltips until the new version of art comes out

Hi,
The wiki is a git repo itself, so you can clone it and open pull requests (or send patches) as usual

Best

1 Like

@agriggio I also have a suggestion / request: currently all the CTL scripts show up in the main “Mode” list. As the list of CTL scripts grows, it starts to clutter the menu list. Would it be possible to add a new “CTL” category, like you did for “LUT”?

Let me think a little bit whether we can have something more general (e.g. a user-defined menu structure). I need to play with the idea a little bit though to see how it could work

1 Like

Ah, that explains those error msgs I saw this morning… :wink:

As a workaround, you don’t need to “install” all ctl scripts, as you can always load them on demand as LUTs. So if the menu is too busy, did you consider removing those you don’t like and/or use less frequently?

1 Like

I forgot about the possibility to use CTL scripts like a LUT. I’ll try that.

First of all I want to wish you all a happy new year 2024.
I really enjoy new CTL scripts feature, and I want to try to develop some ideas by myself. But I am lost with pixel operations. Could @agriggio or someone else recommend any textbook, tutorial or similar to better understand the mathematics and the algorithms behind rgb pixel manipulation?. Any help will be appreciated!.

Hi,
I think this is a too open-ended question. Do you have any specific idea in mind of what you would like to do?

Hello. It is true, just because I am a very novice in this matters. I really enjoy to develop my photographs with ART, but I would like to better understand the internal processes of software. Something that could help me to introduce in this world will be very useful.
I am specially interest to understand how can be modified colors, for example with split toning. Also, I have experienced tone stretching (used in astrophotography) and I would like to use it on ART.

Globally tone-wise, it’s pretty simple. It’s based on a “transfer function”, where that function is applied to each channel of each pixel. The transfer function is usually a polynomial equation describing some sort of curve, with the shape of the curve defining how the image tones are departed from the original distribution.

Here’s a screenshot showing my hack software rawproc’s filmic curve:

The bottom-left pane shows the curve plot of the transfer function, which is this:

y = pow((x(Ax+B))/(x(Ax+C))+D,Power)

where A=6.2, B=0.05, C=1.7, and D=0.06; Power=1.0 for most uses

The algorithm basically just walks the image, and transforms each channel value with the above equation. You can inspect the code here:

https://github.com/butcherg/rawproc/blob/master/src/gimage.cpp#L2938

Now, such arbitrary application to the individual channels generally preserves hue, but that degrades if aggressively used. Others can talk to hue-preservation…