Menithal / ActionCameraPlugin

Experimental Dynamic Camera plugin for LivVR
Apache License 2.0
9 stars 3 forks source link

# Menithal's Dynamic Action Camera

This allows you LIV Avatars to express your self via some gesture and camera automation to avoid having to have a separate person or a game pad strapped to control specifically the camera.

See License.

Installation

Make sure you are running LIV SDK2 build (1.3.5+) Install by moving the ActionCamera.dll from Releases into your Liv Plugins CameraBehaviours directory at

%HOMEPATH%/Documents/Liv/Plugins/CameraBehaviours/

Use

When in Liv, Set an Avatar Camera, and make sure to select Plugin > "Menithal' Action Camera" to start using the plugin. Closing Liv now wil update your settings file. You can then create and configure multiple profiles with different configurations in Liv and modifying the json file. See Configuration for more detail.

Available Cameras

Controlling Cameras and Gestures

You direct the camera direction with head movement (for now) with your controllers behaving as keylocks. You must be mostly pointing forwards with your controllers for commands to work.

Most of the swapping of the camera directions are done by pointing forwards (where your body is pointing towards), while you turn your head. Your Head velocity (as of now) controls the camera after.

Passively this works best with games where you are doing alot of aiming, dodging or ducking (PistolWhip / H3 ) into cover than games where you can mostly stand still (like BeatSaber): It can work, in Beatsaber, but you have to really exaggerate your head movements to get the camera to work in your favor, but its all about practice.

When in a front side view, or a shoulder view, turning your head alternates between sides.

Please note that having a visible viewport in your hud may be considered cheating as technically second view port gives you a small edge in some multiplayer games that support LIV. The intention of this is for streaming; not for being a naughty cheater.

Configuring

Configurable after setting as a plugin for a camera, and closing Liv Composer AND App. It is a bit fiddly, but with sufficient configuration you can do quite a bit.

You can find the settings at %LOCALAPPDATA%/Liv/App/<LivVersion>.json

Default Setting Example:

[...]
"pluginCameraBehaviourSettings": {
    "selectedPluginCameraBehaviourID": "ActionCamera",
    "pluginSettings": {
        "ActionCamera": {
            "cameraSwapTimeLock": 8,
            "cameraPositionTimeLock": 0.8,
            "reverseFBT": false,
            "reverseShoulder": false,
            "controlMovementThreshold": 3,
            "forwardVerticalOffset": 0,
            "forwardHorizontalOffset": 5,
            "forwardDistance": 10,

            "removeAvatarInsteadOfHead": true,
            "disableTopCamera": true,
            "disableFBTCamera": false,
            "disableFPSCamera": true,
            "disableGunCamera": true,
            "inBetweenCameraEnabled": true,
            "cameraVerticalLock": false,
            "cameraDefaultFov": 80.0,

            "cameraShoulderPositioningTime": 0.9,
            "cameraShoulderdistance": 1.8,
            "cameraShoulderAngle": 35,
            "cameraShoulderSensitivity": 2,

            "cameraBodyPositioningTime": 2,
            "cameraBodyLookAtForward": 1,
            "cameraBodyDistance": 1.4,
            "cameraBodyAngle": 45,
            "cameraBodySensitivity": 2,

            "averageHandsWithHead": true,
            "useDominantHand": false,
            "rightHandDominant": true,
            "disableGunCamera": true,
            "cameraGunFov": 80.0,
            "cameraGunZoom": 0.25,
            "cameraGunHeadDistanceTrigger": 0.25,
            "cameraMaxTwoHandedDistance": 0.4,
            "cameraMinTwoHandedDistance": 0.08
        }
    }
}
[...]

Configurables:

By default the setting are configured for CQC Pistol Combat (ala pistolwhip) but playing around with the values allows you to create entries for other games, such as Beat Saber or Audica.

Example "Dancing/Sabering" Profile

[...]
"pluginCameraBehaviourSettings": {
    "selectedPluginCameraBehaviourID": "ActionCamera",
    "pluginSettings": {
        "ActionCamera": {
            "shoulderCameraPositioningTime": 2,
            "bodyCameraPositioningTime": 2,
            "cameraSwapTimeLock": 10,
            "cameraPositionTimeLock": 3,
            "reverseFBT": false,
            "reverseShoulder": false,
            "controlMovementThreshold": 1,
            "forwardVerticalOffset": 0,
            "forwardHorizontalOffset": 5,
            "forwardDistance": 10,
            "removeAvatarInsteadOfHead": true,
            "disableGunCamera": true,
            "disableTopCamera": true,
            "disableFBTCamera": false,
            "disableFPSCamera": true,
            "inBetweenCameraEnabled": false,
            "cameraVerticalLock": true,
            "cameraDefaultFov": 90.0,

            "cameraShoulderPositioningTime": 1.8,
            "cameraShoulderDistance": 2.6,
            "cameraShoulderAngle": 35,
            "cameraShoulderSensitivity": 1,
            "cameraBodyPositioningTime": 4,
            "cameraBodyLookAtForward": 1.6,
            "cameraBodyDistance": 3,
            "cameraBodyAngle": 45,
            "cameraBodySensitivity": 1,

            "averageHandsWithHead": true,
            "useDominantHand": false,
            "rightHandDominant": true,

            "cameraGunFov": 90,
            "cameraGunZoom": 0.25,
            "cameraGunHeadDistanceTrigger": 0.25,
            "cameraMaxTwoHandedDistance": 0.4,
            "cameraMinTwoHandedDistance": 0.08
        }
    }
}
[...]

Not yet in use

These have not yet been set to be used, but will be related to any other gestures with the controllers averageHandsWithHead useDominantHand

Additionally, there might be later some behavior chaining, so that transitions between different types of cameras would be smoother, but this is underworks.

Contributing, Developing and Building

Note if building using DEBUG, a textfile will be output to %HOMEPATH%/Documents/Liv/Output and written into with debug messages.

When building a release, make sure NOT to have the DEBUG flag set, otherwise the debug file will be filled to brim. We do not want to flood end users disks with logs.

Bug Reports

You can comments, suggestions, bug reports to me over Discord Malactus#3957 or just leave them as Github Issues