AR pop-out effect

Content Creation 3D Scene Editing 3D Animation 2D Compositing 2D Animation Post Effects Virtual Camera Camera Tracking Augmented Reality Unreal

 

Hello Aximmetry.

I was wondering what would be the approach to achieve the following effect:

https://www.youtube.com/watch?v=ZtsySq1ZGIQ (0:12)

Mainly I am concerned about two questions:

1The picture frame as a 3d object shows an entire world behind it, yet it is masked in some way outside the borders of the frame. How would you achieve masking the interior of a certain element, such as this, or a hole in the ground or etc.

(I have tried using a simple worldPosition mask material, as suggested here

https://my.aximmetry.com/post/1331-augmented-reality-template---reveal-ar-o

but it masks out the entire object from a certain point in space).

2. In the case that i would like to use a 2D video on a physical screen, instead of the 3d element such as the frame, and make the air-plane pop out as an AR element right at the moment it has reached the surface of the screen in the video. What could be the best approach for doing so?


Thanks alot.

Andrei.


  

   Blackfish Studio

 
Profile Image
Eifert@Aximmetry
6/28/2022 12:32:26 PM
  -  

Hi,

There are several ways to do this. The methods listed here are the simplest I could think of. If they don't work with your setup, then there are probably other solutions that will better fit your needs.


Scenes rendered by Aximmetry (SE) in AR:

You create a window by hiding the rest of the scene. You do this by rendering a mask with the Camera module's mask feature.

To render the mask use [Common_Studio]:Shaders\VCam_Billboard.xshad shader and 4 big rectangles:

Place the 4 rectangles around the window:

Make sure that the rectangles are big enough that the camera will never see behind them. They don't have to end like the markings in the above screenshot. Or you can use any other model with the shader to function as a mask.

And connect the Camera module's Mask and Out output pins the following way to the AR camera compound:

The airplane model has to be in front of the rectangles in the world position when leaving the window.


Scenes rendered by Unreal (DE) in AR:

You create a window by hiding the rest of the scene. You do this with a material that is set to AlphaHoldout Blend Mode and set to Unlit Shading Model:

Then you apply the material around the window on meshes. The simplest way is to use 4 basic plane meshes around the window:

And place the 4 planes like this:

Make sure that the planes are big enough that the camera will never see behind them. They don't have to end like the markings in the above screenshot. Or you can use any other mesh with the material.

The airplane model has to be in front of the planes in the world position when leaving the window.

In Aximmetry you set up the Flow Editor as with any other Unreal AR scene:

Warmest regards,

 
Profile Image
Blackfish Studio
6/29/2022 10:37:32 AM
  -  

Thank you so much for the detailed explanation. 

You absolutely nailed it.

The UE solution works like a charm.

 
Profile Image
Blackfish Studio
8/2/2022 10:12:53 AM
  -  

Hi again. 

Iv tried doing the first version (where the Aximmetry is the renderer), and it works just fine, however, the mask plane leaves dark visble borders.

Is there anyway to make it completly trabsparant?