├── Assets ├── SeuratCapture.meta ├── SeuratCapture │ ├── Editor.meta │ ├── Editor │ │ ├── CaptureHeadboxEditor.cs │ │ └── CaptureHeadboxEditor.cs.meta │ ├── Scenes.meta │ ├── Scenes │ │ ├── Seurat.meta │ │ ├── Seurat.unity │ │ ├── Seurat.unity.meta │ │ └── Seurat │ │ │ ├── Blue.mat │ │ │ ├── Blue.mat.meta │ │ │ ├── Green.mat │ │ │ ├── Green.mat.meta │ │ │ ├── Red.mat │ │ │ └── Red.mat.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── CaptureBuilder.cs │ │ ├── CaptureBuilder.cs.meta │ │ ├── CaptureHeadbox.cs │ │ ├── CaptureHeadbox.cs.meta │ │ ├── JsonManifest.cs │ │ └── JsonManifest.cs.meta │ ├── Shaders.meta │ ├── Shaders │ │ ├── AlphaBlended.shader │ │ ├── AlphaBlended.shader.meta │ │ ├── AlphaTested.shader │ │ └── AlphaTested.shader.meta │ ├── Tools.meta │ └── Tools │ │ ├── win.meta │ │ └── win │ │ ├── softserve.exe │ │ └── softserve.exe.meta ├── third_party.meta └── third_party │ ├── builtin_shaders.meta │ └── builtin_shaders │ ├── DefaultResourcesExtra.meta │ ├── DefaultResourcesExtra │ ├── Internal-DepthNormalsTexture.shader │ └── Internal-DepthNormalsTexture.shader.meta │ ├── README.md │ ├── README.md.meta │ ├── license.txt │ └── license.txt.meta ├── CONTRIBUTING.md ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset ├── README.md └── images ├── cracks_01.png └── cracks_02.png /Assets/SeuratCapture.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5be8233589f80a64ab017854259c9b59 3 | folderAsset: yes 4 | timeCreated: 1454392644 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48087416a62bccf4e992a969b2688630 3 | folderAsset: yes 4 | timeCreated: 1454392654 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Editor/CaptureHeadboxEditor.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Google Inc. All Rights Reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | 22 | using UnityEngine; 23 | using UnityEngine.SceneManagement; 24 | using UnityEditor; 25 | using UnityEditor.SceneManagement; 26 | using System.Collections.Generic; 27 | using System.IO; 28 | 29 | // Reflects status updates back to CaptureWindow, and allows CaptureWindow to 30 | // notify capture/baking tasks to cancel. 31 | class EditorBakeStatus : CaptureStatus 32 | { 33 | bool task_cancelled_ = false; 34 | CaptureWindow bake_gui_; 35 | 36 | public override void SendProgress(string message, float fraction_complete) 37 | { 38 | bake_gui_.SetProgressBar(message, fraction_complete); 39 | } 40 | 41 | public override bool TaskContinuing() 42 | { 43 | return !task_cancelled_; 44 | } 45 | 46 | public void SetGUI(CaptureWindow bake_gui) { bake_gui_ = bake_gui; } 47 | 48 | public void CancelTask() 49 | { 50 | Debug.Log("User canceled capture processing."); 51 | task_cancelled_ = true; 52 | } 53 | } 54 | 55 | // Provides an interactive modeless GUI during the capture and bake process. 56 | class CaptureWindow : EditorWindow 57 | { 58 | // Defines a state machine flow for the capture and bake process. 59 | enum BakeStage { 60 | kInitialization, 61 | kCapture, 62 | // This stage indicates the GUI is waiting for user to dismiss the window 63 | // by pressing a "Done" button. 64 | kWaitForDoneButton, 65 | kComplete, 66 | } 67 | 68 | const float kTimerInterval = 0.016f; 69 | const int kTimerExpirationsPerCapture = 4; 70 | 71 | float last_time_; 72 | float ui_timer_ = 0.25f; 73 | int capture_timer_; 74 | 75 | string progress_message_; 76 | float progress_complete_; 77 | // The headbox component receives notification that capture is complete to 78 | // update the Inspector GUI, e.g. unlock the Capture button. 79 | CaptureHeadbox capture_notification_component_; 80 | CaptureBuilder monitored_capture_; 81 | EditorBakeStatus capture_status_; 82 | 83 | BakeStage bake_stage_ = BakeStage.kInitialization; 84 | 85 | public void SetupStatus(EditorBakeStatus capture_status) 86 | { 87 | capture_status_ = capture_status; 88 | capture_status_.SetGUI(this); 89 | } 90 | 91 | public void SetupCaptureProcess(CaptureHeadbox capture_notification_component, 92 | CaptureBuilder capture) 93 | { 94 | capture_timer_ = kTimerExpirationsPerCapture; 95 | bake_stage_ = BakeStage.kCapture; 96 | last_time_ = Time.realtimeSinceStartup; 97 | capture_notification_component_ = capture_notification_component; 98 | monitored_capture_ = capture; 99 | } 100 | 101 | public void SetProgressBar(string message, float fraction_complete) 102 | { 103 | progress_message_ = message; 104 | progress_complete_ = fraction_complete; 105 | } 106 | 107 | public void OnGUI() 108 | { 109 | // Reserve layout space for the progress bar, equal to the space for a 110 | // textfield: 111 | Rect progress_rect = GUILayoutUtility.GetRect(18, 18, "TextField"); 112 | EditorGUI.ProgressBar(progress_rect, progress_complete_, progress_message_); 113 | EditorGUILayout.Space(); 114 | 115 | if (bake_stage_ != BakeStage.kWaitForDoneButton) { 116 | if (GUILayout.Button("Cancel")) { 117 | if (capture_status_ != null) { 118 | capture_status_.CancelTask(); 119 | } 120 | } 121 | } 122 | 123 | if (bake_stage_ == BakeStage.kWaitForDoneButton) { 124 | if (GUILayout.Button("Done")) { 125 | bake_stage_ = BakeStage.kComplete; 126 | } 127 | } 128 | } 129 | 130 | private bool UpdateAndCheckUiTimerReady() 131 | { 132 | bool ui_timer_ready = false; 133 | float delta_time = Time.realtimeSinceStartup - last_time_; 134 | last_time_ = Time.realtimeSinceStartup; 135 | ui_timer_ -= delta_time; 136 | if (ui_timer_ <= 0.0f) { 137 | ui_timer_ready = true; 138 | // Prevent the timer from going infinitely negative due to large real time 139 | // intervals, e.g. from slow frame capture rendering. 140 | if (ui_timer_ <= -kTimerInterval) { 141 | ui_timer_ = 0.0f; 142 | } 143 | ui_timer_ += kTimerInterval; 144 | } 145 | return ui_timer_ready; 146 | } 147 | 148 | public void Update() 149 | { 150 | if (capture_status_ != null && capture_status_.TaskContinuing() && !UpdateAndCheckUiTimerReady()) { 151 | return; 152 | } 153 | 154 | // Refresh the Editor GUI to finish the task. 155 | EditorUtility.SetDirty(capture_notification_component_); 156 | 157 | if (bake_stage_ == BakeStage.kCapture) 158 | { 159 | --capture_timer_; 160 | if (capture_timer_ == 0) { 161 | capture_timer_ = kTimerExpirationsPerCapture; 162 | 163 | monitored_capture_.RunCapture(); 164 | 165 | if (monitored_capture_.IsCaptureComplete() && 166 | capture_status_.TaskContinuing()) 167 | { 168 | monitored_capture_.EndCapture(); 169 | monitored_capture_ = null; 170 | 171 | bake_stage_ = BakeStage.kWaitForDoneButton; 172 | } 173 | } 174 | 175 | if (capture_status_ != null && !capture_status_.TaskContinuing()) 176 | { 177 | bake_stage_ = BakeStage.kComplete; 178 | if (monitored_capture_ != null) { 179 | monitored_capture_.EndCapture(); 180 | monitored_capture_ = null; 181 | } 182 | } 183 | } 184 | 185 | // Repaint with updated progress the GUI on each wall-clock time tick. 186 | Repaint(); 187 | } 188 | 189 | public bool IsComplete() 190 | { 191 | return bake_stage_ == BakeStage.kComplete; 192 | } 193 | }; 194 | 195 | 196 | // Implements the Capture Headbox component Editor panel. 197 | [CustomEditor(typeof(CaptureHeadbox))] 198 | public class CaptureHeadboxEditor : Editor { 199 | public static readonly string kSeuratCaptureDir = "SeuratCapture"; 200 | 201 | SerializedProperty output_folder_; 202 | SerializedProperty size_; 203 | SerializedProperty samples_; 204 | SerializedProperty center_resolution_; 205 | SerializedProperty resolution_; 206 | SerializedProperty dynamic_range_; 207 | SerializedProperty last_output_dir_; 208 | 209 | EditorBakeStatus capture_status_; 210 | CaptureWindow bake_progress_window_; 211 | CaptureBuilder capture_builder_; 212 | 213 | void OnEnable() { 214 | output_folder_ = serializedObject.FindProperty("output_folder_"); 215 | size_ = serializedObject.FindProperty("size_"); 216 | samples_ = serializedObject.FindProperty("samples_per_face_"); 217 | center_resolution_ = serializedObject.FindProperty("center_resolution_"); 218 | resolution_ = serializedObject.FindProperty("resolution_"); 219 | dynamic_range_ = serializedObject.FindProperty("dynamic_range_"); 220 | last_output_dir_ = serializedObject.FindProperty("last_output_dir_"); 221 | } 222 | 223 | public override void OnInspectorGUI() { 224 | serializedObject.Update(); 225 | 226 | EditorGUILayout.PropertyField(output_folder_, new GUIContent( 227 | "Output Folder")); 228 | if (GUILayout.Button("Choose Output Folder")) { 229 | string path = EditorUtility.SaveFolderPanel( 230 | "Choose Capture Output Folder", output_folder_.stringValue, ""); 231 | if (path.Length != 0) { 232 | output_folder_.stringValue = path; 233 | } 234 | } 235 | 236 | EditorGUILayout.PropertyField(size_, new GUIContent("Headbox Size")); 237 | EditorGUILayout.PropertyField(samples_, new GUIContent("Sample Count")); 238 | EditorGUILayout.PropertyField(center_resolution_, new GUIContent( 239 | "Center Capture Resolution")); 240 | EditorGUILayout.PropertyField(resolution_, new GUIContent( 241 | "Default Resolution")); 242 | EditorGUILayout.PropertyField(dynamic_range_, new GUIContent( 243 | "Dynamic Range")); 244 | 245 | EditorGUILayout.PropertyField(last_output_dir_, new GUIContent( 246 | "Last Output Folder")); 247 | 248 | if (capture_status_ != null) 249 | { 250 | GUI.enabled = false; 251 | } 252 | if (GUILayout.Button("Capture")) { 253 | Capture(); 254 | } 255 | GUI.enabled = true; 256 | 257 | serializedObject.ApplyModifiedProperties(); 258 | 259 | // Poll the bake status. 260 | if (bake_progress_window_ != null && bake_progress_window_.IsComplete()) { 261 | bake_progress_window_.Close(); 262 | bake_progress_window_ = null; 263 | capture_builder_ = null; 264 | capture_status_ = null; 265 | } 266 | } 267 | 268 | public void Capture() { 269 | CaptureHeadbox headbox = (CaptureHeadbox)target; 270 | 271 | string capture_output_folder = headbox.output_folder_; 272 | if (capture_output_folder.Length <= 0) { 273 | capture_output_folder = FileUtil.GetUniqueTempPathInProject(); 274 | } 275 | headbox.last_output_dir_ = capture_output_folder; 276 | Directory.CreateDirectory(capture_output_folder); 277 | 278 | capture_status_ = new EditorBakeStatus(); 279 | capture_builder_ = new CaptureBuilder(); 280 | 281 | // Kick off the interactive Editor bake window. 282 | bake_progress_window_ = (CaptureWindow)EditorWindow.GetWindow(typeof(CaptureWindow)); 283 | bake_progress_window_.SetupStatus(capture_status_); 284 | 285 | capture_builder_.BeginCapture(headbox, capture_output_folder, 1, capture_status_); 286 | bake_progress_window_.SetupCaptureProcess(headbox, capture_builder_); 287 | } 288 | } 289 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Editor/CaptureHeadboxEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 56efabba1ac947c4db25390445039e4a 3 | timeCreated: 1507659822 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbda8123d54004107baee9ed55c02f25 3 | folderAsset: yes 4 | timeCreated: 1454393039 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 971087477aed1e8489a51ba35599852a 3 | folderAsset: yes 4 | timeCreated: 1507667419 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 8 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.18028377, g: 0.22571409, b: 0.30692285, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 9 46 | m_GIWorkflowMode: 0 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 8 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 0 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVRFiltering: 0 81 | m_PVRFilteringMode: 1 82 | m_PVRCulling: 1 83 | m_PVRFilteringGaussRadiusDirect: 1 84 | m_PVRFilteringGaussRadiusIndirect: 5 85 | m_PVRFilteringGaussRadiusAO: 2 86 | m_PVRFilteringAtrousColorSigma: 1 87 | m_PVRFilteringAtrousNormalSigma: 1 88 | m_PVRFilteringAtrousPositionSigma: 1 89 | m_LightingDataAsset: {fileID: 0} 90 | m_ShadowMaskMode: 2 91 | --- !u!196 &4 92 | NavMeshSettings: 93 | serializedVersion: 2 94 | m_ObjectHideFlags: 0 95 | m_BuildSettings: 96 | serializedVersion: 2 97 | agentTypeID: 0 98 | agentRadius: 0.5 99 | agentHeight: 2 100 | agentSlope: 45 101 | agentClimb: 0.4 102 | ledgeDropHeight: 0 103 | maxJumpAcrossDistance: 0 104 | minRegionArea: 2 105 | manualCellSize: 0 106 | cellSize: 0.16666667 107 | manualTileSize: 0 108 | tileSize: 256 109 | accuratePlacement: 0 110 | m_NavMeshData: {fileID: 0} 111 | --- !u!1 &9155106 112 | GameObject: 113 | m_ObjectHideFlags: 0 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 0} 116 | serializedVersion: 5 117 | m_Component: 118 | - component: {fileID: 9155110} 119 | - component: {fileID: 9155109} 120 | - component: {fileID: 9155108} 121 | - component: {fileID: 9155107} 122 | m_Layer: 0 123 | m_Name: QuadUpPos5Z 124 | m_TagString: Untagged 125 | m_Icon: {fileID: 0} 126 | m_NavMeshLayer: 0 127 | m_StaticEditorFlags: 0 128 | m_IsActive: 1 129 | --- !u!23 &9155107 130 | MeshRenderer: 131 | m_ObjectHideFlags: 0 132 | m_PrefabParentObject: {fileID: 0} 133 | m_PrefabInternal: {fileID: 0} 134 | m_GameObject: {fileID: 9155106} 135 | m_Enabled: 1 136 | m_CastShadows: 1 137 | m_ReceiveShadows: 1 138 | m_MotionVectors: 1 139 | m_LightProbeUsage: 1 140 | m_ReflectionProbeUsage: 1 141 | m_Materials: 142 | - {fileID: 2100000, guid: b8b542e53202c2d478f1fdd930be6f55, type: 2} 143 | m_StaticBatchInfo: 144 | firstSubMesh: 0 145 | subMeshCount: 0 146 | m_StaticBatchRoot: {fileID: 0} 147 | m_ProbeAnchor: {fileID: 0} 148 | m_LightProbeVolumeOverride: {fileID: 0} 149 | m_ScaleInLightmap: 1 150 | m_PreserveUVs: 1 151 | m_IgnoreNormalsForChartDetection: 0 152 | m_ImportantGI: 0 153 | m_SelectedEditorRenderState: 3 154 | m_MinimumChartSize: 4 155 | m_AutoUVMaxDistance: 0.5 156 | m_AutoUVMaxAngle: 89 157 | m_LightmapParameters: {fileID: 0} 158 | m_SortingLayerID: 0 159 | m_SortingLayer: 0 160 | m_SortingOrder: 0 161 | --- !u!64 &9155108 162 | MeshCollider: 163 | m_ObjectHideFlags: 0 164 | m_PrefabParentObject: {fileID: 0} 165 | m_PrefabInternal: {fileID: 0} 166 | m_GameObject: {fileID: 9155106} 167 | m_Material: {fileID: 0} 168 | m_IsTrigger: 0 169 | m_Enabled: 1 170 | serializedVersion: 2 171 | m_Convex: 0 172 | m_InflateMesh: 0 173 | m_SkinWidth: 0.01 174 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 175 | --- !u!33 &9155109 176 | MeshFilter: 177 | m_ObjectHideFlags: 0 178 | m_PrefabParentObject: {fileID: 0} 179 | m_PrefabInternal: {fileID: 0} 180 | m_GameObject: {fileID: 9155106} 181 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 182 | --- !u!4 &9155110 183 | Transform: 184 | m_ObjectHideFlags: 0 185 | m_PrefabParentObject: {fileID: 0} 186 | m_PrefabInternal: {fileID: 0} 187 | m_GameObject: {fileID: 9155106} 188 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 189 | m_LocalPosition: {x: 1, y: 2, z: 5} 190 | m_LocalScale: {x: 1, y: 1, z: 1} 191 | m_Children: [] 192 | m_Father: {fileID: 0} 193 | m_RootOrder: 3 194 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 195 | --- !u!1 &127006606 196 | GameObject: 197 | m_ObjectHideFlags: 0 198 | m_PrefabParentObject: {fileID: 0} 199 | m_PrefabInternal: {fileID: 0} 200 | serializedVersion: 5 201 | m_Component: 202 | - component: {fileID: 127006610} 203 | - component: {fileID: 127006609} 204 | - component: {fileID: 127006608} 205 | - component: {fileID: 127006607} 206 | m_Layer: 0 207 | m_Name: QuadRightPos1Z 208 | m_TagString: Untagged 209 | m_Icon: {fileID: 0} 210 | m_NavMeshLayer: 0 211 | m_StaticEditorFlags: 0 212 | m_IsActive: 1 213 | --- !u!23 &127006607 214 | MeshRenderer: 215 | m_ObjectHideFlags: 0 216 | m_PrefabParentObject: {fileID: 0} 217 | m_PrefabInternal: {fileID: 0} 218 | m_GameObject: {fileID: 127006606} 219 | m_Enabled: 1 220 | m_CastShadows: 1 221 | m_ReceiveShadows: 1 222 | m_MotionVectors: 1 223 | m_LightProbeUsage: 1 224 | m_ReflectionProbeUsage: 1 225 | m_Materials: 226 | - {fileID: 2100000, guid: 392fb89ca8d5c734eab2c3f527e3143b, type: 2} 227 | m_StaticBatchInfo: 228 | firstSubMesh: 0 229 | subMeshCount: 0 230 | m_StaticBatchRoot: {fileID: 0} 231 | m_ProbeAnchor: {fileID: 0} 232 | m_LightProbeVolumeOverride: {fileID: 0} 233 | m_ScaleInLightmap: 1 234 | m_PreserveUVs: 1 235 | m_IgnoreNormalsForChartDetection: 0 236 | m_ImportantGI: 0 237 | m_SelectedEditorRenderState: 3 238 | m_MinimumChartSize: 4 239 | m_AutoUVMaxDistance: 0.5 240 | m_AutoUVMaxAngle: 89 241 | m_LightmapParameters: {fileID: 0} 242 | m_SortingLayerID: 0 243 | m_SortingLayer: 0 244 | m_SortingOrder: 0 245 | --- !u!64 &127006608 246 | MeshCollider: 247 | m_ObjectHideFlags: 0 248 | m_PrefabParentObject: {fileID: 0} 249 | m_PrefabInternal: {fileID: 0} 250 | m_GameObject: {fileID: 127006606} 251 | m_Material: {fileID: 0} 252 | m_IsTrigger: 0 253 | m_Enabled: 1 254 | serializedVersion: 2 255 | m_Convex: 0 256 | m_InflateMesh: 0 257 | m_SkinWidth: 0.01 258 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 259 | --- !u!33 &127006609 260 | MeshFilter: 261 | m_ObjectHideFlags: 0 262 | m_PrefabParentObject: {fileID: 0} 263 | m_PrefabInternal: {fileID: 0} 264 | m_GameObject: {fileID: 127006606} 265 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 266 | --- !u!4 &127006610 267 | Transform: 268 | m_ObjectHideFlags: 0 269 | m_PrefabParentObject: {fileID: 0} 270 | m_PrefabInternal: {fileID: 0} 271 | m_GameObject: {fileID: 127006606} 272 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 273 | m_LocalPosition: {x: 2, y: 0, z: 1} 274 | m_LocalScale: {x: 1, y: 1, z: 1} 275 | m_Children: [] 276 | m_Father: {fileID: 0} 277 | m_RootOrder: 5 278 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 279 | --- !u!1 &297995210 280 | GameObject: 281 | m_ObjectHideFlags: 0 282 | m_PrefabParentObject: {fileID: 0} 283 | m_PrefabInternal: {fileID: 0} 284 | serializedVersion: 5 285 | m_Component: 286 | - component: {fileID: 297995215} 287 | - component: {fileID: 297995214} 288 | - component: {fileID: 297995213} 289 | - component: {fileID: 297995212} 290 | - component: {fileID: 297995211} 291 | m_Layer: 0 292 | m_Name: Main Camera 293 | m_TagString: MainCamera 294 | m_Icon: {fileID: 0} 295 | m_NavMeshLayer: 0 296 | m_StaticEditorFlags: 0 297 | m_IsActive: 1 298 | --- !u!81 &297995211 299 | AudioListener: 300 | m_ObjectHideFlags: 0 301 | m_PrefabParentObject: {fileID: 0} 302 | m_PrefabInternal: {fileID: 0} 303 | m_GameObject: {fileID: 297995210} 304 | m_Enabled: 1 305 | --- !u!124 &297995212 306 | Behaviour: 307 | m_ObjectHideFlags: 0 308 | m_PrefabParentObject: {fileID: 0} 309 | m_PrefabInternal: {fileID: 0} 310 | m_GameObject: {fileID: 297995210} 311 | m_Enabled: 1 312 | --- !u!92 &297995213 313 | Behaviour: 314 | m_ObjectHideFlags: 0 315 | m_PrefabParentObject: {fileID: 0} 316 | m_PrefabInternal: {fileID: 0} 317 | m_GameObject: {fileID: 297995210} 318 | m_Enabled: 1 319 | --- !u!20 &297995214 320 | Camera: 321 | m_ObjectHideFlags: 0 322 | m_PrefabParentObject: {fileID: 0} 323 | m_PrefabInternal: {fileID: 0} 324 | m_GameObject: {fileID: 297995210} 325 | m_Enabled: 1 326 | serializedVersion: 2 327 | m_ClearFlags: 1 328 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 329 | m_NormalizedViewPortRect: 330 | serializedVersion: 2 331 | x: 0 332 | y: 0 333 | width: 1 334 | height: 1 335 | near clip plane: 0.3 336 | far clip plane: 1000 337 | field of view: 60 338 | orthographic: 0 339 | orthographic size: 5 340 | m_Depth: -1 341 | m_CullingMask: 342 | serializedVersion: 2 343 | m_Bits: 4294967295 344 | m_RenderingPath: -1 345 | m_TargetTexture: {fileID: 0} 346 | m_TargetDisplay: 0 347 | m_TargetEye: 3 348 | m_HDR: 0 349 | m_AllowMSAA: 1 350 | m_ForceIntoRT: 0 351 | m_OcclusionCulling: 1 352 | m_StereoConvergence: 10 353 | m_StereoSeparation: 0.022 354 | m_StereoMirrorMode: 0 355 | --- !u!4 &297995215 356 | Transform: 357 | m_ObjectHideFlags: 0 358 | m_PrefabParentObject: {fileID: 0} 359 | m_PrefabInternal: {fileID: 0} 360 | m_GameObject: {fileID: 297995210} 361 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 362 | m_LocalPosition: {x: 0, y: 1, z: -10} 363 | m_LocalScale: {x: 1, y: 1, z: 1} 364 | m_Children: [] 365 | m_Father: {fileID: 0} 366 | m_RootOrder: 0 367 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 368 | --- !u!1 &604930208 369 | GameObject: 370 | m_ObjectHideFlags: 0 371 | m_PrefabParentObject: {fileID: 0} 372 | m_PrefabInternal: {fileID: 0} 373 | serializedVersion: 5 374 | m_Component: 375 | - component: {fileID: 604930212} 376 | - component: {fileID: 604930211} 377 | - component: {fileID: 604930210} 378 | - component: {fileID: 604930209} 379 | m_Layer: 0 380 | m_Name: QuadLowerLeftZeroZ 381 | m_TagString: Untagged 382 | m_Icon: {fileID: 0} 383 | m_NavMeshLayer: 0 384 | m_StaticEditorFlags: 0 385 | m_IsActive: 1 386 | --- !u!23 &604930209 387 | MeshRenderer: 388 | m_ObjectHideFlags: 0 389 | m_PrefabParentObject: {fileID: 0} 390 | m_PrefabInternal: {fileID: 0} 391 | m_GameObject: {fileID: 604930208} 392 | m_Enabled: 1 393 | m_CastShadows: 1 394 | m_ReceiveShadows: 1 395 | m_MotionVectors: 1 396 | m_LightProbeUsage: 1 397 | m_ReflectionProbeUsage: 1 398 | m_Materials: 399 | - {fileID: 2100000, guid: 3daf27b155f7ad348b0b2e3d40284de1, type: 2} 400 | m_StaticBatchInfo: 401 | firstSubMesh: 0 402 | subMeshCount: 0 403 | m_StaticBatchRoot: {fileID: 0} 404 | m_ProbeAnchor: {fileID: 0} 405 | m_LightProbeVolumeOverride: {fileID: 0} 406 | m_ScaleInLightmap: 1 407 | m_PreserveUVs: 1 408 | m_IgnoreNormalsForChartDetection: 0 409 | m_ImportantGI: 0 410 | m_SelectedEditorRenderState: 3 411 | m_MinimumChartSize: 4 412 | m_AutoUVMaxDistance: 0.5 413 | m_AutoUVMaxAngle: 89 414 | m_LightmapParameters: {fileID: 0} 415 | m_SortingLayerID: 0 416 | m_SortingLayer: 0 417 | m_SortingOrder: 0 418 | --- !u!64 &604930210 419 | MeshCollider: 420 | m_ObjectHideFlags: 0 421 | m_PrefabParentObject: {fileID: 0} 422 | m_PrefabInternal: {fileID: 0} 423 | m_GameObject: {fileID: 604930208} 424 | m_Material: {fileID: 0} 425 | m_IsTrigger: 0 426 | m_Enabled: 1 427 | serializedVersion: 2 428 | m_Convex: 0 429 | m_InflateMesh: 0 430 | m_SkinWidth: 0.01 431 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 432 | --- !u!33 &604930211 433 | MeshFilter: 434 | m_ObjectHideFlags: 0 435 | m_PrefabParentObject: {fileID: 0} 436 | m_PrefabInternal: {fileID: 0} 437 | m_GameObject: {fileID: 604930208} 438 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 439 | --- !u!4 &604930212 440 | Transform: 441 | m_ObjectHideFlags: 0 442 | m_PrefabParentObject: {fileID: 0} 443 | m_PrefabInternal: {fileID: 0} 444 | m_GameObject: {fileID: 604930208} 445 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 446 | m_LocalPosition: {x: -0.5, y: -0.5, z: 0} 447 | m_LocalScale: {x: 1, y: 1, z: 1} 448 | m_Children: [] 449 | m_Father: {fileID: 0} 450 | m_RootOrder: 4 451 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 452 | --- !u!1 &696319081 453 | GameObject: 454 | m_ObjectHideFlags: 0 455 | m_PrefabParentObject: {fileID: 0} 456 | m_PrefabInternal: {fileID: 0} 457 | serializedVersion: 5 458 | m_Component: 459 | - component: {fileID: 696319083} 460 | - component: {fileID: 696319082} 461 | m_Layer: 0 462 | m_Name: Directional Light 463 | m_TagString: Untagged 464 | m_Icon: {fileID: 0} 465 | m_NavMeshLayer: 0 466 | m_StaticEditorFlags: 0 467 | m_IsActive: 1 468 | --- !u!108 &696319082 469 | Light: 470 | m_ObjectHideFlags: 0 471 | m_PrefabParentObject: {fileID: 0} 472 | m_PrefabInternal: {fileID: 0} 473 | m_GameObject: {fileID: 696319081} 474 | m_Enabled: 1 475 | serializedVersion: 8 476 | m_Type: 1 477 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 478 | m_Intensity: 1 479 | m_Range: 10 480 | m_SpotAngle: 30 481 | m_CookieSize: 10 482 | m_Shadows: 483 | m_Type: 2 484 | m_Resolution: -1 485 | m_CustomResolution: -1 486 | m_Strength: 1 487 | m_Bias: 0.05 488 | m_NormalBias: 0.4 489 | m_NearPlane: 0.2 490 | m_Cookie: {fileID: 0} 491 | m_DrawHalo: 0 492 | m_Flare: {fileID: 0} 493 | m_RenderMode: 0 494 | m_CullingMask: 495 | serializedVersion: 2 496 | m_Bits: 4294967295 497 | m_Lightmapping: 4 498 | m_AreaSize: {x: 1, y: 1} 499 | m_BounceIntensity: 1 500 | m_ColorTemperature: 6570 501 | m_UseColorTemperature: 0 502 | m_ShadowRadius: 0 503 | m_ShadowAngle: 0 504 | --- !u!4 &696319083 505 | Transform: 506 | m_ObjectHideFlags: 0 507 | m_PrefabParentObject: {fileID: 0} 508 | m_PrefabInternal: {fileID: 0} 509 | m_GameObject: {fileID: 696319081} 510 | m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} 511 | m_LocalPosition: {x: 0, y: 3, z: 0} 512 | m_LocalScale: {x: 1, y: 1, z: 1} 513 | m_Children: [] 514 | m_Father: {fileID: 0} 515 | m_RootOrder: 1 516 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 517 | --- !u!1 &924987839 518 | GameObject: 519 | m_ObjectHideFlags: 0 520 | m_PrefabParentObject: {fileID: 0} 521 | m_PrefabInternal: {fileID: 0} 522 | serializedVersion: 5 523 | m_Component: 524 | - component: {fileID: 924987841} 525 | - component: {fileID: 924987842} 526 | - component: {fileID: 924987840} 527 | m_Layer: 0 528 | m_Name: Seurat Headbox Capture 529 | m_TagString: Untagged 530 | m_Icon: {fileID: 0} 531 | m_NavMeshLayer: 0 532 | m_StaticEditorFlags: 0 533 | m_IsActive: 1 534 | --- !u!114 &924987840 535 | MonoBehaviour: 536 | m_ObjectHideFlags: 0 537 | m_PrefabParentObject: {fileID: 0} 538 | m_PrefabInternal: {fileID: 0} 539 | m_GameObject: {fileID: 924987839} 540 | m_Enabled: 1 541 | m_EditorHideFlags: 0 542 | m_Script: {fileID: 11500000, guid: 3fa279ab4b847324192b8606cde760cc, type: 3} 543 | m_Name: 544 | m_EditorClassIdentifier: 545 | size_: {x: 1, y: 1, z: 1} 546 | samples_per_face_: 16 547 | center_resolution_: 1024 548 | resolution_: 512 549 | dynamic_range_: 0 550 | output_folder_: 551 | last_output_dir_: Temp/UnityTempFile-5af701f96d403ad4db153c1c2d882d88 552 | --- !u!4 &924987841 553 | Transform: 554 | m_ObjectHideFlags: 0 555 | m_PrefabParentObject: {fileID: 0} 556 | m_PrefabInternal: {fileID: 0} 557 | m_GameObject: {fileID: 924987839} 558 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 559 | m_LocalPosition: {x: 0, y: 0, z: -10} 560 | m_LocalScale: {x: 1, y: 1, z: 1} 561 | m_Children: [] 562 | m_Father: {fileID: 0} 563 | m_RootOrder: 2 564 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 565 | --- !u!20 &924987842 566 | Camera: 567 | m_ObjectHideFlags: 0 568 | m_PrefabParentObject: {fileID: 0} 569 | m_PrefabInternal: {fileID: 0} 570 | m_GameObject: {fileID: 924987839} 571 | m_Enabled: 1 572 | serializedVersion: 2 573 | m_ClearFlags: 1 574 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 575 | m_NormalizedViewPortRect: 576 | serializedVersion: 2 577 | x: 0 578 | y: 0 579 | width: 1 580 | height: 1 581 | near clip plane: 0.3 582 | far clip plane: 1000 583 | field of view: 60 584 | orthographic: 0 585 | orthographic size: 5 586 | m_Depth: 0 587 | m_CullingMask: 588 | serializedVersion: 2 589 | m_Bits: 4294967295 590 | m_RenderingPath: -1 591 | m_TargetTexture: {fileID: 0} 592 | m_TargetDisplay: 0 593 | m_TargetEye: 3 594 | m_HDR: 0 595 | m_AllowMSAA: 1 596 | m_ForceIntoRT: 0 597 | m_OcclusionCulling: 1 598 | m_StereoConvergence: 10 599 | m_StereoSeparation: 0.022 600 | m_StereoMirrorMode: 0 601 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b2404dce6b9cc4f338553b56fdec6272 3 | timeCreated: 1454393028 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Blue.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Blue 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 0, g: 0, b: 1, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Blue.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8b542e53202c2d478f1fdd930be6f55 3 | timeCreated: 1507575355 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Green.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Green 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 0, g: 1, b: 0, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Green.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 392fb89ca8d5c734eab2c3f527e3143b 3 | timeCreated: 1507575355 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Red.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Red 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 1, g: 0, b: 0, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scenes/Seurat/Red.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3daf27b155f7ad348b0b2e3d40284de1 3 | timeCreated: 1507575355 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6aaa00d336959404384f067610959c85 3 | folderAsset: yes 4 | timeCreated: 1454392650 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/CaptureBuilder.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Google Inc. All Rights Reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | 22 | using UnityEngine; 23 | using UnityEditor; 24 | using UnityEditor.SceneManagement; 25 | using System.Collections.Generic; 26 | using System.IO; 27 | 28 | // Defines notification interface for various Seurat pipeline tasks. 29 | public class CaptureStatus { 30 | public virtual void SendProgress(string message, float fraction_complete) { 31 | } 32 | public virtual bool TaskContinuing() { 33 | return true; 34 | } 35 | } 36 | 37 | // Implements image capture with a state machine, to allow incremental capture 38 | // with an interactive GUI. 39 | public class CaptureBuilder { 40 | 41 | // -- Capture Rendering data. -- 42 | 43 | Camera color_camera_; 44 | Camera depth_camera_; 45 | GameObject depth_camera_object_; 46 | // Captures data from the render device and provides access to the pixels for 47 | // export to disk. 48 | Texture2D texture_; 49 | Texture2D texture_fp16_; 50 | Texture2D texture_fp32_; 51 | // The capture process renders to these render texture targets then reads back 52 | // into the various Texture2D objects. 53 | RenderTexture color_render_texture_; 54 | RenderTexture depth_render_texture_; 55 | // Overrides shaders defined in the scene to capture eye space depth as 56 | // shader output. 57 | Shader render_depth_shader_; 58 | // Provides capture settings. 59 | CaptureHeadbox headbox_; 60 | // Indicates capture precision. 61 | CaptureDynamicRange dynamic_range_; 62 | // Stores the count of camera samples taken inside the headbox; each sample 63 | // requires an image per face. 64 | int samples_per_face_; 65 | // Indicates root storage location for capture images and manifest. 66 | string capture_dir_; 67 | // Defines the capture sample positions distributed throughout the headbox in 68 | // world space. 69 | List samples_; 70 | 71 | // -- Incremental capture state machine members. -- 72 | 73 | // Current frame of the capture. Always 0 for static captures, relative to 74 | // max_frames_ for animation capture. 75 | int capture_frame_; 76 | // Total number of frames being captured; always 1 for static captures. 77 | int max_frames_ = 1; 78 | // Current sample of the capture. 79 | int sample_index_; 80 | // Current cube face direction being captured. 81 | int current_side_; 82 | // The view group of the current sample of the current frame accumulates each 83 | // face rendering as the capture progresses. 84 | JsonManifest.ViewGroup view_group_; 85 | // Accumulates the view groups as capture progresses. 86 | JsonManifest.Capture capture_manifest_; 87 | 88 | // Receives status reports as the capture progresses and provides cancellation 89 | // signal. 90 | CaptureStatus status_interface_; 91 | 92 | // Per frame or per sample capture output path. 93 | string export_path_; 94 | float start_time_; 95 | float start_sample_time_; 96 | 97 | 98 | public bool IsCaptureComplete() { 99 | return capture_frame_ >= max_frames_; 100 | } 101 | 102 | public bool IsHighDynamicRange() { 103 | return dynamic_range_ != CaptureDynamicRange.kSDR; 104 | } 105 | 106 | RenderTextureFormat RenderTargetFormatFromDynamicRange() { 107 | RenderTextureFormat format; 108 | switch (dynamic_range_) { 109 | case CaptureDynamicRange.kHDR16: 110 | format = RenderTextureFormat.ARGBHalf; 111 | break; 112 | 113 | case CaptureDynamicRange.kHDR: 114 | format = RenderTextureFormat.ARGBHalf; 115 | break; 116 | 117 | default: 118 | case CaptureDynamicRange.kSDR: 119 | format = RenderTextureFormat.ARGB32; 120 | break; 121 | } 122 | return format; 123 | } 124 | 125 | Texture2D Texture2DFromDynamicRange() { 126 | Texture2D texture_for_dynamic_range; 127 | switch (dynamic_range_) { 128 | case CaptureDynamicRange.kHDR16: 129 | texture_for_dynamic_range = texture_fp16_; 130 | break; 131 | 132 | case CaptureDynamicRange.kHDR: 133 | texture_for_dynamic_range = texture_fp32_; 134 | break; 135 | 136 | default: 137 | case CaptureDynamicRange.kSDR: 138 | texture_for_dynamic_range = texture_; 139 | break; 140 | } 141 | return texture_for_dynamic_range; 142 | } 143 | 144 | private static string PathCombine(params string[] parts) 145 | { 146 | if (parts.Length == 0) return ""; 147 | 148 | string result = parts[0]; 149 | for (int i = 1; i < parts.Length; i++) 150 | { 151 | result = Path.Combine(result, parts[i]); 152 | } 153 | return result; 154 | } 155 | 156 | // Computes the radical inverse base |digit_base| of the given value |a|. 157 | private static float RadicalInverse(ulong a, ulong digit_base) { 158 | float inv_base = 1.0f / digit_base; 159 | ulong reversed_digits = 0; 160 | float inv_base_n = 1.0f; 161 | // Compute the reversed digits in the base entirely in integer arithmetic. 162 | while (a != 0) { 163 | ulong next = a / digit_base; 164 | ulong digit = a - next * digit_base; 165 | reversed_digits = reversed_digits * digit_base + digit; 166 | inv_base_n *= inv_base; 167 | a = next; 168 | } 169 | // Only when done are the reversed digits divided by base^n. 170 | return Mathf.Min(reversed_digits * inv_base_n, 1.0f); 171 | } 172 | 173 | public void BeginCapture(CaptureHeadbox headbox, string capture_dir, int max_frames, CaptureStatus status_interface) { 174 | start_time_ = Time.realtimeSinceStartup; 175 | 176 | headbox_ = headbox; 177 | dynamic_range_ = headbox_.dynamic_range_; 178 | samples_per_face_ = (int)headbox_.samples_per_face_; 179 | capture_dir_ = capture_dir; 180 | capture_frame_ = 0; 181 | status_interface_ = status_interface; 182 | max_frames_ = max_frames; 183 | status_interface_.SendProgress("Capturing Images...", 0.0f); 184 | List samples = new List(); 185 | 186 | // Use Hammersly point set to distribute samples. 187 | for (int position_sample_index = 0; position_sample_index < samples_per_face_; ++position_sample_index) 188 | { 189 | Vector3 headbox_position = new Vector3( 190 | (float)position_sample_index / (float)(samples_per_face_ - 1), 191 | RadicalInverse((ulong)position_sample_index, 2), 192 | RadicalInverse((ulong)position_sample_index, 3)); 193 | headbox_position.Scale(headbox.size_); 194 | headbox_position -= headbox.size_ * 0.5f; 195 | // Headbox samples are in camera space; transform to world space. 196 | headbox_position = headbox.transform.TransformPoint(headbox_position); 197 | samples.Add(headbox_position); 198 | } 199 | 200 | // Sort samples by distance from center of the headbox. 201 | samples.Sort(delegate (Vector3 a, Vector3 b) { 202 | float length_a = a.sqrMagnitude; 203 | float length_b = b.sqrMagnitude; 204 | return length_a.CompareTo(length_b); 205 | }); 206 | // Replace the sample closest to the center of the headbox with a sample at 207 | // exactly the center. This is important because Seurat requires 208 | // sampling information at the center of the headbox. 209 | samples[0] = headbox.transform.position; 210 | 211 | samples_ = samples; 212 | // Note this uses a modified version of Unity's standard internal depth 213 | // capture shader. See the shader in Assets/builtin_shaders/ 214 | // DefaultResourcesExtra/Internal-DepthNormalsTexture.shader. 215 | render_depth_shader_ = Shader.Find("GoogleVR/Seurat/CaptureEyeDepth"); 216 | 217 | capture_manifest_ = new JsonManifest.Capture(); 218 | 219 | // Setup cameras 220 | color_camera_ = headbox_.ColorCamera; 221 | 222 | depth_camera_object_ = new GameObject("Depth Camera"); 223 | depth_camera_ = depth_camera_object_.AddComponent(); 224 | } 225 | 226 | public void EndCapture() 227 | { 228 | if (capture_manifest_ != null) 229 | { 230 | string json_data = JsonUtility.ToJson(capture_manifest_, true); 231 | File.WriteAllText(PathCombine(export_path_, "manifest.json"), json_data); 232 | capture_manifest_ = null; 233 | 234 | GameObject.DestroyImmediate(depth_camera_object_); 235 | color_camera_ = null; 236 | 237 | Debug.Log("Total Capture time: " + (Time.realtimeSinceStartup - start_time_ + " seconds.")); 238 | 239 | DestroyRenderTargets(); 240 | } 241 | } 242 | 243 | public void StartCaptureSamples() 244 | { 245 | export_path_ = capture_dir_; 246 | if (max_frames_ > 1) 247 | { 248 | // When capturing animation, make a directory per frame. 249 | export_path_ = export_path_ + "/frame_" + capture_frame_.ToString() + "/"; 250 | Directory.CreateDirectory(export_path_); 251 | } 252 | 253 | start_sample_time_ = Time.realtimeSinceStartup; 254 | } 255 | 256 | public void RunCapture() 257 | { 258 | // Setup cameras; save, modify, and restore camera settings around each 259 | // captured face. 260 | color_camera_ = headbox_.ColorCamera; 261 | 262 | float original_aspect = color_camera_.aspect; 263 | float original_fov = color_camera_.fieldOfView; 264 | int original_culling_mask = color_camera_.cullingMask; 265 | 266 | if (color_render_texture_ == null) { 267 | BuildRenderTargets(); 268 | } 269 | 270 | color_camera_.targetTexture = color_render_texture_; 271 | color_camera_.fieldOfView = 90f; 272 | color_camera_.aspect = 1f; 273 | // Propagate settings to the depth camera. 274 | depth_camera_.CopyFrom(color_camera_); 275 | depth_camera_.allowHDR = IsHighDynamicRange(); 276 | depth_camera_.targetTexture = depth_render_texture_; 277 | depth_camera_.renderingPath = RenderingPath.Forward; 278 | depth_camera_.clearFlags = CameraClearFlags.Color; 279 | depth_camera_.backgroundColor = new Color(0f, 0f, 0f, 0f); 280 | 281 | CaptureSample(); 282 | 283 | color_camera_.ResetReplacementShader(); 284 | color_camera_.targetTexture = null; 285 | color_camera_.aspect = original_aspect; 286 | color_camera_.fieldOfView = original_fov; 287 | color_camera_.cullingMask = original_culling_mask; 288 | } 289 | 290 | private void CaptureSample() 291 | { 292 | // Transforms all cameras from world space to the eye space 293 | // of the reference camera. 294 | Matrix4x4 reference_from_world = color_camera_.worldToCameraMatrix; 295 | const string base_image_name = "Cube"; 296 | 297 | string[] cube_face_names = { 298 | "Front", 299 | "Back", 300 | "Right", 301 | "Left", 302 | "Top", 303 | "Bottom", 304 | }; 305 | 306 | int num_sides = cube_face_names.Length; 307 | if (current_side_ == 0) 308 | { 309 | StartCaptureSamples(); 310 | view_group_ = new JsonManifest.ViewGroup(); 311 | view_group_.views = new JsonManifest.View[6]; 312 | } 313 | 314 | int side = current_side_; 315 | Quaternion face_rotation; 316 | 317 | switch (side) 318 | { 319 | case 0: 320 | face_rotation = Quaternion.identity; 321 | break; 322 | case 1: 323 | face_rotation = Quaternion.AngleAxis(180f, Vector3.up); 324 | break; 325 | case 2: 326 | face_rotation = Quaternion.AngleAxis(90f, Vector3.up); 327 | break; 328 | case 3: 329 | face_rotation = Quaternion.AngleAxis(-90f, Vector3.up); 330 | break; 331 | case 4: 332 | face_rotation = Quaternion.AngleAxis(-90f, Vector3.right); 333 | break; 334 | case 5: 335 | default: 336 | face_rotation = Quaternion.AngleAxis(90f, Vector3.right); 337 | break; 338 | } 339 | 340 | string progress_status = "Baking " + (sample_index_ + 1) + "/ " + samples_per_face_ + " Frame " + (capture_frame_ + 1) + "/" + max_frames_; 341 | int capture_task_index = sample_index_ * num_sides + side; 342 | int total_capture_tasks = samples_per_face_ * num_sides * max_frames_; 343 | status_interface_.SendProgress(progress_status, 344 | (float)capture_task_index / total_capture_tasks); 345 | if (!status_interface_.TaskContinuing()) 346 | { 347 | return; 348 | } 349 | 350 | // Use cached samples 351 | JsonManifest.View view = Capture( 352 | base_image_name + "_" + cube_face_names[side] + "_" + sample_index_, 353 | face_rotation, 354 | samples_[sample_index_], 355 | reference_from_world, 356 | export_path_); 357 | 358 | // Shows the task is complete. 359 | status_interface_.SendProgress(progress_status, 360 | (float)(capture_task_index + 1) / total_capture_tasks); 361 | 362 | switch (side) 363 | { 364 | case 0: 365 | view_group_.views[0] = view; 366 | break; 367 | case 1: 368 | view_group_.views[1] = view; 369 | break; 370 | case 2: 371 | view_group_.views[3] = view; 372 | break; 373 | case 3: 374 | view_group_.views[2] = view; 375 | break; 376 | case 4: 377 | view_group_.views[5] = view; 378 | break; 379 | case 5: 380 | default: 381 | view_group_.views[4] = view; 382 | break; 383 | } 384 | 385 | ++current_side_; 386 | if (current_side_ == num_sides) 387 | { 388 | if (sample_index_ == 0) { 389 | // Forces recreation of render targets at the normal resolution after 390 | // capturing the center headbox at the typically-higher resolution. 391 | DestroyRenderTargets(); 392 | } 393 | 394 | current_side_ = 0; 395 | capture_manifest_.view_groups.Add(view_group_); 396 | EndCaptureSample(); 397 | } 398 | } 399 | 400 | public void EndCaptureSample() 401 | { 402 | Debug.Log("Sample Capture time: " + (Time.realtimeSinceStartup - start_sample_time_ + " seconds.")); 403 | ++sample_index_; 404 | if (sample_index_ >= samples_per_face_) { 405 | // Go to next frame. 406 | sample_index_ = 0; 407 | ++capture_frame_; 408 | } 409 | } 410 | 411 | public void EndCaptureFrame() 412 | { 413 | ++capture_frame_; 414 | } 415 | 416 | public void CaptureAllHeadboxSamples() 417 | { 418 | if (!status_interface_.TaskContinuing()) 419 | { 420 | return; 421 | } 422 | 423 | // Iterate the capture statemachine to acquire all samples for this frame. 424 | for (int position_sample_index = 0; position_sample_index < samples_per_face_; 425 | ++position_sample_index) { 426 | if (!status_interface_.TaskContinuing()) { 427 | break; 428 | } 429 | RunCapture(); 430 | } 431 | } 432 | 433 | private JsonManifest.View Capture( 434 | string base_image_name, 435 | Quaternion orientation, 436 | Vector3 position, 437 | Matrix4x4 reference_from_world, 438 | string export_path) 439 | { 440 | 441 | // Save initial camera state 442 | Vector3 initial_camera_position = color_camera_.transform.position; 443 | Quaternion initial_camera_rotation = color_camera_.transform.rotation; 444 | 445 | // Setup cameras 446 | color_camera_.transform.position = position; 447 | color_camera_.transform.rotation = orientation; 448 | depth_camera_.transform.position = position; 449 | depth_camera_.transform.rotation = orientation; 450 | 451 | // Write out color data 452 | string color_image_name = base_image_name + "_Color." + 453 | (IsHighDynamicRange() ? "exr" : "png"); 454 | color_camera_.ResetReplacementShader(); 455 | color_camera_.targetTexture = color_render_texture_; 456 | color_camera_.Render(); 457 | WriteImage(color_render_texture_, Texture2DFromDynamicRange(), PathCombine(export_path, color_image_name), true); 458 | 459 | // Write out depth data 460 | string depth_image_name = base_image_name + "_Depth.exr"; 461 | depth_camera_.SetReplacementShader(render_depth_shader_, "RenderType"); 462 | depth_camera_.targetTexture = depth_render_texture_; 463 | depth_camera_.Render(); 464 | WriteImage(depth_render_texture_, texture_fp32_, PathCombine(export_path, depth_image_name), false); 465 | 466 | // Record the capture results. 467 | JsonManifest.View view = new JsonManifest.View(); 468 | view.projective_camera.image_width = color_render_texture_.width; 469 | view.projective_camera.image_height = color_render_texture_.height; 470 | view.projective_camera.clip_from_eye_matrix = JsonManifest.MatrixToArray(color_camera_.projectionMatrix); 471 | view.projective_camera.world_from_eye_matrix = JsonManifest.MatrixToArray(reference_from_world * color_camera_.cameraToWorldMatrix); 472 | view.projective_camera.depth_type = "EYE_Z"; 473 | view.depth_image_file.color.path = color_image_name; 474 | view.depth_image_file.color.channel_0 = "R"; 475 | view.depth_image_file.color.channel_1 = "G"; 476 | view.depth_image_file.color.channel_2 = "B"; 477 | view.depth_image_file.color.channel_alpha = "CONSTANT_ONE"; 478 | view.depth_image_file.depth.path = depth_image_name; 479 | view.depth_image_file.depth.channel_0 = "R"; 480 | 481 | // Restore camera state 482 | color_camera_.transform.position = initial_camera_position; 483 | color_camera_.transform.rotation = initial_camera_rotation; 484 | 485 | return view; 486 | } 487 | 488 | private static void WriteImage(RenderTexture render_texture, Texture2D texture, string image_path, bool clear_alpha_to_one) { 489 | RenderTexture.active = render_texture; 490 | texture.ReadPixels(new Rect(0, 0, texture.width, texture.height), 0, 0); 491 | if (clear_alpha_to_one) { 492 | Color[] pixels = texture.GetPixels(); 493 | int num_pixels = pixels.Length; 494 | for (int pixel = 0; pixel < num_pixels; ++pixel) { 495 | pixels [pixel].a = 1f; 496 | } 497 | texture.SetPixels(pixels); 498 | } 499 | texture.Apply(); 500 | if (texture.format == TextureFormat.RGBAHalf 501 | || texture.format == TextureFormat.RGBAFloat 502 | || texture.format == TextureFormat.RFloat) { 503 | byte[] exr = texture.EncodeToEXR(texture.format == TextureFormat.RGBAHalf 504 | ? Texture2D.EXRFlags.None : (Texture2D.EXRFlags.OutputAsFloat | Texture2D.EXRFlags.CompressZIP)); 505 | File.WriteAllBytes(image_path, exr); 506 | } else { 507 | byte[] png = texture.EncodeToPNG(); 508 | File.WriteAllBytes(image_path, png); 509 | } 510 | RenderTexture.active = null; 511 | } 512 | 513 | private void BuildRenderTargets() { 514 | // Create scratch textures 515 | int resolution = (int)(sample_index_ == 0 ? headbox_.center_resolution_ : headbox_.resolution_); 516 | int depth_bits = 24; 517 | // Note this reads in linear or sRGB depending on project settings. 518 | color_render_texture_ = new RenderTexture(resolution, resolution, depth_bits, RenderTargetFormatFromDynamicRange()); 519 | depth_render_texture_ = new RenderTexture(resolution, resolution, depth_bits, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); 520 | color_render_texture_.autoGenerateMips = false; 521 | depth_render_texture_.autoGenerateMips = false; 522 | texture_ = new Texture2D(resolution, resolution, TextureFormat.ARGB32, false); 523 | texture_fp16_ = new Texture2D(resolution, resolution, TextureFormat.RGBAHalf, false); 524 | texture_fp32_ = new Texture2D(resolution, resolution, TextureFormat.RGBAFloat, false); 525 | } 526 | 527 | private void DestroyRenderTargets() { 528 | color_render_texture_.Release(); 529 | color_render_texture_ = null; 530 | depth_render_texture_.Release(); 531 | depth_render_texture_ = null; 532 | texture_ = null; 533 | texture_fp16_ = null; 534 | texture_fp32_ = null; 535 | } 536 | } 537 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/CaptureBuilder.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4190c999356bec34394ad0b5260e8878 3 | timeCreated: 1507839653 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/CaptureHeadbox.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Google Inc. All Rights Reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | 22 | using UnityEngine; 23 | #if UNITY_EDITOR 24 | using UnityEditor; 25 | #endif 26 | using System.Collections.Generic; 27 | using System; 28 | using System.IO; 29 | 30 | public enum CubeFaceResolution 31 | { 32 | k512 = 512, 33 | k1024 = 1024, 34 | k1536 = 1536, 35 | k2048 = 2048, 36 | k4096 = 4096, 37 | k8192 = 8192 38 | } 39 | 40 | public enum PositionSampleCount { 41 | k2 = 2, 42 | k4 = 4, 43 | k8 = 8, 44 | k16 = 16, 45 | k32 = 32, 46 | k64 = 64, 47 | k128 = 128, 48 | k256 = 256, 49 | } 50 | 51 | public enum CaptureDynamicRange { 52 | // Standard (or low) dynamic range, e.g. sRGB. 53 | kSDR = 0, 54 | // High dynamic range with medium precision floating point data; requires half float render targets. 55 | kHDR16 = 1, 56 | // High dynamic range with full float precision render targets. 57 | kHDR = 2, 58 | } 59 | 60 | [ExecuteInEditMode] 61 | [RequireComponent(typeof(Camera))] 62 | public class CaptureHeadbox : MonoBehaviour { 63 | // -- Capture Settings -- 64 | 65 | [Tooltip("The dimensions of the headbox.")] 66 | public Vector3 size_ = Vector3.one; 67 | [Tooltip("The number of samples per face of the headbox.")] 68 | public PositionSampleCount samples_per_face_ = PositionSampleCount.k32; 69 | [Tooltip("The resolution of the center image, taken at the camera position at the center of the headbox. This should be 4x higher than the resolution of the remaining samples, for antialiasing.")] 70 | public CubeFaceResolution center_resolution_ = CubeFaceResolution.k4096; 71 | [Tooltip("The resolution of all samples other than the center.")] 72 | public CubeFaceResolution resolution_ = CubeFaceResolution.k1024; 73 | 74 | [Tooltip("Capture in standard (SDR) or high dynamic range (HDR). HDR requires floating-point render targets, the Camera Component have allow HDR enabled, and enables EXR output.")] 75 | public CaptureDynamicRange dynamic_range_ = CaptureDynamicRange.kSDR; 76 | 77 | // -- Processing Settings -- 78 | 79 | [Tooltip("Root destination folder for capture data; empty instructs the capture to use an automatically-generated, unique folder in the project temp folder.")] 80 | public string output_folder_ = ""; 81 | 82 | // Indicates location of most-recent capture artifacts. 83 | public string last_output_dir_; 84 | 85 | private Camera color_camera_; 86 | private CaptureBuilder capture_; 87 | 88 | public Camera ColorCamera { 89 | get { 90 | if (color_camera_ == null) { 91 | color_camera_ = GetComponent(); 92 | } 93 | return color_camera_; 94 | } 95 | } 96 | 97 | void Update() { 98 | if (IsCapturing()) { 99 | RunCapture(); 100 | } 101 | 102 | if (Input.GetKeyDown(KeyCode.BackQuote)) { 103 | ToggleCaptureMode(); 104 | } 105 | } 106 | 107 | bool IsCapturing() { 108 | return capture_ != null; 109 | } 110 | 111 | void RunCapture() { 112 | Debug.Log("Capturing headbox samples...", this); 113 | capture_.CaptureAllHeadboxSamples(); 114 | if (capture_.IsCaptureComplete()) { 115 | StopCapture(); 116 | } 117 | } 118 | 119 | void ToggleCaptureMode() { 120 | if (IsCapturing()) { 121 | StopCapture(); 122 | } else { 123 | StartCapture(); 124 | } 125 | } 126 | 127 | void StartCapture() { 128 | Debug.Log("Capture start - temporarily setting fixed framerate.", this); 129 | capture_ = new CaptureBuilder(); 130 | 131 | string capture_output_folder = output_folder_; 132 | if (capture_output_folder.Length <= 0) { 133 | capture_output_folder = FileUtil.GetUniqueTempPathInProject(); 134 | } 135 | Directory.CreateDirectory(capture_output_folder); 136 | capture_.BeginCapture(this, capture_output_folder, 1, new CaptureStatus()); 137 | 138 | // See Time.CaptureFramerate example, e.g. here: 139 | // https://docs.unity3d.com/ScriptReference/Time-captureFramerate.html 140 | Time.captureFramerate = 60; 141 | } 142 | 143 | void StopCapture() { 144 | Debug.Log("Capture stop", this); 145 | if (capture_ != null) { 146 | capture_.EndCapture(); 147 | } 148 | capture_ = null; 149 | Time.captureFramerate = 0; 150 | } 151 | 152 | void OnDrawGizmos() 153 | { 154 | // The headbox is defined in camera coordinates. 155 | Gizmos.matrix = transform.localToWorldMatrix; 156 | Gizmos.color = Color.blue; 157 | Gizmos.DrawWireCube(Vector3.zero, size_); 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/CaptureHeadbox.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fa279ab4b847324192b8606cde760cc 3 | timeCreated: 1507656394 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/JsonManifest.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Google Inc. All Rights Reserved. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 8 | of the Software, and to permit persons to whom the Software is furnished to do 9 | so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | */ 21 | 22 | using UnityEngine; 23 | using System.Collections.Generic; 24 | using System; 25 | 26 | // Defines types and functions to generate a JSON manifest for a Seurat 27 | // capture. 28 | public class JsonManifest { 29 | static public float[] MatrixToArray(Matrix4x4 other) { 30 | float[] elements = new float[16]; 31 | for (int j = 0; j < 4; j++) { 32 | for (int i = 0; i < 4; i++) { 33 | elements[j * 4 + i] = other[j, i]; 34 | } 35 | } 36 | return elements; 37 | } 38 | 39 | [Serializable] 40 | public struct Image4File { 41 | public string path; 42 | public string channel_0; 43 | public string channel_1; 44 | public string channel_2; 45 | public string channel_alpha; 46 | } 47 | 48 | [Serializable] 49 | public struct Image1File { 50 | public string path; 51 | public string channel_0; 52 | } 53 | 54 | // Indicates storage of one RGBAD image. 55 | [Serializable] 56 | public struct DepthImageFile { 57 | public Image4File color; 58 | public Image1File depth; 59 | } 60 | 61 | [Serializable] 62 | public struct ProjectiveCamera { 63 | public int image_width; 64 | public int image_height; 65 | public float[] clip_from_eye_matrix; 66 | public float[] world_from_eye_matrix; 67 | public string depth_type; 68 | } 69 | 70 | [Serializable] 71 | public struct View { 72 | public ProjectiveCamera projective_camera; 73 | public DepthImageFile depth_image_file; 74 | } 75 | 76 | [Serializable] 77 | public struct ViewGroup { 78 | public View[] views; 79 | } 80 | 81 | [Serializable] 82 | public class Capture { 83 | public List view_groups = new List(); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Scripts/JsonManifest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f1a74e3ec2f70a4fa9b7d87d183f50d 3 | timeCreated: 1492110036 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6044edb191dad8a4bb6d59d34e7d8648 3 | folderAsset: yes 4 | timeCreated: 1454478168 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Shaders/AlphaBlended.shader: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All Rights Reserved. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | // this software and associated documentation files (the "Software"), to deal in 5 | // the Software without restriction, including without limitation the rights to 6 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | // of the Software, and to permit persons to whom the Software is furnished to do 8 | // so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 16 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | Shader "GoogleVR/Seurat/AlphaBlended" 21 | { 22 | Properties 23 | { 24 | _MainTex ("Texture", 2D) = "white" {} 25 | } 26 | SubShader 27 | { 28 | Tags { "RenderType"="Opaque" "Queue"="Transparent" } 29 | LOD 100 30 | Blend SrcAlpha OneMinusSrcAlpha 31 | Cull Off 32 | ZWrite Off 33 | ZTest Always 34 | Pass 35 | { 36 | CGPROGRAM 37 | #pragma vertex vert 38 | #pragma fragment frag 39 | 40 | 41 | #include "UnityCG.cginc" 42 | 43 | struct appdata 44 | { 45 | float4 vertex : POSITION; 46 | float2 uv : TEXCOORD0; 47 | }; 48 | 49 | struct v2f 50 | { 51 | float2 uv : TEXCOORD0_centroid; 52 | float4 vertex : SV_POSITION; 53 | }; 54 | 55 | sampler2D _MainTex; 56 | 57 | v2f vert (appdata v) 58 | { 59 | v2f o; 60 | o.vertex = UnityObjectToClipPos(v.vertex); 61 | o.uv = v.uv; 62 | 63 | return o; 64 | } 65 | 66 | half4 frag (v2f i) : SV_Target 67 | { 68 | 69 | half4 col = tex2D(_MainTex, i.uv); 70 | return col; 71 | } 72 | ENDCG 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Shaders/AlphaBlended.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aa65022aefd96bc4a8e828393a840968 3 | timeCreated: 1481663858 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Shaders/AlphaTested.shader: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google Inc. All Rights Reserved. 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | // this software and associated documentation files (the "Software"), to deal in 5 | // the Software without restriction, including without limitation the rights to 6 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | // of the Software, and to permit persons to whom the Software is furnished to do 8 | // so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 16 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | Shader "GoogleVR/Seurat/AlphaTested" 21 | { 22 | Properties 23 | { 24 | _MainTex ("Texture", 2D) = "white" {} 25 | _AlphaCutoff ("Alpha Cutoff", Range (0.01, 0.99)) = 0.25 26 | } 27 | SubShader 28 | { 29 | Tags { "RenderType"="Opaque" "Queue"="Geometry" } 30 | LOD 100 31 | Blend SrcAlpha OneMinusSrcAlpha 32 | Cull Off 33 | ZWrite On 34 | ZTest LEqual 35 | 36 | Pass 37 | { 38 | 39 | AlphaToMask On 40 | 41 | CGPROGRAM 42 | #pragma vertex vert 43 | #pragma fragment frag 44 | 45 | 46 | #include "UnityCG.cginc" 47 | 48 | struct appdata 49 | { 50 | float4 vertex : POSITION; 51 | float2 uv : TEXCOORD0; 52 | }; 53 | 54 | struct v2f 55 | { 56 | float2 uv : TEXCOORD0_centroid; 57 | float4 vertex : SV_POSITION; 58 | }; 59 | 60 | sampler2D _MainTex; 61 | 62 | v2f vert (appdata v) 63 | { 64 | v2f o; 65 | o.vertex = UnityObjectToClipPos(v.vertex); 66 | o.uv = v.uv; 67 | 68 | return o; 69 | } 70 | 71 | half _AlphaCutoff; 72 | half4 frag (v2f i) : SV_Target 73 | { 74 | 75 | half4 col = tex2D(_MainTex, i.uv); 76 | clip(col.a - _AlphaCutoff); 77 | return col; 78 | } 79 | ENDCG 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Shaders/AlphaTested.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4833037e8081397429d88c8cb6d1b9e6 3 | timeCreated: 1486499890 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d56fe881318d68446a48a6e3f28b2f40 3 | folderAsset: yes 4 | timeCreated: 1485814796 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Tools/win.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e9cfae68e23a14c0bb2944554ddc5ae7 3 | folderAsset: yes 4 | timeCreated: 1467829791 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SeuratCapture/Tools/win/softserve.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlevr/seurat-unity-plugin/7b182953b26dbde07d3212d583900f7cb0669a3e/Assets/SeuratCapture/Tools/win/softserve.exe -------------------------------------------------------------------------------- /Assets/SeuratCapture/Tools/win/softserve.exe.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f43b22e762427f448932375e4e906daf 3 | timeCreated: 1488238195 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/third_party.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a344040c76ba7c1408fe7d2a679a7664 3 | folderAsset: yes 4 | timeCreated: 1525298678 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf84da659e45f0f4e9d03953c1d292fb 3 | folderAsset: yes 4 | timeCreated: 1515532996 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/DefaultResourcesExtra.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a30c50244a7d09942ab10c1dbb30c44c 3 | folderAsset: yes 4 | timeCreated: 1515532996 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/DefaultResourcesExtra/Internal-DepthNormalsTexture.shader: -------------------------------------------------------------------------------- 1 | // Copyright(c) 2016 Unity Technologies 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | // this software and associated documentation files(the "Software"), to deal in 5 | // the Software without restriction, including without limitation the rights to 6 | // use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies 7 | // of the Software, and to permit persons to whom the Software is furnished to do 8 | // so, subject to the following conditions : 9 | // 10 | // The above copyright notice and this permission notice shall be included in all 11 | // copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR 16 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) 21 | 22 | // Google modifications: 23 | // * This comment. 24 | // * Add a full copy of the license in this file. 25 | // * Rename shader to disambiguate from the Unity internal shader. 26 | // * Replace window space depth generation with eye space depth. 27 | // * Emit depth in single channel; require float precision render target and 28 | // readback. 29 | Shader "GoogleVR/Seurat/CaptureEyeDepth" { 30 | Properties { 31 | _MainTex ("", 2D) = "white" {} 32 | _Cutoff ("", Float) = 0.5 33 | _Color ("", Color) = (1,1,1,1) 34 | } 35 | 36 | SubShader { 37 | Tags { "RenderType"="Opaque" } 38 | Pass { 39 | CGPROGRAM 40 | #pragma vertex vert 41 | #pragma fragment frag 42 | #include "UnityCG.cginc" 43 | struct v2f { 44 | float4 pos : SV_POSITION; 45 | float4 nz : TEXCOORD0; 46 | UNITY_VERTEX_OUTPUT_STEREO 47 | }; 48 | v2f vert( appdata_base v ) { 49 | v2f o; 50 | UNITY_SETUP_INSTANCE_ID(v); 51 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 52 | o.pos = UnityObjectToClipPos(v.vertex); 53 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 54 | COMPUTE_EYEDEPTH(o.nz.w); 55 | return o; 56 | } 57 | fixed4 frag(v2f i) : SV_Target { 58 | return float4(i.nz.w, i.nz.xy, 1.0); 59 | } 60 | ENDCG 61 | } 62 | } 63 | 64 | SubShader { 65 | Tags { "RenderType"="TransparentCutout" } 66 | Pass { 67 | CGPROGRAM 68 | #pragma vertex vert 69 | #pragma fragment frag 70 | #include "UnityCG.cginc" 71 | struct v2f { 72 | float4 pos : SV_POSITION; 73 | float2 uv : TEXCOORD0; 74 | float4 nz : TEXCOORD1; 75 | UNITY_VERTEX_OUTPUT_STEREO 76 | }; 77 | uniform float4 _MainTex_ST; 78 | v2f vert( appdata_base v ) { 79 | v2f o; 80 | UNITY_SETUP_INSTANCE_ID(v); 81 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 82 | o.pos = UnityObjectToClipPos(v.vertex); 83 | o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); 84 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 85 | COMPUTE_EYEDEPTH(o.nz.w); 86 | return o; 87 | } 88 | uniform sampler2D _MainTex; 89 | uniform fixed _Cutoff; 90 | uniform fixed4 _Color; 91 | fixed4 frag(v2f i) : SV_Target { 92 | fixed4 texcol = tex2D( _MainTex, i.uv ); 93 | clip( texcol.a*_Color.a - _Cutoff ); 94 | return float4(i.nz.w, i.nz.xy, 1.0); 95 | } 96 | ENDCG 97 | } 98 | } 99 | 100 | SubShader { 101 | Tags { "RenderType"="TreeBark" } 102 | Pass { 103 | CGPROGRAM 104 | #pragma vertex vert 105 | #pragma fragment frag 106 | #include "UnityCG.cginc" 107 | #include "Lighting.cginc" 108 | #include "UnityBuiltin3xTreeLibrary.cginc" 109 | struct v2f { 110 | float4 pos : SV_POSITION; 111 | float2 uv : TEXCOORD0; 112 | float4 nz : TEXCOORD1; 113 | UNITY_VERTEX_OUTPUT_STEREO 114 | }; 115 | v2f vert( appdata_full v ) { 116 | v2f o; 117 | UNITY_SETUP_INSTANCE_ID(v); 118 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 119 | TreeVertBark(v); 120 | 121 | o.pos = UnityObjectToClipPos(v.vertex); 122 | o.uv = v.texcoord.xy; 123 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 124 | COMPUTE_EYEDEPTH(o.nz.w); 125 | return o; 126 | } 127 | fixed4 frag( v2f i ) : SV_Target { 128 | return float4(i.nz.w, i.nz.xy, 1.0); 129 | } 130 | ENDCG 131 | } 132 | } 133 | 134 | SubShader { 135 | Tags { "RenderType"="TreeLeaf" } 136 | Pass { 137 | CGPROGRAM 138 | #pragma vertex vert 139 | #pragma fragment frag 140 | #include "UnityCG.cginc" 141 | #include "Lighting.cginc" 142 | #include "UnityBuiltin3xTreeLibrary.cginc" 143 | struct v2f { 144 | float4 pos : SV_POSITION; 145 | float2 uv : TEXCOORD0; 146 | float4 nz : TEXCOORD1; 147 | UNITY_VERTEX_OUTPUT_STEREO 148 | }; 149 | v2f vert( appdata_full v ) { 150 | v2f o; 151 | UNITY_SETUP_INSTANCE_ID(v); 152 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 153 | TreeVertLeaf(v); 154 | 155 | o.pos = UnityObjectToClipPos(v.vertex); 156 | o.uv = v.texcoord.xy; 157 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 158 | COMPUTE_EYEDEPTH(o.nz.w); 159 | return o; 160 | } 161 | uniform sampler2D _MainTex; 162 | uniform fixed _Cutoff; 163 | fixed4 frag( v2f i ) : SV_Target { 164 | half alpha = tex2D(_MainTex, i.uv).a; 165 | 166 | clip (alpha - _Cutoff); 167 | return float4(i.nz.w, i.nz.xy, 1.0); 168 | } 169 | ENDCG 170 | } 171 | } 172 | 173 | SubShader { 174 | Tags { "RenderType"="TreeOpaque" "DisableBatching"="True" } 175 | Pass { 176 | CGPROGRAM 177 | #pragma vertex vert 178 | #pragma fragment frag 179 | #include "UnityCG.cginc" 180 | #include "TerrainEngine.cginc" 181 | struct v2f { 182 | float4 pos : SV_POSITION; 183 | float4 nz : TEXCOORD0; 184 | UNITY_VERTEX_OUTPUT_STEREO 185 | }; 186 | struct appdata { 187 | float4 vertex : POSITION; 188 | float3 normal : NORMAL; 189 | fixed4 color : COLOR; 190 | UNITY_VERTEX_INPUT_INSTANCE_ID 191 | }; 192 | v2f vert( appdata v ) { 193 | v2f o; 194 | UNITY_SETUP_INSTANCE_ID(v); 195 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 196 | TerrainAnimateTree(v.vertex, v.color.w); 197 | o.pos = UnityObjectToClipPos(v.vertex); 198 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 199 | COMPUTE_EYEDEPTH(o.nz.w); 200 | return o; 201 | } 202 | fixed4 frag(v2f i) : SV_Target { 203 | return float4(i.nz.w, i.nz.xy, 1.0); 204 | } 205 | ENDCG 206 | } 207 | } 208 | 209 | SubShader { 210 | Tags { "RenderType"="TreeTransparentCutout" "DisableBatching"="True" } 211 | Pass { 212 | Cull Back 213 | CGPROGRAM 214 | #pragma vertex vert 215 | #pragma fragment frag 216 | #include "UnityCG.cginc" 217 | #include "TerrainEngine.cginc" 218 | 219 | struct v2f { 220 | float4 pos : SV_POSITION; 221 | float2 uv : TEXCOORD0; 222 | float4 nz : TEXCOORD1; 223 | UNITY_VERTEX_OUTPUT_STEREO 224 | }; 225 | struct appdata { 226 | float4 vertex : POSITION; 227 | float3 normal : NORMAL; 228 | fixed4 color : COLOR; 229 | float4 texcoord : TEXCOORD0; 230 | UNITY_VERTEX_INPUT_INSTANCE_ID 231 | }; 232 | v2f vert( appdata v ) { 233 | v2f o; 234 | UNITY_SETUP_INSTANCE_ID(v); 235 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 236 | TerrainAnimateTree(v.vertex, v.color.w); 237 | o.pos = UnityObjectToClipPos(v.vertex); 238 | o.uv = v.texcoord.xy; 239 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 240 | COMPUTE_EYEDEPTH(o.nz.w); 241 | return o; 242 | } 243 | uniform sampler2D _MainTex; 244 | uniform fixed _Cutoff; 245 | fixed4 frag(v2f i) : SV_Target { 246 | half alpha = tex2D(_MainTex, i.uv).a; 247 | 248 | clip (alpha - _Cutoff); 249 | return float4(i.nz.w, i.nz.xy, 1.0); 250 | } 251 | ENDCG 252 | } 253 | Pass { 254 | Cull Front 255 | CGPROGRAM 256 | #pragma vertex vert 257 | #pragma fragment frag 258 | #include "UnityCG.cginc" 259 | #include "TerrainEngine.cginc" 260 | 261 | struct v2f { 262 | float4 pos : SV_POSITION; 263 | float2 uv : TEXCOORD0; 264 | float4 nz : TEXCOORD1; 265 | UNITY_VERTEX_OUTPUT_STEREO 266 | }; 267 | struct appdata { 268 | float4 vertex : POSITION; 269 | float3 normal : NORMAL; 270 | fixed4 color : COLOR; 271 | float4 texcoord : TEXCOORD0; 272 | UNITY_VERTEX_INPUT_INSTANCE_ID 273 | }; 274 | v2f vert( appdata v ) { 275 | v2f o; 276 | UNITY_SETUP_INSTANCE_ID(v); 277 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 278 | TerrainAnimateTree(v.vertex, v.color.w); 279 | o.pos = UnityObjectToClipPos(v.vertex); 280 | o.uv = v.texcoord.xy; 281 | o.nz.xyz = -COMPUTE_VIEW_NORMAL; 282 | COMPUTE_EYEDEPTH(o.nz.w); 283 | return o; 284 | } 285 | uniform sampler2D _MainTex; 286 | uniform fixed _Cutoff; 287 | fixed4 frag(v2f i) : SV_Target { 288 | fixed4 texcol = tex2D( _MainTex, i.uv ); 289 | clip( texcol.a - _Cutoff ); 290 | return float4(i.nz.w, i.nz.xy, 1.0); 291 | } 292 | ENDCG 293 | } 294 | 295 | } 296 | 297 | SubShader { 298 | Tags { "RenderType"="TreeBillboard" } 299 | Pass { 300 | Cull Off 301 | CGPROGRAM 302 | #pragma vertex vert 303 | #pragma fragment frag 304 | #include "UnityCG.cginc" 305 | #include "TerrainEngine.cginc" 306 | struct v2f { 307 | float4 pos : SV_POSITION; 308 | float2 uv : TEXCOORD0; 309 | float4 nz : TEXCOORD1; 310 | UNITY_VERTEX_OUTPUT_STEREO 311 | }; 312 | v2f vert (appdata_tree_billboard v) { 313 | v2f o; 314 | UNITY_SETUP_INSTANCE_ID(v); 315 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 316 | TerrainBillboardTree(v.vertex, v.texcoord1.xy, v.texcoord.y); 317 | o.pos = UnityObjectToClipPos(v.vertex); 318 | o.uv.x = v.texcoord.x; 319 | o.uv.y = v.texcoord.y > 0; 320 | o.nz.xyz = float3(0,0,1); 321 | COMPUTE_EYEDEPTH(o.nz.w); 322 | return o; 323 | } 324 | uniform sampler2D _MainTex; 325 | fixed4 frag(v2f i) : SV_Target { 326 | fixed4 texcol = tex2D( _MainTex, i.uv ); 327 | clip( texcol.a - 0.001 ); 328 | return float4(i.nz.w, i.nz.xy, 1.0); 329 | } 330 | ENDCG 331 | } 332 | } 333 | 334 | SubShader { 335 | Tags { "RenderType"="GrassBillboard" } 336 | Pass { 337 | Cull Off 338 | CGPROGRAM 339 | #pragma vertex vert 340 | #pragma fragment frag 341 | #include "UnityCG.cginc" 342 | #include "TerrainEngine.cginc" 343 | 344 | struct v2f { 345 | float4 pos : SV_POSITION; 346 | fixed4 color : COLOR; 347 | float2 uv : TEXCOORD0; 348 | float4 nz : TEXCOORD1; 349 | UNITY_VERTEX_OUTPUT_STEREO 350 | }; 351 | 352 | v2f vert (appdata_full v) { 353 | v2f o; 354 | UNITY_SETUP_INSTANCE_ID(v); 355 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 356 | WavingGrassBillboardVert (v); 357 | o.color = v.color; 358 | o.pos = UnityObjectToClipPos(v.vertex); 359 | o.uv = v.texcoord.xy; 360 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 361 | COMPUTE_EYEDEPTH(o.nz.w); 362 | return o; 363 | } 364 | uniform sampler2D _MainTex; 365 | uniform fixed _Cutoff; 366 | fixed4 frag(v2f i) : SV_Target { 367 | fixed4 texcol = tex2D( _MainTex, i.uv ); 368 | fixed alpha = texcol.a * i.color.a; 369 | clip( alpha - _Cutoff ); 370 | return float4(i.nz.w, i.nz.xy, 1.0); 371 | } 372 | ENDCG 373 | } 374 | } 375 | 376 | SubShader { 377 | Tags { "RenderType"="Grass" } 378 | Pass { 379 | Cull Off 380 | CGPROGRAM 381 | #pragma vertex vert 382 | #pragma fragment frag 383 | #include "UnityCG.cginc" 384 | #include "TerrainEngine.cginc" 385 | struct v2f { 386 | float4 pos : SV_POSITION; 387 | fixed4 color : COLOR; 388 | float2 uv : TEXCOORD0; 389 | float4 nz : TEXCOORD1; 390 | UNITY_VERTEX_OUTPUT_STEREO 391 | }; 392 | 393 | v2f vert (appdata_full v) { 394 | v2f o; 395 | UNITY_SETUP_INSTANCE_ID(v); 396 | UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); 397 | WavingGrassVert (v); 398 | o.color = v.color; 399 | o.pos = UnityObjectToClipPos(v.vertex); 400 | o.uv = v.texcoord; 401 | o.nz.xyz = COMPUTE_VIEW_NORMAL; 402 | COMPUTE_EYEDEPTH(o.nz.w); 403 | return o; 404 | } 405 | uniform sampler2D _MainTex; 406 | uniform fixed _Cutoff; 407 | fixed4 frag(v2f i) : SV_Target { 408 | fixed4 texcol = tex2D( _MainTex, i.uv ); 409 | fixed alpha = texcol.a * i.color.a; 410 | clip( alpha - _Cutoff ); 411 | return float4(i.nz.w, i.nz.xy, 1.0); 412 | } 413 | ENDCG 414 | } 415 | } 416 | Fallback Off 417 | } 418 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/DefaultResourcesExtra/Internal-DepthNormalsTexture.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7f0870ca2f10194ea76897b5c673d0f 3 | timeCreated: 1515532999 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/README.md: -------------------------------------------------------------------------------- 1 | Seurat Capture Shader modifications. 2 | 3 | This folder contains modified versions of the standard Unity Technologies (tm) 4 | shaders. These override the standard normalized window-space depth capture to 5 | produce eye-space Z in the red channel. 6 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f028f7086b99fa4eab41c2202194c28 3 | timeCreated: 1515532996 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Unity Technologies 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /Assets/third_party/builtin_shaders/license.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a8fb1f9e544e2a45ab68d4985025c87 3 | timeCreated: 1515532999 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. There are 4 | just a few small guidelines you need to follow. 5 | 6 | ## Contributor License Agreement 7 | 8 | Contributions to this project must be accompanied by a Contributor License 9 | Agreement. You (or your employer) retain the copyright to your contribution, 10 | this simply gives us permission to use and redistribute your contributions as 11 | part of the project. Head over to to see 12 | your current agreements on file or to sign a new one. 13 | 14 | You generally only need to submit a CLA once, so if you've already submitted one 15 | (even if it was for a different project), you probably don't need to do it 16 | again. 17 | 18 | ## Code reviews 19 | 20 | All submissions, including submissions by project members, require review. We 21 | use GitHub pull requests for this purpose. Consult 22 | [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more 23 | information on using pull requests. 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Google Inc. All Rights Reserved. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | m_DisableAudio: 0 13 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepThreshold: .00499999989 10 | m_MinPenetrationForPenalty: .00999999978 11 | m_SolverIterationCount: 6 12 | m_RaycastsHitTriggers: 1 13 | m_EnableAdaptiveForce: 0 14 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 15 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 0 9 | path: Assets/Scenes/The_Viking_Village.unity 10 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_LegacyDeferred: 14 | m_Mode: 1 15 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 16 | m_AlwaysIncludedShaders: 17 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 18 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 19 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 20 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 21 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 22 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 23 | m_PreloadedShaders: [] 24 | m_ShaderSettings: 25 | useScreenSpaceShadows: 1 26 | m_BuildTargetShaderSettings: [] 27 | m_LightmapStripping: 0 28 | m_FogStripping: 0 29 | m_LightmapKeepPlain: 1 30 | m_LightmapKeepDirCombined: 1 31 | m_LightmapKeepDirSeparate: 1 32 | m_LightmapKeepDynamicPlain: 1 33 | m_LightmapKeepDynamicDirCombined: 1 34 | m_LightmapKeepDynamicDirSeparate: 1 35 | m_FogKeepLinear: 1 36 | m_FogKeepExp: 1 37 | m_FogKeepExp2: 1 38 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: .00100000005 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: .00100000005 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: .00100000005 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: .00100000005 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left cmd 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: .00100000005 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: joystick button 4 96 | gravity: 1000 97 | dead: .00100000005 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Crouch 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: left ctrl 110 | altNegativeButton: 111 | altPositiveButton: joystick button 5 112 | gravity: 1000 113 | dead: .00100000005 114 | sensitivity: 1000 115 | snap: 0 116 | invert: 0 117 | type: 0 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse X 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: .100000001 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 0 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse Y 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: .100000001 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 1 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Mouse ScrollWheel 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0 162 | sensitivity: .100000001 163 | snap: 0 164 | invert: 0 165 | type: 1 166 | axis: 2 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Horizontal 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: .189999998 178 | sensitivity: 1 179 | snap: 0 180 | invert: 0 181 | type: 2 182 | axis: 0 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Vertical 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 0 193 | dead: .189999998 194 | sensitivity: 1 195 | snap: 0 196 | invert: 1 197 | type: 2 198 | axis: 1 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire1 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 0 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: .00100000005 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire2 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 1 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: .00100000005 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Fire3 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 2 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: .00100000005 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: .00100000005 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: .00100000005 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: .00100000005 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | - serializedVersion: 3 297 | m_Name: Mouse X 298 | descriptiveName: 299 | descriptiveNegativeName: 300 | negativeButton: 301 | positiveButton: 302 | altNegativeButton: 303 | altPositiveButton: 304 | gravity: 0 305 | dead: .100000001 306 | sensitivity: 1 307 | snap: 0 308 | invert: 0 309 | type: 2 310 | axis: 3 311 | joyNum: 0 312 | - serializedVersion: 3 313 | m_Name: Mouse Y 314 | descriptiveName: 315 | descriptiveNegativeName: 316 | negativeButton: 317 | positiveButton: 318 | altNegativeButton: 319 | altPositiveButton: 320 | gravity: 0 321 | dead: .100000001 322 | sensitivity: 1 323 | snap: 0 324 | invert: 1 325 | type: 2 326 | axis: 4 327 | joyNum: 0 328 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_RaycastsHitTriggers: 1 11 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 12 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | productGUID: f4583d0a2ff37e54aa0f5cd66da8ab2c 8 | AndroidProfiler: 0 9 | defaultScreenOrientation: 4 10 | targetDevice: 2 11 | useOnDemandResources: 0 12 | accelerometerFrequency: 60 13 | companyName: Unity Technologies 14 | productName: Viking Village 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1} 18 | m_ShowUnitySplashScreen: 1 19 | m_ShowUnitySplashLogo: 1 20 | m_SplashScreenOverlayOpacity: 1 21 | m_SplashScreenAnimation: 1 22 | m_SplashScreenLogoStyle: 1 23 | m_SplashScreenDrawMode: 0 24 | m_SplashScreenBackgroundAnimationZoom: 1 25 | m_SplashScreenLogoAnimationZoom: 1 26 | m_SplashScreenBackgroundLandscapeAspect: 1 27 | m_SplashScreenBackgroundPortraitAspect: 1 28 | m_SplashScreenBackgroundLandscapeUvs: 29 | serializedVersion: 2 30 | x: 0 31 | y: 0 32 | width: 1 33 | height: 1 34 | m_SplashScreenBackgroundPortraitUvs: 35 | serializedVersion: 2 36 | x: 0 37 | y: 0 38 | width: 1 39 | height: 1 40 | m_SplashScreenLogos: [] 41 | m_SplashScreenBackgroundLandscape: {fileID: 0} 42 | m_SplashScreenBackgroundPortrait: {fileID: 0} 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 1 51 | m_MTRendering: 1 52 | m_MobileMTRendering: 0 53 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 54 | iosShowActivityIndicatorOnLoading: -1 55 | androidShowActivityIndicatorOnLoading: -1 56 | tizenShowActivityIndicatorOnLoading: -1 57 | iosAppInBackgroundBehavior: 0 58 | displayResolutionDialog: 1 59 | iosAllowHTTPDownload: 1 60 | allowedAutorotateToPortrait: 0 61 | allowedAutorotateToPortraitUpsideDown: 0 62 | allowedAutorotateToLandscapeRight: 1 63 | allowedAutorotateToLandscapeLeft: 1 64 | useOSAutorotation: 1 65 | use32BitDisplayBuffer: 1 66 | disableDepthAndStencilBuffers: 0 67 | defaultIsFullScreen: 1 68 | defaultIsNativeResolution: 1 69 | runInBackground: 1 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | submitAnalytics: 1 74 | usePlayerLog: 1 75 | bakeCollisionMeshes: 0 76 | forceSingleInstance: 0 77 | resizableWindow: 0 78 | useMacAppStoreValidation: 0 79 | gpuSkinning: 0 80 | graphicsJobs: 0 81 | xboxPIXTextureCapture: 0 82 | xboxEnableAvatar: 0 83 | xboxEnableKinect: 0 84 | xboxEnableKinectAutoTracking: 0 85 | xboxEnableFitness: 0 86 | visibleInBackground: 0 87 | allowFullscreenSwitch: 1 88 | graphicsJobMode: 0 89 | macFullscreenMode: 2 90 | d3d9FullscreenMode: 1 91 | d3d11FullscreenMode: 1 92 | xboxSpeechDB: 0 93 | xboxEnableHeadOrientation: 0 94 | xboxEnableGuest: 0 95 | xboxEnablePIXSampling: 0 96 | n3dsDisableStereoscopicView: 0 97 | n3dsEnableSharedListOpt: 1 98 | n3dsEnableVSync: 0 99 | ignoreAlphaClear: 0 100 | xboxOneResolution: 0 101 | xboxOneMonoLoggingLevel: 0 102 | xboxOneLoggingLevel: 1 103 | videoMemoryForVertexBuffers: 0 104 | psp2PowerMode: 0 105 | psp2AcquireBGM: 1 106 | wiiUTVResolution: 0 107 | wiiUGamePadMSAA: 1 108 | wiiUSupportsNunchuk: 0 109 | wiiUSupportsClassicController: 0 110 | wiiUSupportsBalanceBoard: 0 111 | wiiUSupportsMotionPlus: 0 112 | wiiUSupportsProController: 0 113 | wiiUAllowScreenCapture: 1 114 | wiiUControllerCount: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 0 117 | 5:4: 0 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 0 121 | bundleVersion: 1.0 122 | preloadedAssets: [] 123 | metroInputSource: 1 124 | m_HolographicPauseOnTrackingLoss: 1 125 | xboxOneDisableKinectGpuReservation: 0 126 | xboxOneEnable7thCore: 0 127 | vrSettings: 128 | cardboard: 129 | depthFormat: 0 130 | enableTransitionView: 0 131 | daydream: 132 | depthFormat: 0 133 | useSustainedPerformanceMode: 0 134 | hololens: 135 | depthFormat: 1 136 | protectGraphicsMemory: 0 137 | useHDRDisplay: 0 138 | applicationIdentifier: 139 | Android: com.Company.ProductName 140 | Standalone: unity.Unity Technologies.Viking Village 141 | Tizen: com.Company.ProductName 142 | iOS: com.Company.ProductName 143 | tvOS: com.Company.ProductName 144 | buildNumber: 145 | iOS: 0 146 | AndroidBundleVersionCode: 1 147 | AndroidMinSdkVersion: 16 148 | AndroidTargetSdkVersion: 0 149 | AndroidPreferredInstallLocation: 1 150 | aotOptions: 151 | stripEngineCode: 1 152 | iPhoneStrippingLevel: 0 153 | iPhoneScriptCallOptimization: 0 154 | ForceInternetPermission: 0 155 | ForceSDCardPermission: 0 156 | CreateWallpaper: 0 157 | APKExpansionFiles: 0 158 | keepLoadedShadersAlive: 0 159 | StripUnusedMeshComponents: 0 160 | VertexChannelCompressionMask: 161 | serializedVersion: 2 162 | m_Bits: 238 163 | iPhoneSdkVersion: 988 164 | iOSTargetOSVersionString: 6.0 165 | tvOSSdkVersion: 0 166 | tvOSRequireExtendedGameController: 0 167 | tvOSTargetOSVersionString: 168 | uIPrerenderedIcon: 0 169 | uIRequiresPersistentWiFi: 0 170 | uIRequiresFullScreen: 1 171 | uIStatusBarHidden: 1 172 | uIExitOnSuspend: 0 173 | uIStatusBarStyle: 0 174 | iPhoneSplashScreen: {fileID: 0} 175 | iPhoneHighResSplashScreen: {fileID: 0} 176 | iPhoneTallHighResSplashScreen: {fileID: 0} 177 | iPhone47inSplashScreen: {fileID: 0} 178 | iPhone55inPortraitSplashScreen: {fileID: 0} 179 | iPhone55inLandscapeSplashScreen: {fileID: 0} 180 | iPadPortraitSplashScreen: {fileID: 0} 181 | iPadHighResPortraitSplashScreen: {fileID: 0} 182 | iPadLandscapeSplashScreen: {fileID: 0} 183 | iPadHighResLandscapeSplashScreen: {fileID: 0} 184 | appleTVSplashScreen: {fileID: 0} 185 | tvOSSmallIconLayers: [] 186 | tvOSLargeIconLayers: [] 187 | tvOSTopShelfImageLayers: [] 188 | tvOSTopShelfImageWideLayers: [] 189 | iOSLaunchScreenType: 0 190 | iOSLaunchScreenPortrait: {fileID: 0} 191 | iOSLaunchScreenLandscape: {fileID: 0} 192 | iOSLaunchScreenBackgroundColor: 193 | serializedVersion: 2 194 | rgba: 0 195 | iOSLaunchScreenFillPct: 1 196 | iOSLaunchScreenSize: 100 197 | iOSLaunchScreenCustomXibPath: 198 | iOSLaunchScreeniPadType: 0 199 | iOSLaunchScreeniPadImage: {fileID: 0} 200 | iOSLaunchScreeniPadBackgroundColor: 201 | serializedVersion: 2 202 | rgba: 0 203 | iOSLaunchScreeniPadFillPct: 100 204 | iOSLaunchScreeniPadSize: 100 205 | iOSLaunchScreeniPadCustomXibPath: 206 | iOSDeviceRequirements: [] 207 | iOSURLSchemes: [] 208 | iOSBackgroundModes: 0 209 | iOSMetalForceHardShadows: 0 210 | metalEditorSupport: 1 211 | metalAPIValidation: 1 212 | appleDeveloperTeamID: 213 | iOSManualSigningProvisioningProfileID: 214 | tvOSManualSigningProvisioningProfileID: 215 | appleEnableAutomaticSigning: 0 216 | AndroidTargetDevice: 0 217 | AndroidSplashScreenScale: 0 218 | androidSplashScreen: {fileID: 0} 219 | AndroidKeystoreName: 220 | AndroidKeyaliasName: 221 | AndroidTVCompatibility: 1 222 | AndroidIsGame: 1 223 | androidEnableBanner: 1 224 | m_AndroidBanners: 225 | - width: 320 226 | height: 180 227 | banner: {fileID: 0} 228 | androidGamepadSupportLevel: 0 229 | resolutionDialogBanner: {fileID: 2800000, guid: e4beb9c62b598bf4ca98ad72603470be, 230 | type: 3} 231 | m_BuildTargetIcons: 232 | - m_BuildTarget: 233 | m_Icons: 234 | - serializedVersion: 2 235 | m_Icon: {fileID: 0} 236 | m_Width: 128 237 | m_Height: 128 238 | m_BuildTargetBatching: 239 | - m_BuildTarget: Standalone 240 | m_StaticBatching: 0 241 | m_DynamicBatching: 1 242 | m_BuildTargetGraphicsAPIs: 243 | - m_BuildTarget: AndroidPlayer 244 | m_APIs: 08000000 245 | m_Automatic: 0 246 | m_BuildTargetVRSettings: [] 247 | openGLRequireES31: 0 248 | openGLRequireES31AEP: 0 249 | webPlayerTemplate: APPLICATION:Default 250 | m_TemplateCustomTags: {} 251 | wiiUTitleID: 0005000011000000 252 | wiiUGroupID: 00010000 253 | wiiUCommonSaveSize: 4096 254 | wiiUAccountSaveSize: 2048 255 | wiiUOlvAccessKey: 0 256 | wiiUTinCode: 0 257 | wiiUJoinGameId: 0 258 | wiiUJoinGameModeMask: 0000000000000000 259 | wiiUCommonBossSize: 0 260 | wiiUAccountBossSize: 0 261 | wiiUAddOnUniqueIDs: [] 262 | wiiUMainThreadStackSize: 3072 263 | wiiULoaderThreadStackSize: 1024 264 | wiiUSystemHeapSize: 128 265 | wiiUTVStartupScreen: {fileID: 0} 266 | wiiUGamePadStartupScreen: {fileID: 0} 267 | wiiUDrcBufferDisabled: 0 268 | wiiUProfilerLibPath: 269 | actionOnDotNetUnhandledException: 1 270 | enableInternalProfiler: 0 271 | logObjCUncaughtExceptions: 1 272 | enableCrashReportAPI: 0 273 | cameraUsageDescription: 274 | locationUsageDescription: 275 | microphoneUsageDescription: 276 | switchNetLibKey: 277 | switchSocketMemoryPoolSize: 6144 278 | switchSocketAllocatorPoolSize: 128 279 | switchSocketConcurrencyLimit: 14 280 | switchUseCPUProfiler: 0 281 | switchApplicationID: 0x0005000C10000001 282 | switchNSODependencies: 283 | switchTitleNames_0: 284 | switchTitleNames_1: 285 | switchTitleNames_2: 286 | switchTitleNames_3: 287 | switchTitleNames_4: 288 | switchTitleNames_5: 289 | switchTitleNames_6: 290 | switchTitleNames_7: 291 | switchTitleNames_8: 292 | switchTitleNames_9: 293 | switchTitleNames_10: 294 | switchTitleNames_11: 295 | switchTitleNames_12: 296 | switchTitleNames_13: 297 | switchTitleNames_14: 298 | switchPublisherNames_0: 299 | switchPublisherNames_1: 300 | switchPublisherNames_2: 301 | switchPublisherNames_3: 302 | switchPublisherNames_4: 303 | switchPublisherNames_5: 304 | switchPublisherNames_6: 305 | switchPublisherNames_7: 306 | switchPublisherNames_8: 307 | switchPublisherNames_9: 308 | switchPublisherNames_10: 309 | switchPublisherNames_11: 310 | switchPublisherNames_12: 311 | switchPublisherNames_13: 312 | switchPublisherNames_14: 313 | switchIcons_0: {fileID: 0} 314 | switchIcons_1: {fileID: 0} 315 | switchIcons_2: {fileID: 0} 316 | switchIcons_3: {fileID: 0} 317 | switchIcons_4: {fileID: 0} 318 | switchIcons_5: {fileID: 0} 319 | switchIcons_6: {fileID: 0} 320 | switchIcons_7: {fileID: 0} 321 | switchIcons_8: {fileID: 0} 322 | switchIcons_9: {fileID: 0} 323 | switchIcons_10: {fileID: 0} 324 | switchIcons_11: {fileID: 0} 325 | switchIcons_12: {fileID: 0} 326 | switchIcons_13: {fileID: 0} 327 | switchIcons_14: {fileID: 0} 328 | switchSmallIcons_0: {fileID: 0} 329 | switchSmallIcons_1: {fileID: 0} 330 | switchSmallIcons_2: {fileID: 0} 331 | switchSmallIcons_3: {fileID: 0} 332 | switchSmallIcons_4: {fileID: 0} 333 | switchSmallIcons_5: {fileID: 0} 334 | switchSmallIcons_6: {fileID: 0} 335 | switchSmallIcons_7: {fileID: 0} 336 | switchSmallIcons_8: {fileID: 0} 337 | switchSmallIcons_9: {fileID: 0} 338 | switchSmallIcons_10: {fileID: 0} 339 | switchSmallIcons_11: {fileID: 0} 340 | switchSmallIcons_12: {fileID: 0} 341 | switchSmallIcons_13: {fileID: 0} 342 | switchSmallIcons_14: {fileID: 0} 343 | switchManualHTML: 344 | switchAccessibleURLs: 345 | switchLegalInformation: 346 | switchMainThreadStackSize: 1048576 347 | switchPresenceGroupId: 0x0005000C10000001 348 | switchLogoHandling: 0 349 | switchReleaseVersion: 0 350 | switchDisplayVersion: 1.0.0 351 | switchStartupUserAccount: 0 352 | switchTouchScreenUsage: 0 353 | switchSupportedLanguagesMask: 0 354 | switchLogoType: 0 355 | switchApplicationErrorCodeCategory: 356 | switchUserAccountSaveDataSize: 0 357 | switchUserAccountSaveDataJournalSize: 0 358 | switchAttribute: 0 359 | switchCardSpecSize: 4 360 | switchCardSpecClock: 25 361 | switchRatingsMask: 0 362 | switchRatingsInt_0: 0 363 | switchRatingsInt_1: 0 364 | switchRatingsInt_2: 0 365 | switchRatingsInt_3: 0 366 | switchRatingsInt_4: 0 367 | switchRatingsInt_5: 0 368 | switchRatingsInt_6: 0 369 | switchRatingsInt_7: 0 370 | switchRatingsInt_8: 0 371 | switchRatingsInt_9: 0 372 | switchRatingsInt_10: 0 373 | switchRatingsInt_11: 0 374 | switchLocalCommunicationIds_0: 0x0005000C10000001 375 | switchLocalCommunicationIds_1: 376 | switchLocalCommunicationIds_2: 377 | switchLocalCommunicationIds_3: 378 | switchLocalCommunicationIds_4: 379 | switchLocalCommunicationIds_5: 380 | switchLocalCommunicationIds_6: 381 | switchLocalCommunicationIds_7: 382 | switchParentalControl: 0 383 | switchAllowsScreenshot: 1 384 | switchDataLossConfirmation: 0 385 | ps4NPAgeRating: 170930224 386 | ps4NPTitleSecret: 387 | ps4NPTrophyPackPath: 388 | ps4ParentalLevel: 540700271 389 | ps4ContentID: 390 | ps4Category: 1684104548 391 | ps4MasterVersion: 392 | ps4AppVersion: 393 | ps4AppType: 0 394 | ps4ParamSfxPath: 395 | ps4VideoOutPixelFormat: 1869902965 396 | ps4VideoOutInitialWidth: 1920 397 | ps4VideoOutBaseModeInitialWidth: 1920 398 | ps4VideoOutReprojectionRate: 120 399 | ps4PronunciationXMLPath: 400 | ps4PronunciationSIGPath: 401 | ps4BackgroundImagePath: 402 | ps4StartupImagePath: 403 | ps4SaveDataImagePath: 404 | ps4SdkOverride: 405 | ps4BGMPath: 406 | ps4ShareFilePath: 407 | ps4ShareOverlayImagePath: 408 | ps4PrivacyGuardImagePath: 409 | ps4NPtitleDatPath: 410 | ps4RemotePlayKeyAssignment: -1 411 | ps4RemotePlayKeyMappingDir: 412 | ps4PlayTogetherPlayerCount: 0 413 | ps4EnterButtonAssignment: 1869226016 414 | ps4ApplicationParam1: 1836404345 415 | ps4ApplicationParam2: 170926138 416 | ps4ApplicationParam3: 539828256 417 | ps4ApplicationParam4: 1769104755 418 | ps4DownloadDataSize: 0 419 | ps4GarlicHeapSize: 2048 420 | ps4ProGarlicHeapSize: 2560 421 | ps4Passcode: dngG7AfhXR0Lt2QbgkjAWmIANeWleATL 422 | ps4UseDebugIl2cppLibs: 0 423 | ps4pnSessions: 1 424 | ps4pnPresence: 1 425 | ps4pnFriends: 1 426 | ps4pnGameCustomData: 1 427 | playerPrefsSupport: 0 428 | restrictedAudioUsageRights: 0 429 | ps4UseResolutionFallback: 0 430 | ps4ReprojectionSupport: 0 431 | ps4UseAudio3dBackend: 0 432 | ps4SocialScreenEnabled: 0 433 | ps4ScriptOptimizationLevel: 3 434 | ps4Audio3dVirtualSpeakerCount: 14 435 | ps4attribCpuUsage: 0 436 | ps4PatchPkgPath: 437 | ps4PatchLatestPkgPath: 438 | ps4PatchChangeinfoPath: 439 | ps4PatchDayOne: 0 440 | ps4attribUserManagement: 0 441 | ps4attribMoveSupport: 0 442 | ps4attrib3DSupport: 0 443 | ps4attribShareSupport: 0 444 | ps4attribExclusiveVR: 0 445 | ps4disableAutoHideSplash: 0 446 | ps4videoRecordingFeaturesUsed: 0 447 | ps4contentSearchFeaturesUsed: 0 448 | ps4attribEyeToEyeDistanceSettingVR: 0 449 | ps4IncludedModules: [] 450 | monoEnv: 451 | psp2Splashimage: {fileID: 0} 452 | psp2NPTrophyPackPath: 453 | psp2NPSupportGBMorGJP: 0 454 | psp2NPAgeRating: 12 455 | psp2NPTitleDatPath: 456 | psp2NPCommsID: 457 | psp2NPCommunicationsID: 458 | psp2NPCommsPassphrase: 459 | psp2NPCommsSig: 460 | psp2ParamSfxPath: 461 | psp2ManualPath: 462 | psp2LiveAreaGatePath: 463 | psp2LiveAreaBackroundPath: 464 | psp2LiveAreaPath: 465 | psp2LiveAreaTrialPath: 466 | psp2PatchChangeInfoPath: 467 | psp2PatchOriginalPackage: 468 | psp2PackagePassword: 7aiFNo6BMDSyPZkyaooon0bgsRIdelIl 469 | psp2KeystoneFile: 470 | psp2MemoryExpansionMode: 0 471 | psp2DRMType: 0 472 | psp2StorageType: 0 473 | psp2MediaCapacity: 0 474 | psp2DLCConfigPath: 475 | psp2ThumbnailPath: 476 | psp2BackgroundPath: 477 | psp2SoundPath: 478 | psp2TrophyCommId: 479 | psp2TrophyPackagePath: 480 | psp2PackagedResourcesPath: 481 | psp2SaveDataQuota: 10240 482 | psp2ParentalLevel: 1 483 | psp2ShortTitle: Not Set 484 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 485 | psp2Category: 0 486 | psp2MasterVersion: 01.00 487 | psp2AppVersion: 01.00 488 | psp2TVBootMode: 0 489 | psp2EnterButtonAssignment: 2 490 | psp2TVDisableEmu: 0 491 | psp2AllowTwitterDialog: 1 492 | psp2Upgradable: 0 493 | psp2HealthWarning: 0 494 | psp2UseLibLocation: 0 495 | psp2InfoBarOnStartup: 0 496 | psp2InfoBarColor: 0 497 | psp2UseDebugIl2cppLibs: 0 498 | psmSplashimage: {fileID: 0} 499 | splashScreenBackgroundSourceLandscape: {fileID: 0} 500 | splashScreenBackgroundSourcePortrait: {fileID: 0} 501 | spritePackerPolicy: 502 | webGLMemorySize: 256 503 | webGLExceptionSupport: 0 504 | webGLNameFilesAsHashes: 0 505 | webGLDataCaching: 0 506 | webGLDebugSymbols: 0 507 | webGLEmscriptenArgs: 508 | webGLModulesDirectory: 509 | webGLTemplate: APPLICATION:Default 510 | webGLAnalyzeBuildSize: 0 511 | webGLUseEmbeddedResources: 0 512 | webGLUseWasm: 0 513 | webGLCompressionFormat: 1 514 | scriptingDefineSymbols: 515 | 1: CROSS_PLATFORM_INPUT 516 | 2: CROSS_PLATFORM_INPUT 517 | 4: CROSS_PLATFORM_INPUT;MOBILE_INPUT 518 | 7: CROSS_PLATFORM_INPUT;MOBILE_INPUT 519 | 15: CROSS_PLATFORM_INPUT;MOBILE_INPUT 520 | 16: CROSS_PLATFORM_INPUT;MOBILE_INPUT 521 | platformArchitecture: 522 | iOS: 2 523 | scriptingBackend: 524 | Android: 0 525 | Metro: 2 526 | Standalone: 0 527 | WP8: 2 528 | WebGL: 1 529 | iOS: 0 530 | incrementalIl2cppBuild: {} 531 | additionalIl2CppArgs: 532 | apiCompatibilityLevelPerPlatform: {} 533 | m_RenderingPath: 1 534 | m_MobileRenderingPath: 1 535 | metroPackageName: Skyshop Project 1 536 | metroPackageVersion: 537 | metroCertificatePath: 538 | metroCertificatePassword: 539 | metroCertificateSubject: 540 | metroCertificateIssuer: 541 | metroCertificateNotAfter: 0000000000000000 542 | metroApplicationDescription: Skyshop Project 1 543 | wsaImages: {} 544 | metroTileShortName: 545 | metroCommandLineArgsFile: 546 | metroTileShowName: 1 547 | metroMediumTileShowName: 0 548 | metroLargeTileShowName: 0 549 | metroWideTileShowName: 0 550 | metroDefaultTileSize: 1 551 | metroTileForegroundText: 1 552 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 553 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 554 | metroSplashScreenUseBackgroundColor: 0 555 | platformCapabilities: {} 556 | metroFTAName: 557 | metroFTAFileTypes: [] 558 | metroProtocolName: 559 | metroCompilationOverrides: 1 560 | tizenProductDescription: 561 | tizenProductURL: 562 | tizenSigningProfileName: 563 | tizenGPSPermissions: 0 564 | tizenMicrophonePermissions: 0 565 | tizenDeploymentTarget: 566 | tizenDeploymentTargetType: -1 567 | tizenMinOSVersion: 1 568 | n3dsUseExtSaveData: 0 569 | n3dsCompressStaticMem: 1 570 | n3dsExtSaveDataNumber: 0x12345 571 | n3dsStackSize: 131072 572 | n3dsTargetPlatform: 2 573 | n3dsRegion: 7 574 | n3dsMediaSize: 0 575 | n3dsLogoStyle: 3 576 | n3dsTitle: GameName 577 | n3dsProductCode: 578 | n3dsApplicationId: 0xFF3FF 579 | stvDeviceAddress: 580 | stvProductDescription: 581 | stvProductAuthor: 582 | stvProductAuthorEmail: 583 | stvProductLink: 584 | stvProductCategory: 0 585 | XboxOneProductId: 586 | XboxOneUpdateKey: 587 | XboxOneSandboxId: 588 | XboxOneContentId: 589 | XboxOneTitleId: 590 | XboxOneSCId: 591 | XboxOneGameOsOverridePath: 592 | XboxOnePackagingOverridePath: 593 | XboxOneAppManifestOverridePath: 594 | XboxOnePackageEncryption: 0 595 | XboxOnePackageUpdateGranularity: 2 596 | XboxOneDescription: 597 | XboxOneLanguage: 598 | - enus 599 | XboxOneCapability: [] 600 | XboxOneGameRating: {} 601 | XboxOneIsContentPackage: 0 602 | XboxOneEnableGPUVariability: 0 603 | XboxOneSockets: 604 | Unity Internal - Mono async-IO: 605 | m_Name: Unity Internal - Mono async-IO 606 | m_Port: 0 607 | m_Protocol: 0 608 | m_Usages: 0000000001000000 609 | m_TemplateName: 610 | m_SessionRequirment: 0 611 | m_DeviceUsages: 612 | XboxOneSplashScreen: {fileID: 0} 613 | XboxOneAllowedProductIds: [] 614 | XboxOnePersistentLocalStorageSize: 0 615 | xboxOneScriptCompiler: 0 616 | vrEditorSettings: 617 | daydream: 618 | daydreamIconForeground: {fileID: 0} 619 | daydreamIconBackground: {fileID: 0} 620 | cloudServicesEnabled: {} 621 | facebookSdkVersion: 7.9.1 622 | apiCompatibilityLevel: 2 623 | cloudProjectId: 624 | projectName: 625 | organizationId: 626 | cloudEnabled: 0 627 | enableNewInputSystem: 0 628 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.6.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Berserk 11 | pixelLightCount: 4 12 | shadows: 0 13 | shadowResolution: 3 14 | shadowProjection: 1 15 | shadowCascades: 4 16 | shadowDistance: 1050 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.024065774, y: 0.1304932, z: 0.4666666} 20 | blendWeights: 2 21 | textureQuality: 0 22 | anisotropicTextures: 1 23 | antiAliasing: 4 24 | softParticles: 0 25 | softVegetation: 1 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 1 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4096 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | m_PerPlatformDefaultQuality: 36 | Android: 0 37 | Standalone: 0 38 | Web: 0 39 | WebGL: 0 40 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - Reflection_Probes 17 | - Lighting 18 | - Props 19 | - ReflectedInWater 20 | - Ground 21 | - AccessibleVolume 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlevr/seurat-unity-plugin/7b182953b26dbde07d3212d583900f7cb0669a3e/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_Enabled: 0 14 | m_CaptureEditorExceptions: 1 15 | UnityPurchasingSettings: 16 | m_Enabled: 0 17 | m_TestMode: 0 18 | UnityAnalyticsSettings: 19 | m_Enabled: 0 20 | m_InitializeOnStartup: 1 21 | m_TestMode: 0 22 | m_TestEventUrl: 23 | m_TestConfigUrl: 24 | UnityAdsSettings: 25 | m_Enabled: 0 26 | m_InitializeOnStartup: 1 27 | m_TestMode: 0 28 | m_EnabledPlatforms: 4294967295 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | PerformanceReportingSettings: 32 | m_Enabled: 0 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Importing Seurat Meshes Into Unity 2 | 3 | Seurat is a scene simplification technology designed to process very complex 3D scenes into a representation that renders efficiently on mobile 6DoF VR systems. 4 | 5 | This document covers how to import Seurat meshes into Unity. To learn more about the Seurat pipeline, visit the main [Seurat GitHub page](https://github.com/googlevr/seurat). 6 | 7 | ## Introduction 8 | 9 | This document is organized into two sections. The first describes the steps to 10 | load a mesh produced by Seurat into Unity. The second provides detailed 11 | diagnostic steps to examine if the imported Seurat mesh shows artifacts, gaps, 12 | or cracks in various places, typically along the edges of the mesh. 13 | 14 | The document assumes some familiarity with the Unity Editor, and is written 15 | against version 5.6.*. 16 | 17 | ## Importing Seurat Meshes 18 | 19 | The instructions in this section assume the following file layout: 20 | `c:\Unity_Projects\SeuratImport` contains a blank Unity project. 21 | `c:\Seurat_Output` contains a set of files produced by Seurat: in particular 22 | `seurat.obj`, `seurat.png`. Follow these steps to import the Seurat output into 23 | Unity: 24 | 25 | 1. Import Prerequisites 26 | * Open the SeuratImport project in Unity. 27 | * Import the Seurat Unity capture package into the project with 28 | _Assets | Import Package | Custom Package_. 29 | 2. Import the Seurat mesh and texture as an Asset 30 | * Use _Asset | Import New Asset_ to copy seurat.obj and seurat.png into the 31 | Unity project’s Assets folder. 32 | * Browse the Assets folder in Project window. 33 | * Locate the Seurat output model `seurat.obj` in the Assets folder. 34 | 3. Add the Seurat mesh to the Scene. 35 | * Drag and drop the `seurat.obj` model from the Asset folder into the Scene 36 | window (or Hierarchy window, as appropriate). 37 | 38 | Note: Unity may split the mesh into several parts to fit under vertex count 39 | limits. 40 | * Unity should then display a solid-shaded version of the Seurat mesh. 41 | 4. Apply the Seurat shader to the Seurat mesh. 42 | * Locate the new node, _seurat_ instancing the seurat.obj in the Hierarchy 43 | window, and expand the hierarchy it contains until the leaf nodes are 44 | visible. The hierarchy should contain something like the following nodes, 45 | and the leaf nodes will have _Mesh Render_ components attached: 46 | * seurat 47 | * default 48 | * default_MeshPart0 49 | * default_MeshPart1 50 | * default_MeshPart2 51 | * Select the first leaf node a _Mesh Render_ component, _default_MeshPart0_. 52 | * Locate the _Mesh Render_ component in the Inspector panel. 53 | * Apply the Seurat shader to the geometry; click the Shaders popup at the 54 | bottom of the panel, and navigate the menu to the shader GoogleVR | 55 | Softserve | AlphaBlended, and click that menu option to apply the alpha 56 | blended material. 57 | 5. Apply the Seurat texture atlas to the mesh 58 | * Locate the Seurat output texture atlas seurat.png in the Assets folder. 59 | * Apply the texture atlas to the chunks of the Seurat mesh: drag and drop 60 | seurat.png onto each of the leaf nodes, here named _default_MeshPart*_. 61 | 6. Configure Texture Atlas Settings 62 | * Select the seurat.png texture in the Assets browser. 63 | * Locate the Inspector panel for the texture. 64 | * Expand the _Advanced_ rollup. 65 | * Disable the option _Generate Mip Maps_. 66 | * Change _Wrap Mode_ to _Clamp_. 67 | * Locate the build platform subpanel. 68 | * Enable _Override for PC, Mac, & Linux Standalone_. 69 | * Change _Max Size_ to a resolution greater-than or equal-to the dimensions 70 | of the seurat.png. Typically this will be 4096, but depends on Seurat 71 | processing settings. Note: Seurat requires that Unity not resize the 72 | texture! 73 | * Click the _Apply_ button at the bottom of the panel. 74 | * Unity will reprocess the texture, and should now display the Seurat mesh 75 | correctly. 76 | 77 | If the Seurat output has artifacts, or does not look correct, please continue on 78 | to the next section. The section provides detailed instructions on configuring 79 | both the imported assets, Unity project settings to correctly render Seurat 80 | meshes. 81 | 82 | ## Diagnosing Cracks 83 | This section illustrates what crack artifacts may appear, and lists many Unity 84 | settings that can trigger these artifacts. 85 | ![Example of cracks in Unity](images/cracks_01.png) 86 | ![Example of cracks in Unity](images/cracks_02.png) 87 | 88 | ### Determine the cause 89 | The easiest way to determine the cause of crack or gap artifacts in Seurat 90 | output is to set the camera background color to something with great contrast to 91 | the scene (e.g. bright red) and see if there are holes in the mesh generated by 92 | Seurat. 93 | 94 | * If you see holes in the mesh, you should try to rebake with higher quality 95 | settings. 96 | * If you do not see holes, adjust texture and shader settings. 97 | 98 | ### Texture Settings 99 | * Bilinear Filtering 100 | * For premultiplied alpha, uncheck _Alpha is Transparency_. Otherwise, Unity 101 | will inpaint the transparent areas of the texture (this process can be 102 | lengthy) and will show artifacts in areas that are supposed to be completely 103 | transparent. 104 | * NO mip maps 105 | * Low or No anisotropic filtering ~ 1-2 in Unity, any higher may cause cracks 106 | * Do not autoresize to power of 2 107 | * Wrap mode: clamp 108 | * A Unity project setting can affect the texture resolution during the Unity 109 | application build. Check that the _Texture Quality_ option under _Edit | 110 | Project Settings | Quality_ is set to _Full Res_. 111 | 112 | ### Mesh Settings 113 | * Make sure mesh compression is turned off for the UV0 channel in _Project 114 | Settings | Player | Android | Vertex Compression_ 115 | 116 | ### Shader Settings 117 | 118 | #### Centroid and Anti Aliasing 119 | If you are using MSAA, you may notice edge artifacts. Centroid interpolation 120 | will fix edge sampling errors caused by MSAA. For more information, see Fabien 121 | Giesen’s post. In Unity, this can be done by appending `_centroid` to the 122 | `TEXCOORD#` interpolator semantic like so: 123 | 124 | ```glsl 125 | struct VertexToFragment { 126 | float4 position : SV_POSITION; 127 | float2 uv : TEXCOORD0_centroid; 128 | } 129 | ``` 130 | 131 | Fragment shader texture coordinate precision is important. Use `highp` or 132 | `float` precision for texture coordinate variables rather than `lowp` modifier 133 | or the HLSL `min16` prefix. 134 | 135 | IMPORTANT: Centroid requires Open GL ES 3.0, and is performance intensive. Only 136 | use centroid interpolation if you are using MSAA, and absolutely need it. 137 | Currently the _centroid modifier is implicated in GPU driver issues on Pixel 138 | devices. Workarounds / bug fixes are in progress. 139 | 140 | Unless you absolutely need depth write (e.g. you are doing something fancy, like 141 | casting dynamic shadows off Seurat geometry) - you should prefer Alpha Blending. 142 | 143 | #### Alpha Blended 144 | * UV0 set to _centroid interpolation OR disable MSAA 145 | * Cull Off 146 | * ZWrite Off 147 | * ZTest LEqual 148 | * Queue: Transparent 149 | * Blend SrcAlpha OneMinusSrcAlpha 150 | 151 | #### Alpha Tested 152 | * UV0 set to _centroid interpolation OR disable MSAA 153 | * Cull Off 154 | * ZWrite On 155 | * ZTest LEqual 156 | * Queue: Transparent 157 | * Blend SrcAlpha OneMinusSrcAlpha 158 | * Alpha-to-coverage 159 | * Unity: AlphaToMask On 160 | 161 | ### Skybox, Clear Color and Background 162 | Some Seurat scenes can have gaps (cracks, you could say) of varying size against 163 | the background. You should let the team know if you encounter these. Still, 164 | colors from background color can bleed through and appear as cracks. 165 | 166 | Several things in Unity can generate a background color: 167 | 168 | 1. Geometry in the scene drawn before Seurat’s mesh. Try toggling it on and off 169 | to see if a skybox mesh is generating cracks, for example. 170 | 2. The _Skybox Material_ option of the Scene tab of Lighting inspector panel 171 | (_Window | Lighting | Settings_), can control the background color. To 172 | evaluate if this feature is contributing to the problem, try selecting a 173 | black material or a bright red material to see if this changes any of the 174 | cracks. 175 | 3. In the Camera inspector panel of the node containing the LDI Headbox for the 176 | capture, _Clear Flags_ and _Background Color_ control buffer color 177 | initialization for the capture. 178 | 179 | ### Capture Settings 180 | If none of the above fixes the issue, or you see holes in the mesh - try 181 | rebaking with higher quality capture settings. 182 | 183 | DISCLAIMER: This is not an officially supported Google product. 184 | 185 | -------------------------------------------------------------------------------- /images/cracks_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlevr/seurat-unity-plugin/7b182953b26dbde07d3212d583900f7cb0669a3e/images/cracks_01.png -------------------------------------------------------------------------------- /images/cracks_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googlevr/seurat-unity-plugin/7b182953b26dbde07d3212d583900f7cb0669a3e/images/cracks_02.png --------------------------------------------------------------------------------