Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - baldavenger

#26
For those interested in viewing the whole signal (including sub zero values) there's an easy method using a simple constant.



In the above example when ResolveConstant_-1.cube has been placed in Node 02, by selecting Multiply in the Layer Node the signal gets inverted/rotated 180 degrees around the x axis. In the case of a full logC signal linearised, values can go as low as -0.017290419, and this can now be viewed without pulling and pushing the rest of the image. Perhaps not of any great use, but a nice option nonetheless. I've included a Null LUT in the previous post download that clips above 1.0 and below 0 for signal isolation purposes.
#27
Although really only suitable for viewing purposes, it's possible to use 1D LUTs to turn nodes into constants and therefore perform specific offset operations. Basically, you can view parts of the signal greater than 1.0 in both the viewer and waveform. I built a set of 8bit 1D LUTs for this purpose.





In the above example the Layer Node is set to Add, and in Node 02 is placed the ResolveConstant_-1.cube, revealing in the viewer and waveform the original part of the signal with values ranging from 1.0 to 2.0. Disabling Node 02 only disables the effects of the Node, so the result would actually be the original signal added to itself. Instead, replace the LUT with ResolveConstant_Zero.cube, which turns the node into a constant with 0 for every value, therefore effectively disabling the operation.

The LUTs can be combined for more specific offsets. The next example features a standard chart featuring values ranging from 0.0 to 1.0. Applying a 1D LogC to Linear LUT to it expands the signal values as far as 55.08007431



An offset of -55 can be performed by placing ResolveConstant_10.cube and ResolveConstant_-5.cube in Nodes 02 and 04, multiplying them, then place ResolveConstant_-5.cube in Node 08 and set the final Layer node to Add. In the viewer and waveform the values originally ranging from 55 to 55.08007431 can be seen. An exercise in theory of course, but it also shows that the signal doesn't always have to be compressed into a limited space in order to be viewed.


There are other uses for constants, such as a 0.5 constant as part of high-pass sharpening. Here's a fairly simple example:



The first Layer Node is set to Subtract, with Blur performed in Node 04, and ResolveConstant_-0.5.cube placed in Node 05. The final Layer Node can be set to Overlay, Softlight, or Hardlight (depending on taste).



https://www.dropbox.com/s/os7bms2p8legctb/Resolve%20Constants.zip?dl=0


#28
Back in Reply #61 there was a brief mention of Dark Frames, along with a link for footage shot on a 5DMkIII. Before proceeding to build a workflow consisting of the 'greatest hits' of the thread, I'll go through an optional process of removing some noise from your footage, especially if shot at a higher ISO.

The Dark Frame has to match the footage it is intended for. That is to say, if you shot a particular resolution (e.g. 1920 by 1080) at a particular frame rate (e.g 24FPS), with a particular ISO setting (e.g. 1600) on a particular camera sensor (e.g. 5D MkIII) then your Dark Frame would have to have been originally compiled using the same camera type and with those settings. Otherwise you will not achieve optimum results.

So for the example above, put the lens cap on the camera (with the correct settings) and record a few seconds. If you were to view the frames of the MLV you would see almost black frames (except for a magenta looking noise). A Dark Frame is a single frame that is to be subtracted from every frame of the destined (actual footage) MLV, so an average frame is made from the few seconds that were shot with the lens cap on.

In Terminal (in OSX) type 'cd' (without exclamation marks) and drag the folder with mlv_dump.osx onto it and press enter. In the same folder have your pre averaged MLV file.

Type

mlv_dump -o Output.mlv -a Input.mlv

With Input.mlv being your pre averaged MLV file.

The result leaves a new Output.mlv in the folder, that is the size of one DNG. Change to the name to something more appropriate, e.g. Darkframe1600.mlv

Bring the MLV you want to perform the subtraction into the folder.

Type

mlv_dump -o footageDframed.mlv -s Darkframe1600.mlv footage.mlv

The result leaves a new footageDframed.mlv in the folder, that is the same size as the original footage.mlv. Use MLVFS to extract a DNG from both MLVs (before and after Dark Frame removal) and compare.

Here are some examples:














Hopefully this process can be included in one or more of the current post-production options. In the link below you'll find some examples to work on.

Ideally what might happen is that Dark Frames are compiled for every ML ready camera for a variety of resolution, frame rate, and ISO combinations, so that a more automated process can be developed.



