Color Correcting the Dragon Box - 3 Part Spectacular

Discussion regarding the entirety of the franchise in a general (meta) sense, including such aspects as: production, trends, merchandise, fan culture, and more.

Moderators: General Help, Kanzenshuu Staff

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Mon Jun 03, 2019 12:35 am

crabshank1 wrote: Sun Jun 02, 2019 4:55 pm
Ideally, maybe we could setup a script that would accept two videos (a source and a video to alter... FUNI's box and the Dragonbox), and it would run this process frame by frame. There are some minor frame differences between the DragonBox and FUNI's boxes, but if we could pull this off, it would go a long way to automating large portions of it.
Scene-by-scene should be enough. Porting my shader to .avs will be a massive step forward, but I've never worked with .avs before :?.
Managed to get something to work in AvsPmod.

First download and install Avisynth-Plus-r1576.exe http://avs-plus.net/ (Homepage link), then download and extract this .zip file somewhere https://1drv.ms/u/s!AjHPdv1_75reiQCdDWp ... M?e=B9T9PJ.

Then all you need to do is change the cd and input variables' paths to where the files are on your system (from "To apply Remap README.txt"), paste it into the main console and it should work. I suggest that you create a new remap.hlsl file, with a different name, for each scene (/time interval) then encode.

N.B. make sure you're working in 0-255 rather than 16-235 in AvsPMod (check the settings thoroughly!)

User avatar
lansing
Beyond Newbie
Posts: 282
Joined: Mon Jan 06, 2014 1:49 am

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by lansing » Tue Jun 04, 2019 4:17 am

ect5150 wrote: Thu May 30, 2019 8:02 am
HakkaiBills93 wrote: Fri Apr 12, 2019 5:49 am
In the bottom right corner, COLOR of XEROX LINE. RGB [15,13,15]. That's as accurate of a reference point for anything as you'd get for something like this. Question is... what's the XEROX LINE? Either way, I'm guessing that blackbox in the bottom right is supposed to be [15,13,15] and we can use that to make certain the other boxes are accurate for the eyes and hair.

Did you spot others like this?
I have collected all of them, but the color here is not referenceable because they're not accurate. This is just to show how the color palettes fit in on the model designs. The xerox line is the line art.

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Tue Jun 04, 2019 9:48 am

crabshank1 wrote: Thu May 30, 2019 5:39 pm I know sharpening's a contentious area, but I trained a neural network to recognise lines and ported it to HLSL (and added a bit of maths to make all the lines black) so it could work on realtime video:

Image

Image

Image

Image

Image

Image

Then you darken the areas that are black in the black and white image.
Can you do a kind of tutorial on how to use your tools with something like virtual dub or others?

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Tue Jun 04, 2019 4:12 pm

crabshank1 wrote: Mon Jun 03, 2019 12:35 am
crabshank1 wrote: Sun Jun 02, 2019 4:55 pm
Ideally, maybe we could setup a script that would accept two videos (a source and a video to alter... FUNI's box and the Dragonbox), and it would run this process frame by frame. There are some minor frame differences between the DragonBox and FUNI's boxes, but if we could pull this off, it would go a long way to automating large portions of it.
Scene-by-scene should be enough. Porting my shader to .avs will be a massive step forward, but I've never worked with .avs before :?.
Managed to get something to work in AvsPmod.

First download and install Avisynth-Plus-r1576.exe http://avs-plus.net/ (Homepage link), then download and extract this .zip file somewhere https://1drv.ms/u/s!AjHPdv1_75reiQCdDWp ... M?e=B9T9PJ.

Then all you need to do is change the cd and input variables' paths to where the files are on your system (from "To apply Remap README.txt"), paste it into the main console and it should work. I suggest that you create a new remap.hlsl file, with a different name, for each scene (/time interval) then encode.

N.B. make sure you're working in 0-255 rather than 16-235 in AvsPMod (check the settings thoroughly!)
I have updated the shader in the file, so please download the new version ASAP.
HakkaiBills93 wrote: Tue Jun 04, 2019 9:48 am Can you do a kind of tutorial on how to use your tools with something like virtual dub or others?
Me and ect5150 (credit to him for pointing out some bugs in my code) are working on something that should be ready really soon, in the meantime you can try to figure it out. I'll be happy to answer any questions :)

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Tue Jun 04, 2019 4:38 pm

crabshank1 wrote: Tue Jun 04, 2019 4:12 pm
crabshank1 wrote: Mon Jun 03, 2019 12:35 am
crabshank1 wrote: Sun Jun 02, 2019 4:55 pm

Scene-by-scene should be enough. Porting my shader to .avs will be a massive step forward, but I've never worked with .avs before :?.
Managed to get something to work in AvsPmod.

First download and install Avisynth-Plus-r1576.exe http://avs-plus.net/ (Homepage link), then download and extract this .zip file somewhere https://1drv.ms/u/s!AjHPdv1_75reiQCdDWp ... M?e=B9T9PJ.

Then all you need to do is change the cd and input variables' paths to where the files are on your system (from "To apply Remap README.txt"), paste it into the main console and it should work. I suggest that you create a new remap.hlsl file, with a different name, for each scene (/time interval) then encode.

N.B. make sure you're working in 0-255 rather than 16-235 in AvsPMod (check the settings thoroughly!)
I have updated the shader in the file, so please download the new version ASAP.
HakkaiBills93 wrote: Tue Jun 04, 2019 9:48 am Can you do a kind of tutorial on how to use your tools with something like virtual dub or others?
Me and ect5150 (credit to him for pointing out some bugs in my code) are working on something that should be ready really soon, in the meantime you can try to figure it out. I'll be happy to answer any questions :)
Thanks, i think you'll have done your stuffs before i even understand how it work lol

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Fri Jun 07, 2019 9:02 am

https://youtu.be/WPoMa9k40Hg (YouTube compressed it to hell)

Image

Image

Image

Image

Image

Image

First attempt at white balance correction for the OP of E122 of Dragon Ball, (original on the left and adjusted on the right) and even though the eyes and hair are as close to grey as I can get, it still looks weird.

This is: (Red and Green channels matched to the Blue channel) matched to the original saturation. Trying to match it any other way made the dark areas way too blue.

I tried to match the values too but it was too much for the Avisynth plugin to handle.

I also attempted a fix on the audio.

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Fri Jun 07, 2019 1:49 pm

crabshank1 wrote: Fri Jun 07, 2019 9:02 am https://youtu.be/WPoMa9k40Hg (YouTube compressed it to hell)

Image

Image

Image

Image

Image

Image

First attempt at white balance correction for the OP of E122 of Dragon Ball, (original on the left and adjusted on the right) and even though the eyes and hair are as close to grey as I can get, it still looks weird.

This is: (Red and Green channels matched to the Blue channel) matched to the original saturation. Trying to match it any other way made the dark areas way too blue.

I tried to match the values too but it was too much for the Avisynth plugin to handle.

I also attempted a fix on the audio.
so you managed to did it with avisynth? also about white balance, it's not the only thing to fix, you also have to correct contrast, brightness and hue , try with db episode 100, you'll understand why i said that white balance don't correct all colors like it should be

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Fri Jun 07, 2019 2:50 pm

HakkaiBills93 wrote: Fri Jun 07, 2019 1:49 pm
crabshank1 wrote: Fri Jun 07, 2019 9:02 am https://youtu.be/WPoMa9k40Hg (YouTube compressed it to hell)

Image

Image

Image

Image

Image

Image

First attempt at white balance correction for the OP of E122 of Dragon Ball, (original on the left and adjusted on the right) and even though the eyes and hair are as close to grey as I can get, it still looks weird.

This is: (Red and Green channels matched to the Blue channel) matched to the original saturation. Trying to match it any other way made the dark areas way too blue.

I tried to match the values too but it was too much for the Avisynth plugin to handle.

I also attempted a fix on the audio.
so you managed to did it with avisynth? also about white balance, it's not the only thing to fix, you also have to correct contrast, brightness and hue , try with db episode 100, you'll understand why i said that white balance don't correct all colors like it should be
Yes Avisynth. I'm trying to walk before I can run, even this this was tricky because of the colourful macroblocking.

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Fri Jun 07, 2019 3:13 pm

crabshank1 wrote: Fri Jun 07, 2019 2:50 pm
HakkaiBills93 wrote: Fri Jun 07, 2019 1:49 pm
crabshank1 wrote: Fri Jun 07, 2019 9:02 am https://youtu.be/WPoMa9k40Hg (YouTube compressed it to hell)

Image

Image

Image

Image

Image

Image

First attempt at white balance correction for the OP of E122 of Dragon Ball, (original on the left and adjusted on the right) and even though the eyes and hair are as close to grey as I can get, it still looks weird.

This is: (Red and Green channels matched to the Blue channel) matched to the original saturation. Trying to match it any other way made the dark areas way too blue.

I tried to match the values too but it was too much for the Avisynth plugin to handle.

I also attempted a fix on the audio.
so you managed to did it with avisynth? also about white balance, it's not the only thing to fix, you also have to correct contrast, brightness and hue , try with db episode 100, you'll understand why i said that white balance don't correct all colors like it should be
Yes Avisynth. I'm trying to walk before I can run, even this this was tricky because of the colourful macroblocking.
okay i just wanted you to be fully aware that for dbox it's not only white balance issue sadly they fucked off hue too

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Fri Jun 07, 2019 3:55 pm

HakkaiBills93 wrote: Fri Jun 07, 2019 3:13 pm
crabshank1 wrote: Fri Jun 07, 2019 2:50 pm
HakkaiBills93 wrote: Fri Jun 07, 2019 1:49 pm

so you managed to did it with avisynth? also about white balance, it's not the only thing to fix, you also have to correct contrast, brightness and hue , try with db episode 100, you'll understand why i said that white balance don't correct all colors like it should be
Yes Avisynth. I'm trying to walk before I can run, even this this was tricky because of the colourful macroblocking.
okay i just wanted you to be fully aware that for dbox it's not only white balance issue sadly they fucked off hue too
A problem I will have is: what are the right hues? Does anyone know?

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Fri Jun 07, 2019 10:34 pm

Original
Image

Adjusted - PC.709
Image

Adjusted - Rec. 709
Image

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Sat Jun 08, 2019 9:26 am

why do you alter colorspace? it's not there that colors are fuck off it's only a matter hue
for example for your sample even if i don't think i am right, by touching hue, it should look more like this
Image

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Sat Jun 08, 2019 3:48 pm

HakkaiBills93 wrote: Sat Jun 08, 2019 9:26 am why do you alter colorspace? it's not there that colors are fuck off it's only a matter hue
for example for your sample even if i don't think i am right, by touching hue, it should look more like this
Image
I've adjusted the hues in both. Obviously just changing the colour space is not the answer. My point is that I need to decide which colour spaces to use and when. So, when I convert to RGB I have to decide which colour space, but when I remap I have to use 0-255 and then for the output do I go 0-255 or 16-235?

F.Y.I. I used the preview images from Hikari TV to determine which hues to use.

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Sat Jun 08, 2019 4:48 pm

crabshank1 wrote: Sat Jun 08, 2019 3:48 pm
HakkaiBills93 wrote: Sat Jun 08, 2019 9:26 am why do you alter colorspace? it's not there that colors are fuck off it's only a matter hue
for example for your sample even if i don't think i am right, by touching hue, it should look more like this
Image
I've adjusted the hues in both. Obviously just changing the colour space is not the answer. My point is that I need to decide which colour spaces to use and when. So, when I convert to RGB I have to decide which colour space, but when I remap I have to use 0-255 and then for the output do I go 0-255 or 16-235?

F.Y.I. I used the preview images from Hikari TV to determine which hues to use.
altering colorspace is useless so if you can don't touch it, if an avisynth function need other colorspace then convert to the needed colorspace and then revert to the original one

about the 0-255 or other it's not like i am color correcting so i can't help (and my way is not the best)
and i don't know what is hikari tv but if it show you a greenish sky it's wrong for sure

User avatar
Ashura
OMG CRAZY REGEN
Posts: 763
Joined: Sat Mar 26, 2011 8:05 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by Ashura » Sun Jun 09, 2019 1:07 pm

Hey, I haven't had a lot of time to post over here as of recent times, however, I think it's great this thread is still going and people are exploring new methods and ideas.

The information in the first post is pretty outdated, and unfortunately I do not have time to completely redo this thread. Also, I still get DMs about this thread a lot, and due to my day job(s) I do not have time to answer stuff about this thread anymore. Sorry about that, but I hope people understand.
My favorite movie henchman is Sancho.

Follow my stupid crap on Twitter. Please note, I do not have time to reply to any PMs about color correction methods anymore; sorry about that.

[ Hoyoyo! Please pick up our Dr. Slump DVD! ]

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Mon Jun 10, 2019 12:38 am

https://github.com/crabshank/HLSL-Resha ... ither.hlsl
This is a dithering shader that can change the values of a channel according to a(n approximately) uniform distribution, e.g. theoretically, if you want to increase reds by 4 it will randomly add a number between r-4 and r+12 and because of the uniform distribution it will average to r+4. Also, there's a setting that theoretically lets you change the standard deviation by a specified amount.

So I load my image of selected grey areas (see my earlier posts) and play around with the settings until the standard deviations are equalised (RGBAdjust(analyze=true)). The dithering effect looks very strong but the source material is very blocky and after I remap the RGB channels it looks good.

I will post a proper tutorial with pictures soon, but everything that one would need is there, first part will be white balance(+ dithering) and then HSV adjustments (the easier bit).

With my test episode it looks decent to me using the same shader files for the whole episode, but maybe this one is well behaved.

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Mon Jun 10, 2019 12:49 am

crabshank1 wrote: Mon Jun 10, 2019 12:38 am https://github.com/crabshank/HLSL-Resha ... ither.hlsl
This is a dithering shader that can change the values of a channel according to a(n approximately) uniform distribution, e.g. theoretically, if you want to increase reds by 4 it will randomly add a number between r-4 and r+12 and because of the uniform distribution it will average to r+4. Also, there's a setting that theoretically lets you change the standard deviation by a specified amount.

So I load my image of selected grey areas (see my earlier posts) and play around with the settings until the standard deviations are equalised (RGBAdjust(analyze=true)). The dithering effect looks very strong but the source material is very blocky and after I remap the RGB channels it looks good.

I will post a proper tutorial with pictures soon, but everything that one would need is there, first part will be white balance(+ dithering) and then HSV adjustments (the easier bit).

With my test episode it looks decent to me using the same shader files for the whole episode, but maybe this one is well behaved.
Also, if you do a whole episode with the same shader(s), you can run it/them on playback in your media player. No need for Avisynth.

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Mon Jun 10, 2019 8:49 am

crabshank1 wrote: Mon Jun 10, 2019 12:49 am
crabshank1 wrote: Mon Jun 10, 2019 12:38 am https://github.com/crabshank/HLSL-Resha ... ither.hlsl
This is a dithering shader that can change the values of a channel according to a(n approximately) uniform distribution, e.g. theoretically, if you want to increase reds by 4 it will randomly add a number between r-4 and r+12 and because of the uniform distribution it will average to r+4. Also, there's a setting that theoretically lets you change the standard deviation by a specified amount.

So I load my image of selected grey areas (see my earlier posts) and play around with the settings until the standard deviations are equalised (RGBAdjust(analyze=true)). The dithering effect looks very strong but the source material is very blocky and after I remap the RGB channels it looks good.

I will post a proper tutorial with pictures soon, but everything that one would need is there, first part will be white balance(+ dithering) and then HSV adjustments (the easier bit).

With my test episode it looks decent to me using the same shader files for the whole episode, but maybe this one is well behaved.
Also, if you do a whole episode with the same shader(s), you can run it/them on playback in your media player. No need for Avisynth.
the thing is that the white balance need to be done for each part and sometimes there is several cut to do, white balance for the op don't work for the part a that is not the same as preview and part b etc
so you need one white balance for each part (op , recap, part a , eyecatch a, eyecatch b, part b, ending, preview) and in part a and b you also need to white balance differrently the flashback when there is

crabshank1
Beyond Newbie
Posts: 123
Joined: Tue Nov 09, 2010 6:26 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by crabshank1 » Mon Jun 10, 2019 9:51 am

HakkaiBills93 wrote: Mon Jun 10, 2019 8:49 am the thing is that the white balance need to be done for each part and sometimes there is several cut to do, white balance for the op don't work for the part a that is not the same as preview and part b etc
so you need one white balance for each part (op , recap, part a , eyecatch a, eyecatch b, part b, ending, preview) and in part a and b you also need to white balance differrently the flashback when there is
Thanks for the tip, I'll look for differences in these parts.

Also, do you know anything about the characters having blue hair (I don't mean Bulma)? Sometimes this won't balance at all whereas everything else will. Is it some problem with NTSC or was it actually broadcast like that?

HakkaiBills93
Banned
Posts: 551
Joined: Fri Jul 07, 2017 3:04 pm

Re: Color Correcting the Dragon Box - 3 Part Spectacular

Post by HakkaiBills93 » Mon Jun 10, 2019 12:14 pm

crabshank1 wrote: Mon Jun 10, 2019 9:51 am
HakkaiBills93 wrote: Mon Jun 10, 2019 8:49 am the thing is that the white balance need to be done for each part and sometimes there is several cut to do, white balance for the op don't work for the part a that is not the same as preview and part b etc
so you need one white balance for each part (op , recap, part a , eyecatch a, eyecatch b, part b, ending, preview) and in part a and b you also need to white balance differrently the flashback when there is
Thanks for the tip, I'll look for differences in these parts.

Also, do you know anything about the characters having blue hair (I don't mean Bulma)? Sometimes this won't balance at all whereas everything else will. Is it some problem with NTSC or was it actually broadcast like that?
i can't really help as i am far than ready to cc properly , my white balance isn't perfect, i can't even calibrate my screen properly as i don't have what is needed to do it , i can just make something looking better than dbox (not so hard with dbox colors fucked off) but it's not what i want to do. for example i have issue with db movies 1-2 from Toei web dll where after ccing i can't have the same colors for the opening (it should be the same) db episode 100 is also an example of one big difficulty i have with skin tone etc.. what i am happy is that some people seems to have handle this kind of things but sadly none are into a sharing mood, that's why i think that the best is to find it ourselves (what a poor world)

all i can say to help you is
1 calibrate your screen properly
2 cross as much references you can (xerox codes, nice looking cels, broadcast recordings can help a little but it also degrade so can't be relied as big references) and alter hue until ALL colors are fine, it's not only an hair matter, if the blue color is wrong, it will affect all colors that have blue into them, for example red colors you can try to keep red part of piccolo skin while having orange shade for goku's gi, if you push it too muh, piccolo skin line will became orange etc, it's the same with blue, keep piccolo and Mirai Trunks purple cloth without having purple sky or goku's gi turning purple, same with bulma's turquoise hair , you allways have to keep green into her hair etc...

Locked