SG_CCTools


#1

The brilliant Sebastian Goetsch has released the new SG_CCTools for Color Management and Linear workflows.

You can find them here:

http://www2.informatik.hu-berlin.de/~goetsch/CCTools/

This is the first color management system that has been developed ever within any 3D commercial software, and is now available for Lightwave 3D.

Later, I’ll post an introduction tutorial about it’s usage.

Have fun!

Gerardo


#2

The Color Correction Tools by Sebastian Goetsch (SG_CCTools) is the first color management system that has been developed ever within any 3D commercial software. Sebastian Goetsch has solved brilliantly a system that not only implements color management facilities within Lightwave 3D, but also facilitates a lot the Classic Linear Workflow. These tools work nicely also with the Inverse Linear Workflow and Multipas Linear Workflow.

Note: I strongly recommend you get an Issue# 18 of HDRI3D magazine where I propose the 3 Linear Workflows mentioned before.

Installation

Unzip the files (32Bits version or 64Bits version) in its respective folder. Better if we create a special folder for these plugins - later we’ll see why. Add the 3 plugins in Lightwave.

Modules

SG_CCTools is composed by 3 modules:

  1. SG_CCPicker
  2. SG_CCFilter
  3. SG_CCNode

SG_CCPicker

To replace the Default Picker, go to Options => Preferences => General tab and choose SG_CCPicker as your new Color Picker. Once you have made this, you’ll never come back :slight_smile:

The SG_CCPicker is currently the only customizable picker that automatically linearize any color we choose. It has 4 panels:

WinPicker/History Panel - Here we have two ways to pick a color. By using the classic Windows color picker, or by clicking in any place of our screen by using the Screen button. This works if your color source is an image in other window, or if it’s even in another application; we can switch to other program, open any image and choose any color displayed in our screen. This panel stores also the last 30 colors we have used, so this could be an additional way to choose a color.

Tint/Shade Panel - You should already know this useful way to choose colors.

Numerical Panel - We can specify colors directly in XYZ color model. By multiplying values, we can go beyond the 8-bits limit. So yes, SG_CCPicker is floating point (FP) as well.

Config Panel - Here is where reside some of the most powerful features of this picker. There’s possible to customize up to 8 images for our color screen. This means that we can use ANY color wheel or color table (Discreet color wheels, Color Finesse hue offset wheel, Kelvin temperature bar, wavelength bar, HSV>RGB table) or any other color scheme you want to design. We can even get a CMYK Pantone within Lightwave. We can get them all within SG_CCPicker. These color tables can be saved as images of 128x384 pixels.

The Config Panel also allow us to linearize or color encode any color we pick. This color conversions can be made by input any simple gamma curve or more complex gamma formulas for sRGB and Rec. 709.

Example Usages


CMYK color (RGB equivalent) linearized by SG_Picker


Blackbody Temperature / Kelvin


Bluish color, linearized for sRGB, AdobeRGB 1998 and rec. 709

Sebastian’s Tip: Roll your mouse wheel (MW) to increase or decrease saturation. To increase or decrease the brightnes, press RMB + MW. We can see how numbers change in the Numerical tab. Pretty cool eh?

SG_CCNode

This node was made for cases in which we need to linearize dark 8-bits images. For avoiding quantitizations, it’s beter to perform linearizations on FP space. So for those cases, we may use the blank image trick or solve the task in the nodal system with this tool. Good thing about SG_CCNode (besides it’s pretty fast), is its gamma correction options for simple gamma exponents, sRGB and rec 709.

Example usage


HD footage linearized with SG_CCNode

SG_CCFilter

For advanced conversions at gamut level, we have the SG_CCFilter. This filter can be used as pre-processing or post-processing depending on the color management workflow we are using.

Note: I strongly recommend you get an Issue# 18 of HDRI3D magazine where I propose a general Color Management Workflow with which the SG_CCTools fits perfectly.