https://drive.google.com/file/d/0B0WuqGJ11_Egcm9wVjMwbWJPNDA/view?usp=sharing


#29
I see the transform from Cineon to LogC, but doesn't that still preserve the mapping of peak white whereas that should represent reference white instead? That is to say, the saturation roll-off isn't the same as original Arri LogC because the signal is scaled/compressed down. Contrast will increase the signal (and therefore better resemble the preferred distribution in the higher end) but also deepen the lower end, which is probably not desirable. It seems a bit 'loose' to me, at least on a technical level (though I may well be missing something).

#30
@DeafEyeJedi

Thank you as always for the feedback. Apologies for the messiness of the thread (and any excessive convolution, contradiction, and opaqueness), but I hope to start tidying it up soon so that it resembles something more practical for everyone (including myself). There are still elements of AE that would much improve Resolve (such as OCIO and ACR highlight algorithms), and I still use it myself when I'm on the road and need a more immediate and practical solution.

@Andy600

Scaling is probably the issue here, but I'm still not quite getting it. With regards clipping or peak white (15000), the display clips this (at 8bit value 255), but in 32bit float there would appear to be values beyond this (i.e.over 1.0). When I did the signal splitting test this was revealed, along with a visual representation of the effects of selecting Highlight Recovery. I attempted to replicate ACR's highlight rebuilding approach by manually adjusting the channels with RGB Mixer and using the Soft Clip function to bring the rebuilt signal into display range. A formula could probably be written and turned into an expression that performs a similar task as the ACR one, but perhaps the manual approach would allow for greater precision?

Anyway, I'd still like to settle on a better understanding of the scaling issue. Would there be a standardised way to scale the linearised signal (from a ML DNG) so that 90% scene reflectance registers at a float value of 1.0 (as is the case with LogC and other original log encodings).

Thank you again for your valuable advice.

#31
Thank you Andy, that helps clear up a lot of things :) I'll have to revise some of the earlier posted processes.

With regards to the distribution of saturation, won't this be an issue when applying it to ML Raw footage encoded in LogC ? When encoding, it would appear that peak white (1.0) is mapped to the same point as 90% reflectance is with Arri footage, therefore the saturation fall-off that occurs with Arri footage does not apply (to the same extent) to LogC encoded ML Raw footage as the signal was originally scaled to fit into a display referred space.

Apologies for dragging on with this particular line of enquiry (and over multiple threads too), but there's still something I'm not quite getting. Hopefully the penny will drop sooner or later :)
#32
The actual order of application with regards to the 3x3 Film Matrix is not exactly clear in the Arri white papers. You would assume that it is meant for a signal in linear light space (especially given that it is referenced in connection with a VFX pipeline), but I'm not so sure. It seems odd to countenance the idea of applying a 3x3 matrix to a log signal, but that might actually be Arri's intention. Anyway, here's a list of formulas that incorporate the log option.


LogC AWG to Arri Linear Film Matrix


