CREW Network Framework - CREW-Brussels/EXP GitHub Wiki
CREW Network Framework
CREW Network Framework is an Unreal Engine plugin that creates a communication between different Unreal Applications.
It allows:
- Multicasting and unicasting between Unreal applications and projects
- Broadcasting pose replication over network
- Client to client commands system
The advantages of this system are:
- it works on Embbed apps on headsets for example
- it eases the multiplayer set up for a multiple headseats VR experience
- it doesn't saturate the network with broadcasted packages
Requirements:
- Unreal Engine 5.3
- Download the plugin's folder in the Plugins folder of your project here or if your project is on git, add this command in the Plugins folder of your project:
git add submodule https://github.com/CREW-Brussels/CREWNetworkFramework.git
How it works
As soon as the plugin is in the project, the plugin is implemented in the Engine Subsystem and it will create a network discovery of other instances:
- Unreal applications and projects can receive and send their application name: applications with the same name will communicate the messages with each other. You can edit it in project settings > Plugins > CREW Network > Application Name
If autoconnect is ticked, it will automatically connect to apps with the same name on the same network.
Use case #1: Broadcast Pose Replication over Network
Directly with an Animation Blueprint, the Replicate Pose node allows live replication of an animation, wether it uses an animation from a MOCAP suit or any other type of animation, at the only condition that the streamed Skeleton Mesh and the receiver **posses the same Skeleton and have no level of details (Number of LODs must be set at 1).
Animation Blueprint for the sender
- Create an Animation Blueprint with your animation sequence or a live animation, and the node called Replicate Pose. Here, we called it ABP_Rebroadcaster
Additional note: the animation must be already retargeted and ready to use, documentation on the subject is dependent on what MOCAP or animation system you use, but you may have to modify a few things in the ABP or in some of the node details to have your animation working.
- Choose a stream name, here we choose "performer" but it could be anything else.
- Choose your fps, 10 or 20 is good
- Tick streaming
- Create a new Blueprint Actor:
-
Add a new component -> Skeleton mesh component
-
Add the ABP you've previously created in the Animation details, and add the mesh.
-
In details > optimisation, make sure the Visibility Based Anim Tick Option is on Always Tick Pose and Refresh Bones. This will allow the animation data to be sent, even if the editor, om play mode, is not targeted to the animation or if it's hidden in game.
-
In the event graph, create the following nodes. These nodes make sure that only the server is broadcasting the pose, to not multiply the same replication.
-
This Blueprint will send the animation once put in a scene.
- Your animation is ready to be broadcasted over multiple UE applications! Drag and drop the BP you've just created in your scene to broadcast your animation.
Animation Blueprint for the receiver
- Create a new Animation Blueprint. Add the node Replicate Pose
- On this node, type in the same stream name as the sender and make sure Streaming is NOT ticked
- Create a new Blueprint Actor:
- Add a new component -> Skeleton mesh component
- Add the ABP you've just created in the Animation details, and add the mesh.
- This Blueprint will receive the animation.
- Drag and drop it in your scene to have a skeleton mesh ready to receive the broadcasted animation!
Use case #2: Multicast a list of commands
With the command system of this plugin, any client can send a command that will be visible to any client on the same application name. To do that, you will use one of the nodes send command.
For example, if you want to share inputs from the controller of a client, you can send the command over the network. It can be a selection of variable. In the player's BP event graph, you will send commands from different input actions.
Gameplay Tags are a list of user defined tags, that are easy to edit and add. They can then be referenced at different points in the project. It's similar to Enum, but without a specific type.