Realtime animations with AXIS Neuron - MotionTooler/MotionToolsWiki GitHub Wiki

This section explains how to setup Unity and AXIS Neuron, to use real-time animations captured with the Perception Neuron.

Note: Make sure you followed the tutorial on how to properly import a model into Unity, before starting with this tutorial.

Setting up AXIS Neuron

To provide Unity with the data generated by AXIS Neuron, we need to set the channel and format AXIS Neuron uses for broadcasting. To do so:

  • Start AXIS Neuron and open the settings menu, which can be found in the menubar under 'File/Settings'.
  • Navigate to the the broadcasting tab.
  • Make sure that:
    • BVH is selected as file format.
    • Binary is selected as format.
    • 'use old header' is not selected.
    • Make sure that you remember which protocol and port is used (standard TCP and 7001).

Broadcast settings

Setting up Unity

In Unity we need to add the 'NeuronGenericAnimatorInstance' script to our humanoid model. This can be done in numerous ways:

Preferred method

    • Open the Motion Tools window, which can be found in the menubar under 'Neuron/Motion Tools'.
    • select the model(s) you want to animate.
    • press the 'Add Generic Animator' button.

Motion Tools

Advanced methods

    • Select the model you want to animate.
    • In the inspector press the 'Add component' button.
    • Search for 'Neuron Generic Animator Instance' and select.

Search

    • Navigate to the script by yourself, it is located in 'Assets/Neuron/Scripts/GenericAnimator'.
    • Drag and drop the NeuronGenericAnimatorInstance.cs file onto your model in the scene/inspector/hierarchy.

Navigate

Connecting the dots

The last thing we have to do is make sure that the settings of our added script match the AXIS Neuron broadcast settings (i.e. the same port number and protocol are selected). Furthermore we need to check the 'Connect to Axis' option.

Inspector

Everything is set and ready to start recording with AXIS Neuron. Hit play to see your character mimicking the movements of the actor in the Perception Neuron suit!