logo Sign In

Post #546928

Author
You_Too
Parent topic
Info: Digging up those blacks - using the STAR WARS Blu-ray for preservations
Link to post in topic
https://originaltrilogy.com/post/id/546928/action/topic#546928
Date created
18-Oct-2011, 11:32 AM

Actually, the HTML option didn't work for some reason. But today I managed to use another method, so now the thumbnails are up.

Also, here's my settings: http://www.multiupload.com/CBAS7KQS9O

It's the curve file and selective color file. The curve file can be opened in both photoshop and after effects, but the selective color file can only be used in photoshop, at least I think so.

So here comes the selective color settings. (Important: Use selective color BEFORE curves. At least that's what I did.)

Reds: Cyan +50%, Yellow +7%
Yellows: Cyan -25%, Yellow +15%
Greens: Magenta +100%
Cyans: Cyan -25%
Blues: Yellow +75%
Magentas: Cyan -25%, Magenta -75%, Black +100%

Some will notice that the curve file will push blacks down from 1 to 0. That's because in the end I found it looked better this way. It was like the blacks on the Blu-ray was all at 1 instead of 0.

 

(THIS POST WILL BE EDITED WHEN SETTINGS ARE IMPROVED)

 

Avisynth version!

For you who like me prefer avisynth to render your movies, I've got good news. I managed to change the magenta setting so it didn't need "black +100%", so we're now able to use the selective color plugin for avisynth.

HUGE thanks to Darth Editous for the plugin. Or well, the author who by a strange coincidence have never been seen in the same room as Darth Editous at the same time...

For convenience, I've packed the plugins you need (Gicocu, selective color) as well as the curve (modified to GIMP format for Gicocu) and a script example.

Download link: http://www.multiupload.com/93LYOPT7C8

For those new to this, a good example of a program that can render movies using avisynth is Megui. Avisynth is installed with Megui and usually ends up in C:\Program Files (x86)\AviSynth 2.5\ and in there you can find a folder named plugins, that's where Gicocu and selective color should be. The movie and curve file should be in the same folder when using the script.

Script example:

DirectShowSource("Starwars.mkv")

ConvertToRGB32(matrix="rec709")

selectivecolour(last,\
0.5,0,0.07,\
-0.25,0,0.15,\
0,1,0,\
-0.25,0,0,\
0,0,0.75,\
1,-0.5,1,\
false)

GiCoCu("sw13.cur")

ConvertToYV12()

Change Starwars.mkv to whatever your movie file is named. Myself I remuxed the crawl and rest of the movie together in an mkv file and that's why it's named like that.

If you want to remove the black borders from the movie when rendering, add the line:

crop( 0, 131, 0, -131)

If you want to render the movie without audio to remux it afterwards, change the first line to this for example:

DirectShowSource("Starwars.mkv", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)

And to those really into color correcting: The last line should be "ConvertToYV12()" and not have "(matrix="rec709")" added. I tried this first but the colors were messed up. It was enough to have it at the first color conversion line.

 

NEW EXPERIMENTAL ADD-ON SCRIPT:

Add this at the bottom of the script. Reduces dark blue colors in the shadow details. (Requires Masktools plugin for avisynth)

Function SelSah_v3 (clip clp, float "Sat", float "Hue", int "Luma_Low", int "Luma_High", int "Low_OS", int "High_OS",
\                    Float "minSat", float "maxSat", float "startHue", float "endHue", float "interp", clip "clp2", 
\                    bool "Exclude", bool "Preview") 
{

#  Extends Tweak to allow selective control of saturation and hue over a defined luma range. 
#  Assembled by WorBry. MaskTools computations kindly provided by Didee. Thanks to Gavino for advice on script syntax.   
#  Requires YV12 clp input and assumes full (pc) luma range 0-255.
#  Requires MaskTools v2. Tweak should be v2.58 or higher.
#
#  Parameters:
#  Clp       - Is the input clip that will be processed.
#  Clp2      - Provides option to use a second clip with different luma curve for the saturation/hue control.
#  Sat       - Saturation. Desaturation 0.0 =< 1.0 > Increased saturation. See Tweak 2.58 doc 
#  Hue       - Hue. Range -180 to +180. Default 0.0. See Tweak 2.58 doc 
#  startHue  - See Tweak 2.58 doc for details. Range 0 - <360. Default 0 
#  endHue    - See Tweak 2.58 doc for details. Range >0 - 360. Default 360
#  minSat    - See Tweak 2.58 doc for details. Range 0 - <150 ; must be < MaxSat. Default 0
#  maxSat    - See Tweak 2.58 doc for details. Range >0 -150. Default 150
#  interp    - See Tweak 2.58 doc for details. Range 0 - 32. Default 16
#  Luma_Low  - Lower luma range point. Range 0 - 255*  Default 0
#  Luma_High - Upper luma range point. Range 0 - 255*  Default 255
#  Low_OS    - Lower over-shoot point. Provides soft roll-off at lower range boundary. Range 0 - 255*
#              Default is Luma_Low+20 for normal (inclusive) range mode and Luma_low-20 for Exclude mode. 
#  High_OS   - Upper over-shoot point. Provides soft roll-off at upper range boundary. Range 0 - 255*
#              Default is Luma_High-20 for normal (inclusive) mode and Luma_High+20 for Exclude mode.
#  Exclude     True/False. True excludes the range selected by the luma set points. False (default) includes the selected range.  
#  Preview   - True/False. True gives preview of input clip, output and luma masks with original and output chroma.
#              Default is false

#  *Note: the luma set points are limited with respect to each other to ensure correct orientation and avoid overlap.   
#
#Defaults:
Sat       = default(Sat, 1.0)
Hue       = default(Hue, 0.0)
startHue  = default(startHue, 0)
endHue    = default(endHue, 360)
minSat    = default(minSat, 0)
maxSat    = default(maxSat, 150)
interp    = default(interp, 16) 
Exclude   = default(Exclude, False)
Luma_Low  = default(Luma_Low, 0.0)
Luma_High = default(Luma_High, 255) 
Low_OS    = Exclude ? default(Low_OS,  Luma_Low + 20)
\         : default(Low_OS,  Luma_Low - 20)   
High_OS   = Exclude ? default(High_OS, Luma_High - 20)
\         : default(High_OS, Luma_High + 20)
clp2      = default(clp2, clp)
Preview   = default(Preview, False)        
#
#Limits: 
Sat       = Sat <0.0 ? 0.0 : Sat
Hue       = Hue <-180 ? -180 : Hue > 180 ? 180 : Hue
Luma_Low  = Luma_Low  <0.0 ? 0.0 : Luma_Low  >255 ? 255 : Luma_Low
Luma_High = Luma_High <0.0 ? 0.0 : Luma_High >255 ? 255 : Luma_High
Low_OS    = Exclude &&  Low_OS \         : Exclude &&  Low_OS > High_OS ? ((Luma_Low + Luma_High)/2)                 
\         : Low_OS  <0.0 ? 0.0 : Low_OS >Luma_Low ? Luma_Low : Low_OS      
High_OS   = Exclude &&  High_OS >Luma_High ? Luma_High
\         : Exclude && High_OS < Low_OS ? ((Luma_Low + Luma_High + 2)/2)
\         : High_OS 255 ? 255 : High_OS
#
#Limits for startHue, endHue, minSat and maxSat set by Tweak 
#
#Create Saturation and Hue control clip:
twclp = clp2.tweak(sat=Sat, hue=Hue, startHue=startHue, endHue=endHue,
\       minSat=minSat, maxSat=maxSat, interp=interp, coring=false)
#
#Create luma mask with low/high range points and roll-off gradient at boundaries:  
#"Include" [0]<-black->[Low_OS]<-gradient->[Luma_Low]<-white->[Luma_High]<-gradient->[High_OS]<-black->[255]
#"Exclude" [0]<-white->[Luma_Low]<-gradient->[Low_OS]<-black->[High_OS]<-gradient->[Luma_High]<-white->[255]
#
Low_OS    = string(Low_OS) Luma_Low  = String(Luma_Low)
Luma_High = String(Luma_High) High_OS = String(High_OS)
#Create "Include" range expression for mask:
blkI      = "x "+Low_OS+" < x "+High_OS+" > | 0 "
whtI      = "x "+Luma_Low+" >= x "+Luma_High+" <= & 255 "
grLI      = "x "+Luma_Low+" < 255 x "+Low_OS+" - "+Luma_Low+" "+Low_OS+" - / * "
grHI      = "x "+Luma_High+" > 255 1 x "+Luma_High+" - "+High_OS+" "+Luma_High+" - / - * "
exprI     = blkI + whtI + grLI + grHI + "x ? ? ? ?"
#Create "Exclude" range expression for mask:
blkE      = "x "+Low_OS+" >= x "+High_OS+" <= & 0 "
whtE      = "x "+Luma_Low+" < x "+Luma_High+" > | 255 "
grLE      = "x "+Low_OS+" <= 255 x "+Low_OS+" - "+Luma_Low+" "+Low_OS+" - / * "
grHE      = "x "+Luma_High+" < 255 x "+High_OS+" - "+Luma_High+" "+High_OS+" - / * "   
exprE     = blkE + whtE + grLE + grHE +  "x ? ? ? ?"
#Luma Mask (greyscale for output):
lmask     = twclp.mt_lut(expr = (Exclude ? ExprE : ExprI))
lmaskg    = lmask.Greyscale()
# Apply luma mask:
Output    = mt_merge(clp,twclp,lmaskg,luma=true,Y=2,U=3,V=3)
#
#PREVIEW set-up
clps      =clp.Subtitle("Original Clip").LanczosResize(640,360)
outs      =output.Subtitle("Final Output").LanczosResize(640,360)
#Luma Mask with chroma from tweaked clp
lmcts     = lmask.Subtitle("Luma mask + Tweaked Chroma").LanczosResize(640,360)
#Luma Mask with chroma from original clp
lmcc      = Exclude ? clp2.mt_lut(expr=ExprE) : clp2.mt_lut(expr=exprI) 
lmccs     = lmcc.Subtitle("Luma Mask + Original Chroma").LanczosResize(640,360)
#Create composite view
Clpout    = StackVertical(clps,outs)
Masks     = StackVertical(lmccs, lmcts)
Prev      = StackHorizontal(Clpout,Masks)
#
Final     = Preview ? Prev : Output
#
Return(Final)

}


SelSah_v3(Luma_Low=0, Luma_High=25, startHue=310, endHue=80, Sat=0.75)