The SG_CCFilter is capable to manage the most advanced color conversions and rendering intends: Perceptual, Absolute Colorimetric, Relative Colorimetric and Saturation.

It uses ICM/ICC color profiles to make this conversions. In order the SG_CCFilter can recognize our color profiles, we need to specify the route in a .txt file. Something like:

C:/ProgramFiles/CommonFiles/Adobe/Color/ProPhoto RGB.icm

…and so on.

This file should be in the same folder where you installed these plugins - that’s why is advisable to create an special folder for the SG_CCTools.

For color profiles, we can use different files from different folders, but in an studio environment or colaborative projects, it’s advisable to keep the same route, in the same order, with the same color profiles for all computer nodes, so that scenes can be portable from computer to computer. It’s also advisable to create folders for both, linear and log versions of these color profiles.

Note: Be sure to separate linear versions from log versions in a different folder from Adobe’s applications, so these applications don’t confuse them if these color profiles share the same internal name.

Since we can perform color conversion with SG_CCFilter, it’s possible also to use it for working accurately in linear light as well. That is to say, for linearizing images taking into account gamut conversions (chromaticities). In order to do this, we need the usual color profile (a gamma encoded version), and a linear version of the same color profile. Since most of the professional color profile makers are not so cheap to only use them for making linear versions of our color profiles and, since color profiles are in dependence of the particular images devices we are using in a given production (film stocks, digital video and photographic cameras, TV systems, scanners, monitors, papers…), I’ll show you how to make a linear color profile in a very cheaper and easy way:

Go here and download ProfileInspector.

Once installed, open the application, go to Browser and load an ICM or ICC color profile. Let’s say AdobeRGB 1998.icm profile. There, we can see the profile structure and some other useful info. What we care now is the signatures in the Tag Table (12 tags). Select the fourth, fifth or sixth tag (rTRC or gTRC, or bTRC) and double click in one of them. We can see the specific gamma curve for this color space in that specific channel (a simple curve exponent in this case). To set a linear gamma, export the curve tag. Name the txt file as aRGB_gamma.txt and save it in your linear profiles folder. Leave the ProfileInspector opened for a moment and open the txt file. We have now the right syntax to change this gamma. Change 2.200000 by 1.000000 and save it again. Come back to ProfileInspector, select rTRC signature and import the new curve you have just saved. Gamma curve should be linear now. Do the same thing with gTRC and bTRC and save this profile as Linear_AdobeRGB 1998 .icm. You have now a linear version of this working color space. We can do this for other color spaces like ProPhotoRGB (very advisable), sRGB, HDTV, or any other color space if you know its gamma formula. Just notice that internally, both profiles (the log version and the linear version) share the same name. Professional Profile makers allow to change this…


#3

Example usages

Preprocessings


Wooden texture, converted from sRGB to AdobeRGB 1998 in pre-processing.


Same texture converted to Linear ProPhotoRGB.

Tip: Yes! with the new SG_CC Tools, we are able to work properly, for first time, with one of the wider gamuts available: ProPhoto RGB! This colour space is not only better for motion picture production due to its wider gamut but it also works with one of the most convenient gamma exponents (1.8)

Note: It’s advisable to perform conversions to wider color spaces in at least 16-bits space.

PostProcessings

Scene was worked in linear ProPhotoRGB. Raw render, no managed colors:

Here, we’ve used SG_CCFilter as a LUT tool for previewing in log space according to my monitor color space (a CTR monitor in this case):

The setup is like this:

input profile: ‘My Working Color Space.icm’ - Input Intend: Relative Colorimetric - Output profile: ‘my monitor profile.icc’ (log version) - Output intend: (it doesn’t care in this case - leave it as Perceptual)

Even more, we can preview how this result will look in other mediums as well (notice I’m referring to the ProPhotoRGB output, not to our screen output), like let’s say HDTV - not only in gamma aspect but also in its chromaticies:

The setup is like this:

input profile: ‘My Working Color Space.icm’ - Input Intend: Relative Colorimetric - Output profile: videoHD.icc (log version) - Output intend: (it doesn’t care in this case - leave it as Perceptual)

