VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 34
Thread
  1. Alright. I have this Star Trek footage, and what I am trying to do is insert a video of the Enterprise-D on top of a background. When I tried the easiest approach, chroma keyer set to black to match the black stardrop background, the result was absolute crap, as I expected. A different approach I am trying seems to working out better, but still has problems, hence the reason for this post. Here are the steps taken:

    - Here is the background:



    - I then cropped the video of the Enterprise to minimize the amount of black and added it to a track above the background track:



    - I then duplicated the Enterprise footage and placed it on another track above. With filters I was able to make the Enterprise shape in the footage green:



    - I then added a green chroma key mask:



    - And this is how far the result has gotten:



    Now, I was hoping I could set Vegas to use the green Enterprise footage as a sort of mask, where everything that wasn't green would be cut out, but I'm uncertain how this could be done.

    I am using Vegas Movie Studio 8.0c on Windows 7 x64.

    Any ideas?

    Thanks.
    Image Attached Images          
    Quote Quote  
  2. Now, I was hoping I could set Vegas to use the green Enterprise footage as a sort of mask, where everything that wasn't green would be cut out, but I'm uncertain how this could be done.
    You're going to need a better matte , there are too many holes and it's going to look like crap. Vegas really isn't the best tool for this job, but it is possible to use green for the matte

    Top track = your matte (your green footage)
    2nd track = video clip
    3rd track = background

    Hit the track fx button on track 1 => mask generator tool => for 'type' select green instead of luminance . You can hit "invert" if you want green areas to show through or vice versa

    On track 1, push "compositing mode" button and select "multiply (mask)"

    On track 2, push "make compositing child" button
    Quote Quote  
  3. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    You are doing a luminance key, not a chroma key. Chroma key requires the a flat chroma background behind the object you are shooting. The matte (alpha) is defined by CbCr and Y to get a fine edge that will never be possible with luminance only.

    The key to success is a flat chroma (CbCr) background since luminance will vary with noise and imperfect lighting. Green works best for 4:2:0, 4:1:1 and 4:2:2 camcorders since green has lowest signal to noise and highest detail*. Blue works for film or 4:4:4 matrixed video cameras.

    * Y is full sampled and contains 59% green but only 11% blue.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  4. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    No, no, you're doing it wrong. You want to key out the background, not the Enterprise. Are you using the bezier mask? If not, use that. The bezier mask can cut it out with laser precision.
    Last edited by budwzr; 5th Nov 2010 at 18:31.
    Quote Quote  
  5. He's asking about using mattes, not keying . He's only using the color key to generate the matte.

    The problem in his case is the matte, there's too many holes. I've attached what a "proper" matte would look like in green, luma, and the end effect in vegas

    Normally, people that use compositing mattes use luma or black/white and greyscale. You can invert the matte
    (either white is transparent, or black is transparent) . It's also possible to use other colors (green is
    transparent , as is the case here)

    You can't color key this shot effectively because of the black background, and black in the enterpise, or you'll be left with holes in the enterprise. It's the same idea as green spill on typical green screen shots - your foreground subjects have holes in them

    Certainly rotoscoping or using bezier masks manually is one way, but that is very tedious to do in vegas when you do it frame by frame . If you can generate a clean matte with a few filters as he's trying to do here, it is a lot faster and easier

    Other specialized tools dedicated to compositing make this job easier, they have rotobrush tools (that automatically track forwards and backwards instead of roto frame by frame) , matte generation tools , special mask tools , mask feathering, light wraps, etc....
    Image Attached Images      
    Quote Quote  
  6. Member edDV's Avatar
    Join Date
    Mar 2004
    Location
    Northern California, USA
    Search Comp PM
    Originally Posted by poisondeathray View Post
    You can't color key this shot effectively because of the black background, and black in the enterpise, or you'll be left with holes in the enterprise. It's the same idea as green spill on typical green screen shots - your foreground subjects have holes in them...
    If there is a usable outer edge, one can also duplicate the Enterprise layer and paint or mask out the black areas inside the ship area then use that layer to generate a luma or bezier matte. Then mute that layer.

    Rotoscope is the last resort.
    Recommends: Kiva.org - Loans that change lives.
    http://www.kiva.org/about
    Quote Quote  
  7. Originally Posted by edDV View Post
    If there is a usable outer edge, one can also duplicate the Enterprise layer and paint or mask out the black areas inside the ship area then use that layer to generate a luma or bezier matte. Then mute that layer.
    Yes, that would work too

    But then again, maybe he should leave "holes in the hull" - the Enterprise seems to get shot up quite frequently anyways
    Quote Quote  
  8. Thank you so much poisondeathray for the solution in your second post!

    I vaguely remember reading something similar to the instructions you wrote, but I totally forgot it.



    The end result doesn't look that bad, except for the black lines on the top and bottom due to blurring.
    Image Attached Images  
    Quote Quote  
  9. The end result doesn't look that bad, except for the black lines on the top and bottom due to blurring.
    Why do you have the edges?

    Make your matte the same size as all the other layers (make all the layers the same size and don't do that initial crop step):

    - I then cropped the video of the Enterprise to minimize the amount of black and added it to a track above the background track:
    Quote Quote  
  10. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    PDR: Normally, people that use compositing mattes use luma or black/white and greyscale. You can invert the matte
    (either white is transparent, or black is transparent) . It's also possible to use other colors (green is
    transparent , as is the case here)
    ================================================== ======================

    Bravo, that's absolutely true. I routinely make masks in CorelDraw that way, using B/W or greyscale. Didn't think the OP could handle that though.
    Last edited by budwzr; 5th Nov 2010 at 22:01.
    Quote Quote  
  11. Why do you have the edges?

    Make your matte the same size as all the other layers (make all the layers the same size and don't do that initial crop step):
    Yeah, I figured shortly before you posted. I actually only had to resize the "green screen" layer. I need to keep the other layer as is so to minimize the appearance of "black stars".

    Here is the near final result:




    The whiteness is intentional, as it is part of an overall effect.

    Thank you so much for your help!
    Image Attached Images  
    Quote Quote  
  12. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    I'm confused. Is the Enterprise a motion clip or a still?

    If it moves, and changes shape, this "matte" will have to change too, and that would be tough.

    And if it's meant to be a still, taken from a single frame of a clip, wouldn't it be simpler to make a PNG snap and cut it out in a graphics program?

    Just asking.
    Last edited by budwzr; 6th Nov 2010 at 10:01.
    Quote Quote  
  13. Originally Posted by budwzr View Post
    I'm confused. Is the Enterprise a motion clip or a still?

    If it moves, and changes shape, this "matte" will have to change too, and that would be tough.

    And if it's meant to be a still, taken from a single frame of a clip, wouldn't it be simpler to make a PNG snap and cut it out in a graphics program?
    He says in the 1st post it's a movie.

    That's the whole point of generating a matte using filters or keying or any other technique - to reduce the work you would have done manually rotoscoping frame by frame.
    Quote Quote  
  14. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    So the ship doesn't move?

    I was thinking he wanted to animate the ship, something like: http://www.youtube.com/watch?v=e1fV89GgZsQ.
    Quote Quote  
  15. what? it's a movie so i'm assuming the ship moves... otherwise, like you said earlier, this would be a completely pointless exercise. track 1 & 2 are supposed to be videos with motion
    Quote Quote  
  16. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Just asking because the ship is coming in off the edge of the screen was wondering how a matte would hold up if the perspective changed.

    ...or if Kirk shoots a phaser
    Quote Quote  
  17. The matte changes as the ship changes, wherever the ship outline is, there will be "white" or "green" (if you choose to use green) when looking at the matte layer only

    ...or if Kirk shoots a phaser
    Kirk don't need no stinkin phaser. He can punch anything out
    Last edited by poisondeathray; 6th Nov 2010 at 14:34.
    Quote Quote  
  18. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Oh, I see, I was wondering where the green came from. You made a B/W and a G/W mask but not using both. Yeah, that kind of threw me for a loop. But doesn't the green one have to be keyed out, whereas the B/W one automatically acts as a mask?

    Apparently my coffee doesn't work today.
    Quote Quote  
  19. Yes, white/greyscale is what most people use, and the white one in my post above was only included just for fun. Green was the one actually used. His original question was

    Now, I was hoping I could set Vegas to use the green Enterprise footage as a sort of mask, where everything that wasn't green would be cut out, but I'm uncertain how this could be done.
    vegas' mask generator tool can use either (it can even use other colors). In post #2 it says to select "green" instead of luminance for the "type". If he had made your typical black/white instead, then 'luminance' would have worked

    He didn't say exactly which filters he used to get that green image - he just said "some filters". This where you can get very creative and there are many different techniques for isolating & generating masks. For example, it might be easier on a particular shot to do it a certain color or a certain way for easier isolation
    Quote Quote  
  20. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Yeah, yeah, no doubt there's 1001 ways to do it. I too read in the OP's post that it was a "complex chroma key problem", and at first it seemed to me convoluted, so I thought I could learn something, but alas for naught.

    I think his "filter" is just a solid green bitmap on the next track up. Maybe he thought he needed something green to make the chroma key work better.

    I certainly DID learn something
    Last edited by budwzr; 6th Nov 2010 at 16:12.
    Quote Quote  
  21. I think his "filter" is just a solid green bitmap on the next track up. Maybe he thought he needed something green to make the chroma key work better.
    Actually, it was an accident, more-or-less. I was trying out various filter seeing if I could increase the contrast between the Enterprise and the space background (this being original footage) so I could chroma-key the black background easier. By chance, I found a filter which turned the brighter points of the footage green, and I decided then to change my approach.
    Quote Quote  
  22. Continuing on, I would now like to remove as much of the "black stars" as possible. I was thinking of using a combination of the cookie cutter videoFX and the pan and crop tool. However, it seems I have to apply the videoFX to the entire video when I only want it to appear at certain times in the video footage. I know I can add tracking to both the Cookie Cutter and Pan and Crop, but this causes the effect to move in a path on screen rather simply appear and disappear/instantly change when I want them to without having a transition. Am I able to do this? Or is there perhaps an easier way to remove the "blemishes"?
    Image Attached Thumbnails Click image for larger version

Name:	Image1.png
Views:	379
Size:	323.1 KB
ID:	4137  

    Quote Quote  
  23. The "black stars" are from holes in your matte

    Your real question is how could can you generate a clean matte in vegas, short of some manual roto work

    I don't know - I would use after effects for this . AE CS5 has a rotobrush that automatically does selections (similar to magic wand in photoshop), except it tracks fwd/bwd for video. It reduces the amount of manual rotoscoping time immensely

    I know I can add tracking to both the Cookie Cutter and Pan and Crop, but this causes the effect to move in a path on screen rather simply appear and disappear/instantly change when I want them to without having a transition. Am I able to do this?
    If you were approaching it this way, what you would want to do is keyframe the mask path and mask shape (so it changes shape frame by frame) . Vegas sucks for this type of work




    EDIT:
    One approach you could try, is apply a heavy denoiser to obliterate the stars when generating your matte (it doesn't matter that it blurs the detail of the enterprise, it's only the shape for the matte that you want) , then use whatever filters you used to generate the matte in the 1st example. That should reduce the amount of manual work you have to do. You really only need a rim around the ship, the rest can be done with a garbage matte
    Last edited by poisondeathray; 7th Nov 2010 at 10:36.
    Quote Quote  
  24. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    How long is the clip?
    Is it just ONE clip?
    Does the ship change perspective?
    Quote Quote  
  25. The "black stars" are from holes in your matte
    Indeed.

    I don't know - I would use after effects for this . AE CS5 has a rotobrush that automatically does selections (similar to magic wand in photoshop), except it tracks fwd/bwd for video. It reduces the amount of manual rotoscoping time immensely
    Unfortunately, I don't have After Effects.

    If you were approaching it this way, what you would want to do is keyframe the mask path and mask shape (so it changes shape frame by frame) . Vegas sucks for this type of work
    It's a six second clip, so going frame-by-frame wouldn't be a huge issue. The problem is that I can't just have a cookie cutter effect appear on a specific frame. Vegas tries to render this as motion (have the effect move in a smooth path around the video) and I don't want that. I just want it to take effect in one frame and not appear in any other frame at all. Same with pan and crop. I don't want a transition between the different sizes. I just want the changed crop sizes to appear in one frame and not be a transition. However, your second solution may save some time:

    One approach you could try, is apply a heavy denoiser to obliterate the stars when generating your matte (it doesn't matter that it blurs the detail of the enterprise, it's only the shape for the matte that you want) , then use whatever filters you used to generate the matte in the 1st example. That should reduce the amount of manual work you have to do. You really only need a rim around the ship, the rest can be done with a garbage matte
    Worth a try. However, what filter/setting in Vegas would be equivalent to a "heavy denoiser"?

    How long is the clip?
    About six seconds.

    Is it just ONE clip?
    For now. I'll be doing other clips similar in concept to this using the techniques I have acquired from trial and error and from the help I have gotten here.

    Does the ship change perspective?
    For this clip, no. It is a consistent clip from the right side of the Enterprise moving forward.
    Quote Quote  
  26. Originally Posted by Morality124 View Post
    Worth a try. However, what filter/setting in Vegas would be equivalent to a "heavy denoiser"?
    vegas doesn't come with any worthwhile denoisers

    you can use avisynth or virtualdub - free and dozens of filters and all are fully customizable

    e.g.

    AVISource("video.avi")
    source = last
    vectors = source.MVAnalyseMulti(refframes=3, pel=2, overlap=4, sharp=1, idx=1)
    source.MVDegrainMulti(vectors,thSAD=2000,idx=1)
    fft3dfilter(sigma=12,sharpen=0.2)

    Notice how blurry enterprise is after applying heavy filters - but it doesn't matter for this purpose, all you need is the shape outline for the matte

    So once, you "cleaned up" the stars for a preprocessed clip, then you could use whatever you did to generate the matte in the 1st post. Also don't crop it or you'll get the horizontal lines.

    You may have to do a tiny bit of roto work, in sections where there is contiguous black (where the area of 'space' overlaps with the enterprise outline), but it will depend on what technique you choose for isolating & generating masks
    Image Attached Thumbnails Click image for larger version

Name:	0 original.png
Views:	343
Size:	213.4 KB
ID:	4140  

    Click image for larger version

Name:	1 denoise.png
Views:	259
Size:	83.7 KB
ID:	4141  

    Quote Quote  
  27. Ah yes, AviSynth. Is there anything it can't do?

    Does Vegas natively accept AviSynth scripts? Or is there an "Avisynth plugin" for Vegas? I like to reduce the amount of recoding I have to do.
    Quote Quote  
  28. Yes, you can frameserve into vegas using avisynth virtual file system (AVFS) , or vfapi

    http://www.turtlewar.org/avfs/
    http://forum.doom9.org/showthread.php?t=133313

    However, for your matte layer it doesn't matter. It would be easier to apply filters to 6sec clip and use a lossless intermediate (e.g. lagarith, huffyuv, even uncompressed) and re-import that filtered clip.

    I probably didn't explain it very well, but you're only doing this for the matte layer, so recoding isn't really an issue here - especially since it's a short segment. You don't lose quality, because the orginal layer is going to show through
    Quote Quote  
  29. However, for your matte layer it doesn't matter. It would be easier to apply filters to 6sec clip and use a lossless intermediate (e.g. lagarith, huffyuv, even uncompressed) and re-import that filtered clip.
    The problem is, the "clip" I'm using is actually cropped from much longer footage. So I have the problem of either re-encoding the entire video footage, or cropping the piece of footage and applying the filter. I think that would mess up the timings in my project, especially in the latter case,
    Quote Quote  
  30. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    More and more stuff is getting thrown in, and jumping from one idea to another. It's too stressful for me. Adios.
    Quote Quote  



Similar Threads