Convert VRCLens to a drag-n-drop VRCFury prefab

VRCLens directly modifies your avatar’s FX controller, menu, and parameters, making it hard to share or have different versions of your avatar with/without VRCLens.

As a VRCFury prefab, VRCLens can be set up once, then drag-n-drop’d to different avatar versions, and then be easily deleted :D

20-vrcfury-prefab.png

Last updated:

Requirements

How to do it

  1. In your Project files, create a new folder under Assets to store files for the VRCFury prefab. Or use an existing folder. I just made a new folder called “VRCLens”

    00-create-folder.png

  2. Right-click inside the folder and Create a new VRChat > Expressions Parameters, VRChat > Expressions Menu, and Animator Controller. Give them good names like FX_VRCLens, Menu_VRCLens, Params_VRCLens

    1. Create the Expression Parameters and Menu

      01-2-create-params-menu.png

    2. Create the Animator Controller

      01-1-create-fx.png

    3. Double-click the parameters and delete the VRCEmote parameter with the Minus button, as it won’t be used. The other two parameters should be kept though.

      01-create-fx.png

      02-menu-delete-params.png

  3. Temporarily replace your avatar’s FX layer, Expressions Menu, and Expressions Parameters with the new files. Remember what the original FX layer, menu, and params were, as you’ll have to swap them back in at the end.

    03-replace-fx.png

    04-replace-menu-params.png

  4. Install VRCLens onto your avatar as usual using the VRCLens installer. Auto-arrange the camera positions, change your settings, then Apply VRCLens. VRCLens will then modify the new separate FX/menu/params instead of your original avatar’s

    03-1-apply-vrclens.png

  5. On the VRCLens object on your avatar, click Add Component and add a Full Controller (VRCFury)

    05-add-vrcfury-full-controller.png

  6. On the Full Controller, click the Plus button on the Controller, Menu, and Parameters, and place the new FX controller, menu, and parameters there

    06-vrcfury-full-controller.png

    1. Click the Advanced Options arrow. Under Path Rewrite Rules, type VRCLens under If animated path has this prefix. Leave the other settings alone. In newer VRCFury versions, there is an Auto-Fix button that will do the same thing, so you can just click that if you have it.

      07-vrcfury-path-rewrite.png

    2. Add Global Parameters and set it to * to make all VRCLens parameter global. This is optional in most cases though, and only necessary if you want to use VRCLens with OSC extensions or other mods.

      image.png

  7. Restore the original FX layer, Expressions Menu, and Expressions Parameters on your avatar. If you just wanted to add VRCLens to a single avatar and keep the animator separate, you can stop here and not make the prefab. Otherwise, move on…

    08-restore-fx.png

    09-restore-menu-params.png

  8. VRCLens puts 3 objects in your avatar armature: PickupC on the Head, PickupA on the Right Hand, and PickupB on the Left Hand. These need to be moved to the prefab.

    Note: The left and right hand objects will be swapped if you installed VRCLens on your left hand instead.

    1. Expand your Armature, find all 3 objects, and Ctrl + Click to select them all

      10-avatar-objects.png

    2. Drag them to be directly under the VRCLens object instead

      11-avatar-objects-move.png

  9. On PickupC, add an Armature Link (VRCFury) component.

    12-PickupC-armature-link.png

    1. Set Link To (Avatar) to Head

      13-PickupC-armature-link-head.png

    2. PickupC also has a Scale Constraint on your avatar neck that’s specific to this particular avatar. Otherwise, right click the VRCLens object, and select Create Empty to create a new object. Name it Neck .

      17-create-neck-object.png

    3. Click the new Neck object and add an Armature Link (VRCFury) component, with Link To (Avatar) set to Neck

      18-neck-armature-link.png

    4. Go back to PickupC, and drag the Neck object into the Scale Constraint source

      19-PickupC-constraint-neck.png