Now, we may notice these results are pretty similar to how Discreet’s colorgrading systems manage colors, but slightly different from Photoshop or AE proof colors. Besides different color engines, this is mainly due to Adobe uses sRGB space as connection space (a similar concept to how I proposed to work - before SG_CCTools - with cineon footage and rec. 709 in a motion picture production), but in this case it seems this is due to Adobe tries to avoid device-dependent color spaces in the conversion equation to keep a more standard “look” (which I don’t think is necessary with the new displaying technology).

But anyway, it could be a more secure way; so if you want to go with the Adobe’s way, the setup is like this:

input profile: ‘My Working Color Space.icm’ - Input Intend: Relative Colorimetric - Output profile:‘my_screen_profile.icc’ (log version) - Output intend: Perceptual

Add other SG_CCFilter instance in the next slot:

input profile: sRGB.icm - Input Intend: Relative Colorimetric - Output profile: videoHD.icc (log version) - Output intend: (it doesn’t care in this case - leave it as Perceptual)

Now the result match Adobe’s applications. Then you get the picture for other type of conversions. Obviously this setup is not necessary if your working color space is HDTV (the first setup is enough in that case).

But wait, there’s even more: we can get an approximation to how our output render will look like in a cinema theater within Lightwave 3D!

The setup might be like this:

Input profile: ‘My working Color Space.icm’ (Linear ProPhoto RGB is recommendable in this case) - Input Intend: Absolute Colorimetric - Output profile: Negative Film Printing Density.icc - Output intend: Absolute Colorimetric

In the next filter slot, add other SG_CCFilter with this settings:

input profile: “Film Theater Preview.icc” - Input Intend: Relative Colorimetric - Output profile: ‘my_screen_profile’ (log version) - Output intend: (doesn’t care in this case - leave it as Perceptual)

In this example the Negative Film was Kodak 5218/7218 Printing Density, and Theater Preview was Kodak 2383:

In this one the Negative Film was FujiFilm ETERNA 500 Printing Density, and Theater Preview was Kodak 2393

This is the first time that someone can make this within a 3D package!


#4

As we can see, SG_CCFilter is useful also to provide “film looks” to our final renders.

…playing a bit with film desities profiles and a curve filter (‘toe and shoulder’ kind adjustments made with HDRExposure/Exposer):

There are several ways to use the SG_CCTools according to your unique color workflow and pipeline. This tut only pretends to show some of the potencialities of SG_CCTools by explaining what are these tools and its basic usage.

If you want to know how to implement these tools within a general color management workflow in a coherent way, I strongly reccomend you get an Issue# 19 of HDRI3D magazine. There, I propose 2 methods (the screen method and the perceptual method) to work with these tools, and I explain the only method that I found, so far, to take profit from wider gamuts by keeping color consistency.

I said ‘so far’ because I’m still discovering new possibilities, techniques and possible enhancements for this color management system. So I encourage you to discover and share new methods, techniques and possibilities. It would be really great to see something like this implemented as a built-in system in future versions of Lightwave3D.

Many thanks to Sebastian Goetsch, not only for coding so refined piece of software - freaking genious developer! - but also for his generosity to make this advanced color correction system free for educational and commercial use.

You can find the SG_CCTools here:

http://www2.informatik.hu-berlin.de/~goetsch/CCTools/

Gerardo


#5

Good work. gerado.

Video Tutorial (short) will probably more easier to discern to newbies and pros alike.

PRRRRROTON!


#6

If someone is willing to make video tutorials about the usage of these tools, please, feel free to share them here! this is just a kind of ‘user guide’; so please, take it as a manual that you might prefer to read, since there’s very valuable information between the lines :slight_smile:

Gerardo


#7

I have recently been working on writing a LUT, Exposure, and Log previewer with reference black and white controls (as per the cineon documentation) for LW and have gotten a bit stuck. Would this allow me to apply LUTs, expose the images, and preview Log space with user specifiable (and saveable) reference black and white?

