Browse Source

Line Renderer Experiment

Marcel Zickler 3 years ago
parent
commit
1253355f8c

+ 2 - 0
Assembly-CSharp.csproj

@@ -289,6 +289,8 @@
      <Compile Include="Assets\Scripts\Logging\TimeSync.cs" />
      <Compile Include="Assets\Scripts\Logging\ViveSensorDataLogger.cs" />
      <Compile Include="Assets\Scripts\Plotting\DebugPlot.cs" />
+     <Compile Include="Assets\Scripts\Routes\RouteRenderer.cs" />
+     <Compile Include="Assets\Scripts\Routes\RouteTrajectory.cs" />
      <Compile Include="Assets\Scripts\Sensors\ANT\HrReceiver.cs" />
      <Compile Include="Assets\Scripts\Sensors\ANT\PowerMeterReceiver.cs" />
      <Compile Include="Assets\Scripts\Sensors\ANT\SpeedSensorReceiver.cs" />

+ 1 - 1
Assets/PolygonCity/Materials/PolygonCity_Mat_01_B.mat

@@ -9,7 +9,7 @@ Material:
   m_PrefabAsset: {fileID: 0}
   m_Name: PolygonCity_Mat_01_B
   m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
-  m_ShaderKeywords: _EMISSION _ENVIRONMENTREFLECTIONS_OFF _METALLICSPECGLOSSMAP _NORMALMAP
+  m_ShaderKeywords: _ENVIRONMENTREFLECTIONS_OFF _METALLICSPECGLOSSMAP _NORMALMAP
   m_LightmapFlags: 6
   m_EnableInstancingVariants: 0
   m_DoubleSidedGI: 0

+ 2 - 2
Assets/PolygonCity/Materials/PolygonCity_Mat_02_B.mat

@@ -9,8 +9,8 @@ Material:
   m_PrefabAsset: {fileID: 0}
   m_Name: PolygonCity_Mat_02_B
   m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
-  m_ShaderKeywords: _EMISSION _ENVIRONMENTREFLECTIONS_OFF _METALLICSPECGLOSSMAP _NORMALMAP
-  m_LightmapFlags: 1
+  m_ShaderKeywords: _ENVIRONMENTREFLECTIONS_OFF _METALLICSPECGLOSSMAP _NORMALMAP
+  m_LightmapFlags: 6
   m_EnableInstancingVariants: 0
   m_DoubleSidedGI: 0
   m_CustomRenderQueue: 2050

+ 149 - 0
Assets/Scenes/MainScene.unity

@@ -86916,6 +86916,155 @@ PrefabInstance:
       objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: a5b72bb8afb9a3241ae5eb12007ad0ac, type: 3}
+--- !u!1 &354685040
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 354685042}
+  - component: {fileID: 354685041}
+  m_Layer: 0
+  m_Name: Route
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!120 &354685041
+LineRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 354685040}
+  m_Enabled: 1
+  m_CastShadows: 0
+  m_ReceiveShadows: 1
+  m_DynamicOccludee: 1
+  m_MotionVectors: 0
+  m_LightProbeUsage: 0
+  m_ReflectionProbeUsage: 0
+  m_RayTracingMode: 0
+  m_RenderingLayerMask: 1
+  m_RendererPriority: 0
+  m_Materials:
+  - {fileID: 2100000, guid: ee26ded8aeae32044836748251f93891, 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_Positions:
+  - {x: 3.8203564, y: 0.49887756, z: -0.1195006}
+  - {x: 9.101923, y: 0.10000013, z: 0.007335186}
+  - {x: 15.765409, y: 0.10000013, z: -0.095576525}
+  - {x: 26.545794, y: 0.10000013, z: -0.07988572}
+  - {x: 33.816097, y: 0.10000013, z: 0.046153307}
+  - {x: 46.332485, y: 0.10000013, z: -0.25157404}
+  - {x: 54.79314, y: 0.10000013, z: -0.07421589}
+  - {x: 60.33134, y: 0.10000013, z: -0.059036493}
+  - {x: 98.9403, y: 0.10000013, z: 0.10223794}
+  - {x: 103.29938, y: 0.10000002, z: -0.19890976}
+  - {x: 105.126976, y: 0.10000002, z: -0.3288715}
+  - {x: 109.31748, y: 0.1, z: 0.08164692}
+  - {x: 109.975815, y: 0.1, z: 0.760046}
+  - {x: 110.07887, y: 0.10000002, z: 2.6873908}
+  - {x: 109.934975, y: 0.100000024, z: 5.200957}
+  - {x: 110.131775, y: 0.10000013, z: 14.783737}
+  - {x: 109.76239, y: 0.10000013, z: 37.23981}
+  - {x: 109.59631, y: 0.10000013, z: 87.40021}
+  - {x: 109.36108, y: 0.1, z: 100.25118}
+  - {x: 105.14554, y: 0.1, z: 100.48354}
+  - {x: 47.17576, y: 0.10000014, z: 99.987305}
+  - {x: 19.52054, y: 0.10000012, z: 100.5023}
+  - {x: 18.782904, y: 0.10000013, z: 121.54102}
+  m_Parameters:
+    serializedVersion: 3
+    widthMultiplier: 2
+    widthCurve:
+      serializedVersion: 2
+      m_Curve:
+      - serializedVersion: 3
+        time: 0.0586586
+        value: 1
+        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: 1, b: 1, a: 1}
+      key1: {r: 1, g: 1, b: 1, 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: 1
+    textureMode: 1
+    shadowBias: 0.5
+    generateLightingData: 0
+  m_UseWorldSpace: 1
+  m_Loop: 0
+--- !u!4 &354685042
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 354685040}
+  m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_RootOrder: 6
+  m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
 --- !u!1001 &354958613
 PrefabInstance:
   m_ObjectHideFlags: 0

+ 3 - 0
Assets/Scripts/Routes.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 39c19ad0f75a4a22b65d71cfb0df583f
+timeCreated: 1609341898

+ 10 - 0
Assets/Scripts/Routes/RouteRenderer.cs

@@ -0,0 +1,10 @@
+using UnityEngine;
+
+namespace Routes
+{
+    public class RouteRenderer : MonoBehaviour
+    {
+
+        public RouteTrajectory route;
+    }
+}

+ 3 - 0
Assets/Scripts/Routes/RouteRenderer.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: b1bc4354843c43f19f183117b45e0b9b
+timeCreated: 1609341961

+ 11 - 0
Assets/Scripts/Routes/RouteTrajectory.cs

@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Routes
+{
+    [CreateAssetMenu(fileName = "Route", menuName = "ScriptableObjects/RouteTrajectory", order = 0)]
+    public class RouteTrajectory : ScriptableObject
+    {
+        public List<Vector3> points;
+    }
+}

+ 3 - 0
Assets/Scripts/Routes/RouteTrajectory.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 0edb99d48e914465a069ad6898236082
+timeCreated: 1609342417