Skip to content
  • There are no suggestions because the search field is empty.

Masking in Varjo Base

Overview
Supported mask files
Loading a mask to Varjo Base
Modifying mask settings in Varjo Base
Masking examples

Overview

This feature allows you to control blend control masks in Varjo Base. Masks defined in Varjo Base work independently and can be used in any application.  

The ability to edit the mask settings in Varjo Base is available with version 4.15 onwards with a Varjo Base Pro license. Loading masks from Lab Tools to Varjo Base has been available since Varjo Base release version 4.11 with a Varjo Base Pro license.  

Note that the Varjo Base settings export does not include masking settings. 

Masking settings in Varjo Base


Supported mask files 

Masking in Varjo Base supports two types of mask files: 

  • .obj files with the following configurations: 
    • Single mesh included in the file 
    • No material required 
    • Triangulation recommended 
    • The origin of the 3D model will be at the defined anchor point.
    • One unit in the 3D file represents one meter in real life.
  • Masks that you have configured in Varjo Lab Tools. For more information about masking and how to configure masks in Lab Tools, see Varjo Lab Tools | Varjo for developers.  


Loading a mask to Varjo Base
 

The masks will be applied with the same settings that were defined when they were configured. 

  1. Navigate to Settings > Mixed reality > Mixed reality effects > Masking
  2. Select Add mask
  3. Select your file. 
  4. Select Open. 

Note that you need to close Varjo Lab Tools when using masks through Varjo Base.

After you have loaded a setup file to Varjo Base, start an application to see the applied masks. You can download Varjo’s own Masking Test Environment application to test the masks. 

You can disable the masks in settings to see only the virtual environment. This will not remove the file. 


Modifying mask settings in Varjo Base
 

You can adjust the following mask settings in Varjo Base after uploading a file. 

Mask content 

Select what type of content is shown in the masked area. See Masking examples for real-world use cases.

Real world 

Shows the real world in the masked area. The surrounding areas show virtual content. 

When used with chroma key, the chroma key is applied to the inside of the masked area. 

Virtual content 

Shows virtual content in the masked area. The surrounding areas show the real world. 

When used with chroma key, the chroma key is applied to the outside of the masked area. 

Real world and chroma key 

Show the real world without using chroma key in the masked area. The surrounding areas use chroma key to show virtual content.  

This mode requires chroma key to be enabled. Chroma key is automatically enabled when this mode is selected. 

Virtual content and real world with depth occlusion 

Show virtual content in the masked area. Depth occlusion is used to define when the real world is shown in the masked area. Surrounding areas show the real world. 

This mode requires depth occlusion to be enabled in Lab Tools or ‘Show hands’ to be enabled in Varjo Base. 

Real world with depth occlusion 

Use depth occlusion to define when the real world is shown in the masked area. The surrounding areas show virtual content. 

This mode requires depth occlusion to be enabled in Lab Tools or ‘Show hands’ to be enabled in Varjo Base. 

Anchor 

Select where the mask is anchored.  

Room origin 

The mask is fixed to a specific coordinate point in the room, anchored relative to the room origin. The room origin is set during room setup.  

Once placed, the mask always stays at its assigned coordinates. 

Varjo Marker 

The mask is anchored to the defined Varjo Marker.  

There are two options for ‘Marker tracking prediction’: Preserved and Dynamic

  • Use Preserved tracking for masks that do not move. This option saves marker information at the location where the marker was last seen. 
     
    Note that this type of tracking is equivalent to the ‘Static marker’. 
  • Use Dynamic for masks that are attached to moving objects. Additionally, you can adjust the timeout of how long a marker remains active without being seen. 

SteamVR™ tracker 

The mask is anchored to the defined SteamVR™ tracker. 

When using a SteamVR™ tracker, it is important to check that the Tracker role that is defined in Varjo Base matches the one defined in SteamVR. 

If needed, check the tracker role in SteamVR: 

  1. Open SteamVR. 
  2. Navigate to Settings > Controllers > Manage trackers

Offset 

The Offset settings allow you to adjust the position of the mask on the anchor. 

Position 

Position allows you to slightly move the mask using centimeters.  

Rotation 

Rotation allows you to adjust the mask's position in degrees. 

Scale 

Scale the mask bigger or smaller for a better fit. Note that using negative scale values mirrors the applied mask. 


Masking examples 

The following images show examples of how different types of masks are applied.  

In the images: 

Blue Virtual content
Grey Real world
Red Masked area
Green Chroma key

Mask type

Mask location 

Result 

Real world

Blend_Control_Restricted_Mask

Blend_Control_Restricted_Mask_Result

 

I want to create a scene with a real-world cockpit and virtual surroundings outside the cockpit windows. 

The mask is applied to the cockpit. 

As a result, the masked area shows the real world and the surrounding areas show virtual content. 


Mask type

Mask location 

Result 

Virtual content

Blend_Control_Extended_Mask

Blend_Control_Restricted_Mask_Result

 

I want to create a scene with a real-world cockpit and virtual surroundings outside the cockpit windows. 

The mask is applied to the outside of the cockpit. 

As a result, the masked area shows the real world and the surrounding areas show virtual content. 


Mask type Mask location Result
Real world Blend_Control_Restricted_Chroma Blend_Control_Restricted_Chroma_Result
 

I want to create a chroma-key scene with real people shown in a virtual environment, but I am unable to install the canvas on the ceiling. 

The mask is applied to the walls and to the floor. 
 
Chroma key is used inside the masked area.

 As a result, the masked area shows virtual content using chroma key. Additionally, the surrounding areas show virtual content. 

Mask type Mask location Result
Virtual content Blend_Control_Extended_Chroma Blend_Control_Extended_Chroma_Result
 

I want to create a chroma-key scene with real people shown in a virtual environment, but I am unable to install the canvas on the ceiling. 

The mask is applied to the ceiling. 
 
Chroma key is used outside the masked area.

As a result, the masked area shows virtual content and the surrounding areas show virtual content using chroma key. 

Mask type Mask location Result
Real world and chroma key Blend_Control_Reduced Blend_Control_Reduced_Result
 

I want to create a scene where a real-world screen is shown in a virtual environment without applying chroma keying to the green colors on the screen.

The mask is applied to the screen.

As a result, the screen is excluded from chroma keying, while the surrounding areas use chroma key to display virtual content, since the screen may contain green elements that must remain unaffected.


Mask type Mask location Result
Real world with depth occlusion Blend_Control_Depth_VST Blend_Control_Depth_VST_Result
 

I want to create a scene where only the people who are sitting inside the cockpit are shown in the virtual environment, while others in the room, such as a training instructor, are not visible.

A specific area of the room is masked so that real‑world objects or people can appear on top of the virtual content. 

Depth occlusion is also used to control how close real‑world objects must be before they become visible in the masked area.

As a result, the mask and surrounding areas show virtual content except for the real-world objects that are in the defined area.