Page MenuHome

"C" channel of RGB Curves node is ineffective at input values > 1.0
Closed, ResolvedPublic

Description

Version: 2.69 official (win 64)

How to reproduce: Render the scene (just a sphere with a very bright lamp) and inspect the composite node tree. With the "C" curve completely inverted, the expected output of the RGB Curves node should be a complete inversion of the input, but it isn't. Also try flattening the curve at 0.0, which should make the whole frame dark, but this also does not work.

Comparing the render result to the composite, It seems to only subtract 1.0 from values greater than 1.0, no matter how low the curve is. Changing the extrapolation of the curve has no effect.

The individual RGB channels *do* seem to work as expected on values > 1.0, so perhaps this is not a bug and I'm just misunderstanding the purpose of the C channel? I don't know why I would want it to work the way it currently does, though.

Event Timeline

Sam Brubaker (rocketman) updated the task description. (Show Details)
Sam Brubaker (rocketman) raised the priority of this task from to Needs Triage by Developer.
Sam Brubaker (rocketman) set Type to Bug.

What happens here is that the color of the image goes beyond the 1.0 white level. The behavior of the curve mapping atm is such that it will extrapolate the mapping for any colors above the white level (or below black level for that matter) with the default 1:1 identity curve, offset by the white/black level.

This doesn't seem to be a bug per-se, it's just that you need to adjust your white level to the excessive level in the input image. Alternatively you can try to normalize the image first, or perhaps better use an invert node instead which doesn't clamp the range to black/white levels.

I think this is a bug, it's in the "premultiply" system here where it multiplies the C curve table with the R/G/B curve tables as an optimization, but doesn't adjust the extrapolation values ext_in and ext_out. I'll fix it.

Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.Feb 14 2014, 4:02 PM