((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655


((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655


((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655


LogC AWG to Cineon(clipped) Film Matrix


(((log10((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655)*(1-.0108)+.0108))*300)+685)/1023


(((log10((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655)*(1-.0108)+.0108))*300)+685)/1023


(((log10((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655)*(1-.0108)+.0108))*300)+685)/1023


LogC AWG to Linear(Cineon scaled) Film Matrix


(((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655) > 1 ? pow((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655))


(((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655) > 1 ? pow((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655))


(((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655) > 1 ? pow((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655))


LogC AWG to Cineon(scaled) Film Matrix


(((log10(((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655) > 1 ? pow((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) > 0.1496582 ? (pow(10.0, (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*1.271103)+(g*-0.284279)+(b*0.013176)) - 0.092809) / 5.367655)))*(1-.0108)+.0108))*300)+685)/1023


(((log10(((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655) > 1 ? pow((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) > 0.1496582 ? (pow(10.0, (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.127165)+(g*1.436429)+(b*-0.309264)) - 0.092809) / 5.367655)))*(1-.0108)+.0108))*300)+685)/1023


(((log10(((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655) > 1 ? pow((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655), 0.6496465358) : ((((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655) < 0 ? pow(abs(((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655), 1.2756188918) * -1 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) > 0.1496582 ? (pow(10.0, (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (((r*-0.129927)+(g*-0.510286)+(b*1.640214)) - 0.092809) / 5.367655)))*(1-.0108)+.0108))*300)+685)/1023


It's pretty much a return to the original LogC approach from earlier in the thread, albeit with more informed precision. So much for the short-lived dalliance with ACES primaries.

It's probably not a bad time to start putting the various different techniques and processes together into one main pipeline.

#33
@DeafEyeJedi

Why do you think it's easier to achieve in AE? I'm not disputing that (still better algorithms in ACR than Resolve), I'm just wondering what AE does differently (so that it can be replicated in Resolve).
#34
I think my assumption that 90% scene reflectance is automatically mapped to the value 1.0 (32bit float) in Resolve is mistaken. Peak white (15000) would appear to be mapped instead, and more than likely represents values that exceed 90% scene reflectance. This also suggests that the superwhite values (above 1.0 in 32bit float) registered (without Highlight Recovery) are in fact the values between 15000 and 16383.

When a camera like the Alexa records to log it allocates values so that when LogC is linearised in software such as Resolve (or Nuke, Fusion, etc.) 18% scene reflectance is mapped to 0.2 and 90% scene reflectance is mapped to 1.0, and values above 90% are superwhites (up to @55.1 in float values). CinemaDNG seems to bypass this strict conformity to linearity, but would it be possible to somehow replicate it in Resolve?

In other words, is it possible to know what exact values are registered by the camera sensor when registering 18% reflectance, and 90% reflectance? Say, in an ideal set-up, an environment is light by 6500K bulbs, there is an 18% middle grey card, and a reference white card (90% reflectance), and the camera settings are adjusted (with the exception of ISO, which is set at 100) so that when the scene is metered (and observing the LCD viewer) those values are returned. When viewing that CR2 file in RawDigger (or other suitable app), what would be the values returned for those specific areas of the image?

Any help with this matter would be greatly appreciated.

#35
Here's a list of the formulas that are involved in converting LogC Alexa Wide Gamut to Cineon Log Alexa Film Matrix. The larger ones might seem daunting at first sight, but they are merely concatenations of several smaller components. They can be applied directly via the ChannelMath plugin, or exported as LUTs.


LogC to Cineon functions:


log(13.5216945686, 55.0800869419) = 0.649646535749151

0.6496465358

log(abs(-0.0056508194), abs(-0.0172904190)) = 1.275618891720147

1.2756188918

R = r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655

G = g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655

B = b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655

R > 1 ? pow(R, 0.6496465358) : (R < 0 ? pow(abs(R), 1.2756188918) * -1 : R)

G > 1 ? pow(G, 0.6496465358) : (G < 0 ? pow(abs(G), 1.2756188918) * -1 : G)

B > 1 ? pow(B, 0.6496465358) : (B < 0 ? pow(abs(B), 1.2756188918) * -1 : B)


r < 0 ? pow(abs(r),0.7839332002)*-1 : (r > 1 ? 1 : r)

(r > 1 ? pow(r, 0.6496465358) : 1) - 1

AWG to Film Matrix

(r*1.271103)+(g*-0.284279)+(b*0.013176)
(r*-0.127165)+(g*1.436429)+(b*-0.309264)
(r*-0.129927)+(g*-0.510286)+(b*1.640214)

LogC AWG to Arri Linear Film Matrix

((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)


((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)


((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)


LogC AWG to Cineon Linear Film Matrix


(R) > 1 ? pow((R), 0.6496465358) : ((R) < 0 ? pow(abs(R), 1.2756188918) * -1 : (R))

(G) > 1 ? pow((G), 0.6496465358) : ((G) < 0 ? pow(abs(G), 1.2756188918) * -1 : (G))

(B) > 1 ? pow((B), 0.6496465358) : ((B) < 0 ? pow(abs(B), 1.2756188918) * -1 : (B))



(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)))



(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)))



(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)))



LogC AWG to Cineon Film Matrix


(((log10((R)*(1-.0108)+.0108))*300)+685)/1023


(((log10((G)*(1-.0108)+.0108))*300)+685)/1023


(((log10((B)*(1-.0108)+.0108))*300)+685)/1023




(((log10(((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*1.271103)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.284279)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*0.013176))))*(1-.0108)+.0108))*300)+685)/1023


(((log10(((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.127165)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*1.436429)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*-0.309264))))*(1-.0108)+.0108))*300)+685)/1023


(((log10(((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)) > 1 ? pow((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)), 0.6496465358) : ((((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)) < 0 ? pow(abs(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214)), 1.2756188918) * -1 : (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655)*-0.129927)+((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655)*-0.510286)+((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655)*1.640214))))*(1-.0108)+.0108))*300)+685)/1023

