This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Getting Started

These guides explain the minimal setup steps and usage instructions for VirtualLens2.

1 - Setup Guide

This guide explains the steps to integrate VirtualLens2 into your avatar.

Requirement Check

Before setting up VirtualLens2, please ensure that the target avatar meets the following requirements:

  • It is set up using VRCSDK 3.7.0 or later.
  • Modular Avatar 1.8.0 or later is imported into the project.
  • Expression Parameters have a margin of at least 8 bits.

Import Modular Avatar

Refer to the Modular Avatar documentation and import Modular Avatar into your project. If it’s already imported, make sure the version is 1.8.0 or later.

Importing Modular Avatar

Import Unitypackage File

Import the downloaded package (VirtualLens2_v2.x.x.unitypackage) into your project.

Import Unitypackage file

Running Setup Helper

Select the avatar you want to set up, right-click, and choose “VirtualLens2” → “Non-Destructive Setup”. The setup helper will launch, so review the following settings and then press the “Apply” button.

Avatar The avatar you want to set up.
Target Hand The hand that will hold the camera.
Settings Template If set, it reads the configuration information from the VirtualLens Settings Prefab. (Optional)
Use Custom Model Check this if you want to use a camera model other than the default.
Custom Model Prefab Specify the Prefab for the camera model you want to place instead of the default model. If not set, the model placement will be skipped.
Keep Root Transform Disables the automatic Transform adjustment feature when placing a custom model.

Running Setup Helper

Placing the Camera Model

If the automatic placement of a camera model other than the default doesn’t work, you need to place the model manually. After adding the model to the scene, adjust its position and orientation. Move it to be a child of the bone you want the camera to follow. Additionally, you’ll need to enter information about the model into the VirtualLens Settings component. Refer to the image below and set the information below “Camera Object.”

Placing the Camera Model

Uploading the Avatar

Now the setup of VirtualLens2 is complete. Upload your avatar and try using it.

2 - Shooting Guide

This guide explains the steps for taking photos using VirtualLens2.

Basic Usage

Preparing the Built-in Camera

From the menu, go to “Camera” → “Photo Camera” (or “Stream Camera” for video recording) and take out the built-in VRChat camera. If the focus feature is enabled, disable it beforehand to prevent interference.

Launching VirtualLens

Open the action menu and go to “Expressions” → “VirtualLens2” → “Enable” to launch VirtualLens2. While it’s active, the image seen in the built-in camera will be overridden with the one captured by VirtualLens. In this state, you can take and save photos captured by VirtualLens by triggering the shutter on the standard camera.

3 - Upgrade Guide

This guide explains the update procedure for upgrading VirtualLens2 to a newer version.

Basic Steps

Importing the Unitypackage File

Import the Unitypackage file of the latest version that you downloaded (VirtualLens2_v2.x.x.unitypackage) to overwrite.

Importing the Unitypackage File

Reapplying Settings (For Destructive Setup Only)

Press the “Apply” button in the VirtualLens Settings component that was generated during the initial setup to update the data within your avatar.

Reapplying Settings

Version-Specific Steps

Updates from v2.10.4 or Earlier

Starting with VirtualLens2 v2.11.0, VRCSDK 3.7.0 or later is required. Additionally, this version of VRCSDK only supports Unity 2022. If your project is currently using Unity 2019, an upgrade to Unity 2022 will be necessary.

Updates from v2.9.9 or Earlier

Starting from VirtualLens2 v2.10.0, it is recommended to use the non-destructive setup. If you set up VirtualLens2 with a version earlier than v2.9.9, you can migrate to the non-destructive setup by importing Modular Avatar (version 1.8.0 or later) into your project and pressing the “Migrate as a Non-destructive Module” button in the VirtualLens Settings component.

Once you have migrated to the non-destructive setup, you won’t need to reapply settings for future updates.

Migrating to non-destructive setup

Updates from v2.8.5 or Earlier

Starting from VirtualLens2 v2.9.0, default settings are provided through a prefab (VirtualLens2/Prefabs/DefaultSettings.prefab). The settings objects generated automatically by the setup helper in versions earlier than v2.8.5 are not instances of this prefab. To ensure that parameter adjustments in future updates are correctly reflected, it is recommended to replace the current settings objects with instances of the prefab.

To replace the settings objects, press the “Replace by Prefab Instance” button at the bottom of the VirtualLens Settings component to generate instances of the prefab with the current values, as needed.