SONY

In the next step, let's install the Unreal Engine Plugin in Unreal Engine to try and make an actor move.

  1. Advance Preparations
  2. STEP 1: Install the Unreal Engine Plugin
  3. STEP 2: Receive and validate motion data
  4. STEP 3: Record motion data and create animation sequences
  5. Appendix) How to receive multiple data streams

Reference

Prepare to use the Unreal Engine Plugin using the following procedure.

  1. Connect the PC (Windows/Mac) on which Unreal Engine is installed to the local network.
  2. Access the Downloads page and download the latest version of the Unreal Engine Plugin.
  3. Connect the smartphone on which the mocopi app is installed to the local network.

The advance preparations are now complete.

  1. Start Unreal Engine.
    When using an existing Unreal Engine project, proceed to Step 3.
  2. Create a new Unreal Engine project, and close it.
  3. Restart Unreal Engine.
  4. Click [Edit]>[Plugins] in that order from the Unreal Editor menu bar.
    The Plugins window appears.
  5. Search for "mocopi", and confirm that "MocopiLiveLink" appears and is enabled (when installing to the Engine you need to enable it manually).

The Unreal Engine Plugin is now installed.

  1. Click [+ Source]>[Mocopi LiveLink] in that order and set the following item.
    1. Port Number
      Enter the port number to receive the data via UDP (initial value: 12351).
      Enter the same number as the port number specified in the mocopi app.
    2. Subject Name
      Check that it's "MocopiSkeleton".

      Reference

      You are able to modify subject name. When you modify it, you must also modify the "ABP_Mocopi" blueprint included in the plugin.

  2. Click [Create Mocopi Source] button.
    The "Mocopi LiveLink" is added in the source section.
  3. Operate the mocopi app to start the UDP transmission of the motion data.
    When the Unreal Engine receives the motion data, the subject name of the Mocopi LiveLink source you created and a green indicator will appear in the subject panel of the Live Link window.
  4. Open [All]>[Plugins]>[MocopiLiveLink Content] in that order in the left pane of the [Content Browser] tab/window.

    Reference

    1. If you don't see the [MocopiLiveLink Content] in the left pane of the [Content Browser] tab/window:
      Click [Settings] on the top right of the tab/window, and check [Show Plugin Content].
    2. If you installed the plugin to the Unreal Engine's Plugins folder:
      Click [Settings] and check [Show Engine Content]. Open [All]>[Engine]>[Plugins]>[MocopiLiveLink Content].
  5. Double-click the "ABP_Mocopi" blueprint to view the animation.
    Alternatively, drag and drop the "MocopiActor" blueprint into your scene.
    The actor animates on the scene according to motion data.

The motion data has now been received and validated.

Reference

When receiving motion data of multiple players (multiple mocopi apps), refer to How to receive multiple data streams.

You can record motion data (actor's movements) and create animation sequences, using the following procedure.

  1. During the reception of motion data, click [Window]>[Cinematics]>[Take Recorder] in that order from the Unreal Editor menu bar.
    The [Take Recorder] tab/window appears.
  2. Click [+ Source]>[From LiveLink]>[MocopiSkeleton] in that order.
    The "MocopiSkeleton" is added in the source section.
  3. Click the Stop button to stop the recording.
  4. Click the "Review Last Recording" icon on the top left.
    Your recording take appears in the [Sequencer] tab/window.
  5. Click the Play button.
    The recorded take is played back.
    If you wish to re-record, click the "Return" icon in the top left of the [Take Recorder] tab/window and repeat the procedure from step 3.
  6. Once you have a recording that you like, click the "Lock" icon in the top right of the [Sequencer] tab/window.
    The animation will be editable.
  7. Display the [Content Browser] tab/window, and drag and drop the "MocopiActor" blueprint under the recorded take in the [Sequencer] tab/window.
  8. Right click the [MocopiActor] in the [Sequencer] tab/window, and click "Bake Animation Sequence".
    The Create a New Animation Asset window appears.
  9. Select the destination folder, and enter a meaningful animation name in the "Animation Name" field.
  10. Click [OK].
    The Animation Sequence Options window appears.
  11. Click [Export To Animation Sequence] button.

You are done recording motion data and creating an animation sequence.

Reference

You can receive motion data from multiple mocopi apps using the following procedure.

Caution

A different port number for receiving via UDP must be specified for each mocopi app.

  1. Refer to Step 5 of the Advance Preparations for the state in which motion data can be sent using UDP from the mocopi app to be added.
  2. Refer to STEP 2: Procedures 1 to 4 of Receive and validate motion data to receive the motion data from the new Mocopi LiveLink source.
  3. Refer to STEP 2: Procedures 5 and 6 of Receive and validate motion data to open the [MocopiLiveLink Content] in the [Content Browser] tab/window.
  4. Right-click on the selected "ABP_Mocopi" and "MocopiActor" blueprints and click [Duplicate].
    Blueprints are duplicated.
  5. Double-click the duplicated "ABP_Mocopi" blueprint.
    The "ABP_Mocopi_x" window (x represents the number) appears.
  6. Double-click [AnimGraph].
    The "AnimGraph" tab appears.
  7. Select the Live Link subject name for the new mocopi source from the drop-down menu in the "LiveLink Pose" node.
    This is how you can tie data streams into your own blueprint.
  8. Click [Compile] button.
  9. Click the "Save" icon.
  10. Click [x] in the upper right corner of the screen.
  11. Double-click the duplicated "MocopiActor" blueprint.
    The "MocopiActor_x" window (x represents the number) appears.
  12. Click [SkeletalMesh] in the [Components] tab.
  13. Select the duplicated "ABP_Mocopi_x" blueprint (Step 4 above) from pulldown menu under the [Details tab]>[Animation]>[Anim Class].
  14. Click [Compile] button.
  15. Click the "Save" icon.
  16. Click [x] in the upper right corner of the screen.
  17. Drag and drop the duplicated "MocopiActor" blueprint into your scene.
    Multiple actors animate on the scene according to each motion data.