#36
I recently reviewed my DIT workflow and decided to add a few changes. I focused more on removing the gamma function from the Print LUT in order to have a 'cleaner' signal path.

As a starting point I decided to go with Linear, Linear, Bypass in RCM, which puts the footage into Linear gamma and ACES (AP0) primaries. In the first node I hacked a 3x3 matrix into the RGB Mixer, converting ACES (AP0) to Alexa Film Matrix. The second node has a 14bit 1D LUT applied, converting Linear to Cineon Log Gamma and therefore completing the conversion to a something resembling a scanned negative.

The Film Print LUT stage is now broken into two parts. The first is a Cineon to Cineon 3D Film LUT that deals with chromaticity, followed by a 14bit 1D LUT that converts Cineon to sRGB (or whichever display gamma is required). The Film LUTs that are supplied come in two varieties, with Inter (interim) and Out (more punch) the options. They still add some s-curve, but I modified how much they push the mid-tones and shadows to avoid baked in compression.



The only adjustments I made to the above image were pulling a small bit of red from the highlights in Colour Wheels, and pushing more green into the foliage with Hue vs Hue.

Also included are Arri to Cineon LUTs, which I wrote some expressions for in order to prevent clipping while still preserving the main part of the signal (0%, 18%, and 90% reflectance).

Print Film LUTs are primarily built for Cineon scanned negative, and given that scanned negative is still the most robust medium for grading it means that the LUTs can be quite brutal on weaker footage (most forms of digital). Also, it expects a high signal midpoint so any footage that is a bit lower than this really gets squashed. Even LogC gets over pushed, which is why I made the Arri to Cineon converters. LogC has a lower midpoint because it actually squeezes in an extra two stops of latitude at both ends of the signal, but it still needs to be conformed in order to get the cleanest possible results.

Anyway, have a go and leave some feedback if you get a chance.


https://www.dropbox.com/s/zckc4t2y8ux43yc/DIT_Workflow_Resolve.zip?dl=0


#37
I converted both the MLVs into folders containing the DNG files (for those who prefer the quicker and easier option).


https://www.dropbox.com/s/7p8e5y8qvc2ddtf/indoors_1_2014-07-25_0001_C0000.zip?dl=0

https://www.dropbox.com/s/8nl3i0yltrmu4n5/balcony_1_2014-10-11_0001_C0000.zip?dl=0



One of the issues with dealing with a split signal is not being able to view the individual streams and make adjustments to earlier nodes (with the Highlight function limiting adjustments to the selected node). This can be somewhat addressed by adding a node to the stream you want to 'switch off' and using the RGB Mixer controls to enter 0 for every channel. This node can then be enabled/disabled as per when required.


#38
I looked a bit further into the idea of rebuilding highlights in Resolve, and I've put together a selection of clips that I hope people will have a go at. I'm interested in hearing feedback as to what approaches work better than others.

There are four clips, with two shot regular, and two in Dual-ISO. The regulars are in the form of 100 frame MLV files, and the Dual-ISO are folders with 100 already converted DNG files. All available for download, along with 4 signal splitter 1D LUTs and the ChannelMath plugin (OS X only).

If using the ChannelMath plugin, the following images show the expressions for splitting the signal:






The clips (in Rec709 Gamma and Gamut) are presented in this order: Viewer + Node Graph, Highlight Recovery Off and Waveform, Highlight Recovery On and Waveform.


























The Node Graph set-up allows for viewing the highlights, along with the option to grade, rebuild, and blur if so required. Rebuilding should be done using the RGB Mixer, with Preserve Luminance unticked.



The last operation should be the use of Soft Clip (High Soft) in the Custom Curves section:



The Soft Clip is a handy way to bring your highlights into display values, though it is limited to how much it can grab so try to have your highlights scaled to no higher than the 384 mark on the waveform once you're finished working on them.

There is great work being done right now by the ML community, so it is only right that equal effort should be put into making the most out of the information contained in the files. Onward and upwards.

