Blog | Overlaying Rendered Video from Virtual CRASH on top of Live-Action Video

Updated: October 6, 2020

Overlaying rendered video from Virtual CRASH onto a live-action video backdrop can make for some amazing visuals. In this post, we will learn the workflow for this process.


Simple Overlay using Shapes

In Virtual CRASH, video files in avi format can be used as texture maps. Like any texture map, the avi file can be loaded by dragging and dropping the file into any closed shape (polyline, circle, rectangle, and ellipse) or on the top or sides of an extruded object.

In our example below, we start with a scene created from an orthomosaic and point cloud which we used to build the surface mesh. The orthomosaic is used to colorize the terrain mesh. We place an image from the first frame of our avi file on top of the orthomosaic and scale it using the Easy Alignment Tool.

With the image in place, we now have a way to size our avi file. Next, we draw a filled rectangle with size, position, and orientation set to match the single scaled frame from the previous step.

Next, drag and drop the avi file onto the shape. Press “yes” when asked “Do you want to replace current cap texture?”. Note, you can also select the avi file by left-clicking on the shape, then in the “texture-cap” menu, left-click on “file”. In the file selection window you will need to type “*.avi” to see avi files in your directory. Next, set the u size and v size values in the “texture-cap” menu to match the length and width values in the “misc” menu for the shape. Set “map method” to local. In most cases, you will likely want to ensure the shape fill color is white and that the line color is transparent. Remember, textures are projected onto terrain mesh objects using the “receive projection” option of the mesh. This means your video can be projected onto any terrain, no matter how complex its shape.

You will see your video play as the simulation runs. Of course, you will need to set the initial positions of your simulated or animation objects to overlap with the video.

Stabilization

We highly recommend, if you’re overlaying vehicles onto an drone-based overhead avi texture, to first stabilize the avi file in Adobe After effects, especially for lengthy simulations or animations where the pixel drift over time can be perceived relative to the Virtual CRASH rendered vehicles or rendered tire marks. Pixel drift in aerial videos is generally caused by the drone’s slight lateral and vertical drift as it attempts to hold a stationary position in space. In this scene, we use the Tracker feature in Adobe After Effects to automatically change our drone video’s position, orientation, and scale so as to lock two of our physical ground control point targets to the same pixel position on the screen.

Here we see the ground control point target drift by about 3 pixels (approximately 6 inches) due to the drone’s slight lateral and vertical drift during flight.

Below we see the effect of using After Effect’s stabilization feature. Notice this feature has eliminated the pixel drift effect.

Below we see the final result:

Simple Backdrop with Extrusions

Extrusions can be textured in a similar manner as shape objects. Simply go to the extrusion’s “texture-coat” menu and drag and drop your avi file on top of the extrusion’s sides or use the “file” option. Note, you can also texture the top of an extrusion using the “texture-cap” menu. Here we see our avi file mapped to our extruded line object.

In this case, because we want to show our avi file playing along with the rendered simulation, we need to elevate the terrain object and vehicles well above the x-y plane since any portion of the extrusion beneath the x-y plane will be hidden.

 

Immersive Overlay in Perspective

For scenarios where you want to give the illusion of embedding rendered simulated or animated objects within live video, such as in the example video below, a more complex workflow is required: click on button below to learn more about this workflow.