AWS Thinkbox Discussion Forums

EXR to QT gamma

How can I compress linear EXR’s as gamma 2.2 quicktimes so that they look correct?

This is kinda a showstopper for us as we work in linear for everything.

R

Thank you for your report!

Draft currently has no way to do this, but we’ve added it to our plans for a future release.

Edit: This will be in the next release.

Any ETA of the date the next release might be?

I’d estimate the week of April 9th.

FYI, I downloaded Beta Build 8 last night, installed it, and it fixed many of my exr color issues. The color in the QT wasn’t dead on but it was definitely close and the exr proxies I made look exactly the same in Nuke (I was getting some kind of colorspace madness before). It was one test on one set of frames but still.

With Beta8 I’m still seeing the linear gamma in the QTs. Is there a something I need to add to the template to convert to sRGB in the QT?

Does this require something like a Linear -> sRGB LUT?

We added an Image.ApplyGamma( gamma ) function in Draft Beta 9, which may let you approximate the conversion you need.

Thankyou.

A general 1D LUT would be pretty useful to be honest. It kinda sucks that you guys have to implement each transform on a case by case basis.

If you do feel like adding a couple more; lin -> rec709 and lin -> sRGB would be awesome

where x is each color channel:

rec709 formula: x <= 0.018 ? (x * 4.5) : 1.099 * pow( x, (0.45) ) - 0.099
sRGB formula: x <= 0.0031308 ? (x * 12.92) : 1.055 *pow( x, (0.4167) ) − 0.055

Thank you for your feedback!

General LUT support is on our wish list for future development, but I haven’t decided how to handle it yet. Here’s what I have in mind now: implement a few basic LUTs in Draft (rec709, sRGB, Cineon, gamma), and add support for OpenColorIO to do anything more general.

I’d be very interested to hear if anyone has thoughts on this.

Sounds like a great start to me; maybe an additional function that allows the user to indicate both a “source” and “target” colorspace? I don’t believe colorspace info is saved in a TIF file or QT. In fact, I think the only one that does save colorspace info (if it’s set up to do so in the metadata) is EXR? Maybe DPX, too?

One other thing along these lines: we’re finding that EXRs out of AE are saved as Linear color space, while EXRs out of Nuke are saved with whatever default is set up for that bit depth (usually sRGB). Could we add Linear to the list of source colorspaces?

For sure!

I think it will take a few iterations for us to get this right, but here’s what we have planned for Draft Beta 10.

Let’s say you have a linear image, and you want to convert it to sRGB:lut = Draft.LUT.CreateSRGB() image = Draft.Image.ReadFromFile( 'c:/users/paul/linear.exr' ) lut.Apply( image )

Now let’s say you already have an sRGB image, and you want to convert it to linear:lut = Draft.LUT.CreateSRGB().Inverse() image = Draft.Image.ReadFromFile( 'c:/users/paul/srgb.exr' ) lut.Apply( image )(Note the Inverse() on the first line.)

Both AE exrs and Nuke EXRs should be linear by default.

Is there a way to pull the colorspace info out of the metadata saved with the frame?

Draft doesn’t expose that yet. Is there something in particular you’d like to see?

Well, colorspace for one, although I can imagine there are a few others that some people could find useful, like keycode/edgecode or timecode, framerate, etc. I’m attaching a screengrab of the metadata that Nuke reads from an example film scan and an example Alexa file. Let your imagination go wild!

we definitely want to support all the metadata, and have the ability to inject new metadata - for example - if you have deadline tied to shotgun, then upon submission you could take all metadata from the scene that the submitter knows about, and corresponding data from shotgun that is applicable to that shot and save that to an xml file [for example], inject that into the header of the image files [when appropriate etc] as well as take metadata from other files [such as the original plate, if it had keycode, timecode etc] and reinject that or pass it along to the rendered files.

so this is on the roadmap, but i want 1.0 of draft to go out the door so we can ‘release’ and immediately start on 1.01 :smiley:

there are many things on our roadmap, in case you haven’t noticed!

cb

Hi Paul

This thread is currently happening on the nuke-users group list. It’s a little long and you have to read from the bottom up but it might provide some nice context for pulling metadata from EXRs?


Hi
With just few lines of code and totally simplified


compList = [‘None’, ‘RLE’, ‘ZIP’, ‘ZIP 16 lines’, ‘PIZ’, ‘PXR24’, ‘B44’, ‘B44A’]

n = nuke.selectedNode()
file = nuke.filename(n, nuke.REPLACE)
fd = open(file, ‘rb’)
header = fd.read(1024)
index = header.find(‘compression’)
comp =ord(header[(index+28):(index+29)])
print compList[comp]


Each exr file MUST have compression info in the header and this info is placed just after channels info. It’s simple to get actual size of channels list but I quickly set 1024 bytes of a headroom.

Best
Adrian

Privacy | Site terms | Cookie preferences