Creative Coding with DCTL Part 8 – Refining UI Parameters

November 4, 2021

Colorist Cullen Kelly finished defining his Davinci Resolve DCTL plugin. Learn how he tweaks the interface, eliminating 'dead zones.'


Series

Providing useful constraints on the user interface

In our prior Insight in this series, we’ve been focused on building our Filmic Contrast tool to offer greater creative control to the end-user. Now that we’ve built out the functionality we intended, we need to consider an equally important aspect of tool design: useful constraint.

The split-toning feature we incorporated in our last Insight is a powerful addition to the tool, but at the moment its maximum strength nets too aggressive a change in our image. There’s a large portion of the Blue/Green Shadows slider and Red/Green Highlights slider that produce visual results most users will find undesirable. If we can take these ‘dead zones’ out of play, we’ll end up with a tool that’s simultaneously stronger and simpler. We can also improve on the functionality of the tool by ensuring that the overall luminance of our shadows and highlights is unchanged when activating the split-toning effect.

In this Insight we’ll cover:

  • Manipulating raw user input to fall within the desired range
  • Preserving original luminance levels by scaling the output of the apply_shadow_split and apply_highlight_split functions

Let’s get started!

Evaluating our tool from the user’s point-of-view

After testing out the current version of our tool on a recent job, I have a few notes I’d like to implement for the next version:

Member Content

Sorry... the rest of this content is for members only. You'll need to login or Join Now to continue (we hope you do!).

Need more information about our memberships? Click to learn more.

Membership options
Member Login

Are you using our app? For the best experience, please login using the app's launch screen


Comments

Homepage Forums Creative Coding with DCTL Part 8 – Refining UI Parameters


  • Scott Stacy
    Guest

    Another winner modification. These changes are a must needed bonus to the previous version. Looking forward to the next “upgrade.”

    I, however, have noticed an interesting bug when using a RCM project (BMD and Arri) and the S-Curve setting in combination with Resolve Fx (specifically Lens Blur). It produces black artifacts. If you switch to Linear the artifacts disappear.

    I though that it might have been my code, so I went to Gitfront and downloaded your version. Same issue. There has to be something going on under the RCM hood that is not playing nice.


  • Cullen Kelly
    Guest

    Thanks Scott! Yes, I’ve seen this too. I have some hunches about what it may be but no definitive answers yet.


  • Daniel P
    Guest

    One more thing I would love to be shown how to do is a split toning roll-off which smoothly brings the highlights or shadows back to their neutral origins as well as a pivot slider for the split toning itself. I simply don’t know the right maths required to do that

    • Daniel, here’s my solution to rolling off the highlights/shadows back to neutral.

      You’ll create a new UI element called “split_rolloff” with a range of 0-1, and then add the following line after the lines which normalised the output (as per this insight)

      out.x = out.x + (in.x – out.x) * split_rolloff * _powf(in.x, 1.f + split_rolloff);

      It basically works by adding some portion of the difference between the derived value (out) and original value (in), based on the input from split_rolloff. The second part of the multiplication is so that the closer the original luminance was to 1 (white), the more it will affect it. Squaring that value made sure that the s-curve was maintained, therefore we add 1 to the split_rolloff value (because if split_rolloff was at 1, it will = 2, ie. squaring).

      Hopefully, that is a correct approach, and that somebody could chime in if there is a cleaner way to do that.

      And to Cullen, thank you for these insights. DCTLs seemed like a daunting thing to learn, but I nutted out the above right after watching this insight, so safe to say, I think I’m beginning to understand it!


      • Cullen Kelly
        Member

        Wow Kent, this seems like a very elegant solution! To be honest I don’t think I would have been able to come up with this — the student has become the teacher!

        @Daniel, my apologies for missing your original comment. This is actually something I’ve been working on in several of my tools — it can be done, but it requires additional math as in Kent’s example, or a more complex function. Starting to feel like it’s time for parts 10-20 of this series😂

Log in to reply.

1,000+ Tutorials to Explore

Get full access to our entire library of over 1,100+ color tutorials for an entire week!


Start Your Test Drive!
Loading...