Because of how quickly the implementation of position tracking was made, it has an awful user interface. We're kinda relying on developers to create a good one for us.

To use the tracker tracked experience, select the externally tracked option in the app.
When you connect to a modded game, tapping on the screen will cycle through the different trackers.

If the game has SteamVR set as its tracking system in the configs, you'll have 16 different tracked objects to choose from, always. the first 3 are usually the headset, and controllers, then you'll have your tracked non-controller objects.

If the game has UnityXR set as its tracking system in the configs, you'll have 6 + (number of base stations) + (number of trackers) objects to choose from. Each tap will set you to a different tracked object, you'll cycle between headset, 3 untracked objects that are meant to be left, right and "center" eye, the 2 controllers, the base stations, then get to your trackers.

You want to ensure that the tracker offsets are set correctly in the viewrcamera.cfg file as well. You can find out by experimenting with the numbers.

First off, you want to enable the setting in viewrcamera.cfg. Open up that file in the game you wish to record and set allowrecording to true. You can see our lovely warning in the file as well.

Don't forget to also match the tracker offsets and field of view in viewrcamera.cfg as well.

Now you want to boot up your game and connect ViewR.

Once you have calibration setup, be it with ARCore or with SteamVR tracking. Pressing E on your keyboard will start recording. You can tell if it's started recording by checking the game folder for a new folder with something like the current unix epoch time in millis.

