Optitrack Character to send Mocap for Chorus effects for Dazzle

These are some comments from inside my BP code I need to add images etc and finish

In order to set up the Optitrack character to send mocap for chorus effects (multiple meshs e.g chorus line etc.)

1. Edit Class settings, Add the interface – ‘Skeleton Share Data’

2. On the list on the L hand Side open the Share Bone Function to edit it

3. We get a ref to the mesh and the data for each bone (e.g Bone Rotation, Bone Loc) that is required for the return node – this will send all this data to the interface

4. Add a ‘Skelton is Moving’ bool to Event Graph.

5. Copy the code below that checks every .5 sec to see if the bone is moving and sets the bool. Either the bone is moving or it ain’t! Depends on Optitrack.

6. In the ShareBone function add the boolean result to the last entry.

7. Now make a new BP class or copy my ‘Anim Transfer’ class. This is a placable BP with 2 x ‘poseable mesh’ components – these are skel meshes that can be animated -but not by anim BP. In order to set up the Optitrack character to send mocap for chorus effects (multiple meshs e.g chorus line etc.)

8. Edit Class settings, Add the interface – ‘Skeleton Share Data’

9. On the list on the L hand Side open the Share Bone Function to edit it

10. basically get a ref to the mesh and the data for each bone (e.g Bone Rotation, Bone Loc) that is required for the return node – this will send all this data to the interface

11. Add a ‘Skelton is Moving’ bool to Event Graph.

12. Copy the code below that checks every .5 sec to see if the bone is moving and sets the bool. Either the bone is moving or it ain’t! Depends on Optitrack.

 

13. In the ShareBone function add the boolean result to the last entry.

. . . . . . .
6.5 Add this character to the level

7. Now make a new BP class or copy my ‘Anim Transfer’ class. This is a placable BP with 2 x ‘poseable mesh’ components – these are skel meshes that can be animated -but not by anim BP. One mesh has the black material the other has the white outline mat.

7.5 LOL! Add an actor variable called ‘SkeletonAnimSource’ and make it instance editable. In the AnimTransfer BP in the level use the eydropper to select the source for where the animation is coming from – in this case the Optitrack charcter in the level.

8. In event graph after the event tick Rclick and add a ‘Share Bone’s message (this is from my ‘Skeleton Share Data’ BP interface.) You dont need to add the interface to the Class settings – were only getting the message here. Hook up the ‘SkeletonAnimSource’ to the ‘ShareBones’ Target. So we have a ‘data pipe’ from the Optitrack character to this BP, where we can get the messages.

9. Add a ‘Set Bone Location by Name’ and a ‘Set Bone Rotation’ for every bone connection so that all the incoming anim data is routed to every bone. Set all the Bone space to ‘use Component space.’ Connect both poseable meshes to the target of each ‘Set Bone Rotation’ etc. get the data from

10. Hook it all up

11.Add a ‘Set Visibility Node’ for the root and hook it to the ‘Skeleton is Moving’ Boolean  – this will automagically hide these meshes if the mocap performer has left the volume

12 Now we need to code up something to make the chorus go into a line etc and respond to user input. This is all done in a separate BP ‘ChorusHolder_OPTI_BP’ that makes an array of all actors tagged. So each ‘Anim Transfer’ needs to be tagged appropriately.