Skip to content
umiyuki edited this page Nov 23, 2018 · 4 revisions

Manual

What is UnityVRAnimationEditor?

In the play mode of the Unity editor, you can grab and move objects in the VR.

You can also operate the editor's animation window from within VR.

In other words, you can edit animation clips in VR.

It is a hacky implementation that forcibly uses the function of the Unity editor, so there are various usage restrictions so far. (You can not operate without entering play mode etc.)

It is supposed to use it when you want to create character animation within Unity.

Create an animated video with Timeline.

I think that you can also create character animation for games.

Required environment

OS supports Windows only

Unity 2018.3.0 or later version is required. Operation is confirmed with Unity 2018.3.0 b10.

VR headset is compatible with Vive. I am checking the operation with the regular version Vive. Since VRTK is used, it may work with Oculus Rift or Windows MR device, but I have not verified it. Please also install SteamVR on your PC.

When there is a FinalIK asset of the asset store, it is convenient for character animation editing. It is not inconvenient. Operation is confirmed with version 1.8.

Installation

Please clone or download the repository and open the project in Unity.

To enable Text Mesh Pro, import the resource by selecting Window → TextMeshPro → Import TMP Essential Resources from the menu.

Import TMP Essential Resources

If you have a FinalIK asset, download it from the asset store and import it. If you do not have FinalIK assets, please delete the Assets / UnityVRAnimationEditor / Scripts / WithFinalIK folder to avoid compile errors.

When you introduce FinalIK, you want to operate IK without going into play mode, such as Timeline preview, so please add the [ExecuteInEditmode] attribute to the IK component class to use. In order to operate the sample, please give it to three of FullBodyBipedIK, LookAtIK, FBBIKHeadEffector.

In the Unity editor, only the animation window should be in the child window. It is a little troublesome, but since it is not possible to distinguish which child window from the animation window or program, it becomes a necessary constraint. Since you animate the mouse and operate the animation window from VR, you can not operate normally if the animation window is not at the forefront or it is outside the screen during application execution.

Try the sample

Assets / UnityVRAnimationEditor / Sample / Scenes / SampleNode Open the scene and execute it in play mode.

Node Sample

Since the node handle (object displayed in wire frame) is touched with the VR controller, it is highlighted, so you can grasp the object while pulling the trigger in that state. Release the trigger and release the node.

The cube has "Node" tag, it can move, rotate, scale. Sphere has "FKNode" tag, it can not move, it can only rotate, expand and shrink.

Animation window and operation UI are displayed above the left hand controller.

Method of operation

Working with Nodes

Objects tagged with "Node" tag or "IKNode" tag can be operated in editor's play mode.

While holding the trigger with the VR controller touching the node handle (displayed in the wire frame), you can grab the object and move and rotate it.

You can zoom in and out by touching the touchpad while holding it and swiping left or right.

Objects with the "FKNode" tag can only be rotated, scaled.

own operation

If you hold down the grip on the controller (right or left) and move the controller back and forth, left and right, it will move itself in that direction.

Pressing the left and right sides of the touch pad while holding the grip rotates itself.

If you hold down the grip and touch the touchpad and swipe left or right you will zoom in and out.

When you want to move far away you can quickly move yourself to a giant.

Working with animation windows

When pointing the controller to the animation window or operation UI, the pointer is displayed.

UI

When the UI is in the way, you can switch display / non-display by pressing the menu button on the left controller.

If you pull the trigger when there is a pointer on the animation window, it behaves the same as mouse left click. You can also drag with trigger pulling. There is no right click. However, if you try to change an animation clip or change the number of samples from within VR, the application loses focus and stops. Please remove the headset and operate with such a mouse on the editor. Basically it is hard to try fancy editing in VR, so it is faster to do fine editing on the editor.

If you want to pan the animation window left and right, you can pan it by dragging to the left or right while holding down the menu button of the right controller instead of the trigger.

Operation Operation UI


Node movement restriction: If you turn it off, you can not move the node.


Node rotation restriction: When turned off, the node can not be rotated.


Node rotation restriction: When turned off, the node can not be rotated.


Pin: Turn on to fix the operation UI in place.


Play animation


Go forward one frame


Return 1 frame


Enter record mode


Proceed to the last keyframe


Return to the first key frame


Go to next keyframe


Return to previous keyframe


Key all items in the current frame


Delete all keys of the current frame


Copy: Same behavior as Ctrl + C


Paste: Same behavior as Ctrl + V


Undo: Same behavior as Ctrl + Z


Redo: Same behavior as Ctrl + Y

Touchpad operation

Some operations can be performed by pushing the side of the touchpad. It is faster than operating on the UI.

touchpad

Left controller

←: Return 1 frame

→: Go forward one frame

↑: Return to the first key frame

↓: Play animation

Right controller

←: Undo: Same behavior as Ctrl + Z

→: Redo: Same behavior as Ctrl + Y

↑: Paste: Same behavior as Ctrl + V

↓: Copy: Same behavior as Ctrl + C

# FinalIK collaboration

If you have FinalIK, you can pose the character using IK.

Assets / UnityVRAnimationEditor / Sample / Scenes / SampleUnityChan_FinalIK Please open the scene and enter play mode.

You can pose freely by operating the node handle corresponding to each part of Unity.

IK Sample

Animate Unity

Please select the unitychan game object in editor mode.

Press the Create button in the animation window to create animation clips. The animation controller is set to unitychan and the animation window is in edit state.

create animationclip

Open the animator window, create an empty state, and set it to the default state. (To prevent unintentional animation playback in play mode)

emptystate

You can edit Unity's animation clip by entering play mode and starting Record of animation window.

By default, the number of animation clip samples is 60 in seconds, but it is a good idea to set the animation clip to around 12, as frame movement is difficult.

Timeline sample

Actually animate Unity, and further animation clip of expression and animation clip of hand posing are combined and played by Timeline.

Assets / UnityVRAnimationEditor / Sample / Scenes / SampleUnityChan_FinalIK_Timeline Please open the scene.

Timeline Sample

Please open the Timeline window and select the "Timeline" object of the scene.

Press Timeline Window Play to play the Timeline.

Other settings

Player position save setting

By default, you save the position and size of the player in play mode and load it the next time you enter play mode.

If you want to change this behavior, you can turn on / off the player load save load function by turning on / off the Is Load and Is Save check of the SavePlayingTransform component of the VRAnimationEditor / Managers / SavePlayingTransform object of the scene.

Hiding node names

By default, the game object name of the node is displayed in play mode.

If you want to hide this, please uncheck the Is Show Node Name of the GenerateNodes component of the VRAnimationEditor / Managers / GenerateNodes object of the scene.

I want to display nodes only on specific objects

By default, nodes are displayed in all Node tag objects in the scene.

, If you set a specific game object in the Root Object of the GenerateNodes component of the VRAnimationEditor / Managers / GenerateNodes object of the scene, the node appears only in the child objects of that object.