From 6c77985ccc257daef7e6667f28391c379891bc12 Mon Sep 17 00:00:00 2001 From: miwarnec Date: Wed, 30 Oct 2024 12:27:14 +0100 Subject: [PATCH] HYBRID NT BENCHMARK --- .../Examples/Benchmark/Prefabs/Monster.prefab | 30 +++++++++-------- .../Examples/Benchmark/Prefabs/Player.prefab | 30 +++++++++-------- .../Benchmark/Scenes/MirrorBenchmark.unity | 33 +++++++------------ .../Scripts/BenchmarkNetworkManager.cs | 1 + ProjectSettings/ProjectSettings.asset | 2 +- ProjectSettings/QualitySettings.asset | 29 +++++++++++----- 6 files changed, 66 insertions(+), 59 deletions(-) diff --git a/Assets/Mirror/Examples/Benchmark/Prefabs/Monster.prefab b/Assets/Mirror/Examples/Benchmark/Prefabs/Monster.prefab index 5af7fc2a0..bdddbfa56 100644 --- a/Assets/Mirror/Examples/Benchmark/Prefabs/Monster.prefab +++ b/Assets/Mirror/Examples/Benchmark/Prefabs/Monster.prefab @@ -31,6 +31,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -54,10 +55,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -82,6 +85,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &1078519278818213949 MonoBehaviour: m_ObjectHideFlags: 0 @@ -95,7 +99,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: sceneId: 0 - _assetId: 2156230198 + _assetId: 3853995854 serverOnly: 0 visibility: 0 hasSpawned: 0 @@ -108,30 +112,28 @@ MonoBehaviour: m_GameObject: {fileID: 449802645721213856} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Script: {fileID: 11500000, guid: 8f63ea2e505fd484193fb31c5c55ca73, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 0 syncMode: 0 syncInterval: 0 target: {fileID: 2697352357490696306} - syncPosition: 1 - syncRotation: 0 - syncScale: 0 + clientAuthority: 0 + bufferSizeLimit: 64 + sendRate: 30 onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 0 - interpolateScale: 0 - coordinateSpace: 0 - timelineOffset: 1 - showGizmos: 0 - showOverlay: 0 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} bufferResetMultiplier: 5 positionSensitivity: 0.01 rotationSensitivity: 0.01 scaleSensitivity: 0.01 + syncPosition: 1 + syncRotation: 0 + syncScale: 0 + disableSendingThisToClients: 0 + showGizmos: 0 + showOverlay: 0 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} --- !u!114 &8309506939003697769 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/Benchmark/Prefabs/Player.prefab b/Assets/Mirror/Examples/Benchmark/Prefabs/Player.prefab index 2e69a8f43..20a564f73 100644 --- a/Assets/Mirror/Examples/Benchmark/Prefabs/Player.prefab +++ b/Assets/Mirror/Examples/Benchmark/Prefabs/Player.prefab @@ -31,6 +31,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -54,10 +55,12 @@ MeshRenderer: m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 m_MotionVectors: 1 m_LightProbeUsage: 1 m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 + m_RayTraceProcedural: 0 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -82,6 +85,7 @@ MeshRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} --- !u!114 &1078519278818213949 MonoBehaviour: m_ObjectHideFlags: 0 @@ -95,7 +99,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: sceneId: 0 - _assetId: 91522075 + _assetId: 242745736 serverOnly: 0 visibility: 0 hasSpawned: 0 @@ -108,30 +112,28 @@ MonoBehaviour: m_GameObject: {fileID: 449802645721213856} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a553cb17010b2403e8523b558bffbc14, type: 3} + m_Script: {fileID: 11500000, guid: 8f63ea2e505fd484193fb31c5c55ca73, type: 3} m_Name: m_EditorClassIdentifier: syncDirection: 1 syncMode: 0 syncInterval: 0 target: {fileID: 2697352357490696306} - syncPosition: 1 - syncRotation: 0 - syncScale: 0 + clientAuthority: 0 + bufferSizeLimit: 64 + sendRate: 30 onlySyncOnChange: 1 - compressRotation: 1 - interpolatePosition: 1 - interpolateRotation: 0 - interpolateScale: 0 - coordinateSpace: 0 - timelineOffset: 0 - showGizmos: 1 - showOverlay: 1 - overlayColor: {r: 0, g: 0, b: 0, a: 0.5} bufferResetMultiplier: 5 positionSensitivity: 0.01 rotationSensitivity: 0.01 scaleSensitivity: 0.01 + syncPosition: 1 + syncRotation: 0 + syncScale: 0 + disableSendingThisToClients: 0 + showGizmos: 1 + showOverlay: 1 + overlayColor: {r: 0, g: 0, b: 0, a: 0.5} --- !u!114 &644305951047116972 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/Benchmark/Scenes/MirrorBenchmark.unity b/Assets/Mirror/Examples/Benchmark/Scenes/MirrorBenchmark.unity index 1640bd626..e00582b42 100644 --- a/Assets/Mirror/Examples/Benchmark/Scenes/MirrorBenchmark.unity +++ b/Assets/Mirror/Examples/Benchmark/Scenes/MirrorBenchmark.unity @@ -43,7 +43,7 @@ RenderSettings: --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -98,7 +98,8 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 4890085278179872738, guid: ea1632539e02f4273a77131bdc23f674, + type: 2} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -118,6 +119,8 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 m_NavMeshData: {fileID: 23800000, guid: 0bc607fa2e315482ebe98797e844e11f, type: 2} @@ -210,6 +213,7 @@ Transform: m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956} m_LocalPosition: {x: 0, y: 50, z: -80} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 0 @@ -255,6 +259,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 3 @@ -283,7 +288,6 @@ GameObject: - component: {fileID: 1282001520} - component: {fileID: 1282001519} - component: {fileID: 1282001521} - - component: {fileID: 1282001522} - component: {fileID: 1282001523} m_Layer: 0 m_Name: NetworkManager @@ -302,6 +306,7 @@ Transform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 @@ -337,8 +342,6 @@ MonoBehaviour: headlessStartMode: 1 editorAutoStart: 0 sendRate: 30 - autoStartServerBuild: 0 - autoConnectClientBuild: 0 offlineScene: onlineScene: offlineSceneLoadDelay: 0 @@ -371,7 +374,7 @@ MonoBehaviour: timeInterpolationGui: 1 spawnPrefab: {fileID: 449802645721213856, guid: 30b8f251d03d84284b70601e691d474f, type: 3} - spawnAmount: 1000 + spawnAmount: 10000 interleave: 1 --- !u!114 &1282001521 MonoBehaviour: @@ -402,22 +405,6 @@ MonoBehaviour: debugLog: 0 statisticsGUI: 0 statisticsLog: 0 ---- !u!114 &1282001522 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 39adc6e09d5544ed955a50ce8600355a, type: 3} - m_Name: - m_EditorClassIdentifier: - visRange: 30 - rebuildInterval: 1 - checkMethod: 0 - showSlider: 1 --- !u!114 &1282001523 MonoBehaviour: m_ObjectHideFlags: 0 @@ -522,6 +509,7 @@ Light: m_UseColorTemperature: 0 m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 m_ShadowRadius: 0 m_ShadowAngle: 0 --- !u!4 &2054208276 @@ -534,6 +522,7 @@ Transform: m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 diff --git a/Assets/Mirror/Examples/Benchmark/Scripts/BenchmarkNetworkManager.cs b/Assets/Mirror/Examples/Benchmark/Scripts/BenchmarkNetworkManager.cs index 786369fa4..7e667eb8e 100644 --- a/Assets/Mirror/Examples/Benchmark/Scripts/BenchmarkNetworkManager.cs +++ b/Assets/Mirror/Examples/Benchmark/Scripts/BenchmarkNetworkManager.cs @@ -45,6 +45,7 @@ void SpawnAll() public override void OnStartServer() { + Camera.main.enabled = false; base.OnStartServer(); SpawnAll(); } diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 04de49dd7..65417af7e 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -582,7 +582,7 @@ PlayerSettings: webGLPowerPreference: 2 scriptingDefineSymbols: Server: MIRROR;MIRROR_70_OR_NEWER;MIRROR_71_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER;MIRROR_81_OR_NEWER;MIRROR_82_OR_NEWER;MIRROR_83_OR_NEWER;MIRROR_84_OR_NEWER;MIRROR_85_OR_NEWER - Standalone: MIRROR;MIRROR_70_OR_NEWER;MIRROR_71_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER;MIRROR_81_OR_NEWER;MIRROR_82_OR_NEWER;MIRROR_83_OR_NEWER;MIRROR_84_OR_NEWER;MIRROR_85_OR_NEWER;MIRROR_86_OR_NEWER;MIRROR_89_OR_NEWER;MIRROR_90_OR_NEWER;EDGEGAP_PLUGIN_SERVERS + Standalone: MIRROR;MIRROR_70_OR_NEWER;MIRROR_71_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER;MIRROR_81_OR_NEWER;MIRROR_82_OR_NEWER;MIRROR_83_OR_NEWER;MIRROR_84_OR_NEWER;MIRROR_85_OR_NEWER;MIRROR_86_OR_NEWER;MIRROR_89_OR_NEWER;MIRROR_90_OR_NEWER;EDGEGAP_PLUGIN_SERVERS;MIRROR_93_OR_NEWER WebGL: MIRROR;MIRROR_70_OR_NEWER;MIRROR_71_OR_NEWER;MIRROR_73_OR_NEWER;MIRROR_78_OR_NEWER;MIRROR_79_OR_NEWER;MIRROR_81_OR_NEWER;MIRROR_82_OR_NEWER;MIRROR_83_OR_NEWER;MIRROR_84_OR_NEWER;MIRROR_85_OR_NEWER additionalCompilerArguments: {} platformArchitecture: {} diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index 9b5845542..b77773ff9 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -4,7 +4,7 @@ QualitySettings: m_ObjectHideFlags: 0 serializedVersion: 5 - m_CurrentQuality: 5 + m_CurrentQuality: 0 m_QualitySettings: - serializedVersion: 2 name: Very Low @@ -18,7 +18,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 1 + skinWeights: 1 textureQuality: 1 anisotropicTextures: 0 antiAliasing: 0 @@ -27,6 +27,7 @@ QualitySettings: realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 + realtimeGICPUUsage: 25 lodBias: 0.3 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -40,6 +41,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Low @@ -53,7 +55,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 0 antiAliasing: 0 @@ -62,6 +64,7 @@ QualitySettings: realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 0 + realtimeGICPUUsage: 25 lodBias: 0.4 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -75,6 +78,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium @@ -88,7 +92,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -97,6 +101,7 @@ QualitySettings: realtimeReflectionProbes: 0 billboardsFaceCameraPosition: 0 vSyncCount: 1 + realtimeGICPUUsage: 25 lodBias: 0.7 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -110,6 +115,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: High @@ -123,7 +129,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -132,6 +138,7 @@ QualitySettings: realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 + realtimeGICPUUsage: 50 lodBias: 1 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -145,6 +152,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High @@ -158,7 +166,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 @@ -167,6 +175,7 @@ QualitySettings: realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 + realtimeGICPUUsage: 50 lodBias: 1.5 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -180,6 +189,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra @@ -193,7 +203,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 @@ -202,6 +212,7 @@ QualitySettings: realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 vSyncCount: 1 + realtimeGICPUUsage: 100 lodBias: 2 maximumLODLevel: 0 streamingMipmapsActive: 0 @@ -215,6 +226,7 @@ QualitySettings: asyncUploadBufferSize: 4 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: Android: 2 @@ -223,7 +235,8 @@ QualitySettings: PS4: 5 PSM: 5 PSP2: 2 - Standalone: 3 + Server: 0 + Standalone: 0 Tizen: 2 WebGL: 3 WiiU: 5