Here are the downloads:

https://www.dropbox.com/s/bsf6zp4zp1dn3xm/Signal%20Splitters.zip?dl=0

https://www.dropbox.com/s/gj3mvwcrouum94k/indoors.mlv.zip?dl=0

https://www.dropbox.com/s/ub8iuuysrunf6zy/balcony.mlv.zip?dl=0

https://www.dropbox.com/s/f25khctemium4kh/Beach_Dual_ISO.zip?dl=0

https://www.dropbox.com/s/1jm9x7ywxr60mrq/Sunrise_Dual_ISO.zip?dl=0


#39
I listened again to an old podcast where the colourist Peter Doyle spoke about some of the grading techniques he used on the final Harry potter movie. When I first listened to it about 2 years ago I understood very little of what he was talking about, but things are a bit clearer now. 2 techniques in particular are worth looking at inside of Resolve.


https://www.fxguide.com/fxpodcasts/the-art-of-grading-harry-potter-peter-doyle/


When he mentions 'matrices' around the 15 minute mark it turns out that he actually means expressions.

He stated the intention of the expression was to prevent cyan being greater than the sum of the other two channels (red and green), so given that green would be a common factor it suggests limiting the blue channel value so that it never exceeds the value of the red channel. He mentions the same technique later in the podcast when discussing the scene in the river.

Using the ChannelMath OFX plugin, leave red and green empty, and enter

b > r ? r : b


I believe ChannelMath processes are done in full 32bit float with no clipping/range restrictions, but it can hog the system.

An alternative would be to export as a 3D LUT straight from Resolve, though it's limited to a 33x33x33 cube (whereas Resolve can actually process a 65x65x65 cube)

A 65x65x65 cube can be instead be built in Nuke (using an Expression Node) or Fusion (using a Custom Tool 'tool'). Fusion only offers ALUT3, ITX, and 3DL as LUT options, but the ITX version is identical to that which Resolve exports, you just need to change the extension from '.itx' to '.cube' and Resolve will recognise it.

When I started trying to figure out the expression I came up with some slightly more complex yet nonetheless interesting versions. One limits the channel so that it is never the highest value (despill), the other so that it is never more than the third highest value.

g > b ? (r > g ? g : r) : (r > b ? b : r)

g > b ? (r > b ? b : r) : (r > g ? g : r)

r > b ? (g > r ? r : g) : (g > b ? b : g)

r > b ? (g > b ? b : g) : (g > r ? r : g)

r > g ? (b > g ? g : b) : (b > r ? r : b)

r > g ? (b > r ? r : b) : (b > g ? g : b)

A specific Luma range can be incorporated into the expressions (and LUTs), but it makes more sense to leave that to a more flexible luma key in the application.

The other technique he mentions is splitting the colour from the luma. This is pretty common place now, though perhaps not in such a specific way as he describes.



The Splitter-Combiner node reveals which channels are cleaner (usually green) or dirtier (usually blue), so some early repair can be done. Then the signal gets split, using RGB Mixer to select Monotone (Preserve Luma unticked) and then rebuilding the luma channel by substituting blue for green (usually). The bottom layer node has YUV selected and using RGB Mixer (Preserve Luma unticked) to put a zero value in the red channel, and the composite mode is Add. This method doesn't work with LAB. Separate sharpening is done on the luma, and blur on the chroma. Pretty much as he describes it in the podcast.

In the immortal words of Harry Potter, "Shazam!"


#40
There was something odd about the Cineon Film Log option in RCM with the 12.2 update in Resolve. Turns out it was only affecting Raw files (well, at least CinemaDNG), and not regular footage. The same was also happening when choosing Linear. I exported some dpx files and brought them into Nuke, and after testing with different varieties of illuminants and primaries it turns out it was ACES colour space (AP0 primaries to be exact). Weird. It would have been cool if Blackmagic Design had actually let people know if was going to adopt this approach, but anyway...

As there isn't an official ACES pipeline established for ML footage I haven't paid a lot of attention to it, but a little extra research has resulted in enough usable information (for now).

You'll find relevant matrix values on this page:

https://github.com/ampas/aces-dev/blob/master/transforms/ctl/README-MATRIX.md

And additional relevant information here:

http://www.reduser.net/forum/showthread.php?134789-ACES-workflow-tested-and-verified&p=1533260&viewfull=1#post1533260

