From 1d0717237457904089afe5a654b0153726fb4236 Mon Sep 17 00:00:00 2001 From: TGW795 Date: Tue, 8 Aug 2023 17:09:12 +0900 Subject: [PATCH 1/3] Modified AWSIM vehicle's turning behavior --- .../Scenes/Main/AutowareSimulation.unity | 101 +++++++++--------- Assets/AWSIM/Scripts/Vehicles/Vehicle.cs | 33 +++++- Assets/AWSIM/Scripts/Vehicles/Wheel.cs | 15 ++- 3 files changed, 96 insertions(+), 53 deletions(-) diff --git a/Assets/AWSIM/Scenes/Main/AutowareSimulation.unity b/Assets/AWSIM/Scenes/Main/AutowareSimulation.unity index 111d17a99..1586defa8 100644 --- a/Assets/AWSIM/Scenes/Main/AutowareSimulation.unity +++ b/Assets/AWSIM/Scenes/Main/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: 0, g: 0, b: 0, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -520,6 +520,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: meshSource: 2 + semanticCategoryDictionaryFile: --- !u!114 &543989982 MonoBehaviour: m_ObjectHideFlags: 0 @@ -4019,6 +4020,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 +4122,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 @@ -4233,6 +4234,10 @@ PrefabInstance: propertyPath: m_Name value: Lexus RX450h 2015 Sample Sensor objectReference: {fileID: 0} + - target: {fileID: 4981081891045692866, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: sleepVelocityThreshold + value: 0.02 + objectReference: {fileID: 0} - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} propertyPath: m_RootOrder value: 0 diff --git a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs index 4f3e698ca..690bd55fb 100644 --- a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs +++ b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs @@ -208,7 +208,9 @@ public class Axle private float sleepTimer = 0.0f; ///Count the time until CanSleep is switched to true - + // Vehicle dynamics parameters used for calculating of front wheel angles. + private float wheelBase = 2.787877f; + private float tread = 1.8199022f; // Cache components. Wheel[] wheels; @@ -335,7 +337,7 @@ bool IsEachWheelGrounded() // Is less than sleepVelocityThreshold ? bool IsCanSleepVelocity() { - if (Mathf.Abs(Velocity.z) < sleepVelocityThreshold) + if (Mathf.Abs(LocalVelocity.z) < sleepVelocityThreshold) return true; else return false; @@ -424,8 +426,31 @@ void UpdateWheelsForce(float acceleration) var perWheelAcceleration = acceleration / wheels.Length; // Update the acceleration output by each wheel. - foreach (var wheel in wheels) - wheel.UpdateWheelForce(perWheelAcceleration); + var dif1 = Mathf.Sin(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) / Mathf.Sin(SteerAngle * Mathf.Deg2Rad); + var dif2 = (Mathf.Cos(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) + tread * Mathf.Sin(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(SteerAngle * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) / wheelBase); + var dif3 = Mathf.Cos(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))); + + if (SteerAngle > 0.001) + { + frontAxle.LeftWheel.UpdateWheelForce(perWheelAcceleration); + frontAxle.RightWheel.UpdateWheelForce(perWheelAcceleration * dif1); + rearAxle.LeftWheel.UpdateWheelForce(perWheelAcceleration * dif2); + rearAxle.RightWheel.UpdateWheelForce(perWheelAcceleration * dif3); + } + + else if (SteerAngle < -0.001) + { + frontAxle.LeftWheel.UpdateWheelForce(perWheelAcceleration * dif1); + frontAxle.RightWheel.UpdateWheelForce(perWheelAcceleration); + rearAxle.LeftWheel.UpdateWheelForce(perWheelAcceleration * dif3); + rearAxle.RightWheel.UpdateWheelForce(perWheelAcceleration * dif2); + } + + else + { + foreach (var wheel in wheels) + wheel.UpdateWheelForce(perWheelAcceleration); + } } } } diff --git a/Assets/AWSIM/Scripts/Vehicles/Wheel.cs b/Assets/AWSIM/Scripts/Vehicles/Wheel.cs index 53ede7918..2f91ba591 100644 --- a/Assets/AWSIM/Scripts/Vehicles/Wheel.cs +++ b/Assets/AWSIM/Scripts/Vehicles/Wheel.cs @@ -38,6 +38,10 @@ public class Wheel : MonoBehaviour // Coefficient for cancelling the skidding while stopping of the tire. float skiddingCancelRate; + // Vehicle dynamics parameters used for calculating of front wheel angles. + private float wheelBase = 2.787877f; + private float tread = 1.8199022f; + void Reset() { // Initializes the value of WheelCollider. @@ -106,7 +110,16 @@ public void UpdateWheelSteerAngle(float steerAngle) steerAngle = 0.00001f; if (wheelCollider.steerAngle != steerAngle) - wheelCollider.steerAngle = steerAngle; + { + if (steerAngle > 40 && name == "FrontLeftWheel") + wheelCollider.steerAngle = Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(steerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; + + else if (steerAngle < -40 && name == "FrontRightWheel") + wheelCollider.steerAngle = -Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(steerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; + + else + wheelCollider.steerAngle = steerAngle; + } } /// From 428b21c33e6f0b01ce61b87227edeae453a0afca Mon Sep 17 00:00:00 2001 From: TGW795 Date: Thu, 17 Aug 2023 15:35:16 +0900 Subject: [PATCH 2/3] Minor modifications and additions --- Assets/AWSIM/Scripts/Vehicles/Vehicle.cs | 39 ++++++++++++++++++++---- Assets/AWSIM/Scripts/Vehicles/Wheel.cs | 15 +-------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs index 690bd55fb..c51ff3302 100644 --- a/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs +++ b/Assets/AWSIM/Scripts/Vehicles/Vehicle.cs @@ -205,12 +205,16 @@ public class Axle /// public Vector3 AngularVelocity { get; private set; } - - private float sleepTimer = 0.0f; ///Count the time until CanSleep is switched to true + ///Count the time until CanSleep is switched to true. + private float sleepTimer = 0.0f; // Vehicle dynamics parameters used for calculating of front wheel angles. - private float wheelBase = 2.787877f; - private float tread = 1.8199022f; + private float wheelBase; + private float tread; + + // Vehicle's true front wheel angles considering Ackermann geometry. + private float leftWheelAngle; + private float rightWheelAngle; // Cache components. Wheel[] wheels; @@ -233,6 +237,9 @@ void Awake() m_transform = transform; wheels = new Wheel[] { frontAxle.LeftWheel, frontAxle.RightWheel, rearAxle.LeftWheel, rearAxle.RightWheel }; + wheelBase = Mathf.Abs(wheels[0].transform.localPosition.z - wheels[2].transform.localPosition.z); + tread = Mathf.Abs(wheels[0].transform.localPosition.x - wheels[1].transform.localPosition.x); + // Set center of mass position. if (centerOfMassTransform != null) m_rigidbody.centerOfMass = m_transform.InverseTransformPoint(centerOfMassTransform.position); @@ -291,8 +298,26 @@ void ComputeVehicleState() void PreUpdateWheels() { // Steer angle is front-only. - frontAxle.LeftWheel.UpdateWheelSteerAngle(SteerAngle); - frontAxle.RightWheel.UpdateWheelSteerAngle(SteerAngle); + if (SteerAngle > 0.01) + { + leftWheelAngle = Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; + rightWheelAngle = SteerAngle; + } + + else if (SteerAngle < -0.01) + { + leftWheelAngle = SteerAngle; + rightWheelAngle = -Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; + } + + else + { + leftWheelAngle = SteerAngle; + rightWheelAngle = SteerAngle; + } + + frontAxle.LeftWheel.UpdateWheelSteerAngle(leftWheelAngle); + frontAxle.RightWheel.UpdateWheelSteerAngle(rightWheelAngle); foreach (var wheel in wheels) { @@ -426,6 +451,8 @@ void UpdateWheelsForce(float acceleration) var perWheelAcceleration = acceleration / wheels.Length; // Update the acceleration output by each wheel. + // Calculate the radius of the arc drawn by each wheel based on the radius of the arc drawn by the front wheels, which are on the outside when the vehicle turns, to obtain dif1, dif2, and dif3, and weight the magnitude of the force applied. + // These dif1, dif2, and dif3 are used to control the speed of each wheel when the vehicle turns. var dif1 = Mathf.Sin(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) / Mathf.Sin(SteerAngle * Mathf.Deg2Rad); var dif2 = (Mathf.Cos(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) + tread * Mathf.Sin(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(SteerAngle * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))) / wheelBase); var dif3 = Mathf.Cos(Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(SteerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1))); diff --git a/Assets/AWSIM/Scripts/Vehicles/Wheel.cs b/Assets/AWSIM/Scripts/Vehicles/Wheel.cs index 2f91ba591..53ede7918 100644 --- a/Assets/AWSIM/Scripts/Vehicles/Wheel.cs +++ b/Assets/AWSIM/Scripts/Vehicles/Wheel.cs @@ -38,10 +38,6 @@ public class Wheel : MonoBehaviour // Coefficient for cancelling the skidding while stopping of the tire. float skiddingCancelRate; - // Vehicle dynamics parameters used for calculating of front wheel angles. - private float wheelBase = 2.787877f; - private float tread = 1.8199022f; - void Reset() { // Initializes the value of WheelCollider. @@ -110,16 +106,7 @@ public void UpdateWheelSteerAngle(float steerAngle) steerAngle = 0.00001f; if (wheelCollider.steerAngle != steerAngle) - { - if (steerAngle > 40 && name == "FrontLeftWheel") - wheelCollider.steerAngle = Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(steerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; - - else if (steerAngle < -40 && name == "FrontRightWheel") - wheelCollider.steerAngle = -Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(Mathf.Abs(steerAngle) * Mathf.Deg2Rad) + tread / wheelBase), 2) + 1)) * Mathf.Rad2Deg; - - else - wheelCollider.steerAngle = steerAngle; - } + wheelCollider.steerAngle = steerAngle; } /// From 8dcbfa75efceec5556543cb380f0512952dd7905 Mon Sep 17 00:00:00 2001 From: TGW795 Date: Tue, 12 Sep 2023 15:52:33 +0900 Subject: [PATCH 3/3] Added test environment for vehicle's turning experiments. --- Assets/AWSIM/Materials/Trail_Color.mat | 285 ++++++ Assets/AWSIM/Materials/Trail_Color.mat.meta | 8 + .../Scenes/Samples/VehicleGeometryTest.meta | 8 + .../Scenes/Samples/VehicleGeometryTest.unity | 961 ++++++++++++++++++ .../Samples/VehicleGeometryTest.unity.meta | 7 + .../DXRSettingsProfile.asset | 116 +++ .../DXRSettingsProfile.asset.meta | 8 + .../SkyandFogSettingsProfile.asset | 498 +++++++++ .../SkyandFogSettingsProfile.asset.meta | 8 + Assets/AWSIM/Scripts/GizmoTest.cs | 22 + Assets/AWSIM/Scripts/GizmoTest.cs.meta | 11 + Assets/src.meta | 8 + Assets/src/GizmosExtensions.cs | 192 ++++ Assets/src/GizmosExtensions.cs.meta | 13 + ProjectSettings/SceneTemplateSettings.json | 167 +++ UserSettings/EditorUserSettings.asset | 20 +- 16 files changed, 2322 insertions(+), 10 deletions(-) create mode 100644 Assets/AWSIM/Materials/Trail_Color.mat create mode 100644 Assets/AWSIM/Materials/Trail_Color.mat.meta create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.meta create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity.meta create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset.meta create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset create mode 100644 Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset.meta create mode 100644 Assets/AWSIM/Scripts/GizmoTest.cs create mode 100644 Assets/AWSIM/Scripts/GizmoTest.cs.meta create mode 100644 Assets/src.meta create mode 100644 Assets/src/GizmosExtensions.cs create mode 100644 Assets/src/GizmosExtensions.cs.meta create mode 100644 ProjectSettings/SceneTemplateSettings.json diff --git a/Assets/AWSIM/Materials/Trail_Color.mat b/Assets/AWSIM/Materials/Trail_Color.mat new file mode 100644 index 000000000..338b1a49b --- /dev/null +++ b/Assets/AWSIM/Materials/Trail_Color.mat @@ -0,0 +1,285 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-1434981468069563316 +MonoBehaviour: + m_ObjectHideFlags: 11 + 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: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 11 +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Trail_Color + m_Shader: {fileID: 4800000, guid: c4edd00ff2db5b24391a4fcb1762e459, type: 3} + m_ShaderKeywords: _DISABLE_SSR_TRANSPARENT _NORMALMAP_TANGENT_SPACE + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2000 + stringTagMap: {} + disabledShaderPasses: + - DistortionVectors + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DistortionVectorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _UnlitColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DistortionBlendMode: 0 + - _DistortionBlurBlendMode: 0 + - _DistortionBlurDstBlend: 1 + - _DistortionBlurRemapMax: 1 + - _DistortionBlurRemapMin: 0 + - _DistortionBlurScale: 1 + - _DistortionBlurSrcBlend: 1 + - _DistortionDepthTest: 1 + - _DistortionDstBlend: 1 + - _DistortionEnable: 0 + - _DistortionOnly: 0 + - _DistortionScale: 1 + - _DistortionSrcBlend: 1 + - _DistortionVectorBias: -1 + - _DistortionVectorScale: 2 + - _DoubleSidedEnable: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _IncludeIndirectLighting: 1 + - _InvTilingScale: 1 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 1 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 0 + - _StencilRefDistortionVec: 4 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 32 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskDistortionVec: 4 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestModeDistortion: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 0.99056596, g: 0.0046724924, b: 0.0046724924, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + - _UnlitColor: {r: 0.990566, g: 0.0046724924, b: 0.0046724924, a: 1} + - _UnlitColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/AWSIM/Materials/Trail_Color.mat.meta b/Assets/AWSIM/Materials/Trail_Color.mat.meta new file mode 100644 index 000000000..e6e7d40a4 --- /dev/null +++ b/Assets/AWSIM/Materials/Trail_Color.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ca12d197a03fb2068064661b346a24d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.meta b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.meta new file mode 100644 index 000000000..c9b2fcff2 --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 11ea573bb222e67af838a2c2c93b83cd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity new file mode 100644 index 000000000..3c94f9320 --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity @@ -0,0 +1,961 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 2127.5667, g: 2230.266, b: 3074.9512, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &157207112 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 157207114} + - component: {fileID: 157207113} + - component: {fileID: 157207115} + m_Layer: 0 + m_Name: Sun + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &157207113 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 157207112} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 130000 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 2 + m_AreaSize: {x: 0.5, y: 0.5} + m_BounceIntensity: 1 + m_ColorTemperature: 6500 + m_UseColorTemperature: 1 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 2.5 +--- !u!4 &157207114 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 157207112} + m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!114 &157207115 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 157207112} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 11 + m_ObsoleteShadowResolutionTier: 1 + m_ObsoleteUseShadowQualitySettings: 0 + m_ObsoleteCustomShadowResolution: 512 + m_ObsoleteContactShadows: 0 + m_PointlightHDType: 0 + m_SpotLightShape: 0 + m_AreaLightShape: 0 + m_Intensity: 130000 + m_EnableSpotReflector: 0 + m_LuxAtDistance: 1 + m_InnerSpotPercent: 0 + m_SpotIESCutoffPercent: 100 + m_LightDimmer: 1 + m_VolumetricDimmer: 1 + m_LightUnit: 2 + m_FadeDistance: 10000 + m_VolumetricFadeDistance: 10000 + m_AffectDiffuse: 1 + m_AffectSpecular: 1 + m_NonLightmappedOnly: 0 + m_ShapeWidth: 0.5 + m_ShapeHeight: 0.5 + m_AspectRatio: 1 + m_ShapeRadius: 0.025 + m_SoftnessScale: 1 + m_UseCustomSpotLightShadowCone: 0 + m_CustomSpotLightShadowCone: 30 + m_MaxSmoothness: 0.99 + m_ApplyRangeAttenuation: 1 + m_DisplayAreaLightEmissiveMesh: 0 + m_AreaLightCookie: {fileID: 0} + m_IESPoint: {fileID: 0} + m_IESSpot: {fileID: 0} + m_IncludeForRayTracing: 1 + m_AreaLightShadowCone: 120 + m_UseScreenSpaceShadows: 0 + m_InteractsWithSky: 1 + m_AngularDiameter: 2.5 + m_FlareSize: 2 + m_FlareTint: {r: 1, g: 1, b: 1, a: 1} + m_FlareFalloff: 4 + m_SurfaceTexture: {fileID: 0} + m_SurfaceTint: {r: 1, g: 1, b: 1, a: 1} + m_Distance: 1.5e+11 + m_UseRayTracedShadows: 0 + m_NumRayTracingSamples: 4 + m_FilterTracedShadow: 1 + m_FilterSizeTraced: 16 + m_SunLightConeAngle: 0.5 + m_LightShadowRadius: 0.5 + m_SemiTransparentShadow: 0 + m_ColorShadow: 1 + m_DistanceBasedFiltering: 0 + m_EvsmExponent: 15 + m_EvsmLightLeakBias: 0 + m_EvsmVarianceBias: 0.00001 + m_EvsmBlurPasses: 0 + m_LightlayersMask: 1 + m_LinkShadowLayers: 1 + m_ShadowNearPlane: 0.1 + m_BlockerSampleCount: 24 + m_FilterSampleCount: 16 + m_MinFilterSize: 0.1 + m_KernelSize: 5 + m_LightAngle: 1 + m_MaxDepthBias: 0.001 + m_ShadowResolution: + m_Override: 512 + m_UseOverride: 1 + m_Level: 0 + m_ShadowDimmer: 1 + m_VolumetricShadowDimmer: 1 + m_ShadowFadeDistance: 10000 + m_UseContactShadow: + m_Override: 0 + m_UseOverride: 1 + m_Level: 0 + m_RayTracedContactShadow: 0 + m_ShadowTint: {r: 0, g: 0, b: 0, a: 1} + m_PenumbraTint: 0 + m_NormalBias: 0.75 + m_SlopeBias: 0.5 + m_ShadowUpdateMode: 0 + m_AlwaysDrawDynamicShadows: 0 + m_UpdateShadowOnLightMovement: 0 + m_CachedShadowTranslationThreshold: 0.01 + m_CachedShadowAngularThreshold: 0.5 + m_BarnDoorAngle: 90 + m_BarnDoorLength: 0.05 + m_preserveCachedShadow: 0 + m_OnDemandShadowRenderOnPlacement: 1 + m_ShadowCascadeRatios: + - 0.05 + - 0.2 + - 0.3 + m_ShadowCascadeBorders: + - 0.2 + - 0.2 + - 0.2 + - 0.2 + m_ShadowAlgorithm: 0 + m_ShadowVariant: 0 + m_ShadowPrecision: 0 + useOldInspector: 0 + useVolumetric: 1 + featuresFoldout: 1 + showAdditionalSettings: 0 + m_AreaLightEmissiveMeshShadowCastingMode: 0 + m_AreaLightEmissiveMeshMotionVectorGenerationMode: 0 + m_AreaLightEmissiveMeshLayer: -1 +--- !u!1001 &177502715 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2540743507290084090, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalPosition.x + value: -0.000006198883 + objectReference: {fileID: 0} + - target: {fileID: 4981081891045692864, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_Name + value: Lexus RX450h 2015 Sample Sensor + objectReference: {fileID: 0} + - target: {fileID: 4981081891045692867, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_Enabled + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalPosition.x + value: 1.5 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5650763240072318842, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} +--- !u!1 &432432459 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 432432461} + - component: {fileID: 432432460} + m_Layer: 0 + m_Name: Sky and Fog Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &432432460 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 432432459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: bf4a3e3fe980ece7792f8da2e513602d, type: 2} +--- !u!4 &432432461 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 432432459} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &434405345 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 434405349} + - component: {fileID: 434405348} + - component: {fileID: 434405347} + - component: {fileID: 434405346} + - component: {fileID: 434405350} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &434405346 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434405345} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &434405347 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434405345} + m_Enabled: 1 + 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: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &434405348 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434405345} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &434405349 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434405345} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 10, y: 1, z: 10} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &434405350 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 434405345} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 52648454e5923cf91b6adf7fa7d86b14, type: 3} + m_Name: + m_EditorClassIdentifier: + SteeringAngle: 35 +--- !u!1 &1245280912 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 2963107000432534361, guid: 164645b2d105b6b4ab4e3d2e7c65dab2, type: 3} + m_PrefabInstance: {fileID: 177502715} + m_PrefabAsset: {fileID: 0} +--- !u!96 &1245280914 +TrailRenderer: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1245280912} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 7ca12d197a03fb2068064661b346a24d, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Time: 100 + m_Parameters: + serializedVersion: 3 + widthMultiplier: 1 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.10150337 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 0, b: 0, a: 1} + key1: {r: 1, g: 0, b: 0, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_MinVertexDistance: 0.1 + m_Autodestruct: 0 + m_Emitting: 1 +--- !u!1 &1650212112 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1650212113} + - component: {fileID: 1650212114} + m_Layer: 0 + m_Name: DXR Settings Volume + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1650212113 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650212112} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, 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 &1650212114 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1650212112} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3} + m_Name: + m_EditorClassIdentifier: + isGlobal: 1 + priority: 0 + blendDistance: 0 + weight: 1 + sharedProfile: {fileID: 11400000, guid: d3072686f3c138a85991325e9caf0c49, type: 2} +--- !u!1 &1823688464 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1823688467} + - component: {fileID: 1823688466} + - component: {fileID: 1823688465} + - component: {fileID: 1823688468} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &1823688465 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823688464} + m_Enabled: 1 +--- !u!20 &1823688466 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823688464} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1823688467 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823688464} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: 30, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!114 &1823688468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1823688464} + m_Enabled: 1 + m_EditorHideFlags: 0 + 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 + volumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + volumeAnchorOverride: {fileID: 0} + antialiasing: 2 + SMAAQuality: 2 + dithering: 1 + stopNaNs: 0 + taaSharpenStrength: 0.5 + TAAQuality: 1 + taaHistorySharpening: 0.35 + taaAntiFlicker: 0.5 + taaMotionVectorRejection: 0 + taaAntiHistoryRinging: 0 + physicalParameters: + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + flipYMode: 0 + xrRendering: 1 + fullscreenPassthrough: 0 + allowDynamicResolution: 0 + customRenderingSettings: 0 + invertFaceCulling: 0 + probeLayerMask: + serializedVersion: 2 + m_Bits: 4294967295 + hasPersistentHistory: 0 + exposureTarget: {fileID: 0} + m_RenderingPathCustomFrameSettings: + bitDatas: + data1: 72198262773251917 + data2: 13763000464465395712 + lodBias: 1 + lodBiasMode: 0 + lodBiasQualityLevel: 0 + maximumLODLevel: 0 + maximumLODLevelMode: 0 + maximumLODLevelQualityLevel: 0 + sssQualityMode: 0 + sssQualityLevel: 0 + sssCustomSampleBudget: 20 + materialQuality: 0 + renderingPathCustomFrameSettingsOverrideMask: + mask: + data1: 0 + data2: 0 + defaultFrameSettings: 0 +--- !u!1 &1898772527 +GameObject: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1898772529} + - component: {fileID: 1898772528} + m_Layer: 0 + m_Name: StaticLightingSky + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1898772528 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1898772527} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Profile: {fileID: 11400000, guid: bf4a3e3fe980ece7792f8da2e513602d, type: 2} + m_StaticLightingSkyUniqueID: 4 +--- !u!4 &1898772529 +Transform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1898772527} + 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: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity.meta b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity.meta new file mode 100644 index 000000000..6b33c21e9 --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 11a2d8489528c0f4eb7085bc5a1449fd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset new file mode 100644 index 000000000..3612c6393 --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset @@ -0,0 +1,116 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: DXRSettingsProfile + m_EditorClassIdentifier: + components: + - {fileID: 2761618898094082810} +--- !u!114 &2761618898094082810 +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: 384c4d03a551c44448145f4093304119, type: 3} + m_Name: ScreenSpaceReflection + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + quality: + m_OverrideState: 0 + m_Value: 1 + enabled: + m_OverrideState: 0 + m_Value: 1 + usedAlgorithm: + m_OverrideState: 0 + m_Value: 0 + rayTracing: + m_OverrideState: 1 + m_Value: 1 + reflectSky: + m_OverrideState: 0 + m_Value: 1 + depthBufferThickness: + m_OverrideState: 0 + m_Value: 0.01 + min: 0 + max: 1 + screenFadeDistance: + m_OverrideState: 0 + m_Value: 0.1 + min: 0 + max: 1 + accumulationFactor: + m_OverrideState: 0 + m_Value: 0.75 + min: 0 + max: 1 + layerMask: + m_OverrideState: 0 + m_Value: + serializedVersion: 2 + m_Bits: 4294967295 + mode: + m_OverrideState: 0 + m_Value: 2 + sampleCount: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 32 + bounceCount: + m_OverrideState: 0 + m_Value: 1 + min: 1 + max: 31 + m_MinSmoothness: + m_OverrideState: 1 + m_Value: 0.5 + min: 0 + max: 1 + m_SmoothnessFadeStart: + m_OverrideState: 0 + m_Value: 0.9 + min: 0 + max: 1 + m_RayMaxIterations: + m_OverrideState: 0 + m_Value: 32 + m_RayLength: + m_OverrideState: 0 + m_Value: 10 + min: 0.001 + m_ClampValue: + m_OverrideState: 0 + m_Value: 1 + min: 0.001 + max: 10 + m_UpscaleRadius: + m_OverrideState: 0 + m_Value: 4 + min: 2 + max: 6 + m_FullResolution: + m_OverrideState: 0 + m_Value: 0 + m_Denoise: + m_OverrideState: 0 + m_Value: 0 + m_DenoiserRadius: + m_OverrideState: 0 + m_Value: 16 + min: 1 + max: 32 diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset.meta b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset.meta new file mode 100644 index 000000000..033485fcf --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/DXRSettingsProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3072686f3c138a85991325e9caf0c49 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset new file mode 100644 index 000000000..b60f94a79 --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset @@ -0,0 +1,498 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-7724654706381055090 +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: d877ec3e844f2ca46830012e8e79319b, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + rotation: + m_OverrideState: 0 + m_Value: 0 + min: 0 + max: 360 + skyIntensityMode: + m_OverrideState: 0 + m_Value: 0 + exposure: + m_OverrideState: 0 + m_Value: 0 + multiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxValue: + m_OverrideState: 0 + m_Value: 1 + min: 0 + upperHemisphereLuxColor: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + desiredLuxValue: + m_OverrideState: 0 + m_Value: 20000 + updateMode: + m_OverrideState: 0 + m_Value: 0 + updatePeriod: + m_OverrideState: 0 + m_Value: 0 + min: 0 + includeSunInBaking: + m_OverrideState: 0 + m_Value: 0 + m_SkyVersion: 1 + m_ObsoleteEarthPreset: + m_OverrideState: 0 + m_Value: 1 + type: + m_OverrideState: 0 + m_Value: 1 + sphericalMode: + m_OverrideState: 0 + m_Value: 1 + seaLevel: + m_OverrideState: 0 + m_Value: 0 + planetaryRadius: + m_OverrideState: 0 + m_Value: 6378100 + min: 0 + planetCenterPosition: + m_OverrideState: 0 + m_Value: {x: 0, y: -6378100, z: 0} + airDensityR: + m_OverrideState: 0 + m_Value: 0.04534 + min: 0 + max: 1 + airDensityG: + m_OverrideState: 0 + m_Value: 0.10237241 + min: 0 + max: 1 + airDensityB: + m_OverrideState: 0 + m_Value: 0.23264056 + min: 0 + max: 1 + airTint: + m_OverrideState: 0 + m_Value: {r: 0.9, g: 0.9, b: 1, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 1 + airMaximumAltitude: + m_OverrideState: 0 + m_Value: 55261.973 + min: 0 + aerosolDensity: + m_OverrideState: 0 + m_Value: 0.01192826 + min: 0 + max: 1 + aerosolTint: + m_OverrideState: 0 + m_Value: {r: 0.9, g: 0.9, b: 0.9, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 1 + aerosolMaximumAltitude: + m_OverrideState: 0 + m_Value: 8289.296 + min: 0 + aerosolAnisotropy: + m_OverrideState: 0 + m_Value: 0 + min: -1 + max: 1 + numberOfBounces: + m_OverrideState: 0 + m_Value: 8 + min: 1 + max: 10 + groundTint: + m_OverrideState: 1 + m_Value: {r: 0.122641504, g: 0.1043775, b: 0.09313812, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 0 + groundColorTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + groundEmissionTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + groundEmissionMultiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + planetRotation: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + spaceEmissionTexture: + m_OverrideState: 0 + m_Value: {fileID: 0} + spaceEmissionMultiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + spaceRotation: + m_OverrideState: 0 + m_Value: {x: 0, y: 0, z: 0} + colorSaturation: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + alphaSaturation: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + alphaMultiplier: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + horizonTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 0 + zenithTint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 0 + showAlpha: 0 + showEyeDropper: 0 + horizonZenithShift: + m_OverrideState: 0 + m_Value: 0 + min: -1 + max: 1 +--- !u!114 &-4151792930034644520 +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: 953beb541740ddc499d005ee80c9ff29, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + quality: + m_OverrideState: 0 + m_Value: 1 + enabled: + m_OverrideState: 1 + m_Value: 1 + colorMode: + m_OverrideState: 0 + m_Value: 1 + color: + m_OverrideState: 0 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + tint: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 1 + showAlpha: 0 + showEyeDropper: 1 + maxFogDistance: + m_OverrideState: 0 + m_Value: 5000 + min: 0 + mipFogMaxMip: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 + max: 1 + mipFogNear: + m_OverrideState: 0 + m_Value: 0 + min: 0 + mipFogFar: + m_OverrideState: 0 + m_Value: 1000 + min: 0 + baseHeight: + m_OverrideState: 0 + m_Value: 0 + maximumHeight: + m_OverrideState: 0 + m_Value: 50 + meanFreePath: + m_OverrideState: 0 + m_Value: 400 + min: 1 + enableVolumetricFog: + m_OverrideState: 1 + m_Value: 1 + albedo: + m_OverrideState: 0 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hdr: 0 + showAlpha: 1 + showEyeDropper: 1 + globalLightProbeDimmer: + m_OverrideState: 0 + m_Value: 1 + min: 0 + max: 1 + depthExtent: + m_OverrideState: 0 + m_Value: 64 + min: 0.1 + denoisingMode: + m_OverrideState: 0 + m_Value: 2 + anisotropy: + m_OverrideState: 1 + m_Value: 0.65 + min: -1 + max: 1 + sliceDistributionUniformity: + m_OverrideState: 0 + m_Value: 0.75 + min: 0 + max: 1 + m_FogControlMode: + m_OverrideState: 0 + m_Value: 0 + screenResolutionPercentage: + m_OverrideState: 0 + m_Value: 12.5 + min: 6.25 + max: 100 + volumeSliceCount: + m_OverrideState: 0 + m_Value: 64 + min: 1 + max: 1024 + m_VolumetricFogBudget: + m_OverrideState: 0 + m_Value: 0.33 + min: 0 + max: 1 + m_ResolutionDepthRatio: + m_OverrideState: 0 + m_Value: 0.666 + min: 0 + max: 1 + directionalLightsOnly: + m_OverrideState: 0 + m_Value: 0 +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + 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: d7fd9488000d3734a9e00ee676215985, type: 3} + m_Name: SkyandFogSettingsProfile + m_EditorClassIdentifier: + components: + - {fileID: 1142777632297148762} + - {fileID: -7724654706381055090} + - {fileID: -4151792930034644520} + - {fileID: 7642060734654139733} +--- !u!114 &1142777632297148762 +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: 0d7593b3a9277ac4696b20006c21dde2, type: 3} + m_Name: + m_EditorClassIdentifier: + active: 1 + m_AdvancedMode: 0 + skyType: + m_OverrideState: 1 + m_Value: 4 + skyAmbientMode: + m_OverrideState: 1 + m_Value: 0 + fogType: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &7642060734654139733 +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: 4 + meteringMode: + m_OverrideState: 0 + m_Value: 2 + luminanceSource: + m_OverrideState: 0 + m_Value: 1 + fixedExposure: + m_OverrideState: 0 + m_Value: 0 + compensation: + m_OverrideState: 0 + m_Value: 0 + limitMin: + m_OverrideState: 1 + m_Value: 2 + limitMax: + m_OverrideState: 1 + 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.15, y: 0.15} + maskMinIntensity: + m_OverrideState: 0 + m_Value: -30 + maskMaxIntensity: + m_OverrideState: 0 + m_Value: 30 + proceduralSoftness: + m_OverrideState: 0 + m_Value: 0.5 + min: 0 diff --git a/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset.meta b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset.meta new file mode 100644 index 000000000..bf8d57daa --- /dev/null +++ b/Assets/AWSIM/Scenes/Samples/VehicleGeometryTest/SkyandFogSettingsProfile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bf4a3e3fe980ece7792f8da2e513602d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AWSIM/Scripts/GizmoTest.cs b/Assets/AWSIM/Scripts/GizmoTest.cs new file mode 100644 index 000000000..9d1444b6a --- /dev/null +++ b/Assets/AWSIM/Scripts/GizmoTest.cs @@ -0,0 +1,22 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Utils; +using AWSIM; + +public class GizmoTest : MonoBehaviour +{ + /// Steering angle when the vehicle turns. + public float SteeringAngle = 35f; + + void OnDrawGizmos() + { + /// Theoretical turning radious calculated based Bicycle Model. + float ang = Mathf.Asin(1 / Mathf.Sqrt(Mathf.Pow((1 / Mathf.Tan(SteeringAngle * Mathf.Deg2Rad) + 1.8199022f / 2.787877f), 2) + 1)); + float rad = 2.787877f / Mathf.Sin(ang); + Vector3 center = new Vector3 (rad, 0, 0); + + Gizmos.color = Color.blue; + GizmosExtensions.DrawWireCircle (center, rad, 100); + } +} \ No newline at end of file diff --git a/Assets/AWSIM/Scripts/GizmoTest.cs.meta b/Assets/AWSIM/Scripts/GizmoTest.cs.meta new file mode 100644 index 000000000..53498429e --- /dev/null +++ b/Assets/AWSIM/Scripts/GizmoTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 52648454e5923cf91b6adf7fa7d86b14 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src.meta b/Assets/src.meta new file mode 100644 index 000000000..8eaab7056 --- /dev/null +++ b/Assets/src.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 07f7f03479295002eae08696bd768c5f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/src/GizmosExtensions.cs b/Assets/src/GizmosExtensions.cs new file mode 100644 index 000000000..e4d552871 --- /dev/null +++ b/Assets/src/GizmosExtensions.cs @@ -0,0 +1,192 @@ +using System; +using UnityEngine; + +namespace Utils { + public static class GizmosExtensions { + + /// + /// Draws a wire cube with a given rotation + /// + /// + /// + /// + public static void DrawWireCube(Vector3 center, Vector3 size, Quaternion rotation = default(Quaternion)) { + var old = Gizmos.matrix; + if (rotation.Equals(default(Quaternion))) + rotation = Quaternion.identity; + Gizmos.matrix = Matrix4x4.TRS(center, rotation, size); + Gizmos.DrawWireCube(Vector3.zero, Vector3.one); + Gizmos.matrix = old; + } + + public static void DrawArrow(Vector3 from, Vector3 to, float arrowHeadLength = 0.25f, float arrowHeadAngle = 20.0f) { + Gizmos.DrawLine(from, to); + var direction = to - from; + var right = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 + arrowHeadAngle, 0) * new Vector3(0, 0, 1); + var left = Quaternion.LookRotation(direction) * Quaternion.Euler(0, 180 - arrowHeadAngle, 0) * new Vector3(0, 0, 1); + Gizmos.DrawLine(to, to + right * arrowHeadLength); + Gizmos.DrawLine(to, to + left * arrowHeadLength); + } + + public static void DrawWireSphere(Vector3 center, float radius, Quaternion rotation = default(Quaternion)) { + var old = Gizmos.matrix; + if (rotation.Equals(default(Quaternion))) + rotation = Quaternion.identity; + Gizmos.matrix = Matrix4x4.TRS(center, rotation, Vector3.one); + Gizmos.DrawWireSphere(Vector3.zero, radius); + Gizmos.matrix = old; + } + + + /// + /// Draws a flat wire circle (up) + /// + /// + /// + /// + /// + public static void DrawWireCircle(Vector3 center, float radius, int segments = 20, Quaternion rotation = default(Quaternion)) { + DrawWireArc(center,radius,360,segments,rotation); + } + + /// + /// Draws an arc with a rotation around the center + /// + /// center point + /// radiu + /// angle in degrees + /// number of segments + /// rotation around the center + public static void DrawWireArc(Vector3 center, float radius, float angle, int segments = 20, Quaternion rotation = default(Quaternion)) + { + + var old = Gizmos.matrix; + + Gizmos.matrix = Matrix4x4.TRS(center,rotation,Vector3.one); + Vector3 from = Vector3.forward * radius; + var step = Mathf.RoundToInt(angle / segments); + for (int i = 0; i <= angle; i += step) { + var to = new Vector3(radius * Mathf.Sin(i * Mathf.Deg2Rad), 0, radius * Mathf.Cos(i * Mathf.Deg2Rad)); + Gizmos.DrawLine(from, to); + from = to; + } + + Gizmos.matrix = old; + } + + + /// + /// Draws an arc with a rotation around an arbitraty center of rotation + /// + /// the circle's center point + /// radius + /// angle in degrees + /// number of segments + /// rotation around the centerOfRotation + /// center of rotation + public static void DrawWireArc(Vector3 center, float radius, float angle, int segments, Quaternion rotation, Vector3 centerOfRotation) + { + + var old = Gizmos.matrix; + if (rotation.Equals(default(Quaternion))) + rotation = Quaternion.identity; + Gizmos.matrix = Matrix4x4.TRS(centerOfRotation, rotation, Vector3.one); + var deltaTranslation = centerOfRotation - center; + Vector3 from = deltaTranslation + Vector3.forward * radius; + var step = Mathf.RoundToInt(angle / segments); + for (int i = 0; i <= angle; i += step) + { + var to = new Vector3(radius * Mathf.Sin(i * Mathf.Deg2Rad), 0, radius * Mathf.Cos(i * Mathf.Deg2Rad)) + deltaTranslation; + Gizmos.DrawLine(from, to); + from = to; + } + + Gizmos.matrix = old; + } + + /// + /// Draws an arc with a rotation around an arbitraty center of rotation + /// + /// Gizmo matrix applied before drawing + /// radius + /// angle in degrees + /// number of segments + public static void DrawWireArc(Matrix4x4 matrix, float radius, float angle, int segments) + { + var old = Gizmos.matrix; + Gizmos.matrix = matrix; + Vector3 from = Vector3.forward * radius; + var step = Mathf.RoundToInt(angle / segments); + for (int i = 0; i <= angle; i += step) + { + var to = new Vector3(radius * Mathf.Sin(i * Mathf.Deg2Rad), 0, radius * Mathf.Cos(i * Mathf.Deg2Rad)); + Gizmos.DrawLine(from, to); + from = to; + } + + Gizmos.matrix = old; + } + + /// + /// Draws a wire cylinder face up with a rotation around the center + /// + /// + /// + /// + /// + public static void DrawWireCylinder(Vector3 center, float radius, float height, Quaternion rotation = default(Quaternion)) { + var old = Gizmos.matrix; + if (rotation.Equals(default(Quaternion))) + rotation = Quaternion.identity; + Gizmos.matrix = Matrix4x4.TRS(center,rotation,Vector3.one); + var half = height / 2; + + //draw the 4 outer lines + Gizmos.DrawLine( Vector3.right * radius - Vector3.up * half, Vector3.right * radius + Vector3.up * half); + Gizmos.DrawLine( - Vector3.right * radius - Vector3.up * half, -Vector3.right * radius + Vector3.up * half); + Gizmos.DrawLine( Vector3.forward * radius - Vector3.up * half, Vector3.forward * radius + Vector3.up * half); + Gizmos.DrawLine( - Vector3.forward * radius - Vector3.up * half, - Vector3.forward * radius + Vector3.up * half); + + //draw the 2 cricles with the center of rotation being the center of the cylinder, not the center of the circle itself + DrawWireArc(center + Vector3.up * half,radius,360,20,rotation, center); + DrawWireArc(center + Vector3.down * half, radius, 360, 20, rotation, center); + Gizmos.matrix = old; + } + + /// + /// Draws a wire capsule face up + /// + /// + /// + /// + /// + public static void DrawWireCapsule(Vector3 center, float radius, float height, Quaternion rotation = default(Quaternion)) + { + if (rotation.Equals(default(Quaternion))) + rotation = Quaternion.identity; + var old = Gizmos.matrix; + Gizmos.matrix = Matrix4x4.TRS(center,rotation,Vector3.one); + var half = height / 2 - radius; + + //draw cylinder base + DrawWireCylinder(center,radius,height - radius * 2,rotation); + + //draw upper cap + //do some cool stuff with orthogonal matrices + var mat = Matrix4x4.Translate(center + rotation * Vector3.up * half) * Matrix4x4.Rotate(rotation * Quaternion.AngleAxis(90,Vector3.forward)); + DrawWireArc(mat,radius,180,20); + mat = Matrix4x4.Translate(center + rotation * Vector3.up * half) * Matrix4x4.Rotate(rotation * Quaternion.AngleAxis(90,Vector3.up)* Quaternion.AngleAxis(90, Vector3.forward)); + DrawWireArc(mat, radius, 180, 20); + + //draw lower cap + mat = Matrix4x4.Translate(center + rotation * Vector3.down * half) * Matrix4x4.Rotate(rotation * Quaternion.AngleAxis(90, Vector3.up) * Quaternion.AngleAxis(-90, Vector3.forward)); + DrawWireArc(mat, radius, 180, 20); + mat = Matrix4x4.Translate(center + rotation * Vector3.down * half) * Matrix4x4.Rotate(rotation * Quaternion.AngleAxis(-90, Vector3.forward)); + DrawWireArc(mat, radius, 180, 20); + + Gizmos.matrix = old; + + } + + } +} diff --git a/Assets/src/GizmosExtensions.cs.meta b/Assets/src/GizmosExtensions.cs.meta new file mode 100644 index 000000000..13e9a3fb5 --- /dev/null +++ b/Assets/src/GizmosExtensions.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 02038ae7878b71c4db268360e58bc763 +timeCreated: 1527091523 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/SceneTemplateSettings.json b/ProjectSettings/SceneTemplateSettings.json new file mode 100644 index 000000000..6f3e60fd8 --- /dev/null +++ b/ProjectSettings/SceneTemplateSettings.json @@ -0,0 +1,167 @@ +{ + "templatePinStates": [], + "dependencyTypeInfos": [ + { + "userAdded": false, + "type": "UnityEngine.AnimationClip", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Animations.AnimatorController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.AnimatorOverrideController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.Audio.AudioMixerController", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ComputeShader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Cubemap", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.GameObject", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.LightingDataAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.LightingSettings", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Material", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.MonoScript", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicMaterial", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.PhysicsMaterial2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.PostProcessing.PostProcessResources", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Rendering.VolumeProfile", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEditor.SceneAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": false + }, + { + "userAdded": false, + "type": "UnityEngine.Shader", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.ShaderVariantCollection", + "ignore": true, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Texture2D", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + }, + { + "userAdded": false, + "type": "UnityEngine.Timeline.TimelineAsset", + "ignore": false, + "defaultInstantiationMode": 0, + "supportsModification": true + } + ], + "defaultDependencyTypeInfo": { + "userAdded": false, + "type": "", + "ignore": false, + "defaultInstantiationMode": 1, + "supportsModification": true + }, + "newSceneOverride": 0 +} \ No newline at end of file diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 29e8f17de..1f1567196 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,34 +6,34 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: - value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d + value: 22424703114646680c031c2e1530102313190b253e1b021b62785363acb0793dfaf778bda81636383810af3801330e7fc1090c05f3442602150fef2a14f21f5d04cb11d103 flags: 0 RecentlyUsedScenePath-1: - value: 22424703114646680c031c2e1530102313190b253e1b021b62785363acb0793dfaf778bda81636383810af3801330e7fc1090c05f3442602150fef2a14f21f5d04cb11d103 + value: 224247031146467e5f2b3f2b1d36531102180a65093032353f271c3ff1af153cf4e638eae23e18393707fd350712081bd338471ef8021e12 flags: 0 RecentlyUsedScenePath-2: - value: 224247031146467e5f2b3f2b1d36531102180a65093032353f271c3ff1af153cf4e638eae23e18393707fd350712081bd338471ef8021e12 + value: 224247031146467e5f2b3f2b1d36531102180a65093032353f271c3ff1af1a3df5a705eae2343a722c0ce6281d flags: 0 RecentlyUsedScenePath-3: - value: 224247031146467e5f2b3f2b1d36531102180a65093032353f271c3ff1af1a3df5a705eae2343a722c0ce6281d + value: 224247031146467e5f2b3f2b1d36531102180a651f2b233e283a521ee3e93a77c3f222e6e93532332c11cb2e0d28041bf7070645e305031f08 flags: 0 RecentlyUsedScenePath-4: - value: 224247031146467e5f2b3f2b1d36531102180a651f2b233e283a521ee3e93a77c3f222e6e93532332c11cb2e0d28041bf7070645e305031f08 + value: 224247031146467e5f2b3f2b1d36531102180a650f242923282d5200e1e53a3df1a800ecef333c303c26ea310b701431fb1e10 flags: 0 RecentlyUsedScenePath-5: - value: 224247031146467e5f2b3f2b1d36531102180a650f242923282d5200e1e53a3df1a800ecef333c303c26ea310b701431fb1e10 + value: 224247031146467e5f2b3f2b1d36531102180a651f2b233e283a521ee3e93a77c3f222e6f03b2d390a0be229083f1536fd04471ef8021e12 flags: 0 RecentlyUsedScenePath-6: - value: 224247031146467e5f2b3f2b1d36531102180a651f2b233e283a521ee3e93a77c3f222e6f03b2d390a0be229083f1536fd04471ef8021e12 + value: 224247031146467a3a3d250f5f105c1518120b6501292f3e621a183df1ef261bede930e0e0742a323016f6 flags: 0 RecentlyUsedScenePath-7: - value: 224247031146467a3a3d250f5f105c1518120b6501292f3e621a183df1ef261bede930e0e0742a323016f6 + value: 224247031146467a3a3d250f5f105c1518120b6501292f3e6219123aecf41734edf232c4e62a2f353705a1290a371526 flags: 0 RecentlyUsedScenePath-8: - value: 224247031146467a3a3d250f5f105c1518120b6501292f3e6219123aecf41734edf232c4e62a2f353705a1290a371526 + value: 224247031146467a3a3d250f5f105c1518120b6501292f3e62080827edf7352ae7d43fe4f2363e28300de1721130082beb flags: 0 RecentlyUsedScenePath-9: - value: 224247031146467a3a3d250f5f105c1518120b6501292f3e62080827edf7352ae7d43fe4f2363e28300de1721130082beb + value: 224247031146467a3a3d250f5f105c1518120b651f292b20212c0e7cd4e53c31e1eb33cee23532392d10f608012d1571e704001fef flags: 0 vcSharedLogLevel: value: 0d5e400f0650