View Full Version : How to achieve "film look" on PAL DV source
Pages :
1
2
[
3]
4
5
6
7
8
9
Mug Funky
19th January 2005, 03:13
glow in film is caused by crap on the lens though... meaning that everything gets the same amount of glow (not just the objects).
bright objects appear to glow more because of overexposure - the effect can be mimiced using high dynamic range images (ie, 32-bit floating-point images captured using multiple images at different exposures).
this can be fudged with a simple gamma curve on the glow mask.
joshbm
19th January 2005, 05:02
For NTSC material I bob my clip from 30i to 60p using either TDeint() (then supersample it using TomsMoComp) or MVBob(). Then use scharfis_brain's convert60ito24p() script to convert 60p to 24p.
By doing this you are left with 24 progressive frames per second -- the same as a film camera.
After this I do a Tweak() on saturation in the colors. Of course it depends on what your "film" to look like. If you want it colder, obviously reduce the saturation. If you want it to look like a modern film, where colors are more warm, then increase the saturation. I then use the Histogram() to find out where my blacks need to be and then use Levels() to increase the grayscale.
You can also make your own DOF adapter for your video camera (instead of buying one-- hefty price involved). You can check out a how-to at http://www.marlathemovie.com/, a movie totally shot on DV.
Another good thing to do is to use a sharpener to sharpen your video. Look into LimitedSharpen(). Also adding grain (as mentioned before) does help the illusion of film. 16:9 is always a good thing as well (which I have made a custom script to do for me as well).
Regards,
joshbm
Macanudo
19th January 2005, 06:14
E-Male,
Here is a photoshop tutorial that may give you some ideas on how to achieve the Depth of Field simulation you are pursuing - Hocus Pocus Focus (http://www.russellbrown.com/images/tips_movies/Hocus%20Pocus%20Focus.mov)
It is a mov tutorial, so you will need Quicktime installed to view it. I think you might find the portion dealing with a DOF gradient mask of particular interest. I realize that Avisynth doesn't have an equivalent of a "lens blur" filter found in the tutorial, but IMHO I think that the idea of a "gradient mask" would be the best approach to simulating DOF.
If you duplicate the original clip and apply a "Gaussian Blur" of a radius of say 50.0(I used Didee's suggestion in this thread (http://forum.doom9.org/showthread.php?s=&threadid=88482) to simulate the Gaussian Blur.), then using Overlay() sandwich a Gradient mask(I created my mask in Gimp) between the blurred clip and the original clip with the Lightest area of the mask being the most blurred and the Darkest area being the most focused.
Here is the script I used:
a=AviSource("C:\boats.avi")
b=a.bicubicresize(150,100,1.0,.0).bilinearresize(720,480)
g=ImageReader("C:\gradient-2.bmp").AssumeFPS(29.97)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
Here is my result:
Original Screen Shot (frame#360)
http://img109.exs.cx/img109/9010/boats9hu.png
Gradient Mask (frame#360)
http://img116.exs.cx/img116/9352/gradient25qw.png
Gaussian Blur Simulation Screen Shot (frame#360)
http://img68.exs.cx/img68/7870/boatsgaussianblur5di.png
DOF Simulation Screen Shot (frame#360)
http://img91.exs.cx/img91/5149/boatsdofsimulation2nw.png
I purposely exaggerated the effect for this test, so you may want to adjust it a little. You can customize this method by creating different gradients, Gaussian Blur radiuses, and Overlay options.
This may not be exactly what you are looking for, but it may give you a jumping off point.
Hope I have contributed,
Macanudo
Edit: Included Gaussian Blur Simulation Screenshot. Don't ask me where the blue band on the Gaussian simulation came from, I suspect it was a side effect of the resizing used to create the blur, but I am not sure.
Didee,
Is the blue band a product of the Bicubic or Bilinear Resizing?
Did I follow your suggested method for creating the Gaussian Blur incorrectly?
Mug Funky
19th January 2005, 07:56
the blur looks a little pixelly. try bilinear down, and bicubic(1,0) up to get a smoother blur.
Macanudo
19th January 2005, 09:27
Originally posted by Mug Funky
the blur looks a little pixelly. try bilinear down, and bicubic(1,0) up to get a smoother blur.
Here is the result:
http://img32.exs.cx/img32/5069/boatsdofsimulation24hx.png
I see a noticeable improvement. What do you think?
Mug Funky
19th January 2005, 11:04
yeah, looks better now.
what's that blue line on the right?
Macanudo
19th January 2005, 11:25
Originally posted by Mug Funky
yeah, looks better now.
what's that blue line on the right?
I am not sure...I think it may have something to do with the resizing used to simulate to Gaussian Blur. If you will look up at the screenshot of just the Blur Simulation that is when it first appears.
Didée
19th January 2005, 12:10
Try the intermediate resizing with MOD4 resolutions. You did 150*100, where 150 is only MOD2.
Macanudo
19th January 2005, 12:16
Originally posted by Didée
Try the intermediate resizing with MOD4 resolutions. You did 150*100, where 150 is only MOD2.
Bingo...that fixed it. No more blue band.
Thanks Didee!
Later,
Macanudo
E-Male
19th January 2005, 13:32
so this means, the higher up a pixel is the more it gets blurred, right?
this works ok for shots like this, when you see a lot of floor (i hope you get what i mean)
but on a close-up this would look odd i assume
Macanudo
19th January 2005, 13:53
Originally posted by E-Male
so this means, the higher up a pixel is the more it gets blurred, right?
this works ok for shots like this, when you see a lot of floor (i hope you get what i mean)
but on a close-up this would look odd i assume
It has its limitations, but by gradiently blurring you get a more realistic impression of depth, as opposed to blurring the background uniformly.
You can create gradient masks in a variety of shapes to suit your application. I used a simple linear gradient mask for this test, but you can create radial, diamond, or custom shaped gradient masks.
The major set back with this method is that the gradient mask remains stationary. If your subject moves the gradient mask does not move with it. If there was some way to create a mask that would track the subject you could resolve one of the major limitations IMHO. I think it can be done with motion prediction, but that is way over my head. That would require one of the resident GURUS to work out.
As far as a close up goes, you could try a radial or eliptical gradient mask that encirles the face and/or body of your subject. I think that would give you the desired effect, provided your subject doesn't move their head very much within the frame.
EditOh sorry, Yes, the further up you go the the blurrier.
E-Male
19th January 2005, 14:14
i see, so we have a "great looking but not automatic" solution
i think i'll use that on some scenes
i should be able to build a focus shift function on that
Macanudo
19th January 2005, 14:57
Here is an example of a radial gradient mask applied to the boat the the far right. It isn't the best example, because it doesn't look very realistic just having the right bottom corner in focus. I just wanted to show you what a different shaped gradient would yield.
Radial Gradient
http://img40.exs.cx/img40/5695/gradient44gt.jpg
DOF using Radial Blur (frame#360)
http://img130.exs.cx/img130/1535/boatsdofradialblur3rt.png
E-Male
19th January 2005, 16:01
wow, pretty nice effect
but it's not so easy to make thos masks without some knowledge of graphic programs (which i don't have)
but i'll look into it
E-Male
19th January 2005, 16:36
i think i got an idea for a plug-in (in fact 2) that will allow creating the masks directly in avisynth
E-Male
19th January 2005, 18:51
good news
i was able to dublicate both masks
plug-in release later tonight or tomorrow
E-Male
20th January 2005, 00:32
i finished a little plug-in that can create such masks directly in avisynth
EDIT: see next page
Macanudo
20th January 2005, 07:18
E-Male,
I think there is a bug.
Here is my script
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\maskmaker.dll")
a=AviSource("K:\boats.avi")
b=a.bilinearresize(104,48,1.0,.0).bicubicresize(720,480,1.0,0.0)
g=b.maskmaker(1,3,0,0,500)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
If you will look at the following screencaps you will see what I mean. These are consecutive frames.
MaskMaker Test Screen Shot #1(frame#430)
http://img58.exs.cx/img58/3001/boatsmaskmaker18lw.png
MaskMaker Test Screen Shot #2(frame#431)
http://img109.exs.cx/img109/3233/boatsmaskmaker22zu.png
The masked area shifts back and forth every few frames between these two locations.
I wish there were someway to send you the video, but I don't have any host space. I think you get the idea from my screen shots though.
Question:
Does the mask layer have a transparent or white background? Because, in order to be truly effective as a mask the background of the mask created should be white.
I hope I have helped,
Macanudo
Edit I goofed and posted the wrong frame for screen shot #1. Fixed it with this edit
E-Male
20th January 2005, 07:43
duplicated it
i'll have a look
Macanudo
20th January 2005, 08:00
Wait a minute...After replacing the Gaussain Blur simulation code in my script with tsp's new filter "Variable Blur" the masked areas shift changes positions again, now they shift between the bottom right corner to the top left corner instead of the bottom left to the top right as before.
Here is the new code:
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\variableblur.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\Filters\maskmaker.dll")
a=AviSource("K:\boats.avi").ConverttoYV12()
b=a.VariableBlur(radY=50)
g=b.maskmaker(1,3,0,0,500)
Overlay(a, b, mask=g, mode="blend", opacity=1.0)
The results are far more pleasing using "Variable Blur" as well. I think you will prefer tsp's new filter. By the way I have exaggerated the blur so you could see the contrast between focused to blurred better. Try VariableBlur(radY=10), it is great effect.
E-Male
20th January 2005, 08:03
well, i couldn't exactly duplicate it, but similar
for mode 1-3 on odd frames the coordinates are from top-left (c=1)
even frames are correct
i just triple-checked the code and got no idea what causes this
but i'm sleepy, i might find it later
it's just the the frame number shouldn't make any difference at all
a note i forgot:
the filter atm is yv12 only
about white/transparent:
well, i just have luma go from black to white
and keep the chroma at grey
(i do not knot that much about masks, as always i worked without doing proper research)
Macanudo
20th January 2005, 08:15
Originally posted by E-Male
well, i couldn't exactly duplicate it, but similar
for mode 1-3 on odd frames the coordinates are from top-left (c=1)
even frames are correct
i just triple-checked the code and got no idea what causes this
but i'm sleepy, i might find it later
it's just the the frame number shouldn't make any difference at all
a note i forgot:
the filter atm is yv12 only
about white/transparent:
well, i just have luma go from black to white
and keep the chroma at grey
(i do not knot that much about masks, as always i worked without doing proper research)
I wasn't aware that it was YV12 only, that is probably why the gradient didn't look quite right to me. After adding ConverttoYV12 to the script the quality is much improved, so the white background comment is nonsense on my part and should be treated accordingly(LOL).
The masked areas still shift from the top left to the top bottom even after adding ConverttoYV12 though.
Oh well, Good Night. Pleasant Dreams.
Macanudo
E-Male
20th January 2005, 08:21
there are 2 work arounds:
either use c = 1 (which stays corerct for me) and adjust x & y accordingly (i daubt you'll have any trouble with this simple math)
or use trim(0,-1).loop(x) (x = length)
the strange thing that nothing in my code should react to the frame-number and all my tries to trace the error to the IFs and CASEs that might cause it eliminate each other
Macanudo
20th January 2005, 08:36
Originally posted by E-Male
there are 2 work arounds:
either use c = 1 (which stays corerct for me) and adjust x & y accordingly (i daubt you'll have any trouble with this simple math)
or use trim(0,-1).loop(x) (x = length)
the strange thing that nothing in my code should react to the frame-number and all my tries to trace the error to the IFs and CASEs that might cause it eliminate each other
c=1 and adjusting the x, y coordinates to 720,480 fixed it.
It looks awesome by the way! Great Job!
Good Night,
Macanudo
E-Male
20th January 2005, 08:44
thx for the kind words
btw, it should be 719,479 :cool:
joshbm
20th January 2005, 20:32
I think it's kind of funny you all are talking about DOF plugin. I mentioned this a while back and got almost 0 replies.
I think it would be good if a plugin would be able to calculate distance accordingly to movement of the camera in what is in focus, then a DOF plugin could actually become an automated reality.
Regards,
joshbm
E-Male
20th January 2005, 20:38
@joshbm:
you talk about technology which by now only exists in experimental state at research labs of universities
if you wanna discuss this, please do it in a seperate thread
no chance to use this right here and now
much too less advanced and i guess much too resource intensive
joshbm
20th January 2005, 21:13
This is true.
E-Male
20th January 2005, 21:30
ok, i think narrowed down the code that contains the bug:
switch (d) {
case 1:
break;
case 2:
a=(src_width-1)-a;
break;
case 3:
a=(src_width-1)-a;
b=(src_height-1)-b;
break;
case 4:
b=(src_height-1)-b;
break;
}
this only has an effect on every second frame
any ideas
E-Male
21st January 2005, 04:42
fixed the bug (and learned something about avisynth again)
also renamed the plug-in to GraMaMa (Gradient Mask Maker)
http://e-rels.dyndns.org/downloads/GraMaMa.dll
GraMaMa(m, c, x, y, r)
m = mode (int)
1: circle ("radial gradient" 2nd example)
2: square
3: square diagonal
4: line ("gradient mask" 1st example)
c = center corner/side (int)
1: (top) left
2-4 clockwise respectively
x&y, coordinates (float)
center coordinates of the gradient / line coordinate (no y then)
the center can be outside the picture
r, "radius" (float)
"size" of the gradient
the 2 examples on the last page should look like this:
maskmaker(4,3,-170,2.8)
maskmaker(1,3,0,0,500)
please post feedback (bugs; suggestion, maybe for new modes, ...)
this filter is YV12 only for now
CraigBjorn
24th January 2005, 22:38
In response to joshbm about calculating the distance, and E-male's reply.. it's not really experimental (unless you consider programs like avisynth it's self experimental) There are camera trackers likeVooDoo (http://www.digilab.uni-hannover.de/docs/manual.html) that could be used for something like this... the only thing about it is that it's impractical. Especially when it's ALOT easier to just make your own 35mm adaptor....
This forum has alot of good threads on 35mm adaptors. (http://www.dvinfo.net/conf/forumdisplay.php?forumid=70)
And this forum has alot of info on getting that "film look" (http://www.dvinfo.net/conf/forumdisplay.php?forumid=34)
Hope some of that helps
E-Male
24th January 2005, 23:07
well, maybe "experitmental" wasn't the right choice of words
but it doesn't simply work on all scenes, you need movement
also i wonder if this is, yet, pratical for our project
but i'll have a closer look
EDIT: i wrote to the programmers of voodoo to see if this will help us
E-Male
25th January 2005, 20:55
i got a reply
the program by now can only work on camera rotation on at ripod and there is are no plans to add stereoscopic features or anything similar
i got some links from him, one is worth looking at:
http://cat.middlebury.edu/stereo/
but i think it's not as easy as some people think
there won't be fully automated high quality depth detection for every material in avisynth any time soon
*.mp4 guy
26th January 2005, 20:23
Well even the latest Gicuco borks on Gimp color curves, I've got a screenshot to demonstrate the problem, but no way to post it. Anyway the problem is very obvous, the clouds turn pink. Can someone please help me post the screenshot?
E-Male
26th January 2005, 20:50
http://imageshack.us/
please post an original frame and it's gicocued version
as well as the avs-script and the curves
*.mp4 guy
26th January 2005, 21:01
Just checking to see if the image works, ill post the other stuff in a followup.
http://img177.exs.cx/img177/4959/frames3ha.jpg
hey it works!
and heres the original:
http://img165.exs.cx/img165/9189/original1om.jpg
heres my script:
#loadplugin("G:\warpsharp_2003_1103\LoadPluginEx.dll")
#loadplugin("G:\avishader.dll")
#loadplugin("G:\dust.dll")
#loadplugin("G:\smoothd.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
#LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
loadplugin("G:\GiCoCu.dll")
#loadplugin("G:\warpsharp.dll")
avisource("C:\DC.avi")
#Telecide(order=1,guide=1).Decimate()
FieldDeinterlace()
#fluxsmooth(3,3)
#lanczosresize(2560,1920)
#Xsharpen(255,255)
#lanczosresize(1024,768)
#smoothd(1,6)
converttorgb()
GiCoCu("C:/cvr4.txt")
(heheh kinda messy)
and the curves:
# GIMP Curves File
2 27 -1 -1 -1 -1 54 51 -1 56 -1 -1 -1 108 106 115 -1 180 -1 185 157 189 -1 140 -1 198 -1 208 -1 199 -1 -1 255 255
0 0 -1 -1 -1 0 -1 0 61 0 84 76 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 50 66 0 87 79 -1 180 -1 203 133 134 -1 133 -1 139 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
-1 0 -1 0 -1 0 -1 0 64 0 -1 -1 -1 70 -1 126 126 128 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
E-Male
26th January 2005, 22:07
i assume that if you just remove gicocu and keep everything else that the output looks correct, please doublecheck that
i see no problem in the script, gicocu should take any rgb input
it might be the curve file, as it includes the not yet understood [by me] (-1/x)-pairs, even has a line starting with "-1 0"
please try some other curve files on this to see if it might be that
also it would be nice if the the pics would be from the same frame
*.mp4 guy
26th January 2005, 22:15
Other curve files all display similar distortion althogh in different color ranges(for istance more greent than in the gimp). I'll check with some other curves and post screenies form the same frame.(althogh imo it's colors who cares:p ). Also thanks for the grate tool!
*.mp4 guy
26th January 2005, 22:41
Heres the green one...its a bit more subtle than pink clouds;)
http://img193.exs.cx/img193/7605/comparison22fw.jpg
Heres the curve file:
# GIMP Curves File
0 0 22 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 -1 -1 116 139 108 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 59 86 44 -1 44 -1 143 -1 120 140 115 -1 199 -1 226 194 235 -1 175 -1 -1 -1 -1 255 255
0 0 -1 56 -1 54 -1 42 67 38 -1 34 -1 137 108 143 -1 137 -1 247 -1 223 168 221 -1 223 -1 -1 -1 -1 -1 -1 252 246
0 37 -1 53 -1 -1 -1 61 -1 74 72 73 -1 -1 108 136 -1 131 -1 214 -1 218 175 211 -1 190 -1 135 -1 -1 -1 -1 255 255
0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 255 255
Fyi if u want the full source it's on that free stock footage site, this is frame 230 of the dc clip.
E-Male
26th January 2005, 22:56
i daubt i can visually improve gicocu atm
i could if soemone from the gim ml would finally respond
or someone with the needed skills go through the gimpsource (i know which files) and tell me how the files are to be read
*.mp4 guy
26th January 2005, 23:24
Thanks for all of your effort so far. I wish I could help, but I can hardly coble together a simple avs script:D . Man opensource is supposed to be better then this, darned Gimp people:rolleyes: .
morsa
27th January 2005, 00:24
I will insist so people I don't want anybody to get angry.
The nice way to get better results is using LUTs in the HSV colorspace...
DSP8000
27th January 2005, 02:24
Hi guys,
Just recently I found a very useful tool, DCE Digital Camera Enhance.
Oscar, the guy who writes Real-Draw Pro, DVD-Lab, has some very good filters in this tool.I'll contact him to see if he can help us a bit.
The images that I did with DCE look very close to MB.
Also the chroma filter in Microsoft Digital Image Suite Pro v10 works wonders, maybe I can find something in the Microsoft knowledge base about this.
DSP8000
E-Male
27th January 2005, 02:24
ok, i did some googeling to find some info on HSV
i think i understood what it is
but i'm not sure how it'll help us here
could you go into some detail please
thx
EDIT1: so we basicly would use an LUT version of "tweak"?
sound ok to me, but:
what makes that better than usign the LUTs in rgb?
where/how do we get data for hsv LUTs?
sorry if i ask dumb questions, but it seems i can't really get the idea of your's, yet
E-Male
27th January 2005, 03:58
i think i got some ideas what's going wrong with GiCoCu
expect a new test version soon
EDIT:
http://e-rels.dyndns.org/downloads/GiCoCu.dll
has 2 additional parameters, both bool
GiCoCu("x:\abc", false, false)
i won't tell yet what the 2 bool-parameters do
please test with all 4 combinatons and report which is closest to gimp and which have more or less visible errors
this release includes some moving around of code, so there could be new bugs
looking forward to results
morsa
27th January 2005, 08:56
Well, the nice thing about HSV is that you can change ranges of colors.(Like touching just the yellowish color and nothing else, etc)
For example you could turn a red T-shirt into a blue one, etc.( H )
then you have the Saturation thing ( S ) so you can rip off for example color saturation on the blacks if needed (that way it is easier to get a "bleach by-pass" effect if desired.Anyway I think more or less the same can be done in YUV too, so forget about this :) ).
And then you have the Intensity or "brightness" value ( V ) so you can remap luminance more or less as usual.
I know my explanation is really poor but I guess it helps as to give a basic idea.
I will try to find some links in google for you.THX
(As another easy example, we all know in PAL land that the range of the yellows isn't always nice, it has a really "video" look.On contrary yellow colors on film tend to look a little bit diferent and way much nicer and natural.This difference also changes when you change film stocks.Colors don't look the same on 50 ASA film than on 320 ASA.
The only easy way to change this without needing some strange LUT working with RGB triplets is using just a LUT with H data in HSV colorspace)
E-Male
27th January 2005, 09:34
ok, but is there any method (gui) to make HSV-LUTs?
if yes, i'll look into making the plug-in
morsa
27th January 2005, 09:55
I don't understand very well your question, sorry.
If you are asking about any Paint program with support for HSV, the answer is Photoshop, Combustion, Gimp (I guess), I suppose After effects too...
PS: Anyway if you aren't convinced I guess some other people here could clarfy things a little bit, cause as always I can be wrong about everything ;)
E-Male
27th January 2005, 10:07
my point is that we need a (preferably free) program that allows creating HSV-curve-files, just like we can use gimp or photoshop for RGB now
or would you like to enter all values in into the LUT by hand? ;)
morsa
27th January 2005, 10:25
So I must assume Photoshop and/or Gimp don't support HSV (I would prefer HSL instead anyway)inside their curves editors? :confused:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.