The CIEXYZ option in RCM is basically Linear XYZ, so that's the reference gamma and gamut and effectively the core starting point for all transformations. More useful matrices can be found in the first link.


Ben Turley's LUTCalc is also a handy source. Always select Data In and Data Out when exporting a LUT (Resolve operates in full Data, and handles any legal conversions so stick to Data only with LUTs). I wasn't sure of this before, but I am now.

I am of the opinion now that any gamma transform performed by a LUT should be done separately and only in a 1D LUT, and 3D LUTs should only deal with the colour element. 3D LUTs used for calibrating a monitor can incorporate subtle non-linear gamma adjustments, but they are the exception. From now on I prefer to use a 3D LUT in only a Log to Log manner, such as LogC Alexa Wide Gamut to LogC LC709 (which can't be achieved with a matrix so only a 3D LUT will work).

Please feel free to try out some of the suggestions here and post feedback :)
#41
Raw Video Postprocessing / Re: Davinci color artefacts
January 23, 2016, 10:28:50 PM
Try different MLVFS settings, such as everything off or none, and then try introducing chroma smoothing and upload the dngs. MLRawViewer should only be used for convenient viewing and not post production. Only after getting the least contaminated results should you proceed to using chroma smoothing in Resolve. I suggest selecting YUV in a node and un-ticking channel 1, then applying blur to the node. LAB can do funny things with the highlights sometimes, so YUV is safer.
#42
Raw Video Postprocessing / Re: Davinci color artefacts
January 23, 2016, 02:31:53 AM
What settings did you choose in MLVFS? Post a link to the original MLV (or just one of the dngs) and you'll get some feedback.
#43
I ran a few more tests with the ChannelMath plugin. The parametric parameters issue that plagues the other OFX plugins is still present, but it's just a minor inconvenience really. I had hoped to use param2 to turn the plugin into an extended waveform viewer, but that can still be done only without the added ease of a slider.

I had a go at nesting expressions into expressions, and the results were good. That is to say, instead of having separate plugins to perform specific tasks, I wrote everything into one long expression to see if concatenation was viable.

I tried combining a LogC to Linear, Alexa Wide Gamut to Rec709, and Linear to LogC.

LogC to Lin

r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655

g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655

b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655

Alexa Wide Gamut to Rec709

(r * 1.617523) + (g * -0.537287) + (b * -0.080237)

(r * -0.070573) + (g * 1.334613) + (b * -0.26404)

(r * -0.021102) + (g * -0.226954) + (b * 1.248056)

Lin to LogC

r > 0.010591 ? 0.247190 * log10(5.555556 * r + 0.052272) + 0.385537 : 5.367655 * r + 0.092809

g > 0.010591 ? 0.247190 * log10(5.555556 * g + 0.052272) + 0.385537 : 5.367655 * g + 0.092809

b > 0.010591 ? 0.247190 * log10(5.555556 * b + 0.052272) + 0.385537 : 5.367655 * b + 0.092809

Nesting the LogC to Linear expression into the Alexa Wide Gamut to Rec709 expression, and then nesting that into the Linear to LogC expression, results in these expressions (for R, G, and B respectfully):

(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * 1.617523) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.537287) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.080237)) > 0.010591 ? 0.247190 * log10(5.555556 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * 1.617523) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.537287) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.080237)) + 0.052272) + 0.385537 : 5.367655 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * 1.617523) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.537287) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.080237)) + 0.092809


(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.070573) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * 1.334613) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.26404)) > 0.010591 ? 0.247190 * log10(5.555556 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.070573) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * 1.334613) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.26404)) + 0.052272) + 0.385537 : 5.367655 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.070573) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * 1.334613) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * -0.26404)) + 0.092809