Basically my compositing processes need to be previewable in LW, and all my CG will be having a consistent per-sequence LUTs applied, as well as being able to preview the Log space conversion.

Cheers.


#8

SG_CCFilter works with ICC/ICM color profiles (which are more than LUTs). The tutorial is showing in fact, how we can use color profiles as LUTs (in postprocessing). So yes, all what you are saying is what we are seeing in the tutorial above. We can do all this (and even more) in several ways. The ICC/ICM profile for the camera negative film can reconstruct the relative luminance and colorimetry in the scene from the scanned camera negative. This is even more precise than 3D LUT-based profiles. We can ‘bake’ this LUT in our output render or we can leave it as linear /raw render (recomendable if we gonna finish it through our DI facilities).

This is very advantageous because ICC/ICM profiles are A LOT cheaper than LUTs from systems like Kodak’s KDM or Autodesk’s Lustre (LUTs can cost about USD100 - USD5000, color profiles are free - several of them - or they cost between USD15 or not more than USD250). But not only that, we can even write or modify C-LUTs inside DPX scene profiles to to enhance them through color profiles makers. This is RELLY good because they are standard formats in industry, so you don’t need to write a special tool to make this.

About the black and white controls, color profiles specifies white points compensations (perceptual rendering intend can match black points compensations between color profiles and Sebastian is aware about this for Relative Colorimetric as well). If you are referring to the toe and shoulder of the film’s characteristic curve, it’s recommendable to introduce them later in post processing. Btw, the S-shaped curve, scene luminance curve is already taken into account in the color profile as well. For previewing purposes though, we can do this job (toe&shoulder) with Exposer or HDRExposure, for more precise adjustments (even exposure) WaveFilterImage or Denis Pontonnier Node Editors can do the job as well. I’ve used Exposer for the examples above, by matching a real Cineon Converter. Though a proper “Cineon Converter” is in my improvements list.

If you are interested in to use these tools in a Cineon/DPX pipeline, we need a ‘special setup’ depending on our general color management workflow. In my articles of HDRI3D magazine (Issue# 18 and 19), I explain a couple of ways depending on your compositing system :slight_smile:

Gerardo


#9

Just to clarify when I say ‘cineon converter’ I’m referring to a tool for toe&shoulder adjustments only (with the same measurement’s units for 8-bits, 10-bits, 16-bits and decimal FP). Since a real cineon converter is unnecessary with SG_CCFilter (seeing that a real cineon converter it’s not even close to real negatives film color spaces).

Gerardo


#10

Hello,

Just to let you know Sebastian has updated the SG_CCTools:

http://www2.informatik.hu-berlin.de/~goetsch/CCTools/

Some bugfixes in SG_CCFilter 32/64bits, it now stores the profile filename instead of profile index in the .lws by making LW scenes portable between computers with different profile lists; this makes more viable to set up collaborative work pipelines.

Cheers,

Gerardo


#11

My only question is:

Will it work with fprime? Thanks


#12

SG_CCFilter works with FPrime as pre-filter. SG_CCPicker and SG_CCNode work also with FPrime. As post-filter, no post-filter works with FPrime. G2 indeed works, but it’s a kind of workaround from Worley with Worley plugins. In order to make other pixel filters work with FPrime, Worley would have to share some info to do this, I guess.

Working with SG_CCFilter as pre-filter with FPrime only allows us colorimetric consistency within our monitor color space, which can be useful only for web, but depending on your screen (considering new aRGB screens) it could be useful for print work and even TV shows and spots.

Btw, thanks to everybody for your testings and suggestions to improve these tools.

Gerardo


#13

Just to let you know there is already available a 64-bits version of the SG_CCPicker!
Please, feel free to report if everything is working ok.

Gerardo


#14

Good to know! Thank you for the info, Gerardo.

Let’s try it!


#15

Sebastian Goetsch has improved even more the SG_CCTools by adding a very requested feature. SG_CCNode can now utilize color profiles and perform complex color conversions like SG_CCFilter! If no profile is selected, it will work like it used to (lin/log/sRGB/Rec.709). SG_CCPicker now remembers window position as well.

Usage

SG_CCNode’s new feature can be useful in several contexts and it can be used in several ways. In the surface node editor, it can convert automatically colors from our screen space to our working color space. Though the perceptual method (for chromaticities, not gamma) is still much more recommendable, you may want to try and see if this new feature gets adapted to your preferences in the surface node editor. For color conversions in surface node editor by working in linear light, you’d need two versions of your working color space to perform the color correction (log & lin versions). If you want to work directly in a negative film space, you’ll need a linear version of it too (a professional profile maker is desirable for this). Consider film theater profiles for projected film are preview profiles, not output profiles, and they are not convenient as working color spaces for CG work. Remenber since ICC/ICM profiles only support up to 16-bit precision, the output values are converted to 16-bit.

Other very useful usage of SG_CCNode’s new feature is that it can work as part of a nodal setup in pre- or post-process within a nodal image filter. This, together with Dpont’s Image Filter Node Editor, bring three new advantages for preview purposes:

  1. It allows previews in real-time

  1. It allows to perform color conversions with a predetermined artistic “look” by providing us a very near idea of the final result in a very early stage of the process


Simple nodal setup for a film “look” proposal

  1. Artistic “looks” can be saved and recycled as presets in a non-destructive way


All this within Lightwave :thumbsup:

Gerardo


#16

Thank you again. :–)


