Jump to content


Photo

How do you go about creating a LUT?


  • Please log in to reply
9 replies to this topic

#1 Peter Taps

Peter Taps

    New

  • Basic Members
  • Pip
  • 7 posts
  • Other

Posted 12 June 2012 - 04:55 AM

Folks,

The company I work for has received a bunch of dpx image files (3TB). I have been asked to develop an application that will create a LUT that can be applied to the images for viewing on a specific projector.

After doing some research on Google, here is what I have proposed:

1. Load the DPX image in Adobe Premier Pro and change the pixel colors so that they match the desired final output.
2. Give me the original DPX image and the converted image.
3. I will create a look-up table that simply matches the old RGB value to the new RGB value pixel by pixel.

I am wondering if this logic would work.

My area of expertise is in software development. Please forgive my limited knowledge on cinematography.

One of the graphics consultant mentioned something about this strategy not working as the input dpx file is "log" formatted and not "linear." I didn't get this part either. If it is an image file, all it will have is the RGB value, either directly or indirectly, of each pixel that needs to be displayed.

Thank you in advance for your help.

Regards,
Peter
  • 0

#2 David Mullen ASC

David Mullen ASC
  • Sustaining Members
  • 19761 posts
  • Cinematographer
  • Los Angeles

Posted 12 June 2012 - 11:27 AM

This is pretty standard stuff, a Log image on the original DPX file having a viewing LUT applied to correct the gamma and color space for the particular projector (most likely Rec.709 HD rather than P3 digital cinema, which are the two most common display color space/gammas.)

However, I don't know how to do it personally, but I would think it's been done many times. The first question is what sort of Log format -- ARRI Log-C, Sony S-Log, Canon C-Log, Panavision Panalog, etc.? I think one could create a mathematical conversion of color and luminance values to go from that particular Log to Rec.709 but one should probably make some adjustments after you see the results. For example, I find that the ARRI Alexa's Rec.709 output, which was mathematically derived, looks a bit yellowish, saturated, and harsh (crushed) on a Rec.709 monitor. When I create my own LUT's at the post house with a colorist, we usually go for something a bit less strong.

ARRI has a program that allows you to create your own LUT's here:
http://www.arri.com/..._709_video.html
  • 0

#3 Mike Lary

Mike Lary
  • Basic Members
  • PipPipPipPip
  • 472 posts
  • Other

Posted 13 June 2012 - 04:23 AM

After doing some research on Google, here is what I have proposed:

1. Load the DPX image in Adobe Premier Pro and change the pixel colors so that they match the desired final output.
2. Give me the original DPX image and the converted image.
3. I will create a look-up table that simply matches the old RGB value to the new RGB value pixel by pixel.

I am wondering if this logic would work.

Hi Peter,

That approach sounds a little simplistic. Have you looked at the solutions available? LUT-building software requires the display, measurement, and analysis of thousands of custom patch values that are used to determine the entire gamut of the target device. This makes it possible for accurate color transforms to happen when any color numbers are thrown at the LUT.

What you're describing is the requirement for two conversions. One is a log to lin conversion and the other is a colorspace conversion. Both can be accomplished with a single LUT, but the conversions need to be precise.

If you're not clear on the necessity of a log to lin conversion, this will help:
Understanding Log Grading:
http://mikemost.com/?p=251

The ARRI tool that David linked to is actually just a shell that spits out prebuilt LUTs based on the selections you make in the GUI, not an actual LUT generator as the name implies. If you need to do a color transform to a specific device (the projector you mentioned) and not a specification like Rec. 709 you'll need a custom solution.

Edited by Mike Lary, 13 June 2012 - 04:26 AM.

  • 0

#4 Peter Taps

Peter Taps

    New

  • Basic Members
  • Pip
  • 7 posts
  • Other

Posted 18 June 2012 - 04:54 AM

Thank you all for your help.

Mike. The link you mentioned was quite enlightening. Upon further investigation, it seems the best approach is to apply "s-curve" to the input dpx file.

If I go with s-curve approach, I am trying to understand the parameters I would need.

1. Is this thinking correct? log-curve-value minus s-curve-value equals linear-value.
2. The s-curve can be simulated in multiple ways. I could use an equation such as the one mentioned in the wiki http://en.wikipedia....istic_function. Or, I could ask the user to give me a few points on the curve. What is a good approach?
3. Do I need three different s-curves for R, G, and B components?

Appreciate your help.

Regards,
Peter
  • 0

#5 Phil Rhodes

Phil Rhodes
  • Sustaining Members
  • 11939 posts
  • Other

Posted 18 June 2012 - 06:40 AM

There are several problems here:

- What's called "log" by various manufacturers is not the same thing. What you actually get is a curve that makes all the code values of the image hold approximately the same amount of energy, coupled with whatever bends and tweaks the manufacturer thinks makes their sensor look subjectively nice.

