# HTPC Color Calibration with 3D LUT



## hulkss

I have been using JRiver Media Center DSP to get great audio. It digitally filters the signal going to my speakers to correct the sound. In a similar way, madVR rendering can be used to get great video. It can digitally modify the signal going to your display to correct the image color. This is FANTASTIC and would normally require a specialized video color processor system costing thousands of dollars! This process works with any type of TV, Projector, or computer monitor connected to an HTPC.

Color in a computer is represented by three numbers (0-255 each) representing red, blue, and green output. This forms a cube with over 16 milion colors. The corners of the cube are black, white, red, green, blue, magenta, yellow, and cyan.










With an HTPC we can correct the image color in two ways: First, by installing an Image Color Management profile (ICM profile) in the Windows operating system. This will correct the gamma and gray scale response of the display for all applications. This is accomplished in the ICM file with three, one dimensional Color Lookup Tables (CLUTs), one for each primary color.

The second level of color correction for video playback is accomplished by installing a Three Dimensional Look Up Table (3D LUT) in the madVR rendering engine of Red October HQ. This will add additional correction for errors in the color gamut of the display.










To create the ICM profile and 3D LUT you will need a colorimeter and some free software. I use an EyeOne Display 3 Pro colorimeter with ChromaPure software. You can get the meter only if you want to use the free HCFR software: EyeOne Display 3 & ChromaPure

Download and install the following software:
AVS HD 709 MP4 test patterns: Test Patterns
AVS HD 709 patterns manual: Patterns Manual
HCFR Software: HCFR Software

First you calibrate your display to its best native state using its built in hardware controls.
1. Set your computer video and display to RGB.
2. Turn off all computer video enhancement settings in the video hardware driver.
3. Make sure no color profiles are loaded in Windows (control panels / color management).
4. With JRiver Red October HQ playing, go to madVR settings (right click during video playback). Select your display under devices and review the settings. Make sure to use the proper selection for RGB levels under the properties tab. This depends on your display capability. I use 0-255 in madVR and 16-235 on my video projector. That is what works with my Intel HD 4000 graphics. The test for black and white points mentioned below will help you find selections that work best. Select disable calibration under the calibration tab. Do not check disable gamma ramps. Under color & gamma, do not enable gamma processing.

If you're new to video calibration, go to Grey Scale And Color Calibration For Dummies: Calibration for Dummies. Use the colorimeter and HCFR to get as close as you can to Rec. 709, the color standard for HD television. Gamma should be 2.2 - 2.4 depending on preference and how dark your room is (higher numbers for darker rooms). The standard color temperature is 6500 K (D65). Play the Basic Settings patterns you downloaded in RedOctober HQ to get the Black and White points correct, then use the HCFR greyscale patterns. You may be able to adjust the primary and secondary colors. A lot depends on the features in the Color Management System (CMS) of your display. Refer to your manual as needed.

My cheap Acer monitor calibrated to the best possible settings before color profiling (ChromaPure):


















Download and install the following software:
dispcalGUI: DispcalGUI
Argyll Color Management System: Argyll Color Management
TI3 Parser toolset: TI3 Parser

Set dispcalGUI to video, profile type XYZ LUT + matrix. Click the advanced button to set gamut mapping options: check both boxes; select an Rec. 709 profile; set the intents to absolute colorimetric. Click on the Calibrate & Profile button. When finished install the ICM profile. Check that it is loaded as the default profile for your display in the color management control panel.

Now go to the bin folder of the Ti3 Parser toolset and run LinkICCGUI.exe (important: Uncheck Auto-calibrate, this will then make a 3D LUT that will work with the installed ICM profile). The application will browse to the default locations to load the files created by dispcalGUI. Click on generate to make the 3D LUT for madVR. Go back to madVR settings and under calibration pick the 3D LUT option. Make the link to the .3dlut file you just created. Click apply and OK. Your done!

Go back and use HCFR and patterns played with madVR to verify that your display is working to near perfection. My cheap Acer monitor after color profiling (ChromaPure):


----------



## mechman

I'll leave this for now hoping that you'll just repost it here. 

We'd rather you post it here than direct members to another forum.

If you need me to cut and paste it let me know.


----------



## mechman

Thank you hulkss!! :T


----------



## Elix

Yes, that's a great tutorial  Good for me, I already know it and use it. Actually, there's one more trick: don't use ICM profiles because they use video card's gamma correction which usually have 8-bit output. This will more likely introduce banding. You may use this neat program instead which use 16-bit correction: http://www.avsforum.com/t/1042160/videoequalizer-2-0-powerful-gamma-correction-for-your-pc
First, make LUT with AgryllCMS as described in the tutorial, then load VideoEqualizer and save current profile. Delete ICM profile and use VideoEqualizer to auto-load its profile on system start-up.


----------

