View Full Version : Possible to darken a certain color range only?
pwnsweet
6th April 2016, 02:41
I have a short clip (1mb) (https://mega.nz/#!ZZ5HCQYZ!vQZE31rhcPIfgEEaUDMp6sE68DE3pMgJEpQXM282x5k) (below, left) where I would like to change the color of the eyes into a darker shade like the image below (ignore the contrast and brightness change). In the image provided, I simply edited the color of the eyes in paint, but I would like to know if there a script that can automate this process.
I have thought about creating a new clip of just the chroma information, cropping everything except a small box containing the eyes, lowering the brightness, and then merging the altered chroma clip wit the luma clip. I have no idea if that works, I haven't tried and I have very little knowledge of how luma, chroma information is stored.
As such, I eagerly await your ideas on how this might be done.
http://i68.tinypic.com/2yzms8y.jpghttp://i64.tinypic.com/2h2fjgo.png
StainlessS
6th April 2016, 02:46
Take a look at Tweak built-in filter, can restrict color changes to specific range (HSL) of colors.
johnmeyer
6th April 2016, 04:27
My NLE, Sony Vegas, has a built-in effect called the Secondary Color Corrector. It lets you interactively specify a color range based on hue, saturation, and luma value. You can interactively adjust these values to create a mask. You can then walk through the clip to make sure the mask stays the same as the color moves around (in this case as the person and her eyes move).
For simple flat animation, like your example, I expect this mask would be near-perfect. Then, once you have the mask, you can, within the same dialog, or with another dialog, make that color brighter, darker, more or less saturated, etc. You can even change it to an entirely different color.
I'm sure most other competent NLEs have a similar function. This is a lot better done (IMHO) using an NLE than AVISynth because you have so many interactive controls that you can use to make the mask "perfect."
Here's what the dialog looks like for creating the mask. I simply used the "select affected range" eyedropper and dragged it across the blue portion of one eyeball.
http://i177.photobucket.com/albums/w208/johnmeyer/Screen%20Cap_1_zpsl5xv0j6w.jpg
And here's what it looks like when I change the eye color to green and make the color really intense (the opposite of what you want to do, but it makes for a better demo):
http://i177.photobucket.com/albums/w208/johnmeyer/Screen%20Cap_2_zpshcbcegwv.jpg
None of the other colors are affected, at all.
pwnsweet
6th April 2016, 04:34
@johnmeyer,
I have Sony Vegas but not experienced in using it. That said, I'm a fast learner. Would you be willing to IRC with me (Skype, Facebook, etc) to show me how to do this? (preferable)
If not, would you be able to filter it for me if I upload a lossless clip of this scene, then losslessly output the clip and re-upload?
EDIT: Nevermind, I seem to have figured it out. This is amazing. Thanks johnmeyer!!!
johnmeyer
6th April 2016, 06:40
You're welcome. For 2D animation, I expect this will work really, really well.
Sharc
6th April 2016, 07:59
Same/similar problem as posted earlier for the progressive version with the "black crush" here?
http://forum.doom9.org/showthread.php?t=173360
colours
6th April 2016, 08:06
Have you considered buying (or otherwise obtaining) the Blu-ray boxset? Not that it'd have different eye colours, but the chroma in your screenshots looks seriously awful and I don't know why you would want to work with that when the BDs exist.
For a purely AviSynth solution, you can use something like tcolormask or any of the thousand other colour keying filters to mask parts of the frame by colour. AvsPmod, which is pretty much the only AVS script editor you should use, ever, lets you get the RGB values of any pixel just by hovering your cursor over it.
Even if you don't have a macro to automatically insert a tcolormask function call, typing out an RGB triplet in hexadecimal takes only a few seconds.
Motenai Yoda
6th April 2016, 11:46
with utoy() and vtoy() feed a lutxy to return 255 for the pixels with the selected chroma values, add mt_expand/inflate, upscale to original resolution (2x)
use another lutxy to darken pixels with selected luma e where the previsious lutxy give 255.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.