- Because of this it is easy to apply curves that make things strictly correct but objectively not so nice, which is a problem.

- The same applies to most of the things that are called an "s-curve".

I think we need to know a bit more about the circumstances of your application to advise.

P
  • 0

#6 Peter Taps

Peter Taps

    New

  • Basic Members
  • Pip
  • 7 posts
  • Other

Posted 18 June 2012 - 11:50 AM

Phil,

Thank you for your help.

We recently got into the process of converting movie films into 1080p mp4 files. The original movie is supplied to us by the movie producer. It consists of a series of dpx images.

The team that is currently doing the conversion uses Adobe Premiere to adjust colors. However, it has been a bit of trial and error. Also, the overall process takes a couple of days to complete.

My responsibility is to find a better solution. I am looking at either using freeware software on Linux (such as the one from ImageMagick) or developing our own software. Ultimately, we would like to deploy several machine (one per movie reel) so that we could run the conversion process in parallel using the same settings.

Hope this gives you enough background.

Regards,
Peter
  • 0

#7 Mike Lary

Mike Lary
  • Basic Members
  • PipPipPipPip
  • 472 posts
  • Other

Posted 19 June 2012 - 01:30 AM

If I go with s-curve approach, I am trying to understand the parameters I would need.

1. Is this thinking correct? log-curve-value minus s-curve-value equals linear-value.
2. The s-curve can be simulated in multiple ways. I could use an equation such as the one mentioned in the wiki http://en.wikipedia....istic_function. Or, I could ask the user to give me a few points on the curve. What is a good approach?
3. Do I need three different s-curves for R, G, and B components?


Hi Peter,

The use of curves for R, G, and B falls into the 1D LUT realm. They're generally used for simulation (artistic "look" previews) and situations where color accuracy is less crucial (especially where ambient lighting conditions can't be controlled). A 3D LUT will give you much more accurate color transforms because it uses a matrix (allowing for independent color remapping). You could build a LUT that incorporates both a gamma curve for the Log-to-Lin transform as well as a color transform or you could separate them. Workflow considerations will influence your choices, especially in regards to placement. I don't work much 'under the hood', so I'll let others comment on the math. There's a very interesting project you might want to look at and see if it offers you ideas or solutions:
http://dispcalgui.hoech.net/
  • 0

#8 Mike Lary

Mike Lary
  • Basic Members
  • PipPipPipPip
  • 472 posts
  • Other

Posted 19 June 2012 - 08:20 PM

Hi Peter,

A 3D LUT will give you much more accurate color transforms because it uses a matrix (allowing for independent color remapping). You could build a LUT that incorporates both a gamma curve for the Log-to-Lin transform as well as a color transform or you could separate them.


This wording is a little off. It should read "it uses a matrix based on a cube, so it allows for independent color mapping".
  • 0

#9 Peter Taps

Peter Taps

    New

  • Basic Members
  • Pip
  • 7 posts
  • Other

Posted 22 June 2012 - 01:30 PM

Hi Mike,

Thank you for your help.

I did some research on 3D LUT. I think I understand the concept now. However, I couldn't find any articles on how to go about building a 3D LUT and the parameters one should use to build the LUT. I would appreciate your help if you could point me in the right direction.

The team that would build the 3D LUT would sit in the theater hall, apply the lut and view the output on the screen. They would keep modifying the LUT until the output looks right. My job is to help them simplify build the LUT.

I appreciate your help.

Regards,
Peter
  • 0

#10 Mike Lary

Mike Lary
  • Basic Members
  • PipPipPipPip
  • 472 posts
  • Other

Posted 23 June 2012 - 01:08 AM

Hi Peter,

Sorry, but I can't help you there. The custom patch sets and algorithms are all proprietary, so you've got your work cut out for you. You might try to enlist the help of an RIT graduate who's studied the subject in-depth.

Best of luck,
Mike
  • 0


FJS International, LLC

Paralinx LLC

Opal

Media Blackout - Custom Cables and AKS

Wooden Camera

Broadcast Solutions Inc

Ritter Battery

Rig Wheels Passport

Aerial Filmworks

Visual Products

Tai Audio

Metropolis Post

The Slider

Abel Cine

CineTape

rebotnix Technologies

CineLab

Glidecam

Technodolly

Gamma Ray Digital Inc

Willys Widgets

Gamma Ray Digital Inc

CineTape

Rig Wheels Passport

Glidecam

The Slider

Ritter Battery

Paralinx LLC

Tai Audio

Willys Widgets

CineLab

Opal

Abel Cine

Broadcast Solutions Inc

Wooden Camera

Visual Products

Media Blackout - Custom Cables and AKS

Aerial Filmworks

FJS International, LLC

Metropolis Post

Technodolly

rebotnix Technologies