Announcement

Collapse
No announcement yet.

[Mini Tutorial] Camera Crossfade

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [Mini Tutorial] Camera Crossfade

    Hello,

    Here's a quick tutorial on how to achieve camera crossfade effect for your cinematics.


    End result:



    First, create a parameter collection, a new material and a render target 2D texture.

    Click image for larger version

Name:	1.JPG
Views:	1
Size:	14.1 KB
ID:	1155567
    • First, create a parameter collection, a new material and a render target 2D texture.
    • Create a scalar parameter in the parameter collection, and set the render target's resolution to the resolution you want to render the sequence at.
    • Set your material's domain to Post Process and Blend Location to Before Tonemapping. Create the material network you see in the screenshot with the collection parameter.

      Click image for larger version

Name:	2.JPG
Views:	1
Size:	256.8 KB
ID:	1155568
    • Inside your level add the material to the Blendable slot of your camera. And then create a SceneCapture2D actor. This will be used as your second camera, so plug the render target texture you created into this actor.

      Click image for larger version

Name:	3.JPG
Views:	1
Size:	113.3 KB
ID:	1155569
    • Prepare your Matinee sequence. Create an Event track in one of the groups and set your event key at the keyframe you want the transition to start.

      *If you want to use the scenecapture2d camera for more complex animations(not just sliding horizontally, vertically, or just still) then you may want to create a normal camera at the same location and position so that you can use it's preview window.

      Click image for larger version

Name:	4.JPG
Views:	1
Size:	54.6 KB
ID:	1155570
    • Finally, call the Matinee into the level BP, set your Timeline as you like and done.

      Click image for larger version

Name:	5.JPG
Views:	1
Size:	48.0 KB
ID:	1155574


    Now i can hear your sighing in disappointment since this isn't really practical for in-game cinematics because of multiple screen resolutions of the end users. If you have any solutions for that feel free to share with us. Otherwise i can bore you with my utterly stupid workaround ideas.

    Sample Project: https://drive.google.com/file/d/0B0L...ew?usp=sharing
    FREE Color LUT Collection
    FREE Physics Driven Spacecraft Project
    GTA Style Vehicle Interaction
    Dynamic DoF(Depth of Field)
    Camera Crossfade
    Portfolio

    #2
    Very nice!

    Comment


      #3
      Nice tutorial, but you know how to do this work on VR?

      Cause the VR only render the left eye, and the right eye is like a trail of the last pixel from the left eye, like when you try to repeat a texture and the mode is clamped.
      Any idea to do this?

      Comment


        #4
        Originally posted by cruz.guinho View Post
        Nice tutorial, but you know how to do this work on VR?

        Cause the VR only render the left eye, and the right eye is like a trail of the last pixel from the left eye, like when you try to repeat a texture and the mode is clamped.
        Any idea to do this?
        I have no idea, sorry. :\ I have no experience with VR.
        FREE Color LUT Collection
        FREE Physics Driven Spacecraft Project
        GTA Style Vehicle Interaction
        Dynamic DoF(Depth of Field)
        Camera Crossfade
        Portfolio

        Comment


          #5
          Okay, I've solved this with another way.

          Thanks for the reply

          Comment


            #6
            Hello. I'm trying to get this to work with the sequencer but I have a few issues. First of all. In the material, the rendertarget (which i assume is the green texture in the op) the white (full) output cant be connected since the engine complains about converting vector 3 to vector 2, so I chose a single channel instead. Unsure of the result I moved on, but I can't figure out what the "blendable" slot in the camera is. I've been looking through most sub categories now, so I'm hoping I might be able to get some help with one or both issues. Thanks

            Comment


              #7
              Not to bring up an old thread but I'm shocked there isn't support for this in UE4. Surely it's not too difficult to implement something like this in the Sequencer (although I'm guessing it's not high on Epic's priority list). Virtually every film software program from the 90s could do a cross-fade effect. I get UE4 is a game engine, not a film editing software, but the Sequencer is meant to be like a cinematic editor (duh). It just doesn't make sense to me that I can choose from like 12 different professional virtualized cameras all of which have been customized to render things differently, but yet I can't cross-fade a clip.

              My dilemma: I have a main menu sequence that I wanna loop for like 5 minutes and I want to cross-fade between shots (think like any COD menu screen ever). Right now the only way I see to do this is render and export out every single individual clip I need, import them in a movie editor (heck, iMovie would do), add the cross-fades, export it back out, then re-import it to my game project. That's a lot of work just to add some cross-fades. And furthermore, I now loose any flexibility or dynamics the Sequencer was suppose to provide that Epic touts (shuffling clips around, rendering real-time, etc). Not to mention now my video is locked into a resolution, which means it's either A) blurry/cropped on some displays or B) I have to do the above stated process again for each different screen resolution I want to support, which is a nightmare.

              Anyone see a solution here? I really am out of ideas...
              Last edited by Blakeanator; 04-28-2018, 05:33 AM.

              Comment


                #8
                Hi Staude . Could you please share a screenshot of where you are having the vector error? I've just converted the project to 4.18 and everything works as they should. Also, blendable is now under Details panel > Post Process Materials > Array(Add element) > Asset Reference.
                FREE Color LUT Collection
                FREE Physics Driven Spacecraft Project
                GTA Style Vehicle Interaction
                Dynamic DoF(Depth of Field)
                Camera Crossfade
                Portfolio

                Comment


                  #9
                  Blakeanator may not be the simplest solution but as a workaround you could build a Lerp hierarchy in a material to crossfade any number of video.
                  FREE Color LUT Collection
                  FREE Physics Driven Spacecraft Project
                  GTA Style Vehicle Interaction
                  Dynamic DoF(Depth of Field)
                  Camera Crossfade
                  Portfolio

                  Comment

                  Working...
                  X