In game, the user may experience a performance hit. This is caused by us writing a huge amount of data to the hard drive. This problem is sometimes remedied by moving the game to an SSD (we'll fix this before actual release). To finish recording, press E again, this is the part which may or may not crash your game. Once we're done, your folder will be filled with jpegs.

Now, click and drag the folder over ReNumber.exe. Windows will pop up with a warning, accept the warning to run the app. If you don't trust us, you can download the source, read it, and compile it yourself. ReNumber will generate a text file in your folder called input.txt.

Using the ViewR mod installer

To mod ViewR into a Unity game that we haven't added to our games list yet, click the add button and find your game, and click OK.

You should be able to see your game added to the list.

Then click patch and wait for the matrix to finish loading.

The installer will have placed a default viewrcamera.cfg and viewrplugin.cfg.

Setting Configs

Once IPA is installed, also download and place PressPToPause in the plugins folder. We'll use this to explore the Unity scene.

Once all the files are in the required places, run the game in --verbose mode.

This should launch the game with a console window (which is helpful but not necessary).

When the game has launched and VR is working, click on the game window and press x on your keyboard to dump the hierarchy to a file.

In the file, locate where the headset is. This is usually marked with <<<Camera.main>>> or the like.

Copy the names of the headset, and the play space GameObjects to the viewrcamera.cfg file. Also, find out which MonoBehaviours to add to the camerabehaviourfilter (this is mostly through trial and error, sometimes incredibly obvious).

Find out if the game uses SteamVR or UnityXR. This can usually be found by checking the attached scripts on the hmd object for scripts starting with SteamVR_*. UnityXR tends to be used for Unity games running unity 2017 and higher, you can find this at the top of the logs that are shown at the top of the --verbose console. Once you've figured that out, fill in the field in viewrplugin.cfg.

Find out if the game initializes VR later than when the game starts. This can usually be told from whether or not there's a VR hmd/play space when the first loaded scene is dumped.

Once these settings have been set. ViewR should work with the game you've modded. (And ayy, it worked first try).

(I don't know if budget cuts actually got modded correctly, at this point I'm too tired to actually test it properly with a headset. I'll come back and fix this later if you guys tell me it's actually broken.)

Editor Params

Target
The headset transform, setting this lets users calibrate based on headset location. If both Target and Origin are set, calibration will be based on the ground directly below the headset.

Origin
The play space transform, setting this lets users calibrate based on play space location. If both Target and Origin are set, calibration will be based on the ground directly below the headset.

Data Port
This is the port which ViewR App will communicate through. This port is usually communicated through the server search procedure. But if the server isn't found by by the server list on the app, use the manual connect button on the app and use the port shown here and see if it works.

Device Object
This is the object that will be instantiated on device connection. You can change what gets instantiated by default by setting an object here.

Events

DeviceConnectEvent
Triggered when a client connects to server.

DeviceDisconnectEvent
Triggered when a client disconnected from server.

For our tracked footage, we've used one of three rigs to attach Vive trackers to our cameras/phones/tablets. Which we'll provide information about here. If you have your own 3D printer or if you could find

Suction Cup

The suction cup will not hold the tracker in a single position, you'll need to modify the config file to match the way your tracker is attached/move the tracker to match how your config file has specified it's attached.

This will only work on things with a non porous back... things like the matte aluminium back of an iPad won't work

ViewR mod uses two config files in the root folder of to configure how it works. This will guide you through what each component does.

viewrcamera.cfg

This file configures how the modded camera behaves.

The camera cfg for superhot is shown below.

(float) x, y, z, rx, ry, rz

This is the physical offset of the tracker, if you have one attached to your device. These values will be ignored if you use an inside out tracking system for your device like ARCore.

(float) poslerp, rotlerp

These values determine how much smoothing is applied to your camera. Trackers tend to be jittery when recording moving footage, and thus, these values make the stream smoother to watch from the device. Setting these values to 0 will turn off any smoothing. Smaller values will result in a smoother but laggier stream.

(float)fov

Field of view of the recording camera. Changing this value will not change the field of view of the stream on your device.

(string[]) originname

The ViewR Interface object in Unity is designed to detect an origin if it's not specified explicitly by the game. The origin is the playspace which the player exists in. ViewR Interface will use the name here to Find() the object. This value is a comma separated list, and will cause ViewR Interface to search for those names in the specified order when it loses its origin.

(string[])targetname

The ViewR Interface object in Unity is designed to detect an target if it's not specified explicitly by the game. The target is the player's headset object. ViewR Interface will use the name here to Find() the object. This value is a comma separated list, and will cause ViewR Interface to search for those names in the specified order when it loses its target.

(string[])targetcamera

This is the object that holds the camera that ViewR will copy if it needs to copy a camera when a device connects. If the name is "Camera.main", ViewR will use the Camera.main object in Unity. This value is a comma separated list, and will cause ViewR Interface to search for those names in the specified order when a device connects.

(string[])camerabehaviourfilter

These are behaviors to be stripped off the ViewR Camera object when it's cloned from the target camera. A good example of this is the MonoBehaviour on SuperHot's main camera, that causes time to move when the headset moves. We really don't need that on the spectator cameras, so it's removed by this value on instantiation. This value is a comma separated list.

(int[]) cullinglayerstoadd

These are culling layers to add to the created camera. We do this because sometimes, culling layers need to be added. eg. ViewrAvatar puts the avatar on a layer that's not shown by the main camera so that the player can't see the avatar overlaying everything, but for the spectators, we need to re add the layer that was removed. This value is a comma separated list.

(int[]) cullinglayerstoremove

These are culling layers to be removed from the created camera. We do this because sometimes there's things we don't want the spectator to see. For example, in modded beatsaber, layer 4 needs be removed as it's the first person view objects, and we don't need 2 of everything. This value is a comma separated list.

(bool) allowhdr

This turns on the hdr setting on the camera (beatsaber needed this). In older versions of unity, turning this feature on may crash the game, so only allow hdr on things that actually need it.

(bool) regeneratecamera

Some games like superhot will use different cameras with different behaviors and effects on different levels. Setting this value to true will force ViewR to reconfigure all of its connected device's cameras on each new level event from Unity.

(bool) allowrecording

Binds "e" on your keyboard to start recording. This value is false by default because the feature is still a work in progress, poorly implemented, and causes a heavy performance hit under certain circumstances. Also, some games may have bound "e" to do something else. However, if you really really want to use it, set it to true and find out how to use it here.

viewrmod.cfg

This file configures how the mod is loaded.

The mod cfg for superhot is shown below.

(int) leveltoloadon

The level to load ViewR mod on... pretty straight forward. Setting it to -1 will load the mod immediately on game start, ignoring the actual level.

(string) trackingtype

Type of tracking used by the game. The values can be "steamvr", "unityxr", or "none".

Avatar Settings

These are settings used by the ViewRAvatar, find out more about it here.

(string[]) avatarrighthand

Name of the GameObject that represents right hand of the player, This value is a comma separated list.

(string[])avatarlefthand

Name of the GameObject that represents left hand of the player, This value is a comma separated list.

(string[])avatarhead

Name of the GameObject that represents left head of the player, This value is a comma separated list.

(string[])avatarspace

Name of the GameObject that represents play space, This value is a comma separated list.

(int)avatarlayer

Layer number to remove from camera and to set the avatar to. This prevents the avatar from being visible to the player in VR.

(string[])avatarhmdcamera

Name of the camera to remove the culling layer from. If the name is "Camera.main", ViewR will use the Camera.main object in Unity. This value is a comma separated list, and will cause ViewR Interface to search for those names in the specified order when a device connects.