VideoHelp Forum
+ Reply to Thread
Results 1 to 30 of 30
Thread
  1. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    Sup.

    This is my first post here.


    I have at my disposal a nikon d3100, premiere pro and after effect.


    I've searched on the web about this but I couldn't find anything, that is why I am making a thread right here, sorry if it has already been discussed.


    I would like to reproduce the 3d camera shift effect like in this video.


    http://youtu.be/RPT7xbhqodo


    I know this is 2 cameras offset that is filming, but the reason I am in the editing section of this forum is:


    How to edit this?


    I'm a noob regarding editing, so when I get inspired and want to make something cool I check online how to do it.


    I know it might be as simple as making a similar effect .gif, taking 2 frames and playing it in loop like this :







    TLDR; I want to know if there's a method to make a video like it, by alterning between 2 clips really fast to make the desired effect instead of putting frames 1 by 1 on the timeline.


    Thank you!
    Last edited by Ambrosia; 25th Oct 2013 at 03:24.
    Quote Quote  
  2. If you have a still subject:
    http://www.studio3d.com/pages2/camera_shift_3D.html

    Otherwise you need to start with a 3d camera and alternate views every few frames.
    Quote Quote  
  3. A couple of strategies come to mind. First, as you've noted, you will need two cameras.

    In Premiere you can group the two cameras together as a multi-cam clip and switch between them quickly.
    or
    In After Effects you can place the clips on separate layers and keyframe the opacity on the top clip. At this point you can either cut and past the opacity keyframes to build up the back and forth rather quickly. (copy the first two keyframes, paste them, copy all four to make eight, etc.) Or you can create an After Effects script to automate it.
    or
    write an avisynth script using the interleave function.
    Quote Quote  
  4. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I was thinking of AVIsynth script also, however the Interleave function only works on EVERY frame, which is way too fast a change (unless you prepend it with a change in FPS to much slower). I was thinking more along the lines of SelectEvery() and Overlay(). It's too early in the AM for me to do coding for that - maybe later...

    Note: any good multi-track NLE can put the 2 streams on 2 different tracks, then either change the opacity on the upper (front) track to reveal the lower (back) track, or cut out selected frames from the upper track - in a sense creating an ABABAB staggered edit VIRTUALLY instead of having to do an actual insert/assemble edit on the same track.

    The problem that I see is getting the proper framerate of the held/visible pics adjusted to work with the rate of alternation.
    You could cheat and go from:
    A1 B1 C1 D1 E1 F1 G1 H1
    and
    A2 B2 C2 D2 E2 F2 G2 H2
    to
    A1 B2 C1 D2 E1 F2 G1 H2
    but it makes better stereo3d to go:
    A1 A2 C1 C2 E1 E2 G1 G2

    This requires a shift in the 2nd stream that is dependent upon those 2 rates I mentioned above.

    Scott
    Last edited by Cornucopia; 25th Oct 2013 at 07:28.
    Quote Quote  
  5. AviSynth script example:

    Code:
    left=AviSource("left.avi")
    right=AviSource("right.avi")
    
    evens = Interleave(left.SelectEven(), right.SelectEven())
    odds =  Interleave(left.SelectOdd(), right.SelectOdd())
    
    Interleave(evens, odds)
    SelectEvery(8,0,1,6,7)
    Or this variation:

    Code:
    left=AviSource("left.avi")
    right=AviSource("right.avi")
    
    evens = Interleave(left.SelectEven(), right.SelectEven()).SelectEvery(4,0,3)
    odds =  Interleave(left.SelectOdd(), right.SelectOdd()).SelectEvery(4,0,3)
    
    Interleave(evens, odds)
    These scripts alterante between in 2 frames left and 2 frames right, just like many samples I've seen at Youtube.
    Image Attached Files
    Last edited by jagabo; 25th Oct 2013 at 10:17.
    Quote Quote  
  6. Here's an improved script that can handle different values of alternating frames:

    Code:
    ##########################################################
    #
    # Select alternating groups of "n" frames from two videos.
    # Useful for 3d camera switch techniques.
    #
    ##########################################################
    
    function CameraSwitch3D(clip vid1, clip vid2, int "n")
    {
      n = default(n,1) 
    
      nText = String(n)
      ConditionalFilter(vid1, vid1, vid2, "current_frame / " + nText + " % 2", "=", "0")
    }
    
    ##########################################################
    
    left=AviSource("left.avi")
    right=AviSource("right.avi")
    
    CameraSwitch3D(left, right, 3) # switch view every 3 frames
    Quote Quote  
  7. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    Thanks guys for the quick answers.

    Thanks for the keyframe advice, I didn't think of that.


    I think keyframing them exponentially like smrpix suggested might be the best option because you need to realign the videos with your convergence subject for that effect to be good. Maybe I could reposition the videos before putting them in the avisynth but I don't see it as intuitive as editing them with premiere. Except if you can reposition them by scripting avisynth, I really know nothing about scripting. But still I think it's preferable to have a view box to know if it's aligned correctly. So I must do this manually I guess by keyframing them.

    Except if someone got another idea?
    Quote Quote  
  8. What kind of repositioning ?

    Did you shoot it with both cameras mounted with a rig ? You shouldn't need reposition since they are already converged and aligned

    Or do you have footage shot for a different purpose that isn't aligned? What is the background info ?

    You can view scripts in avspmod or vdub, make adjustments . One benefit of scripting is it makes tedious tasks much faster instead of manually copying & pasting keyframes
    Quote Quote  
  9. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    What I mean is look in this video. http://www.youtube.com/watch?v=0JHaavo9nhI

    The guy reposition the 2 frames to make it aligned with the convergence point ( the pot ).


    I just assume that you need to realign the 2 clips with the same fashion.
    Quote Quote  
  10. Yes, you can change the depth by shifting the two images left/right. That's easily done in AviSynth with Crop() and AddBorders().
    Quote Quote  
  11. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    Also, correct me if I am wrong, but I can assume you can do the same thing with opacity with keyframing?

    Because I believe aniceideaeveryday ( the people who makes these video clips ) use a more refined method in their recent videos. What I believe they do is change the opacity of the top layer gradualy to make a more fluid effect, which people probably wrongly assume it's a morphing effect between the 2 clips. See this http://www.aniceideaeveryday.com/videos/70/Bring-Me-The-Horizon/Shadow-Moses at look at the grass at 0:25, you'll see what I mean.
    Quote Quote  
  12. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    ^ Or actually, is it possible that they simply alternated the clips without any opacity change but used the twixtor plugin to make it fluid?
    Quote Quote  
  13. You can simply overlay two images using an alpha mask video that alternates between black and white frames.
    Quote Quote  
  14. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    But wouldn't that only work for non-moving objects?
    Quote Quote  
  15. If you use still images, yes. You can use it with videos too.
    Quote Quote  
  16. Are you still attempting this with 1 camera ? Not 2 cameras fixed on a rig ?

    The last video has the horrible morphing edge artifacts and signatures of optical flow - so yes they used something like twixtor / pixel motion/ kronos etc... as well for the switch frame between cameras . The 1st video used duplicate pairs
    Quote Quote  
  17. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Originally Posted by jagabo View Post
    Here's an improved script that can handle different values of alternating frames:

    Code:
    ##########################################################
    #
    # Select alternating groups of "n" frames from two videos.
    # Useful for 3d camera switch techniques.
    #
    ##########################################################
    
    function CameraSwitch3D(clip vid1, clip vid2, int "n")
    {
      n = default(n,1) 
    
      nText = String(n)
      ConditionalFilter(vid1, vid1, vid2, "current_frame / " + nText + " % 2", "=", "0")
    }
    
    ##########################################################
    
    left=AviSource("left.avi")
    right=AviSource("right.avi")
    
    CameraSwitch3D(left, right, 3) # switch view every 3 frames
    Sweet!

    Clearly you are more adept at AVISynth than I am.

    For convergence adjustment & skew alignment (which often does still happen even with the best DPs and rigs), it makes much more sense to do that directly, clip-by-clip in your Compositor/NLE of choice (mine would be Vegas or AE for this WRT stereo3d) or using a dedicated processor (AVISynth, StereoMovieMaker). Then do the wiggle effect in a separate pass.

    BTW, perfect example of overuse of an effect (especially the 2nd clip). Less is more.

    Scott
    Quote Quote  
  18. Originally Posted by jagabo View Post
    You can simply overlay two images using an alpha mask video that alternates between black and white frames.
    That's kind of brilliant. And it will work in any of the programs mentioned.
    Quote Quote  
  19. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    Originally Posted by smrpix View Post
    Originally Posted by jagabo View Post
    You can simply overlay two images using an alpha mask video that alternates between black and white frames.
    That's kind of brilliant. And it will work in any of the programs mentioned.
    Do you know any tutorial that I could use to do this?

    I only know alpha masks for photoshop, not with Premiere.
    Quote Quote  
  20. Do you know how to use track mattes in AE or Premiere ?

    Top Layer = matte
    Middle Layer = Left Clip
    Bottom Layer = Right Clip

    The matte layer is the alternating white/black clip. e.g. You might have it 2 frames white, 2 frames black, etc.... It's easy to generate in something like avisynth .

    Set Middle layer's track matte to "luma matte Top Layer" . So whenever the matte it's white, you will "see" the Left Clip. Whenever it's black you will "see" the Right Clip. If you wanted it the other way around (black shows the Left Clip), then use "luma matte inverted Top Layer"
    Quote Quote  
  21. IMO an easier way to automate on/off binary behavior is to create an expression for the opacity parameter in AE . The benefit is no manual repetitive tasks, no copying keyframes, no need to make a matte layer

    Top Layer = Left Clip
    Bottom Layer = Right Clip

    Alt+click the opacity "stopwatch" on the top layer and enter the expression

    Code:
    blinkSpeed =5;
    lowOpacity =0;
    highOpacity = 100;
    if(Math.sin(blinkSpeed * time * Math.PI *2) < 0) lowOpacity else highOpacity;
    You can change the blink speed. E.g. if you want it faster increase the value . So when the layer opacity is zero, you "see" the bottom layer or "Right Clip" . When the opacity is 100%, you see the top layer
    Last edited by poisondeathray; 25th Oct 2013 at 19:54.
    Quote Quote  
  22. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM

    Yep, Expressions. That's the way to truly get the machine to do the heavy lifting for you.
    (Note to self: Need to get further into that.)

    Scott
    Quote Quote  
  23. Nobody seems interested but here's an update to my earlier AviSynth script that allows you to set the 3d depth. I also changed the name to CameraShift3D():

    Code:
    ##########################################################
    #
    # Camera shifting technique for simulated 3d.
    # Select alternating groups of "n" frames from two videos.
    # "depth" pushes the image farther away from the viewer,
    # or brings it closer to the viewer (negative values).
    # Non-zero depths will leave black borders at the left
    # and right edges of the frame.
    #
    ##########################################################
    
    function CameraShift3D(clip left, clip right, int "n", int "depth")
    {
      n = default(n,1) 
      depth = default(depth, 0)
      # you can remove line below if the video is RGB
      depth = (depth / 2) * 2 # in case the video is YUY2 or YV12
    
      # change the depth by shifting the frames left/right
      left = depth >= 0 ? left.Crop(depth, 0, -0, -0).AddBorders(0, 0, depth, 0) : left.Crop(0, 0, depth, -0).AddBorders(-depth, 0, 0, 0)
      right = depth >= 0 ? right.Crop(0, 0, -depth, -0).AddBorders(depth, 0, 0, 0) : right.Crop(-depth, 0, -0, -0).AddBorders(0, 0, -depth, 0)
    
      nText = String(n)
      ConditionalFilter(left, left, right, "current_frame / " + nText + " % 2", "=", "0")
    }
    
    ########################################################
    Quote Quote  
  24. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    !! I'm interested. Bravo.

    Scott
    Quote Quote  
  25. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    I'm still wondering why anyone would think that effect is visually appealing. Sorry about that. It looks like someone de-interlaced in the wrong order, not that it's some great fantastic effect.
    Quote Quote  
  26. ^I hate it too. Blah . Headache inducing seizures LOL

    If you only have 1 camera and 1 view , you also can "fake" it by duplicating the layer, rotating on layer on the Y axis one direction -y degrees, and the other +y degrees (and scaling the layer up to fill in the edges) . The optics aren't quite right, but it's a cheap effect

    e.g
    "cut.mov" is the source video cut from Dark Knight Apple Movie Trailer
    "1.mp4" is the exported effect
    Image Attached Files
    Last edited by poisondeathray; 26th Oct 2013 at 00:31.
    Quote Quote  
  27. It's not too horrible with still shots but for most video I don't find the effect appealing. I spent time to add the depth control because I have a similar anaglyph function that could use it. Here's a shot from a 3d Coke commercial where it's not too bad. I used the above CameraShift3D() and MvTools to add motion interpolated in-between frames.

    Code:
    CameraShift3D(left, right, 2, 0)
    DoubleFPS2()
    Image Attached Files
    Quote Quote  
  28. By the way, cat's sometimes use a similar head bobbing technique to better judge distances just before they pounce on their prey.
    Quote Quote  
  29. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    Originally Posted by jagabo View Post
    By the way, cat's sometimes use a similar head bobbing technique to better judge distances just before they pounce on their prey.
    I do that too when I get skunked at the club. On the way out to the parking lot to visit "ralph". ( <<<<hahaha, what a hoot)

    Hey, we have 3D moticons now?
    Last edited by budwzr; 26th Oct 2013 at 08:54.
    Quote Quote  
  30. Member
    Join Date
    Oct 2013
    Location
    Canada
    Search Comp PM
    Thanks everyone.

    Really helpful, I meant to use it with 2 cameras but wanted to make sure how to edit them before commiting to it.


    If I have other questions I'll be sure to ask here, you guys are really helpful and friendly.


    Thanks again!
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!