From 8f3acd0900a96ca32ee3cbd03c081e8f275a2818 Mon Sep 17 00:00:00 2001 From: Szymon Lis Date: Fri, 16 Jun 2023 10:14:42 +0200 Subject: [PATCH] Changed CameraSensor to render with sync to sensor frequency --- .../Nishishinjuku/Volume Profile.asset | 160 +++++++++++++++++- .../AWSIM/Prefabs/Sensors/CameraSensor.prefab | 67 ++++++-- .../AutowareSimulation.unity | 141 +++++++++------ 3 files changed, 301 insertions(+), 67 deletions(-) diff --git a/Assets/AWSIM/Prefabs/Environments/Nishishinjuku/Volume Profile.asset b/Assets/AWSIM/Prefabs/Environments/Nishishinjuku/Volume Profile.asset index 5a6f1f379..7085ee084 100644 --- a/Assets/AWSIM/Prefabs/Environments/Nishishinjuku/Volume Profile.asset +++ b/Assets/AWSIM/Prefabs/Environments/Nishishinjuku/Volume Profile.asset @@ -19,7 +19,7 @@ MonoBehaviour: m_Value: 1 skyAmbientMode: m_OverrideState: 1 - m_Value: 1 + m_Value: 0 fogType: m_OverrideState: 0 m_Value: 0 @@ -160,6 +160,7 @@ MonoBehaviour: - {fileID: 8301423506126545333} - {fileID: -3768527809937896628} - {fileID: 6553751843573519693} + - {fileID: 5701176100694489548} --- !u!114 &1062231254598306812 MonoBehaviour: m_ObjectHideFlags: 3 @@ -209,6 +210,163 @@ MonoBehaviour: cascadeShadowBorder3: m_OverrideState: 0 m_Value: 0 +--- !u!114 &5701176100694489548 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2d08ce26990eb1a4a9177b860541e702, type: 3} + m_Name: Exposure + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + mode: + m_OverrideState: 1 + m_Value: 0 + meteringMode: + m_OverrideState: 0 + m_Value: 2 + luminanceSource: + m_OverrideState: 0 + m_Value: 1 + fixedExposure: + m_OverrideState: 1 + m_Value: 13 + compensation: + m_OverrideState: 1 + m_Value: -0.4 + limitMin: + m_OverrideState: 0 + m_Value: -1 + limitMax: + m_OverrideState: 0 + m_Value: 14 + curveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -10 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 20 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMinCurveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -12 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 18 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + limitMaxCurveMap: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: -10 + value: -8 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 20 + value: 22 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + adaptationMode: + m_OverrideState: 0 + m_Value: 1 + adaptationSpeedDarkToLight: + m_OverrideState: 0 + m_Value: 3 + min: 0.001 + adaptationSpeedLightToDark: + m_OverrideState: 0 + m_Value: 1 + min: 0.001 + weightTextureMask: + m_OverrideState: 0 + m_Value: {fileID: 0} + histogramPercentages: + m_OverrideState: 0 + m_Value: {x: 40, y: 90} + min: 0 + max: 100 + histogramUseCurveRemapping: + m_OverrideState: 0 + m_Value: 0 + targetMidGray: + m_OverrideState: 0 + m_Value: 0 + centerAroundExposureTarget: + m_OverrideState: 0 + m_Value: 0 + proceduralCenter: + m_OverrideState: 0 + m_Value: {x: 0.5, y: 0.5} + proceduralRadii: + m_OverrideState: 0 + m_Value: {x: 0.3, y: 0.3} + maskMinIntensity: + m_OverrideState: 0 + m_Value: -30 + maskMaxIntensity: + m_OverrideState: 0 + m_Value: 30 + proceduralSoftness: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 --- !u!114 &6553751843573519693 MonoBehaviour: m_ObjectHideFlags: 3 diff --git a/Assets/AWSIM/Prefabs/Sensors/CameraSensor.prefab b/Assets/AWSIM/Prefabs/Sensors/CameraSensor.prefab index bb4164e51..841f9889c 100644 --- a/Assets/AWSIM/Prefabs/Sensors/CameraSensor.prefab +++ b/Assets/AWSIM/Prefabs/Sensors/CameraSensor.prefab @@ -1,6 +1,6 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: ---- !u!1 &7800869322880189811 +--- !u!1 &683421532908195521 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -8,39 +8,37 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7800869322880189814} - - component: {fileID: 7800869322880189813} - - component: {fileID: 7800869322880189801} - - component: {fileID: 7800869322880189800} - - component: {fileID: 7800869322880189815} + - component: {fileID: 8618870265807608092} + - component: {fileID: 1748890876559847002} + - component: {fileID: 4817441929433844819} m_Layer: 0 - m_Name: CameraSensor - m_TagString: MainCamera + m_Name: CameraObject + m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7800869322880189814 + m_IsActive: 0 +--- !u!4 &8618870265807608092 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7800869322880189811} + m_GameObject: {fileID: 683421532908195521} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 0} + m_Father: {fileID: 7800869322880189814} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!20 &7800869322880189813 +--- !u!20 &1748890876559847002 Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7800869322880189811} + m_GameObject: {fileID: 683421532908195521} m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 1 @@ -77,13 +75,13 @@ Camera: m_OcclusionCulling: 1 m_StereoConvergence: 10 m_StereoSeparation: 0.022 ---- !u!114 &7800869322880189801 +--- !u!114 &4817441929433844819 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7800869322880189811} + m_GameObject: {fileID: 683421532908195521} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} @@ -191,6 +189,39 @@ MonoBehaviour: data1: 0 data2: 0 defaultFrameSettings: 0 +--- !u!1 &7800869322880189811 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7800869322880189814} + - component: {fileID: 7800869322880189800} + - component: {fileID: 7800869322880189815} + m_Layer: 0 + m_Name: CameraSensor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &7800869322880189814 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7800869322880189811} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 8618870265807608092} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &7800869322880189800 MonoBehaviour: m_ObjectHideFlags: 0 @@ -221,7 +252,7 @@ MonoBehaviour: p1: 0 p2: 0 k3: 0 - cameraObject: {fileID: 7800869322880189813} + cameraObject: {fileID: 1748890876559847002} distortionShader: {fileID: 7200000, guid: 8ba118ba5fd3df74da56fc7b5c68f16c, type: 3} rosImageShader: {fileID: 7200000, guid: ec3733322406d6750a0ad58713c14110, type: 3} --- !u!114 &7800869322880189815 diff --git a/Assets/AWSIM/Scenes/Main/AutowareSimualtion/AutowareSimulation.unity b/Assets/AWSIM/Scenes/Main/AutowareSimualtion/AutowareSimulation.unity index 111d17a99..619b7539b 100644 --- a/Assets/AWSIM/Scenes/Main/AutowareSimualtion/AutowareSimulation.unity +++ b/Assets/AWSIM/Scenes/Main/AutowareSimualtion/AutowareSimulation.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 1536.168, g: 1903.334, b: 2519.2246, a: 1} + m_IndirectSpecularColor: {r: 1520.0924, g: 1884.674, b: 2491.8425, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -2789,6 +2789,51 @@ Transform: m_CorrespondingSourceObject: {fileID: 1041813114, guid: 58d73df60b244d146bdf5f5896f78355, type: 3} m_PrefabInstance: {fileID: 813212876} m_PrefabAsset: {fileID: 0} +--- !u!1 &836495761 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 836495763} + - component: {fileID: 836495762} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &836495762 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 836495761} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: 87ed1f4fcbcd01348b783774e8f29934, type: 2} + m_StaticLightingSkyUniqueID: 1 +--- !u!4 &836495763 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 836495761} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &890457390 stripped MonoBehaviour: m_CorrespondingSourceObject: {fileID: 9027057600411674006, guid: 58d73df60b244d146bdf5f5896f78355, type: 3} @@ -4019,6 +4064,53 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 23c1ce4fb46143f46bc5cb5224c934f6, type: 3} m_Name: m_EditorClassIdentifier: + m_Version: 7 + m_ObsoleteRenderingPath: 0 + m_ObsoleteFrameSettings: + overrides: 0 + enableShadow: 0 + enableContactShadows: 0 + enableShadowMask: 0 + enableSSR: 0 + enableSSAO: 0 + enableSubsurfaceScattering: 0 + enableTransmission: 0 + enableAtmosphericScattering: 0 + enableVolumetrics: 0 + enableReprojectionForVolumetrics: 0 + enableLightLayers: 0 + enableExposureControl: 1 + diffuseGlobalDimmer: 0 + specularGlobalDimmer: 0 + shaderLitMode: 0 + enableDepthPrepassWithDeferredRendering: 0 + enableTransparentPrepass: 0 + enableMotionVectors: 0 + enableObjectMotionVectors: 0 + enableDecals: 0 + enableRoughRefraction: 0 + enableTransparentPostpass: 0 + enableDistortion: 0 + enablePostprocess: 0 + enableOpaqueObjects: 0 + enableTransparentObjects: 0 + enableRealtimePlanarReflection: 0 + enableMSAA: 0 + enableAsyncCompute: 0 + runLightListAsync: 0 + runSSRAsync: 0 + runSSAOAsync: 0 + runContactShadowsAsync: 0 + runVolumeVoxelizationAsync: 0 + lightLoopSettings: + overrides: 0 + enableDeferredTileAndCluster: 0 + enableComputeLightEvaluation: 0 + enableComputeLightVariants: 0 + enableComputeMaterialVariants: 0 + enableFptlForForwardOpaque: 0 + enableBigTilePrepass: 0 + isFptlEnabled: 0 clearColorMode: 0 backgroundColorHDR: {r: 0.025, g: 0.07, b: 0.19, a: 0} clearDepth: 1 @@ -4074,53 +4166,6 @@ MonoBehaviour: data1: 0 data2: 0 defaultFrameSettings: 0 - m_Version: 7 - m_ObsoleteRenderingPath: 0 - m_ObsoleteFrameSettings: - overrides: 0 - enableShadow: 0 - enableContactShadows: 0 - enableShadowMask: 0 - enableSSR: 0 - enableSSAO: 0 - enableSubsurfaceScattering: 0 - enableTransmission: 0 - enableAtmosphericScattering: 0 - enableVolumetrics: 0 - enableReprojectionForVolumetrics: 0 - enableLightLayers: 0 - enableExposureControl: 1 - diffuseGlobalDimmer: 0 - specularGlobalDimmer: 0 - shaderLitMode: 0 - enableDepthPrepassWithDeferredRendering: 0 - enableTransparentPrepass: 0 - enableMotionVectors: 0 - enableObjectMotionVectors: 0 - enableDecals: 0 - enableRoughRefraction: 0 - enableTransparentPostpass: 0 - enableDistortion: 0 - enablePostprocess: 0 - enableOpaqueObjects: 0 - enableTransparentObjects: 0 - enableRealtimePlanarReflection: 0 - enableMSAA: 0 - enableAsyncCompute: 0 - runLightListAsync: 0 - runSSRAsync: 0 - runSSAOAsync: 0 - runContactShadowsAsync: 0 - runVolumeVoxelizationAsync: 0 - lightLoopSettings: - overrides: 0 - enableDeferredTileAndCluster: 0 - enableComputeLightEvaluation: 0 - enableComputeLightVariants: 0 - enableComputeMaterialVariants: 0 - enableFptlForForwardOpaque: 0 - enableBigTilePrepass: 0 - isFptlEnabled: 0 --- !u!81 &2122627085 AudioListener: m_ObjectHideFlags: 0