Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
19th January 2005, 03:13 | #101 | Link |
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
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.
__________________
sucking the life out of your videos since 2004 |
19th January 2005, 05:02 | #102 | Link |
Registered User
Join Date: Jun 2003
Location: Land of the Noobs & the Home of the Brave
Posts: 349
|
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
__________________
Tired of waiting for video encodes? Get a totally new P4 Desktop Computer for FREE. Last edited by joshbm; 19th January 2005 at 05:08. |
19th January 2005, 06:14 | #103 | Link |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
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 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 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: Code:
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) Original Screen Shot (frame#360) Gradient Mask (frame#360) Gaussian Blur Simulation Screen Shot (frame#360) DOF Simulation Screen Shot (frame#360) 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? Last edited by Macanudo; 19th January 2005 at 07:40. |
19th January 2005, 09:27 | #105 | Link | |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
Quote:
I see a noticeable improvement. What do you think? |
|
19th January 2005, 11:25 | #107 | Link | |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
Quote:
|
|
19th January 2005, 12:10 | #108 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Try the intermediate resizing with MOD4 resolutions. You did 150*100, where 150 is only MOD2.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
19th January 2005, 13:32 | #110 | Link |
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
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 |
19th January 2005, 13:53 | #111 | Link | |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
Quote:
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. Last edited by Macanudo; 19th January 2005 at 14:13. |
|
19th January 2005, 14:57 | #113 | Link |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
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 DOF using Radial Blur (frame#360) |
20th January 2005, 07:18 | #118 | Link |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
E-Male,
I think there is a bug. Here is my script Code:
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) MaskMaker Test Screen Shot #1(frame#430) MaskMaker Test Screen Shot #2(frame#431) 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 Last edited by Macanudo; 20th January 2005 at 07:24. |
20th January 2005, 08:00 | #120 | Link |
Registered User
Join Date: Jun 2002
Location: Texas
Posts: 59
|
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: 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) |
|
|