(((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.021102) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.226954) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * 1.248056)) > 0.010591 ? 0.247190 * log10(5.555556 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.021102) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.226954) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * 1.248056)) + 0.052272) + 0.385537 : 5.367655 * (((r > 0.1496582 ? (pow(10.0, (r - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (r - 0.092809) / 5.367655) * -0.021102) + ((g > 0.1496582 ? (pow(10.0, (g - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (g - 0.092809) / 5.367655) * -0.226954) + ((b > 0.1496582 ? (pow(10.0, (b - 0.385537) / 0.2471896) - 0.052272) / 5.555556 : (b - 0.092809) / 5.367655) * 1.248056)) + 0.092809





There's a serious performance hit with such long expressions, but it's good to know that it works and that it is an option.

#44
I say we need more advice from someone who seem to know what he is talking about.



#45
Resolve support have a tendency to be quite selective about what information they reveal to those making enquiries, so I did some research of my own. I ran some tests on dngs that feature superwhites, and exported OpenEXRs so that I could view the channel values properly in Nuke. The viewer in Resolve is limited to 8bit integer (0-255), but by splitting the signal and offsetting by 1.0 you can view the superwhites (from 1.0 to 2.0) in the waveform scope. All dngs were debayered into scene linear, so in theory scene reflectance of 18% should register as 0.2 in scene linear and 20 IRE on the waveform scope (Resolve workspace is PC levels as far as I know), and 90% reflectance is 1.0 and 100 IRE.



This first image has highlight recovery off.



This shows the superwhites when highlight recovery is off.



Superwhites with highlight recovery on. They don't appear to exceed 2.0 but it's still a consideravbe difference.







In this case superwhites exceed 2.0 when highlight recovery is on.







Another example of a big difference.







And again.

















The examples above deal with a Dual-ISO image (courtesy of Danne). The first four have no exposure adjustment, and the remaining four have Exposure set to 4.0 in Camera Raw to bring the image from ISO 100 to 1600.

In Nuke I applied a Curve Tool node to ascertain the max luma values, and they generally corresponded with what the waveform in Resolve was suggesting. Without highlight recovery, superwhites rarely exceeded values of 1.3, but with it on some values exceeded 3.0. Whichever white balance was selected in Resolve also has an effect on the levels of both superwhies and superblacks. In the case of the Dual-ISO, the exposure adjusted image registered values up to 30.0 with As Shot selected as White Balance, but up to 42.0 with Tungsten.



So, my hope that definitive values can be derived for specific Min Input and Max Output for log encoding seems a bit unrealistic now. Highlight recovery has to be taken into account, but it seems unpredictable so best to play it safe with a conservative value of about 3.5 for standard dynamic and might as well stick with LogC for Dual-ISO as it covers a range up to @55.

#46
This is the funniest post that I've read in quite some time. Absolute gold.
#47
Seems like a very Helen Keller approach to the problem, but as long as you're happy with the results then that's the most important thing.

If you want to have a better understanding of the process you should probably concentrate of getting to grips with log and the main colour spaces, and what they are specifically meant for.

Lots of useful info on the Cinelog thread.
#48
Thanks Andy  :) I managed to get a few of the Natron plugins working in OSX by some basic compiling, but the more practical stuff never used to work. Something to do with parametric parameters. I know very little by way of coding, so I was more stumbling in the dark and hoping to get lucky.

If the plugin could be modified to have more expression inputs (like a similar node in Nuke or Fusion) and incorporate proper GPU acceleration, then it really would be a very useful tool. I'm sure there's a way to make that so.
#49
It was very much a chance occurrence. I installed Natron a while back so I could get a better understanding of the basics of OFX plugins, and in the process I signed up for monthly email updates (or something like that). None of the plugins I managed to install were of any use, so I didn't pay that much attention whenever updates occasionally came along, but I half noticed the word math when I quickly glanced at the email that came today so figured what the harm in checking it out. Even when I installed it and booted up Resolve I either expected it not to resister at all in the OFX library, or to be just another dud.

What a lovely surprise it was to be proven wrong. Really unexpected, and really quite wonderful. A few minor tweaks and it could prove to be a major contribution to workflow in Resolve.
#50
So, if 15000 is the white level then 18% reflectance registers 2707 in linear raw value, therefore 2707 x 5 is registered by 90% reflectance (13,535).

Between 13,535 and 15,000 are superwhites, between 90% and 100% reflectance, and between 100 and 109 IRE.

In Resolve, in scene linear, 90% reflectance is at 100 IRE, and 1.0 in 32 bit float, so does that mean the highest value that can be registered from the raw values is 1.09? (Not including Dual-ISO) If I wanted to build a LUT that encodes the scene linear signal to log (or display referred) then the max input value would be no more than 1.09?

Thank you for the feedback. I'm still trying to get my head around some of the basics, so any advice and considered direction is greatly appreciated.