[CREATE] Linear light workflow

Andrew Chadwick a.t.chadwick at gmail.com
Tue Mar 27 09:35:51 PDT 2012


[This pertains to some MyPaint ideas we're kicking the can around for,
but it probably warrants wider discussion.]

Linear light[0] has technical[1] and artistic[2] advantages for
compositing layers, but historically MyPaint has always composited
nonlinear (s)RGB components. I've written some experimental code to
make the internal layer representation linear[3], but we are faced
with the fact that just going ahead and doing this would make old ORA
files saved with earlier versions of MyPaint look different. With
middling alpha or opacity values (~0.5), the difference is readily
apparent even for the normal (src-over) blend. We don't want to break
things for our users; MyPaint has a strong culture of backwards
compatibility (so annoying for us developers :D)

I think that OpenRaster files should be specific about how their
layers are to be composited. Something like color-interpolation from
http://www.w3.org/TR/SVG11/painting.html#ColorInterpolationProperties
might do the trick, perhaps started at the top level of the file. I
don't see any benefits in mixing modes within a single working file.

Another approach would be to version OpenRaster files, and declare
that beyond a certain file format version all ORA files will use
linear light internally. That seems a bit prescriptive to me.

How do (did) GIMP and Krita manage this for their native formats, OOI?


The pixel format MyPaint uses in PNG files stored in ORA wrappers
won't change; however the content artists put in them will because of
the different compositing strategy. We might add an sRGB chunk to them
at the same time as linear workflow code goes into master just to be
explicit about the assumptions we're making (GIMP does this already...
:)  Ideally, for our users, we'd like just a silent, behind the scenes
workflow change for new-style files, and a backwards-compatible mode
for old-style files. No dialogs, no prefs toggles.


[0] any colourspace where the channels are individually proportional
to perceived light intensity, i.e. gamma==1.
[1] https://en.wikipedia.org/wiki/Digital_compositing
[2] http://www.artbeats.com/assets/written_tutorials/pdfs/linear_light.pdf
- it's more "cinematic", greys stuff out less, and looks closer to
what happens with film crossfading. Also it "may correct halos and
fringing when high-contrast saturated colors are blended together",
according to After Effects CS3.
[3] The idea is similar to
http://www.blender.org/development/release-logs/blender-256-beta/color-management/
, or at least it will be when it's finished...

-- 
Andrew Chadwick


More information about the CREATE mailing list