Skip to content
Snippets Groups Projects
Commit 5089261a authored by David Gilbert's avatar David Gilbert :bug:
Browse files

Merge branch 'feature/multiple_clusters' into 'dev/5.4'

feature(replication): Adds initial support for multiple clusters joining the same server.

See merge request !3
parents c4155879 022e9ff3
No related branches found
No related tags found
2 merge requests!4New attachment process and multiple clusters,!3feature(replication): Adds initial support for multiple clusters joining the same server.
Pipeline #484082 passed
File deleted
{
"nDisplay":
{
"description": "nDisplay configuration",
"version": "5.00",
"assetPath": "/RWTHVRCluster/Config/ExampleConfigs/NDC_CaveSmall.NDC_CaveSmall",
"misc":
{
"bFollowLocalPlayerCamera": false,
"bExitOnEsc": true,
"bOverrideViewportsFromExternalConfig": true,
"bOverrideTransformsFromExternalConfig": false
},
"scene":
{
"xforms":
{
"cave_origin":
{
"parentId": "",
"location":
{
"x": 0,
"y": 0,
"z": 10
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
"cave_center":
{
"parentId": "cave_origin",
"location":
{
"x": 0,
"y": 0,
"z": 100
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
"display_floor":
{
"parentId": "cave_center",
"location":
{
"x": 0,
"y": 0,
"z": -100
},
"rotation":
{
"pitch": -90,
"yaw": 0,
"roll": -0
}
},
"angle_left":
{
"parentId": "cave_center",
"location":
{
"x": 150,
"y": -150,
"z": 0
},
"rotation":
{
"pitch": -0,
"yaw": -89.999992370605469,
"roll": 0
}
},
"display_left":
{
"parentId": "angle_left",
"location":
{
"x": -1.52587890625e-05,
"y": -149.99996948242188,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
"angle_right":
{
"parentId": "cave_center",
"location":
{
"x": 150,
"y": 150,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 89.999992370605469,
"roll": -0
}
},
"display_right":
{
"parentId": "angle_right",
"location":
{
"x": 0,
"y": 150,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
}
},
"cameras":
{
"DefaultViewPoint":
{
"interpupillaryDistance": 6.4000000953674316,
"swapEyes": false,
"stereoOffset": "none",
"parentId": "",
"location":
{
"x": 0,
"y": 0,
"z": 50
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
}
},
"screens":
{
"scr_left":
{
"size":
{
"width": 300,
"height": 200
},
"parentId": "display_left",
"location":
{
"x": 0,
"y": 0,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
"scr_right":
{
"size":
{
"width": 300,
"height": 200
},
"parentId": "display_right",
"location":
{
"x": 0,
"y": 0,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
},
"scr_floor":
{
"size":
{
"width": 300,
"height": 300
},
"parentId": "display_floor",
"location":
{
"x": 0,
"y": 0,
"z": 0
},
"rotation":
{
"pitch": 0,
"yaw": 0,
"roll": 0
}
}
}
},
"cluster":
{
"primaryNode":
{
"id": "node_left",
"ports":
{
"ClusterSync": 41001,
"ClusterEventsJson": 41003,
"ClusterEventsBinary": 41004
}
},
"sync":
{
"renderSyncPolicy":
{
"type": "ethernet",
"parameters":
{
}
},
"inputSyncPolicy":
{
"type": "ReplicatePrimary",
"parameters":
{
}
}
},
"network":
{
"ConnectRetriesAmount": "300",
"ConnectRetryDelay": "1000",
"GameStartBarrierTimeout": "18000000",
"FrameStartBarrierTimeout": "1800000",
"FrameEndBarrierTimeout": "1800000",
"RenderSyncBarrierTimeout": "1800000"
},
"failover":
{
"failoverPolicy": "Disabled"
},
"nodes":
{
"node_left":
{
"host": "127.0.0.1",
"sound": true,
"fullScreen": false,
"renderHeadless": false,
"graphicsAdapter": -1,
"textureShare": false,
"window":
{
"x": 120,
"y": 680,
"w": 600,
"h": 400
},
"postprocess":
{
},
"viewports":
{
"vp_left":
{
"camera": "DefaultViewPoint",
"bufferRatio": 1,
"gPUIndex": -1,
"allowCrossGPUTransfer": false,
"isShared": false,
"overscan":
{
"bEnabled": false,
"mode": "percent",
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"oversize": true
},
"region":
{
"x": 0,
"y": 8,
"w": 600,
"h": 400
},
"projectionPolicy":
{
"type": "simple",
"parameters":
{
"screen": "scr_left"
}
}
}
},
"outputRemap":
{
"bEnable": false,
"dataSource": "mesh",
"staticMeshAsset": "",
"externalFile": ""
}
},
"node_right":
{
"host": "127.0.0.1",
"sound": false,
"fullScreen": false,
"renderHeadless": false,
"graphicsAdapter": -1,
"textureShare": false,
"window":
{
"x": 1320,
"y": 680,
"w": 600,
"h": 400
},
"postprocess":
{
},
"viewports":
{
"vp_right":
{
"camera": "DefaultViewPoint",
"bufferRatio": 1,
"gPUIndex": -1,
"allowCrossGPUTransfer": false,
"isShared": false,
"overscan":
{
"bEnabled": false,
"mode": "percent",
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"oversize": true
},
"region":
{
"x": 0,
"y": 0,
"w": 600,
"h": 400
},
"projectionPolicy":
{
"type": "simple",
"parameters":
{
"screen": "scr_right"
}
}
}
},
"outputRemap":
{
"bEnable": false,
"dataSource": "mesh",
"staticMeshAsset": "",
"externalFile": ""
}
},
"node_floor":
{
"host": "127.0.0.1",
"sound": false,
"fullScreen": false,
"renderHeadless": false,
"graphicsAdapter": -1,
"textureShare": false,
"window":
{
"x": 720,
"y": 480,
"w": 600,
"h": 600
},
"postprocess":
{
},
"viewports":
{
"vp_floor":
{
"camera": "DefaultViewPoint",
"bufferRatio": 1,
"gPUIndex": -1,
"allowCrossGPUTransfer": false,
"isShared": false,
"overscan":
{
"bEnabled": false,
"mode": "percent",
"left": 0,
"right": 0,
"top": 0,
"bottom": 0,
"oversize": true
},
"region":
{
"x": 0,
"y": 0,
"w": 600,
"h": 600
},
"projectionPolicy":
{
"type": "simple",
"parameters":
{
"screen": "scr_floor"
}
}
}
},
"outputRemap":
{
"bEnable": false,
"dataSource": "mesh",
"staticMeshAsset": "",
"externalFile": ""
}
}
}
},
"customParameters":
{
"SampleArg1": "SampleVal1",
"SampleArg2": "SampleVal2"
},
"diagnostics":
{
"simulateLag": false,
"minLagTime": 0.0099999997764825821,
"maxLagTime": 0.5
}
}
}
\ No newline at end of file
File added
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
{ {
"bFollowLocalPlayerCamera": false, "bFollowLocalPlayerCamera": false,
"bExitOnEsc": true, "bExitOnEsc": true,
"bOverrideViewportsFromExternalConfig": true "bOverrideViewportsFromExternalConfig": true,
"bOverrideTransformsFromExternalConfig": false
}, },
"scene": "scene":
{ {
......
No preview for this file type
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "CaveSetup.h" #include "CaveSetupComponent.h"
#include "LiveLinkPreset.h"
#include "Logging/StructuredLog.h" #include "Logging/StructuredLog.h"
#include "Utility/RWTHVRClusterUtilities.h" #include "Utility/RWTHVRClusterUtilities.h"
// Sets default values UCaveSetupComponent::UCaveSetupComponent()
ACaveSetup::ACaveSetup()
{ {
PrimaryActorTick.bCanEverTick = false; PrimaryComponentTick.bCanEverTick = false;
SetActorEnableCollision(false); SetIsReplicatedByDefault(false);
// Actor needs to replicate, as it is attached to the pawn on the server.
bReplicates = true;
} }
// Called when the game starts or when spawned void UCaveSetupComponent::BeginPlay()
void ACaveSetup::BeginPlay()
{ {
Super::BeginPlay(); Super::BeginPlay();
if (!URWTHVRClusterUtilities::IsRoomMountedMode()) if (!URWTHVRClusterUtilities::IsRoomMountedMode())
{ {
UE_LOGFMT(RWTHVRCluster, Display, "CaveSetup: Not in RoomMountedMode, doing nothing."); UE_LOGFMT(RWTHVRCluster, Display, "CaveSetup: Not in RoomMountedMode, doing nothing.");
...@@ -33,7 +29,7 @@ void ACaveSetup::BeginPlay() ...@@ -33,7 +29,7 @@ void ACaveSetup::BeginPlay()
if (const auto World = GetWorld()) if (const auto World = GetWorld())
{ {
const auto Actor = World->SpawnActor(ActorClass); const auto Actor = World->SpawnActor(ActorClass);
Actor->AttachToActor(this, FAttachmentTransformRules::SnapToTargetNotIncludingScale); Actor->AttachToActor(GetOwner(), FAttachmentTransformRules::SnapToTargetNotIncludingScale);
UE_LOGFMT(RWTHVRCluster, Display, "CaveSetup: Spawned Actor {Actor} on the Cave and attached it.", UE_LOGFMT(RWTHVRCluster, Display, "CaveSetup: Spawned Actor {Actor} on the Cave and attached it.",
Actor->GetName()); Actor->GetName());
} }
......
...@@ -3,23 +3,20 @@ ...@@ -3,23 +3,20 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "LiveLinkPreset.h"
#include "GameFramework/Actor.h" #include "CaveSetupComponent.generated.h"
#include "CaveSetup.generated.h"
class ULiveLinkPreset;
/**
* Simple Actor that needs to be added to the level which spawns Cave-related actors UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent),
* such as the CaveOverlay. hideCategories = (Rendering, Input, Actor, Base, Collision, Shape, Physics, HLOD))
* It attaches itself to the Primary Node's Pawn and then replicates on the server. class RWTHVRCLUSTER_API UCaveSetupComponent : public UActorComponent
*/
UCLASS(hideCategories = (Rendering, Input, Actor, Base, Collision, Shape, Physics, HLOD))
class RWTHVRCLUSTER_API ACaveSetup : public AActor
{ {
GENERATED_BODY() GENERATED_BODY()
public: public:
ACaveSetup(); // Sets default values for this component's properties
UCaveSetupComponent();
UPROPERTY(EditAnywhere) UPROPERTY(EditAnywhere)
TArray<UClass*> ActorsToSpawnOnCave; TArray<UClass*> ActorsToSpawnOnCave;
...@@ -28,6 +25,6 @@ public: ...@@ -28,6 +25,6 @@ public:
ULiveLinkPreset* LiveLinkPresetToApplyOnCave; ULiveLinkPreset* LiveLinkPresetToApplyOnCave;
protected: protected:
// Called when the game starts or when spawned // Called when the game starts
virtual void BeginPlay() override; virtual void BeginPlay() override;
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment