How is the Contrast option(under the Exposure rollout, in the VFB) working?
I can’t seem to reproduce that sort of contrast in compositing(Photoshop / Fusion)
My workflow is that I’m saving the render as an EXR(with no colour-corrections applied) and then re-apply these colour-corrections(exposure, highlight burn, LUT AND gamma - in this order) back in comp.
But now I’m trying to add the Contrast too(besides exposure and highlight burn, LUT and gamma) in the Fusion comp, but the result doesn’t seem to be the same as in the VFB.
Would the contrast be applied to the EXR before or after the exposure, highlight burn, LUT and gamma?
I tried to apply it in all ways but no matter what I do, I can’t replicate the VFB results.
That leads me to think that the Contrast tool in Fusion is not the same as the one the VFB.
Is the VFB contrast algorithm different than the one you can find in other applications such as Photoshop, Fusion, etc.)?
And, if yes, how would I replicate that sort of VFB contrast in my compositing application?
I’m not sure exactly what the “Contrast” control is doing in the VFB but it appears to be modifying the contrast with a curve adjustment rather than pulling in the absolute White and Black values. Absolute 0 values stay pure black but anything that’s just slightly above gets adjusted, same for whites. In Fusion if you use a ColorCurve (CCv) and add two points and make all of those linear and then arrange the two middle ones to make a vertical or horizontal line in the middle you’ll get virtually identical results. Weirdly it seems to match best when I work in non-linear workflow in Fusion (i.e., you’ll need a gamut before and after the CCv if you want to keep the view LUT active). You can get similar results in photoshop with the curves adjustment (no 32bit!) although it’s more difficult since the curve does not have handles (it’s almost easier to draw it using the pencil for the horizontal line).
Hmm.
Not sure I follow your explanation about the Fusion solution. I got lost when you said I should add 2 middle points and alight them in the middle.
In fact, that’s the solution I care about, not the Photoshop one.
Yeah, not the best explanation. I’ve attached a zip file with 2 .setting files that you can load in to the ColorCurve (right click on node-->Settings-->Load). The +1 contrast should look like this…
I should also point out that what I’m describing here is the extreme of -1 and 1 contrast (which you would probably never want to actually use). To get something in between you probably just want to adjust the handles on the two end points of the curve. Basically the equivalent of the old s-curve adjustment.
If you’ve got a slice tool in fusion (here’s one - Compositing Bites - Blackmagic Fusion — Pixel Fondue), you could make a black to white gradient in fusion, run the slice tool on it to confirm it’s a linear gradient, then load that image into the vfb, put on some contrast and save it out and run the slice tool on it again to see how it’s changed?
Here is the code that V-Ray uses, perhaps someone can turn this into a Nuke expression or something?
float schlickBiasPrecomputedMult(float t, float biasMult) {
return t/(biasMult*(1.0f-2.0f*t)+1.0f);
}
// Nonlinear contrast correction function which preserves the detail in dark and bright areas.
float contrastFunc(float c, float slope, float biasMult) {
float res;
// Use Schlick's gain function in [0.0, 1.0] (which is a bias function in [0.0, 0.5] and a reflected bias in [0.5, 1.0]).
// Outside [0.0, 1.0] use a linear function with a slope equal to the slope of the gain function at 0.0 and 1.0.
if (c<=0.0f) res=c*slope;
else if (c<0.5f) res=schlickBiasPrecomputedMult(c, biasMult);
else if (c<1.0f) res=1.0f-schlickBiasPrecomputedMult(1.0f-c, biasMult);
else res=(c-1.0f)*slope+1.0f;
return res;
}
// Apply contrast on the given linear input color
VUtils::Color contrast(VUtils::Color &color) {
// Calculate the contrast bias
float bias=-contrast*0.5f+0.5f;
bias=clamp(bias, 1e-3f, 1.0f-1e-3f);
contrastBiasMult=1.0f/bias-2.0f;
// Calculate the slope of the contrast function at t>=1.0
contrastSlope=bias/(1.0f-bias);
// Linear input color
VUtils::Color res=color;
// Remove any negative components
res.clampMin();
// We apply the contrast function in sRGB color space
res.encodeToSRGB();
// Apply the contrast to each color component separately
float r=contrastFunc(res.r(), contrastSlope, contrastBiasMult);
float g=contrastFunc(res.g(), contrastSlope, contrastBiasMult);
float b=contrastFunc(res.b(), contrastSlope, contrastBiasMult);
res.set(r, g, b);
// Convert back to linear space
res.decodeFromSRGB();
return res;
}
Again another good example why we finally need to be able to save the image exactly as we see it in VFB, with contrast, LUT etc. applied. Why do all that in Fusion, Nuke or anything again, when it is so much simpler to just save it straight from VFB? I just can’t get my head around this. The less tools are needed to get a good looking image, the better. As we say in Germany: Too many cooks spoil the porridge.
Indeed.
The VFB as it is, is completely inconsistent.
If you save the render as an .exr, it saves certain corrections but doesn’t save others.
it took me a lot of white hairs to figure out what is being saved and what not, and how would I work around that.
But, none the less, you’d still need to reproduce all these colour corrections in comp since, in comp, you may want to add other elemtbs like: peole, says, glows and what not. And you need to apply many of these things on the 32 bit image, then add the gamut and LUT again.
I wish we could just save ALL vfb colour corrections as an LUT and then re-use it wherever you want. That would be the simplest thing to do, and save all drama aroind all these VFB issues.
I think it will not work when the corrections are saved as LUT. Nearly every piece of software I tested interprets the LUT different. I could not get an exact match. A LUT applied in Photoshop for example looks different than in After Effects. I wouldn’t say that this is correct, though. Adobes products are a likely to be wrong…
This is because the ways people use the VFB are wildly inconsistent VFX guys only use the color corrections for display purposes and exploration of the rendered result but absolutely do not want any of those burned into the final image. Other users prefer to have it all baked in, especially if the result is processed in Photoshop or directly sent to clients. It seems like we will need to provide options for both types of workflow.
We don’t bake the Colour Corrections into the render either.
But we want to replicate the same Colour Corrections in post. So, the corrections should look consistent, both in the VFB and post… otherwise, using the colour corrections in the VFB is defeating its own purpose.
So, all corrections(from the LUT to gamma and everything else in there) should be baked then, right?
Also, would it be possible to also be able to export all corrections(actually, the ones that are enabled in the VFB) as a custom LUT?