unity
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| unity [2018/05/13 19:01] – 10.150.0.42 | unity [2018/05/16 17:20] (current) – 10.150.0.28 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Save new projects on the [[filer|Innovationlab Filer]] or on the [[git|ZHdK GIT Server]] in your project folder. | Save new projects on the [[filer|Innovationlab Filer]] or on the [[git|ZHdK GIT Server]] in your project folder. | ||
| - | ===== OptiTrack Unity Plugin ===== | + | |
| + | {{:: | ||
| + | |||
| + | ===== Import a Character ===== | ||
| + | |||
| + | - Drag and Drop FBX into project window | ||
| + | - Select Character in project window and go to Inspector > Rig > Animation Type set to Humanoid | ||
| + | |||
| + | [[Unity_ImportMayaAdvancedSkeleton|Import Advanced Sceleton Charater from Maya into Unity]] | ||
| + | |||
| + | |||
| + | ===== Install | ||
| A full documentation about using the OptiTrack Unity Plugin can be found the OptiTrack page: [[https:// | A full documentation about using the OptiTrack Unity Plugin can be found the OptiTrack page: [[https:// | ||
| - Download Plugin from Optitrack Website [[http:// | - Download Plugin from Optitrack Website [[http:// | ||
| - | - Install the Plugin in your unity project by doubleclicking the on the Plugin file | + | - Install the Plugin in your unity project by doubleclicking the on the Plugin file or go to Asset > Import Pacakge > Import Custom Package... and select the Plugin package. |
| + | {{:: | ||
| - | ===== Useful Shortcuts ===== | ||
| - | Q Pan | + | {{:: |
| - | | + | {{:: |
| - | E | + | |
| - | R | + | |
| - | F Focus on active selection | + | |
| - | Ctrl+Alt+F | + | |
| - | ===== Animation ===== | ||
| - | Open Window > Animation | + | ===== Add OptiTrack Client |
| - | Add Property | + | |
| - | Press record | + | |
| - | Change values to animate > a keyframe will be added | + | |
| - | Scrub in Timeline and change values again | + | |
| - | ===== Animator ===== | + | - Open Asset Folder OptiTrack/ |
| + | - Drag & Drop //Client - OptiTrack// to the scene Hierarchy | ||
| + | - Select //Client - OptiTrack// in Hierarchy and open Inspector window | ||
| + | - Check oarameters of the //Optitrack Streaming Client (Script)// Component | ||
| - | Use to create states. Each state has an animation. So there you can combine animations and connect it to conditions. | + | {{: |
| - | Window > Animator | + | |
| - | Different Layers can be used to make different animations at the same time. The lower the layer the higher priority it has. | + | === Parameters (Motive & Unity on same PC) === |
| + | Connection Type Multicast | ||
| + | Local Address | ||
| + | Server Address | ||
| + | Server Command Port 1510 | ||
| + | Server Data Port | ||
| + | Bone Naming Conv. Motive | ||
| + | |||
| + | Stream | ||
| - | ===== Import Character ===== | + | {{: |
| + | {{:: | ||
| + | |||
| + | === Parameters (Motive on Mocap PC & Unity on Beamer PC) === | ||
| - | Drag and Drop FBX into project window. | + | Connection Type Multicast |
| + | Local Address | ||
| + | Server Address | ||
| + | Server Command Port 1510 | ||
| + | Server Data Port | ||
| + | Bone Naming Conv. Motive | ||
| + | |||
| + | Stream capture data in motive to Local Address if Unity is not running on the same PC as Motive. | ||
| + | |||
| + | {{:: | ||
| + | {{:: | ||
| + | |||
| + | Check [[network|Network LAN IPs]] for other configurations. | ||
| - | Inspector > Rig > Animation Type set to Humanoid | ||
| - | [[Unity_ImportMayaAdvancedSkeleton|Import Advanced Sceleton Charater from Maya into Unity]] | + | ===== Add Motion Caputre Stream for a Rigid Body ===== |
| + | To add motion capture live data to a rigid body (e.g. camera), you need to add the //Optitrack Rigid Body// Script as a Component to your object: | ||
| + | |||
| + | - Open Asset Folder // | ||
| + | - Drag & Drop // | ||
| + | - Open Inspector of Object and show //Optitrack Rigid Body (Script)// Component | ||
| + | - Click on circle symbol next to Streaming Client and select //Client - OptiTrack// client of the scene | ||
| + | - Set //Rigid Body Id// to StreamingID of corresponding Motive Rigid Body | ||
| + | - Run Play Mode | ||
| + | {{: | ||
| + | {{: | ||
| - | ===== Stream Data from Optitrack Motive ===== | + | {{:: |
| - | Asset > Import Custom Package and select | + | {{: |
| + | {{: | ||
| + | {{: | ||
| - | Drag the OptitrackSkeletonAnimator to from the character by remove component | ||
| - | Add Client Prefab to scene | + | ===== Add Motion Caputre Stream for a Character ===== |
| - | Set Skeleton Name to Motive Character | + | Make sure you have a rigged character in unity (see [[unity|Import a Character from Maya]] or Import a Character from Mixamo) |
| + | |||
| + | To add motion capture live data to a Character/ | ||
| + | |||
| + | - Drag & Drop your character into Scene Hierarchy | ||
| + | - Open Asset Folder // | ||
| + | - Drag & Drop // | ||
| + | - Open Inspector of character and show //Optitrack Skeleton Animator (Script)// Component | ||
| + | - Click on circle symbol next to Streaming Client and select //Client - OptiTrack// client of the scene | ||
| + | - Click on circle symbol next to Destination Avatar and select Avatar of the character | ||
| + | - Set //Skeleton | ||
| + | - Run Play Mode | ||
| + | |||
| + | {{:: | ||
| + | {{: | ||
| + | |||
| + | {{:: | ||
| + | |||
| + | {{: | ||
| + | {{: | ||
| + | {{:: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | ===== Enable Background running ===== | ||
| Run in Background in File > Build Settings > Player Settings activate | Run in Background in File > Build Settings > Player Settings activate | ||
| + | |||
| + | ===== Useful Shortcuts ===== | ||
| + | |||
| + | Q Pan | ||
| + | W Move | ||
| + | E | ||
| + | R Scale | ||
| + | F Focus on active selection | ||
| + | Ctrl+Alt+F | ||
| + | |||
| + | |||
| + | ===== Animation ===== | ||
| + | |||
| + | - Open Window > Animation | ||
| + | - Add Property to Animate | ||
| + | - Press record | ||
| + | - Change values to animate > a keyframe will be added | ||
| + | - Scrub in Timeline and change values again | ||
| + | |||
| + | ===== Animator ===== | ||
| + | |||
| + | Use to create states. Each state has an animation. So there you can combine animations and connect it to conditions. | ||
| + | Window > Animator | ||
| + | |||
| + | Different Layers can be used to make different animations at the same time. The lower the layer the higher priority it has. | ||
unity.1526230902.txt.gz · Last modified: by 10.150.0.42
