I played with the ColorCheckMacbeth gizmo in Nuke. It generates the color matrix. If you take this matrix and plug it into a ColorMatrix matchbox, the calibration translates. If you have a pipeline where you’re already doing this for Nuke, you can replicate those values in Flame. Maybe even write a python script that can auto-generate an importable node in Flame.
Be mindful that the gamut in the Nuke gizmo and Flame has to match. I set my project up with ACES 1.2 and had a color mgmt node with input transform to ACEScg in the batch,.
I originally tried Lewis Saunder’s ColorMatrix matchbox, but had some trouble to make it look right. Some other features in there.
So I simplified it into a very basic 3x3 Matrix mult. New shader is not yet in the portal, so you have to manually copy it into /opt/Autodesk/presets/version/matchbox/shaders/Logik: Dropbox - ak_SimpleColorMatrix.tar.gz - Simplify your life
So you’re half-way there on your original request. You have the backend, for the front end it’s either already in your pipeline, you can use an external tool you have access to, or over time we can write some OpenCV python scripts to generate that matrix.
Or twist ADSK’s arm to build it into Flame to start with.
Thanks for the detailed reply, and yes, I do neutralise all plates and HDRIs using the macbeth charts I gather on set. If I can’t get one, things get a bit messy but our approach is pretty much on rails once the footage gets inside Nuke.
In terms of colorists balancing things and producing a technical grade, visually may work very well and client may be happy but given our bread and butter is CGI, that is not a solution I can buy into… the CGI won’t sit on the plate and we will end up fudging it in comp which is very time consuming.
I had a go at this years and years ago, as a Pybox node which I’m not sure anyone ever used because it’s pretty slow and clunky… you can see a demo here on two different colour chart layouts: https://www.youtube.com/watch?v=df2yIh3nx_4
It exports the matrix as a .ctf you can load in ColorMgmt although a tiny Matchbox would also work. To keep the python side simpler it relies on aligning the charts beforehand with an action bilinear… unfortunately like the mmColorTarget gizmo for Nuke it requires a few dependencies which can be annoying to install, and I tried to wrap them up inside the script itself in what seems like a really stupid way in retrospect - but anyone is very welcome to take the script itself and re-package it as something you can run from the logik portal or a right-click menu: https://raw.githubusercontent.com/lcrs/pyboxes/master/Ls_LUTy.py
This is really useful. The node I’m after for macbeths is essentially that but with front and back sample pots for each colour on a macbeth.
Is this wildly different than colour curves matching in the Flame Colour Corrector? (which doesn’t seem to work anymore - maybe since I’ve switched to ACES)
@leovfx Not sure what the logic of the Color Corrector is. This matchbox only works on basic white balance of black and white point.
Here’s the math behind it:
result = vec3( (source - s_blackPoint) / s_whitePoint);
result = vec3( (result * t_whitePoint) + t_blackPoint);
Whereas the various Macbeth plugins/tools run a much more complex algorithm to match the two images. Though they still only derive a global 3x3 matrix, not a match that might take highlights and shadows into consideration, such as LUT could.
Can the results be pretty similar in most circumstances? Probably. But you were looking for something more precise.
Right. I’ll have to take your word for it I’m afraid. I’m fairly competent with Flame but my coding skills end outside of the expressions field and google sheets.
Firstly thanks so much for taking the time to develop this. I’ve watched the demo video and look forward to trying this out myself on Monday.
I love that you’ve gone for colour pickers over the grid that the Nuke gizmo uses. A lot of people use the spyder colour checker chart which has the first and third rows of colours in the reverse order to how they are presented in the nuke gizmo so we normally have to spend time flipping them round before going into Nuke. This will solve that issue.
It looks like your tool does a great job of matching the colours between the 2 images.
Is there a way to use it to use it to neutralise the colours of 1 image without needing a reference image to match to? That would mean instead matching to a shot reference plate, matching to the “true” neutral versions of those colours.
Is there a way to use the tool to export out a LUT that could then be loaded into a colour management node? It looks like your tool takes a while to process.
I’m asking about these particular features because just 2 days ago I came back from a shoot and loaded all the footage (all shot on one Sony Venice). It was all a bit dark and with a hint of raspberry. Unusable how it was for CG and comp. I gave a frame of one of the Macbeths to one of our Nuke artists and he used the gizmo to create me a LUT to neutralise all of the footage. (I’m not sure if that’s a built in feature of the gizmo or if he did something additional and clever) I applied this LUT on import on all the footage from a 5 day shoot and now it’s suddenly much nicer to work with for everyone and we don’t have to apply it shot by shot as we work.
Is there a way to use it to use it to neutralise the colours of 1 image without needing a reference image to match to? That would mean instead matching to a shot reference plate, matching to the “true” neutral versions of those colours
You always need to load an image to the A side (initially), however that could just be a default macbeth chart that is converted to acescg and you know is considered neutral. Then you can save that session as your base and recall it for future sessions without actually loading the image every time. You would just update the B side and it will always apply the look to your A image you recalled.
Is there a way to use the tool to export out a LUT that could then be loaded into a colour management node? It looks like your tool takes a while to process.
I tried so hard to export a lut and while it is possible for probably the standard - its not possible for the HDR b/c of how it goes beyond a 3x3 matrix to produce the image and it could not be contained in the LUT. I could work on getting a LUT in for standard. have a play with everything first and let me know if things are working as you kinda expect and then i can dial a bit.
Thanks for your reply. It would be so good to get a LUT out of the standard version. I don’t imagine needing one for HDRs as that’s something you only need to do once, or maybe twice if you have an HDR with & without a Macbeth. I’ll have a play with it this week. Cheers.
Small suggestion: What about using oiio instead of cv2?
Also, on linux production systems, machines usually don’t have access to internet and installing anything from a hook would be a big no go.
Fortunately we do have oiio and numpy in our paths so I modified your script slightly to use them.
Maybe your hook could check if there’s a side script with the correct import paths?
Ideally, IT. would be able to simply remove the optional install part, add the side script and call it a day.
thank you so much for the suggestions. i’m looking into them now.
and regarding image sequences. yes. possible. it was supposed to be in this version, but something broke along the way and I guess it didn’t quite make it. I"ll have it back when i get these updates in. I didn’t even think to test that this go around.
It could very well be put in an OFX as well, with 2 inputs.
The lut generation would probably become the main tool and not sure about reimporting the result automatically without a watchdog
updated to v3.9.2
* Added OpenImageIO support — uses oiio if available on your system (standard on Linux VFX systems), falls back to OpenCV automatically
* Added ab_colorchecker_paths.py side file for IT/studio teams to configure custom library paths without touching the main script
* Added image sequence processing — apply the same correction to a full sequence of frames in one go
* Redesigned export dialog — dropdown to choose Single Image or Image Sequence, with a checkbox to also export a 3D LUT at the same time
* Sequence file picker now shows actual frames so you can confirm what’s being processed
* Sequence output folder is now separately chooseable
* HDR/360 sessions now store both A and B patch data — load a saved session and apply to a new B clip without re-clicking any patches
* Session save dialog pre-fills the filename with the name you typed