#17

For anyone who have tried to make this within LW and may find this interesting, I’ll share here also - with a very simple example - a color flow setup for managing cineon/DPX files with computer generated elements. Hopefully it could help to provide an overview about some principles behind this kind of color flow and to open discussions about procedures for this kind of workflow. If you give it a try, any suggestions to improve the workflow or SG_CCTools would be very appreciated.

Note: In article on HDRI3D (Issue#19) I did cover color management with SG_CCTools for compositing within Lightwave 3D (CG and cineon/DPX files), however CG integration requires another treatment because goal is different. Let’s take a look at this:

Concept

Trying to put the idea in the simplest possible terms:

Contrary to other color spaces, film color pipeline (Cineon/DPX files) have a color scheme with an intended ‘look’. This ‘look’ not precisely attempts to be exactly the same as the real scene. We can say it has it’s own ‘colour style’.

In practical terms what we need to do is to subtract this intended ‘film look’, assign a scene referred color space (which implies a very wide color space), work the film footage and CG elements below this common wide working color space and apply later a LUT to recover back the intended ‘film look’ for both (BG plate and CG elements).

This implies two main things:

  1. A very wide working color space (device-independent)

  2. Accurate LUTs (forget cineon converters - those are toys - do use a concatenation of a negative film stock and a film theater profiles)

Note: Do not try also to use theatrical cinema profiles as a working color space. A film theater color profile (ICC/ICM) for projected film is a preview profile, not an output profile. Moreover, gamut of film theater color spaces are smaller gamuts than negative film profiles (really smaller). Negative film profiles or wider device-independent color spaces are appropriate color spaces as working color spaces for CGI in motion picture production. Do use theatrical cinema color spaces as a LUT for preview purposes only.

Implementation of Color Flow

Now, this pipeline assumes Lightwave (SG_CCTools) and After Effects, but you can use Fusion, Shake, Nuke or your favorite compositing package (or even Photoshop). Just be sure you have all the involved color spaces available.

For this simple example:

  • Working color space: ProphotoRGB
  • NegativeFilm profile: Kodak 5218 / 7218 Printing Density
  • Theatrical cinema profile: Kodak 2383 Theater Preview

Pre-Process

Load the cineon file on Photoshop, AE or your favorite compositing app. and assign (not convert) ProphotoRGB (log version, not linear). Save as EXR file (yes, not cineon file) and embed ProPhotoRGB as color space. Marcie should look something like this:

Our Cineon/DPX file is now ProphotoRGB.

Managing the Color Flow in the CG Work

Load this EXR file in LW. Within LW we are viewing these colors in monitor color space, but remember, they are in ProPhoto RGB and it supposes these are ‘absolute’ colors. We should get something like this:


(linear EXR file)

Now we load a 3D model and our lighting acquisition model (lightprobe) - converted to our working color space (from camera’s color space or sRGB/aRGB).

For previewing how our output result will look like in a negative film stock we set SG_CCNode (within DP Image Filters NE) or SG_CCFilter in post-process in this way:

  • First node/filter instance:
    Input Profile: ProphotoRGB (lin)
    Input Intent: Absolute Colorimetric
    Ouput Profile: ProphotoRGB (log)
    ouput Intent: Perceptual

  • Second node/filter instance:
    Input Profile: Kodak 5218 / 7218 PD(log)
    input Intent: Perceptual
    Ouput Profile: screen profile (log)
    ouput Intent: it doesn’t care

We should end up with something like this:

The cineon/dpx file with the same profile assigned in AE shows us this:

We have matched a BG plate with a CG element in a negative film stock color space within Lightwave!

Now, for previewing how our output result will look like in a cinema theater, we set SG_CCNode (within DP Image Filters NE) or SG_CCFilter in post-process in this way:

  • First node/filter instance:
    Input Profile: ProphotoRGB (lin)
    Input Intent: Absolute Colorimetric
    Ouput Profile: ProphotoRGB (log)
    Ouput Intent: Perceptual

  • Second node/filter instance:
    Input Profile: Kodak 2383 (log)
    Input Intent: Perceptual
    Ouput Profile: screen profile (log)
    Ouput Intent: it doesn’t care

We get this within LW:

Now output simulation within AE for the cineon/dpx file from Kodak2383 to Kodak5218/7218 looks like this:

We are previewing how our BG plate with a CG element will look like in a cinema theater within Lightwave!

Rendering

For saving this sequence:

  • Disable all SG_CCFilters or SG_CCNodes in post-processing.

  • Apply LW’s FPGamma at 1.8 (yes, this output is not linear - but don’t worry, neither
    cineon/DPX files)

  • We save our sequence as EXR files as always.

    Compositing

    In our compositing package:

    Choose Prophoto as our working color space. Load the EXR sequence and assign the K5218/7218PD color profile.

    We’ll see exactly the same cineon/dpx result (which is the same result within LW). After simulation from Kodak2383 to Kodak5218/7218 we end up with something like this:

    Color flow has rounded-trip perfectly from PS/AE to LW and AE back. A very cheap CG-integrated-with-film production pipeline ready to be used.

    For log2lin operations just linearize with a .5556 exponent. For lin2log operations, gamma correct with a 1.8 gamma exponent (both operations according to Prophoto RGB gamma). You problably have saved alpha and buffers so you may want to do this with CG elements only and use the real Cineon/DPX as BG in your compositing software.

    We can use SG_CCNode within DP Filter Node Editors (RenderBuffers Node) in case we want to adjust the log exposure of CG elements by separate from BG plates (BackGround) for matching more easily film exposure of the real motion picture camera by using an Add node (vector), or for toe&shoulder adjustments with a BoxStep node (a la Levels filter).

    This workflow is viable not only for cineon/dpx management within Lightwave but also to provide to our animations that evasive ‘film look’ in a more accurate way.

    Gerardo


#18

Thanks Gerado
You know I am going to have to read this 4 times to understand it
but I wish you would consider a video tutorials series - explainging this via a real world project and yes you should sell it.


#19

It would be better to follow this overview by working with LW aside. If you get stuck, please, don’t hesitate to ask.

Btw, if I make a video, you gonna have a harder time trying to understand me :smiley: (my English is terrible, you know?) hope Proton or someone else want to make a video about this :slight_smile:

Gerardo


#20

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.