├── Media ├── AfterVoxelization.jfif └── BeforeVoxelization.jfif ├── ProjectSettings ├── ProjectVersion.txt ├── ClusterInputManager.asset ├── PresetManager.asset ├── EditorBuildSettings.asset ├── XRSettings.asset ├── VersionControlSettings.asset ├── TimeManager.asset ├── VFXManager.asset ├── AudioManager.asset ├── TagManager.asset ├── UnityConnectSettings.asset ├── PackageManagerSettings.asset ├── EditorSettings.asset ├── DynamicsManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── QualitySettings.asset └── ProjectSettings.asset ├── Assets ├── MeshVoxelizer │ ├── Torus.unity.meta │ ├── Monkey.unity.meta │ ├── Meshes │ │ ├── Materials │ │ │ ├── defaultMat.mat.meta │ │ │ └── defaultMat.mat │ │ ├── Materials.meta │ │ ├── Torus.obj.meta │ │ ├── Monkey.obj.meta │ │ ├── Torus.obj │ │ └── Monkey.obj │ ├── Meshes.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── Box3.cs.meta │ │ ├── DrawLines.cs.meta │ │ ├── MeshRayTracer.cs.meta │ │ ├── MeshVoxelizer.cs.meta │ │ ├── VoxelizerDemo.cs.meta │ │ ├── DrawLines.cs │ │ ├── MeshVoxelizer.cs │ │ ├── Box3.cs │ │ ├── VoxelizerDemo.cs │ │ └── MeshRayTracer.cs │ ├── Monkey.unity │ └── Torus.unity └── MeshVoxelizer.meta ├── .gitignore ├── README.md └── LICENSE /Media/AfterVoxelization.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Scrawk/Mesh-Voxelization/HEAD/Media/AfterVoxelization.jfif -------------------------------------------------------------------------------- /Media/BeforeVoxelization.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Scrawk/Mesh-Voxelization/HEAD/Media/BeforeVoxelization.jfif -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.1.14f1 2 | m_EditorVersionWithRevision: 2020.1.14f1 (d81f64f5201d) 3 | -------------------------------------------------------------------------------- /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/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /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 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Torus.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 481919b255241624fabb890444d7dd4b 3 | timeCreated: 1492410291 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Monkey.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 63e290ba88820c14698d4bb12047d919 3 | timeCreated: 1491689970 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0564db0003958594ab0ae0c10b549568 3 | folderAsset: yes 4 | timeCreated: 1491689556 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Materials/defaultMat.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f0aeb2f6c50fae48800bbca14e7a238 3 | timeCreated: 1492409418 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b5b01a250ae1e4342b962df15459cc34 3 | folderAsset: yes 4 | timeCreated: 1492409429 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0638771b72f2444db9106ac45643e31 3 | folderAsset: yes 4 | timeCreated: 1492409644 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acbc6b9d817cd554088d889d0db975d0 3 | folderAsset: yes 4 | timeCreated: 1492409418 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /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: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/Box3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ddcf5cce6111eee42ba484b9711f1d46 3 | timeCreated: 1491689557 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/MeshVoxelizer/Scripts/DrawLines.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96b938133140c4b47a3fb28c5246261a 3 | timeCreated: 1491689557 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/MeshVoxelizer/Scripts/MeshRayTracer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b8c78067fd18af46a6dd169b6678640 3 | timeCreated: 1492405512 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/MeshVoxelizer/Scripts/MeshVoxelizer.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 055d9fa153de82e478256bbedce217ae 3 | timeCreated: 1492405512 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/MeshVoxelizer/Scripts/VoxelizerDemo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ea054b58ae3e1b4c8f4f9c5956c1559 3 | timeCreated: 1491689557 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # This .gitignore file was automatically created by Microsoft(R) Visual Studio. 3 | ################################################################################ 4 | 5 | /UserSettings 6 | /Temp 7 | /Packages 8 | /obj/Debug 9 | /Mesh-Voxelization.sln 10 | /Logs 11 | /Library 12 | /Assembly-CSharp.csproj 13 | /.vs/Mesh-Voxelization/v16 14 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | m_CompiledVersion: 0 14 | m_RuntimeVersion: 0 15 | -------------------------------------------------------------------------------- /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 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /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 | - 17 | - 18 | - 19 | - 20 | - 21 | - 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mesh-Voxelization 2 | 3 | This project converts a mesh into voxels in Unity. The idea is to ray trace the mesh and find where each ray intersects a triangle. These positions can then be used to make a 3D array of voxels. 4 | 5 | 6 | The ray tracing is accelerated by using a AABB tree to group the mesh triangles. The AABB tree should be much faster for large meshes but the overhead might not be worth it for smaller meshes. 7 | 8 | 9 | The original code for the AABB tree can be found in the core section of [this](https://github.com/mmacklin/sandbox) collection of code from Miles Macklins [blog](http://blog.mmacklin.com/). 10 | 11 | 12 | For the demo scene the voxels are converted back into a mesh by adding quads at the edge of each voxel. 13 | 14 | The mesh before voxelization. 15 | 16 | ![Before voxelization](./Media/BeforeVoxelization.jfif) 17 | 18 | The mesh after voxelization. 19 | 20 | ![After voxelization](./Media/AfterVoxelization.jfif) 21 | -------------------------------------------------------------------------------- /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 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Justin Hawkins 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /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: 11 7 | m_SerializationMode: 2 8 | m_LineEndingsForNewScripts: 2 9 | m_DefaultBehaviorMode: 0 10 | m_PrefabRegularEnvironment: {fileID: 0} 11 | m_PrefabUIEnvironment: {fileID: 0} 12 | m_SpritePackerMode: 0 13 | m_SpritePackerPaddingPower: 1 14 | m_EtcTextureCompressorBehavior: 1 15 | m_EtcTextureFastCompressor: 1 16 | m_EtcTextureNormalCompressor: 2 17 | m_EtcTextureBestCompressor: 4 18 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 19 | m_ProjectGenerationRootNamespace: 20 | m_EnableTextureStreamingInEditMode: 1 21 | m_EnableTextureStreamingInPlayMode: 1 22 | m_AsyncShaderCompilation: 1 23 | m_CachingShaderPreprocessor: 0 24 | m_EnterPlayModeOptionsEnabled: 0 25 | m_EnterPlayModeOptions: 3 26 | m_GameObjectNamingDigits: 1 27 | m_GameObjectNamingScheme: 0 28 | m_AssetNamingUsesSpace: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | m_DisableCookiesInLightmapper: 0 32 | m_AssetPipelineMode: 1 33 | m_CacheServerMode: 0 34 | m_CacheServerEndpoint: 35 | m_CacheServerNamespacePrefix: default 36 | m_CacheServerEnableDownload: 1 37 | m_CacheServerEnableUpload: 1 38 | m_CacheServerEnableAuth: 0 39 | m_CacheServerEnableTls: 0 40 | -------------------------------------------------------------------------------- /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 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_DefaultMaxDepenetrationVelocity: 10 11 | m_SleepThreshold: 0.005 12 | m_DefaultContactOffset: 0.01 13 | m_DefaultSolverIterations: 6 14 | m_DefaultSolverVelocityIterations: 1 15 | m_QueriesHitBackfaces: 0 16 | m_QueriesHitTriggers: 1 17 | m_EnableAdaptiveForce: 0 18 | m_ClothInterCollisionDistance: 0.1 19 | m_ClothInterCollisionStiffness: 0.2 20 | m_ContactsGeneration: 1 21 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 22 | m_AutoSimulation: 1 23 | m_AutoSyncTransforms: 0 24 | m_ReuseCollisionCallbacks: 0 25 | m_ClothInterCollisionSettingsToggle: 0 26 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 27 | m_ContactPairsMode: 0 28 | m_BroadphaseType: 0 29 | m_WorldBounds: 30 | m_Center: {x: 0, y: 0, z: 0} 31 | m_Extent: {x: 250, y: 250, z: 250} 32 | m_WorldSubdivisions: 8 33 | m_FrictionType: 0 34 | m_EnableEnhancedDeterminism: 0 35 | m_EnableUnifiedHeightmaps: 1 36 | m_SolverType: 0 37 | m_DefaultMaxAngularSpeed: 50 38 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | maxJobWorkers: 0 89 | preserveTilesOutsideBounds: 0 90 | debug: 91 | m_Flags: 0 92 | m_SettingNames: 93 | - Humanoid 94 | -------------------------------------------------------------------------------- /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 | serializedVersion: 5 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_SimulationMode: 0 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Torus.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bad44485595a74242a3e222c993436e6 3 | timeCreated: 1492410275 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: default 9 | 100002: //RootNode 10 | 400000: default 11 | 400002: //RootNode 12 | 2300000: default 13 | 3300000: default 14 | 4300000: default 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | animationImportErrors: 26 | animationImportWarnings: 27 | animationRetargetingWarnings: 28 | animationDoRetargetingWarnings: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | clipAnimations: [] 36 | isReadable: 1 37 | meshes: 38 | lODScreenPercentages: [] 39 | globalScale: 1 40 | meshCompression: 0 41 | addColliders: 0 42 | importBlendShapes: 1 43 | swapUVChannels: 0 44 | generateSecondaryUV: 0 45 | useFileUnits: 1 46 | optimizeMeshForGPU: 1 47 | keepQuads: 0 48 | weldVertices: 1 49 | secondaryUVAngleDistortion: 8 50 | secondaryUVAreaDistortion: 15.000001 51 | secondaryUVHardAngle: 88 52 | secondaryUVPackMargin: 4 53 | useFileScale: 1 54 | tangentSpace: 55 | normalSmoothAngle: 60 56 | normalImportMode: 0 57 | tangentImportMode: 3 58 | importAnimation: 1 59 | copyAvatar: 0 60 | humanDescription: 61 | serializedVersion: 2 62 | human: [] 63 | skeleton: [] 64 | armTwist: 0.5 65 | foreArmTwist: 0.5 66 | upperLegTwist: 0.5 67 | legTwist: 0.5 68 | armStretch: 0.05 69 | legStretch: 0.05 70 | feetSpacing: 0 71 | rootMotionBoneName: 72 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 73 | hasTranslationDoF: 0 74 | hasExtraRoot: 0 75 | skeletonHasParents: 1 76 | lastHumanDescriptionAvatarSource: {instanceID: 0} 77 | animationType: 0 78 | humanoidOversampling: 1 79 | additionalBone: 0 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Monkey.obj.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5eab8d748955e354c9acf45d41da829c 3 | timeCreated: 1492409418 4 | licenseType: Pro 5 | ModelImporter: 6 | serializedVersion: 19 7 | fileIDToRecycleName: 8 | 100000: default 9 | 100002: //RootNode 10 | 400000: default 11 | 400002: //RootNode 12 | 2300000: default 13 | 3300000: default 14 | 4300000: default 15 | materials: 16 | importMaterials: 1 17 | materialName: 0 18 | materialSearch: 1 19 | animations: 20 | legacyGenerateAnimations: 4 21 | bakeSimulation: 0 22 | resampleCurves: 1 23 | optimizeGameObjects: 0 24 | motionNodeName: 25 | animationImportErrors: 26 | animationImportWarnings: 27 | animationRetargetingWarnings: 28 | animationDoRetargetingWarnings: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | clipAnimations: [] 36 | isReadable: 1 37 | meshes: 38 | lODScreenPercentages: [] 39 | globalScale: 1 40 | meshCompression: 0 41 | addColliders: 0 42 | importBlendShapes: 1 43 | swapUVChannels: 0 44 | generateSecondaryUV: 0 45 | useFileUnits: 1 46 | optimizeMeshForGPU: 1 47 | keepQuads: 0 48 | weldVertices: 1 49 | secondaryUVAngleDistortion: 8 50 | secondaryUVAreaDistortion: 15.000001 51 | secondaryUVHardAngle: 88 52 | secondaryUVPackMargin: 4 53 | useFileScale: 1 54 | tangentSpace: 55 | normalSmoothAngle: 60 56 | normalImportMode: 0 57 | tangentImportMode: 3 58 | importAnimation: 1 59 | copyAvatar: 0 60 | humanDescription: 61 | serializedVersion: 2 62 | human: [] 63 | skeleton: [] 64 | armTwist: 0.5 65 | foreArmTwist: 0.5 66 | upperLegTwist: 0.5 67 | legTwist: 0.5 68 | armStretch: 0.05 69 | legStretch: 0.05 70 | feetSpacing: 0 71 | rootMotionBoneName: 72 | rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1} 73 | hasTranslationDoF: 0 74 | hasExtraRoot: 0 75 | skeletonHasParents: 1 76 | lastHumanDescriptionAvatarSource: {instanceID: 0} 77 | animationType: 0 78 | humanoidOversampling: 1 79 | additionalBone: 0 80 | userData: 81 | assetBundleName: 82 | assetBundleVariant: 83 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Materials/defaultMat.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_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: defaultMat 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0.8, g: 0.8, b: 0.8, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | m_BuildTextureStacks: [] 79 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/DrawLines.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace MeshVoxelizerProject 6 | { 7 | 8 | public static class DrawLines 9 | { 10 | 11 | private static IList m_corners = new Vector4[8]; 12 | 13 | private static Material m_lineMaterial; 14 | private static Material LineMaterial 15 | { 16 | get 17 | { 18 | if(m_lineMaterial == null) 19 | m_lineMaterial = new Material(Shader.Find("Hidden/Internal-Colored")); 20 | return m_lineMaterial; 21 | } 22 | } 23 | 24 | private static IList m_cube = new int[] 25 | { 26 | 0, 1, 1, 2, 2, 3, 3, 0, 27 | 4, 5, 5, 6, 6, 7, 7, 4, 28 | 0, 4, 1, 5, 2, 6, 3, 7 29 | }; 30 | 31 | public static void DrawBounds(Camera camera, Color color, Box3 bounds, Matrix4x4 localToWorld) 32 | { 33 | if (camera == null) return; 34 | 35 | bounds.GetCorners(m_corners); 36 | 37 | for (int i = 0; i < 8; i++) 38 | m_corners[i] = localToWorld * m_corners[i]; 39 | 40 | DrawVerticesAsLines(camera, color, m_corners, m_cube); 41 | } 42 | 43 | private static void DrawVerticesAsLines(Camera camera, Color color, IList vertices, IList indices) 44 | { 45 | if (camera == null || vertices == null || indices == null) return; 46 | 47 | GL.PushMatrix(); 48 | 49 | GL.LoadIdentity(); 50 | GL.MultMatrix(camera.worldToCameraMatrix); 51 | GL.LoadProjectionMatrix(camera.projectionMatrix); 52 | 53 | LineMaterial.SetPass(0); 54 | GL.Begin(GL.LINES); 55 | GL.Color(color); 56 | 57 | int vertexCount = vertices.Count; 58 | 59 | for (int i = 0; i < indices.Count / 2; i++) 60 | { 61 | int i0 = indices[i * 2 + 0]; 62 | int i1 = indices[i * 2 + 1]; 63 | 64 | if (i0 < 0 || i0 >= vertexCount) continue; 65 | if (i1 < 0 || i1 >= vertexCount) continue; 66 | 67 | GL.Vertex(vertices[i0]); 68 | GL.Vertex(vertices[i1]); 69 | } 70 | 71 | GL.End(); 72 | 73 | GL.PopMatrix(); 74 | } 75 | 76 | } 77 | 78 | } -------------------------------------------------------------------------------- /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: 13 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_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_VideoShadersIncludeMode: 2 32 | m_AlwaysIncludedShaders: 33 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 40 | m_PreloadedShaders: [] 41 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | m_LogWhenShaderIsCompiled: 0 64 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/MeshVoxelizer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using UnityEngine; 5 | 6 | namespace MeshVoxelizerProject 7 | { 8 | 9 | public class MeshVoxelizer 10 | { 11 | 12 | public int Count { get; private set; } 13 | 14 | public int Width { get; private set; } 15 | 16 | public int Height { get; private set; } 17 | 18 | public int Depth { get; private set; } 19 | 20 | public int[,,] Voxels { get; private set; } 21 | 22 | public List Bounds { get; private set; } 23 | 24 | public MeshVoxelizer(int width, int height, int depth) 25 | { 26 | 27 | Width = width; 28 | Height = height; 29 | Depth = depth; 30 | Bounds = new List(); 31 | Voxels = new int[width, height, depth]; 32 | } 33 | public void Voxelize(IList vertices, IList indices, Box3 bounds) 34 | { 35 | Array.Clear(Voxels, 0, Voxels.Length); 36 | 37 | // build an aabb tree of the mesh 38 | MeshRayTracer tree = new MeshRayTracer(vertices, indices); 39 | Bounds = tree.GetBounds(); 40 | 41 | // parity count method, single pass 42 | Vector3 extents = bounds.Size; 43 | Vector3 delta = new Vector3(extents.x/Width, extents.y/Height, extents.z/Depth); 44 | Vector3 offset = new Vector3(0.5f/Width, 0.5f/Height, 0.5f/Depth); 45 | 46 | float eps = 1e-7f * extents.z; 47 | 48 | for (int x = 0; x < Width; ++x) 49 | { 50 | for (int y = 0; y < Height; ++y) 51 | { 52 | bool inside = false; 53 | Vector3 rayDir = new Vector3(0.0f, 0.0f, 1.0f); 54 | 55 | // z-coord starts somewhat outside bounds 56 | Vector3 rayStart = bounds.Min + new Vector3(x*delta.x + offset.x, y*delta.y + offset.y, -0.0f*extents.z); 57 | 58 | while(true) 59 | { 60 | MeshRay ray = tree.TraceRay(rayStart, rayDir); 61 | 62 | if (ray.hit) 63 | { 64 | // calculate cell in which intersection occurred 65 | float zpos = rayStart.z + ray.distance * rayDir.z; 66 | float zhit = (zpos - bounds.Min.z) / delta.z; 67 | 68 | int z = (int)((rayStart.z - bounds.Min.z) / delta.z); 69 | int zend = (int)Math.Min(zhit, Depth - 1); 70 | 71 | if (inside) 72 | { 73 | for (int k = z; k <= zend; ++k) 74 | { 75 | Voxels[x, y, k] = 1; 76 | Count++; 77 | } 78 | } 79 | 80 | inside = !inside; 81 | rayStart += rayDir*(ray.distance + eps); 82 | } 83 | else 84 | break; 85 | } 86 | } 87 | } 88 | 89 | //end 90 | } 91 | 92 | } 93 | 94 | } 95 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/Box3.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | 5 | using UnityEngine; 6 | 7 | namespace MeshVoxelizerProject 8 | { 9 | [StructLayout(LayoutKind.Sequential)] 10 | public struct Box3 11 | { 12 | 13 | public Vector3 Center { get { return (Min + Max) / 2.0f; } } 14 | 15 | public Vector3 Size { get { return new Vector3(Width, Height, Depth); } } 16 | 17 | public float Width { get { return Max.x - Min.x; } } 18 | 19 | public float Height { get { return Max.y - Min.y; } } 20 | 21 | public float Depth { get { return Max.z - Min.z; } } 22 | 23 | public float Area 24 | { 25 | get 26 | { 27 | return (Max.x - Min.x) * (Max.y - Min.y) * (Max.z - Min.z); 28 | } 29 | } 30 | 31 | public float SurfaceArea 32 | { 33 | get 34 | { 35 | Vector3 d = Max - Min; 36 | return 2.0f * (d.x * d.y + d.x * d.z + d.y * d.z); 37 | } 38 | } 39 | 40 | public Vector3 Min { get; set; } 41 | 42 | public Vector3 Max { get; set; } 43 | 44 | public Box3(float min, float max) 45 | { 46 | Min = new Vector3(min, min, min); 47 | Max = new Vector3(max, max, max); 48 | } 49 | 50 | public Box3(float minX, float maxX, float minY, float maxY, float minZ, float maxZ) 51 | { 52 | Min = new Vector3(minX, minY, minZ); 53 | Max = new Vector3(maxX, maxY, maxZ); 54 | } 55 | 56 | public Box3(Vector3 min, Vector3 max) 57 | { 58 | Min = min; 59 | Max = max; 60 | } 61 | 62 | public Box3(Box3 box) 63 | { 64 | Min = box.Min; 65 | Max = box.Max; 66 | } 67 | 68 | public void GetCorners(IList corners) 69 | { 70 | corners[0] = new Vector3(Min.x, Min.y, Min.z); 71 | corners[1] = new Vector3(Min.x, Min.y, Max.z); 72 | corners[2] = new Vector3(Max.x, Min.y, Max.z); 73 | corners[3] = new Vector3(Max.x, Min.y, Min.z); 74 | 75 | corners[4] = new Vector3(Min.x, Max.y, Min.z); 76 | corners[5] = new Vector3(Min.x, Max.y, Max.z); 77 | corners[6] = new Vector3(Max.x, Max.y, Max.z); 78 | corners[7] = new Vector3(Max.x, Max.y, Min.z); 79 | } 80 | 81 | public void GetCorners(IList corners) 82 | { 83 | corners[0] = new Vector4(Min.x, Min.y, Min.z, 1); 84 | corners[1] = new Vector4(Min.x, Min.y, Max.z, 1); 85 | corners[2] = new Vector4(Max.x, Min.y, Max.z, 1); 86 | corners[3] = new Vector4(Max.x, Min.y, Min.z, 1); 87 | 88 | corners[4] = new Vector4(Min.x, Max.y, Min.z, 1); 89 | corners[5] = new Vector4(Min.x, Max.y, Max.z, 1); 90 | corners[6] = new Vector4(Max.x, Max.y, Max.z, 1); 91 | corners[7] = new Vector4(Max.x, Max.y, Min.z, 1); 92 | } 93 | 94 | /// 95 | /// Returns true if this bounding box contains the given bounding box. 96 | /// 97 | public bool Intersects(Box3 a) 98 | { 99 | if (Max.x < a.Min.x || Min.x > a.Max.x) return false; 100 | if (Max.y < a.Min.y || Min.y > a.Max.y) return false; 101 | if (Max.z < a.Min.z || Min.z > a.Max.z) return false; 102 | return true; 103 | } 104 | 105 | /// 106 | /// Returns true if this bounding box contains the given point. 107 | /// 108 | public bool Contains(Vector3 p) 109 | { 110 | if (p.x > Max.x || p.x < Min.x) return false; 111 | if (p.y > Max.y || p.y < Min.y) return false; 112 | if (p.z > Max.z || p.z < Min.z) return false; 113 | return true; 114 | } 115 | 116 | /// 117 | /// Returns the closest point to a on the box. 118 | /// 119 | public Vector3 Closest(Vector3 p) 120 | { 121 | Vector3 c; 122 | 123 | if (p.x < Min.x) 124 | c.x = Min.x; 125 | else if (p.x > Max.x) 126 | c.x = Max.x; 127 | else if (p.x - Min.x < Width * 0.5f) 128 | c.x = Min.x; 129 | else 130 | c.x = Max.x; 131 | 132 | if (p.y < Min.y) 133 | c.y = Min.y; 134 | else if (p.y > Max.y) 135 | c.y = Max.y; 136 | else if (p.y - Min.y < Height * 0.5f) 137 | c.y = Min.y; 138 | else 139 | c.y = Max.y; 140 | 141 | if (p.z < Min.z) 142 | c.z = Min.z; 143 | else if (p.z > Max.z) 144 | c.z = Max.z; 145 | else if (p.z - Min.z < Depth * 0.5f) 146 | c.z = Min.z; 147 | else 148 | c.z = Max.z; 149 | 150 | return c; 151 | } 152 | 153 | public bool Intersects(Vector3 p1, Vector3 p2) 154 | { 155 | 156 | Vector3 d = (p2 - p1) * 0.5f; 157 | Vector3 e = (Max - Min) * 0.5f; 158 | Vector3 c = p1 + d - (Min + Max) * 0.5f; 159 | Vector3 ad = new Vector3(Math.Abs(d.x), Math.Abs(d.y), Math.Abs(d.z)); 160 | 161 | if (Math.Abs(c.x) > e.x + ad.x) return false; 162 | if (Math.Abs(c.y) > e.y + ad.y) return false; 163 | if (Math.Abs(c.z) > e.z + ad.z) return false; 164 | 165 | float eps = 1e-12f; 166 | 167 | if (Math.Abs(d.y * c.z - d.z * c.y) > e.y * ad.z + e.z * ad.y + eps) return false; 168 | if (Math.Abs(d.z * c.x - d.x * c.z) > e.z * ad.x + e.x * ad.z + eps) return false; 169 | if (Math.Abs(d.x * c.y - d.y * c.x) > e.x * ad.y + e.y * ad.x + eps) return false; 170 | 171 | return true; 172 | } 173 | 174 | 175 | } 176 | 177 | } 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /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: 0.001 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: 0.001 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: 0.001 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: 0.001 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 shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 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: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 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: 0.001 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: 0.001 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: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /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: 5 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | skinWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | streamingMipmapsActive: 0 33 | streamingMipmapsAddAllCameras: 1 34 | streamingMipmapsMemoryBudget: 512 35 | streamingMipmapsRenderersPerFrame: 512 36 | streamingMipmapsMaxLevelReduction: 2 37 | streamingMipmapsMaxFileIORequests: 1024 38 | particleRaycastBudget: 4 39 | asyncUploadTimeSlice: 2 40 | asyncUploadBufferSize: 16 41 | asyncUploadPersistentBuffer: 1 42 | resolutionScalingFixedDPIFactor: 1 43 | customRenderPipeline: {fileID: 0} 44 | excludedTargetPlatforms: [] 45 | - serializedVersion: 2 46 | name: Low 47 | pixelLightCount: 0 48 | shadows: 0 49 | shadowResolution: 0 50 | shadowProjection: 1 51 | shadowCascades: 1 52 | shadowDistance: 20 53 | shadowNearPlaneOffset: 3 54 | shadowCascade2Split: 0.33333334 55 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 56 | shadowmaskMode: 0 57 | skinWeights: 2 58 | textureQuality: 0 59 | anisotropicTextures: 0 60 | antiAliasing: 0 61 | softParticles: 0 62 | softVegetation: 0 63 | realtimeReflectionProbes: 0 64 | billboardsFaceCameraPosition: 0 65 | vSyncCount: 0 66 | lodBias: 0.4 67 | maximumLODLevel: 0 68 | streamingMipmapsActive: 0 69 | streamingMipmapsAddAllCameras: 1 70 | streamingMipmapsMemoryBudget: 512 71 | streamingMipmapsRenderersPerFrame: 512 72 | streamingMipmapsMaxLevelReduction: 2 73 | streamingMipmapsMaxFileIORequests: 1024 74 | particleRaycastBudget: 16 75 | asyncUploadTimeSlice: 2 76 | asyncUploadBufferSize: 16 77 | asyncUploadPersistentBuffer: 1 78 | resolutionScalingFixedDPIFactor: 1 79 | customRenderPipeline: {fileID: 0} 80 | excludedTargetPlatforms: [] 81 | - serializedVersion: 2 82 | name: Medium 83 | pixelLightCount: 1 84 | shadows: 1 85 | shadowResolution: 0 86 | shadowProjection: 1 87 | shadowCascades: 1 88 | shadowDistance: 20 89 | shadowNearPlaneOffset: 3 90 | shadowCascade2Split: 0.33333334 91 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 92 | shadowmaskMode: 0 93 | skinWeights: 2 94 | textureQuality: 0 95 | anisotropicTextures: 1 96 | antiAliasing: 0 97 | softParticles: 0 98 | softVegetation: 0 99 | realtimeReflectionProbes: 0 100 | billboardsFaceCameraPosition: 0 101 | vSyncCount: 1 102 | lodBias: 0.7 103 | maximumLODLevel: 0 104 | streamingMipmapsActive: 0 105 | streamingMipmapsAddAllCameras: 1 106 | streamingMipmapsMemoryBudget: 512 107 | streamingMipmapsRenderersPerFrame: 512 108 | streamingMipmapsMaxLevelReduction: 2 109 | streamingMipmapsMaxFileIORequests: 1024 110 | particleRaycastBudget: 64 111 | asyncUploadTimeSlice: 2 112 | asyncUploadBufferSize: 16 113 | asyncUploadPersistentBuffer: 1 114 | resolutionScalingFixedDPIFactor: 1 115 | customRenderPipeline: {fileID: 0} 116 | excludedTargetPlatforms: [] 117 | - serializedVersion: 2 118 | name: High 119 | pixelLightCount: 2 120 | shadows: 2 121 | shadowResolution: 1 122 | shadowProjection: 1 123 | shadowCascades: 2 124 | shadowDistance: 40 125 | shadowNearPlaneOffset: 3 126 | shadowCascade2Split: 0.33333334 127 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 128 | shadowmaskMode: 1 129 | skinWeights: 2 130 | textureQuality: 0 131 | anisotropicTextures: 1 132 | antiAliasing: 0 133 | softParticles: 0 134 | softVegetation: 1 135 | realtimeReflectionProbes: 1 136 | billboardsFaceCameraPosition: 1 137 | vSyncCount: 1 138 | lodBias: 1 139 | maximumLODLevel: 0 140 | streamingMipmapsActive: 0 141 | streamingMipmapsAddAllCameras: 1 142 | streamingMipmapsMemoryBudget: 512 143 | streamingMipmapsRenderersPerFrame: 512 144 | streamingMipmapsMaxLevelReduction: 2 145 | streamingMipmapsMaxFileIORequests: 1024 146 | particleRaycastBudget: 256 147 | asyncUploadTimeSlice: 2 148 | asyncUploadBufferSize: 16 149 | asyncUploadPersistentBuffer: 1 150 | resolutionScalingFixedDPIFactor: 1 151 | customRenderPipeline: {fileID: 0} 152 | excludedTargetPlatforms: [] 153 | - serializedVersion: 2 154 | name: Very High 155 | pixelLightCount: 3 156 | shadows: 2 157 | shadowResolution: 2 158 | shadowProjection: 1 159 | shadowCascades: 2 160 | shadowDistance: 70 161 | shadowNearPlaneOffset: 3 162 | shadowCascade2Split: 0.33333334 163 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 164 | shadowmaskMode: 1 165 | skinWeights: 4 166 | textureQuality: 0 167 | anisotropicTextures: 2 168 | antiAliasing: 2 169 | softParticles: 1 170 | softVegetation: 1 171 | realtimeReflectionProbes: 1 172 | billboardsFaceCameraPosition: 1 173 | vSyncCount: 1 174 | lodBias: 1.5 175 | maximumLODLevel: 0 176 | streamingMipmapsActive: 0 177 | streamingMipmapsAddAllCameras: 1 178 | streamingMipmapsMemoryBudget: 512 179 | streamingMipmapsRenderersPerFrame: 512 180 | streamingMipmapsMaxLevelReduction: 2 181 | streamingMipmapsMaxFileIORequests: 1024 182 | particleRaycastBudget: 1024 183 | asyncUploadTimeSlice: 2 184 | asyncUploadBufferSize: 16 185 | asyncUploadPersistentBuffer: 1 186 | resolutionScalingFixedDPIFactor: 1 187 | customRenderPipeline: {fileID: 0} 188 | excludedTargetPlatforms: [] 189 | - serializedVersion: 2 190 | name: Ultra 191 | pixelLightCount: 4 192 | shadows: 2 193 | shadowResolution: 2 194 | shadowProjection: 1 195 | shadowCascades: 4 196 | shadowDistance: 150 197 | shadowNearPlaneOffset: 3 198 | shadowCascade2Split: 0.33333334 199 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 200 | shadowmaskMode: 1 201 | skinWeights: 255 202 | textureQuality: 0 203 | anisotropicTextures: 2 204 | antiAliasing: 2 205 | softParticles: 1 206 | softVegetation: 1 207 | realtimeReflectionProbes: 1 208 | billboardsFaceCameraPosition: 1 209 | vSyncCount: 1 210 | lodBias: 2 211 | maximumLODLevel: 0 212 | streamingMipmapsActive: 0 213 | streamingMipmapsAddAllCameras: 1 214 | streamingMipmapsMemoryBudget: 512 215 | streamingMipmapsRenderersPerFrame: 512 216 | streamingMipmapsMaxLevelReduction: 2 217 | streamingMipmapsMaxFileIORequests: 1024 218 | particleRaycastBudget: 4096 219 | asyncUploadTimeSlice: 2 220 | asyncUploadBufferSize: 16 221 | asyncUploadPersistentBuffer: 1 222 | resolutionScalingFixedDPIFactor: 1 223 | customRenderPipeline: {fileID: 0} 224 | excludedTargetPlatforms: [] 225 | m_PerPlatformDefaultQuality: 226 | Android: 2 227 | CloudRendering: 5 228 | Lumin: 5 229 | Nintendo Switch: 5 230 | PS4: 5 231 | Stadia: 5 232 | Standalone: 5 233 | WebGL: 3 234 | Windows Store Apps: 5 235 | XboxOne: 5 236 | iPhone: 2 237 | tvOS: 2 238 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/VoxelizerDemo.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace MeshVoxelizerProject 6 | { 7 | 8 | public class VoxelizerDemo : MonoBehaviour 9 | { 10 | 11 | public int size = 16; 12 | 13 | public bool drawAABBTree; 14 | 15 | private MeshVoxelizer m_voxelizer; 16 | 17 | void Start() 18 | { 19 | MeshFilter filter = GetComponent(); 20 | MeshRenderer renderer = GetComponent(); 21 | 22 | if(filter == null || renderer == null) 23 | { 24 | filter = GetComponentInChildren(); 25 | renderer = GetComponentInChildren(); 26 | } 27 | 28 | if (filter == null || renderer == null) return; 29 | 30 | renderer.enabled = false; 31 | 32 | Mesh mesh = filter.mesh; 33 | Material mat = renderer.material; 34 | 35 | Box3 bounds = new Box3(mesh.bounds.min, mesh.bounds.max); 36 | 37 | m_voxelizer = new MeshVoxelizer(size, size, size); 38 | m_voxelizer.Voxelize(mesh.vertices, mesh.triangles, bounds); 39 | 40 | Vector3 scale = new Vector3(bounds.Size.x / size, bounds.Size.y / size, bounds.Size.z / size); 41 | Vector3 m = new Vector3(bounds.Min.x, bounds.Min.y, bounds.Min.z); 42 | mesh = CreateMesh(m_voxelizer.Voxels, scale, m); 43 | 44 | GameObject go = new GameObject("Voxelized"); 45 | go.transform.parent = transform; 46 | go.transform.localPosition = Vector3.zero; 47 | go.transform.localScale = Vector3.one; 48 | go.transform.localRotation = Quaternion.identity; 49 | 50 | filter = go.AddComponent(); 51 | renderer = go.AddComponent(); 52 | 53 | filter.mesh = mesh; 54 | renderer.material = mat; 55 | } 56 | 57 | private void OnRenderObject() 58 | { 59 | var camera = Camera.current; 60 | 61 | if (drawAABBTree && m_voxelizer != null) 62 | { 63 | Matrix4x4 m = transform.localToWorldMatrix; 64 | 65 | foreach (Box3 box in m_voxelizer.Bounds) 66 | { 67 | DrawLines.DrawBounds(camera, Color.red, box, m); 68 | } 69 | } 70 | 71 | } 72 | 73 | private Mesh CreateMesh(int[,,] voxels, Vector3 scale, Vector3 min) 74 | { 75 | List verts = new List(); 76 | List indices = new List(); 77 | 78 | for (int z = 0; z < size; z++) 79 | { 80 | for (int y = 0; y < size; y++) 81 | { 82 | for (int x = 0; x < size; x++) 83 | { 84 | if (voxels[x, y, z] != 1) continue; 85 | 86 | Vector3 pos = min + new Vector3(x * scale.x, y * scale.y, z * scale.z); 87 | 88 | if (x == size - 1 || voxels[x + 1, y, z] == 0) 89 | AddRightQuad(verts, indices, scale, pos); 90 | 91 | if (x == 0 || voxels[x - 1, y, z] == 0) 92 | AddLeftQuad(verts, indices, scale, pos); 93 | 94 | if (y == size - 1 || voxels[x, y + 1, z] == 0) 95 | AddTopQuad(verts, indices, scale, pos); 96 | 97 | if (y == 0 || voxels[x, y - 1, z] == 0) 98 | AddBottomQuad(verts, indices, scale, pos); 99 | 100 | if (z == size - 1 || voxels[x, y, z + 1] == 0) 101 | AddFrontQuad(verts, indices, scale, pos); 102 | 103 | if (z == 0 || voxels[x, y, z - 1] == 0) 104 | AddBackQuad(verts, indices, scale, pos); 105 | } 106 | } 107 | } 108 | 109 | if(verts.Count > 65000) 110 | { 111 | Debug.Log("Mesh has too many verts. You will have to add code to split it up."); 112 | return new Mesh(); 113 | } 114 | 115 | Mesh mesh = new Mesh(); 116 | mesh.SetVertices(verts); 117 | mesh.SetTriangles(indices, 0); 118 | 119 | mesh.RecalculateBounds(); 120 | mesh.RecalculateNormals(); 121 | 122 | return mesh; 123 | } 124 | 125 | private void AddRightQuad(List verts, List indices, Vector3 scale, Vector3 pos) 126 | { 127 | int count = verts.Count; 128 | 129 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 1 * scale.z)); 130 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 0 * scale.z)); 131 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 0 * scale.z)); 132 | 133 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 1 * scale.z)); 134 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 1 * scale.z)); 135 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 0 * scale.z)); 136 | 137 | indices.Add(count + 2); indices.Add(count + 1); indices.Add(count + 0); 138 | indices.Add(count + 5); indices.Add(count + 4); indices.Add(count + 3); 139 | } 140 | 141 | private void AddLeftQuad(List verts, List indices, Vector3 scale, Vector3 pos) 142 | { 143 | int count = verts.Count; 144 | 145 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 1 * scale.z)); 146 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 0 * scale.z)); 147 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 0 * scale.z)); 148 | 149 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 1 * scale.z)); 150 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 1 * scale.z)); 151 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 0 * scale.z)); 152 | 153 | indices.Add(count + 0); indices.Add(count + 1); indices.Add(count + 2); 154 | indices.Add(count + 3); indices.Add(count + 4); indices.Add(count + 5); 155 | } 156 | 157 | private void AddTopQuad(List verts, List indices, Vector3 scale, Vector3 pos) 158 | { 159 | int count = verts.Count; 160 | 161 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 1 * scale.z)); 162 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 0 * scale.z)); 163 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 0 * scale.z)); 164 | 165 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 1 * scale.z)); 166 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 1 * scale.z)); 167 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 0 * scale.z)); 168 | 169 | indices.Add(count + 0); indices.Add(count + 1); indices.Add(count + 2); 170 | indices.Add(count + 3); indices.Add(count + 4); indices.Add(count + 5); 171 | } 172 | 173 | private void AddBottomQuad(List verts, List indices, Vector3 scale, Vector3 pos) 174 | { 175 | int count = verts.Count; 176 | 177 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 1 * scale.z)); 178 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 0 * scale.z)); 179 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 0 * scale.z)); 180 | 181 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 1 * scale.z)); 182 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 1 * scale.z)); 183 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 0 * scale.z)); 184 | 185 | indices.Add(count + 2); indices.Add(count + 1); indices.Add(count + 0); 186 | indices.Add(count + 5); indices.Add(count + 4); indices.Add(count + 3); 187 | } 188 | 189 | private void AddFrontQuad(List verts, List indices, Vector3 scale, Vector3 pos) 190 | { 191 | int count = verts.Count; 192 | 193 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 1 * scale.z)); 194 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 1 * scale.z)); 195 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 1 * scale.z)); 196 | 197 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 1 * scale.z)); 198 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 1 * scale.z)); 199 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 1 * scale.z)); 200 | 201 | indices.Add(count + 2); indices.Add(count + 1); indices.Add(count + 0); 202 | indices.Add(count + 5); indices.Add(count + 4); indices.Add(count + 3); 203 | } 204 | 205 | private void AddBackQuad(List verts, List indices, Vector3 scale, Vector3 pos) 206 | { 207 | int count = verts.Count; 208 | 209 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 0 * scale.z)); 210 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 0 * scale.z)); 211 | verts.Add(pos + new Vector3(0 * scale.x, 0 * scale.y, 0 * scale.z)); 212 | 213 | verts.Add(pos + new Vector3(0 * scale.x, 1 * scale.y, 0 * scale.z)); 214 | verts.Add(pos + new Vector3(1 * scale.x, 1 * scale.y, 0 * scale.z)); 215 | verts.Add(pos + new Vector3(1 * scale.x, 0 * scale.y, 0 * scale.z)); 216 | 217 | indices.Add(count + 0); indices.Add(count + 1); indices.Add(count + 2); 218 | indices.Add(count + 3); indices.Add(count + 4); indices.Add(count + 5); 219 | } 220 | 221 | } 222 | 223 | } -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Monkey.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: 9 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.67814666, g: 0.7268921, b: 0.8308824, 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: 3 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, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 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: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 512 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 0 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 4890085278179872738, guid: f4d7c46ccb232434fa05505ae346cf2f, type: 2} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!114 &352765157 127 | MonoBehaviour: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_GameObject: {fileID: 386985828} 133 | m_Enabled: 1 134 | m_EditorHideFlags: 0 135 | m_Script: {fileID: 11500000, guid: 0ea054b58ae3e1b4c8f4f9c5956c1559, type: 3} 136 | m_Name: 137 | m_EditorClassIdentifier: 138 | size: 48 139 | drawAABBTree: 0 140 | --- !u!1 &386985828 141 | GameObject: 142 | m_ObjectHideFlags: 0 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInstance: {fileID: 0} 145 | m_PrefabAsset: {fileID: 0} 146 | serializedVersion: 6 147 | m_Component: 148 | - component: {fileID: 387412804} 149 | - component: {fileID: 352765157} 150 | m_Layer: 0 151 | m_Name: Monkey 152 | m_TagString: Untagged 153 | m_Icon: {fileID: 0} 154 | m_NavMeshLayer: 0 155 | m_StaticEditorFlags: 0 156 | m_IsActive: 1 157 | --- !u!1 &386985830 158 | GameObject: 159 | m_ObjectHideFlags: 0 160 | m_CorrespondingSourceObject: {fileID: 0} 161 | m_PrefabInstance: {fileID: 0} 162 | m_PrefabAsset: {fileID: 0} 163 | serializedVersion: 6 164 | m_Component: 165 | - component: {fileID: 387412806} 166 | - component: {fileID: 388182886} 167 | - component: {fileID: 389181862} 168 | m_Layer: 0 169 | m_Name: default 170 | m_TagString: Untagged 171 | m_Icon: {fileID: 0} 172 | m_NavMeshLayer: 0 173 | m_StaticEditorFlags: 0 174 | m_IsActive: 1 175 | --- !u!4 &387412804 176 | Transform: 177 | m_ObjectHideFlags: 0 178 | m_CorrespondingSourceObject: {fileID: 0} 179 | m_PrefabInstance: {fileID: 0} 180 | m_PrefabAsset: {fileID: 0} 181 | m_GameObject: {fileID: 386985828} 182 | m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} 183 | m_LocalPosition: {x: 0, y: 0, z: 0} 184 | m_LocalScale: {x: 1, y: 1, z: 1} 185 | m_Children: 186 | - {fileID: 387412806} 187 | m_Father: {fileID: 0} 188 | m_RootOrder: 2 189 | m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} 190 | --- !u!4 &387412806 191 | Transform: 192 | m_ObjectHideFlags: 0 193 | m_CorrespondingSourceObject: {fileID: 0} 194 | m_PrefabInstance: {fileID: 0} 195 | m_PrefabAsset: {fileID: 0} 196 | m_GameObject: {fileID: 386985830} 197 | m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} 198 | m_LocalPosition: {x: -0, y: 0, z: 0} 199 | m_LocalScale: {x: 1, y: 1, z: 1} 200 | m_Children: [] 201 | m_Father: {fileID: 387412804} 202 | m_RootOrder: 0 203 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 204 | --- !u!33 &388182886 205 | MeshFilter: 206 | m_ObjectHideFlags: 0 207 | m_CorrespondingSourceObject: {fileID: 0} 208 | m_PrefabInstance: {fileID: 0} 209 | m_PrefabAsset: {fileID: 0} 210 | m_GameObject: {fileID: 386985830} 211 | m_Mesh: {fileID: 4300000, guid: 5eab8d748955e354c9acf45d41da829c, type: 3} 212 | --- !u!23 &389181862 213 | MeshRenderer: 214 | m_ObjectHideFlags: 0 215 | m_CorrespondingSourceObject: {fileID: 0} 216 | m_PrefabInstance: {fileID: 0} 217 | m_PrefabAsset: {fileID: 0} 218 | m_GameObject: {fileID: 386985830} 219 | m_Enabled: 1 220 | m_CastShadows: 1 221 | m_ReceiveShadows: 1 222 | m_DynamicOccludee: 1 223 | m_MotionVectors: 1 224 | m_LightProbeUsage: 1 225 | m_ReflectionProbeUsage: 1 226 | m_RayTracingMode: 2 227 | m_RayTraceProcedural: 0 228 | m_RenderingLayerMask: 1 229 | m_RendererPriority: 0 230 | m_Materials: 231 | - {fileID: 2100000, guid: 7f0aeb2f6c50fae48800bbca14e7a238, type: 2} 232 | m_StaticBatchInfo: 233 | firstSubMesh: 0 234 | subMeshCount: 0 235 | m_StaticBatchRoot: {fileID: 0} 236 | m_ProbeAnchor: {fileID: 0} 237 | m_LightProbeVolumeOverride: {fileID: 0} 238 | m_ScaleInLightmap: 1 239 | m_ReceiveGI: 1 240 | m_PreserveUVs: 0 241 | m_IgnoreNormalsForChartDetection: 0 242 | m_ImportantGI: 0 243 | m_StitchLightmapSeams: 1 244 | m_SelectedEditorRenderState: 3 245 | m_MinimumChartSize: 4 246 | m_AutoUVMaxDistance: 0.5 247 | m_AutoUVMaxAngle: 89 248 | m_LightmapParameters: {fileID: 0} 249 | m_SortingLayerID: 0 250 | m_SortingLayer: 0 251 | m_SortingOrder: 0 252 | m_AdditionalVertexStreams: {fileID: 0} 253 | --- !u!1 &1186551166 254 | GameObject: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | serializedVersion: 6 260 | m_Component: 261 | - component: {fileID: 1186551170} 262 | - component: {fileID: 1186551169} 263 | m_Layer: 0 264 | m_Name: Main Camera 265 | m_TagString: MainCamera 266 | m_Icon: {fileID: 0} 267 | m_NavMeshLayer: 0 268 | m_StaticEditorFlags: 0 269 | m_IsActive: 1 270 | --- !u!20 &1186551169 271 | Camera: 272 | m_ObjectHideFlags: 0 273 | m_CorrespondingSourceObject: {fileID: 0} 274 | m_PrefabInstance: {fileID: 0} 275 | m_PrefabAsset: {fileID: 0} 276 | m_GameObject: {fileID: 1186551166} 277 | m_Enabled: 1 278 | serializedVersion: 2 279 | m_ClearFlags: 2 280 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 281 | m_projectionMatrixMode: 1 282 | m_GateFitMode: 2 283 | m_FOVAxisMode: 0 284 | m_SensorSize: {x: 36, y: 24} 285 | m_LensShift: {x: 0, y: 0} 286 | m_FocalLength: 50 287 | m_NormalizedViewPortRect: 288 | serializedVersion: 2 289 | x: 0 290 | y: 0 291 | width: 1 292 | height: 1 293 | near clip plane: 0.3 294 | far clip plane: 1000 295 | field of view: 60 296 | orthographic: 0 297 | orthographic size: 5 298 | m_Depth: -1 299 | m_CullingMask: 300 | serializedVersion: 2 301 | m_Bits: 4294967295 302 | m_RenderingPath: -1 303 | m_TargetTexture: {fileID: 0} 304 | m_TargetDisplay: 0 305 | m_TargetEye: 3 306 | m_HDR: 0 307 | m_AllowMSAA: 1 308 | m_AllowDynamicResolution: 0 309 | m_ForceIntoRT: 0 310 | m_OcclusionCulling: 1 311 | m_StereoConvergence: 10 312 | m_StereoSeparation: 0.022 313 | --- !u!4 &1186551170 314 | Transform: 315 | m_ObjectHideFlags: 0 316 | m_CorrespondingSourceObject: {fileID: 0} 317 | m_PrefabInstance: {fileID: 0} 318 | m_PrefabAsset: {fileID: 0} 319 | m_GameObject: {fileID: 1186551166} 320 | m_LocalRotation: {x: 0.113612846, y: -0.24606173, z: 0.029081762, w: 0.96213305} 321 | m_LocalPosition: {x: 1.515, y: 0.633, z: -2.298} 322 | m_LocalScale: {x: 1, y: 1, z: 1} 323 | m_Children: [] 324 | m_Father: {fileID: 0} 325 | m_RootOrder: 0 326 | m_LocalEulerAnglesHint: {x: 13.47, y: -28.691002, z: 0.003} 327 | --- !u!1 &1867001095 328 | GameObject: 329 | m_ObjectHideFlags: 0 330 | m_CorrespondingSourceObject: {fileID: 0} 331 | m_PrefabInstance: {fileID: 0} 332 | m_PrefabAsset: {fileID: 0} 333 | serializedVersion: 6 334 | m_Component: 335 | - component: {fileID: 1867001097} 336 | - component: {fileID: 1867001096} 337 | m_Layer: 0 338 | m_Name: Directional Light 339 | m_TagString: Untagged 340 | m_Icon: {fileID: 0} 341 | m_NavMeshLayer: 0 342 | m_StaticEditorFlags: 0 343 | m_IsActive: 1 344 | --- !u!108 &1867001096 345 | Light: 346 | m_ObjectHideFlags: 0 347 | m_CorrespondingSourceObject: {fileID: 0} 348 | m_PrefabInstance: {fileID: 0} 349 | m_PrefabAsset: {fileID: 0} 350 | m_GameObject: {fileID: 1867001095} 351 | m_Enabled: 1 352 | serializedVersion: 10 353 | m_Type: 1 354 | m_Shape: 0 355 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 356 | m_Intensity: 1 357 | m_Range: 10 358 | m_SpotAngle: 30 359 | m_InnerSpotAngle: 21.80208 360 | m_CookieSize: 10 361 | m_Shadows: 362 | m_Type: 2 363 | m_Resolution: -1 364 | m_CustomResolution: -1 365 | m_Strength: 1 366 | m_Bias: 0.05 367 | m_NormalBias: 0.4 368 | m_NearPlane: 0.2 369 | m_CullingMatrixOverride: 370 | e00: 1 371 | e01: 0 372 | e02: 0 373 | e03: 0 374 | e10: 0 375 | e11: 1 376 | e12: 0 377 | e13: 0 378 | e20: 0 379 | e21: 0 380 | e22: 1 381 | e23: 0 382 | e30: 0 383 | e31: 0 384 | e32: 0 385 | e33: 1 386 | m_UseCullingMatrixOverride: 0 387 | m_Cookie: {fileID: 0} 388 | m_DrawHalo: 0 389 | m_Flare: {fileID: 0} 390 | m_RenderMode: 0 391 | m_CullingMask: 392 | serializedVersion: 2 393 | m_Bits: 4294967295 394 | m_RenderingLayerMask: 1 395 | m_Lightmapping: 4 396 | m_LightShadowCasterMode: 0 397 | m_AreaSize: {x: 1, y: 1} 398 | m_BounceIntensity: 1 399 | m_ColorTemperature: 6570 400 | m_UseColorTemperature: 0 401 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 402 | m_UseBoundingSphereOverride: 0 403 | m_ShadowRadius: 0 404 | m_ShadowAngle: 0 405 | --- !u!4 &1867001097 406 | Transform: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 1867001095} 412 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 413 | m_LocalPosition: {x: 0, y: 3, z: 0} 414 | m_LocalScale: {x: 1, y: 1, z: 1} 415 | m_Children: [] 416 | m_Father: {fileID: 0} 417 | m_RootOrder: 1 418 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 419 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Torus.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: 9 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.66479236, g: 0.72483987, b: 0.85294116, 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: 3 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, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 12 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 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: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 512 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 512 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 0 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_LightingSettings: {fileID: 4890085278179872738, guid: 06efd97f107c4574e8f90490ed137ae4, type: 2} 102 | --- !u!196 &4 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | maxJobWorkers: 0 122 | preserveTilesOutsideBounds: 0 123 | debug: 124 | m_Flags: 0 125 | m_NavMeshData: {fileID: 0} 126 | --- !u!23 &1108211129 127 | MeshRenderer: 128 | m_ObjectHideFlags: 0 129 | m_CorrespondingSourceObject: {fileID: 0} 130 | m_PrefabInstance: {fileID: 0} 131 | m_PrefabAsset: {fileID: 0} 132 | m_GameObject: {fileID: 1110403961} 133 | m_Enabled: 1 134 | m_CastShadows: 1 135 | m_ReceiveShadows: 1 136 | m_DynamicOccludee: 1 137 | m_MotionVectors: 1 138 | m_LightProbeUsage: 1 139 | m_ReflectionProbeUsage: 1 140 | m_RayTracingMode: 2 141 | m_RayTraceProcedural: 0 142 | m_RenderingLayerMask: 1 143 | m_RendererPriority: 0 144 | m_Materials: 145 | - {fileID: 2100000, guid: 7f0aeb2f6c50fae48800bbca14e7a238, type: 2} 146 | m_StaticBatchInfo: 147 | firstSubMesh: 0 148 | subMeshCount: 0 149 | m_StaticBatchRoot: {fileID: 0} 150 | m_ProbeAnchor: {fileID: 0} 151 | m_LightProbeVolumeOverride: {fileID: 0} 152 | m_ScaleInLightmap: 1 153 | m_ReceiveGI: 1 154 | m_PreserveUVs: 0 155 | m_IgnoreNormalsForChartDetection: 0 156 | m_ImportantGI: 0 157 | m_StitchLightmapSeams: 1 158 | m_SelectedEditorRenderState: 3 159 | m_MinimumChartSize: 4 160 | m_AutoUVMaxDistance: 0.5 161 | m_AutoUVMaxAngle: 89 162 | m_LightmapParameters: {fileID: 0} 163 | m_SortingLayerID: 0 164 | m_SortingLayer: 0 165 | m_SortingOrder: 0 166 | m_AdditionalVertexStreams: {fileID: 0} 167 | --- !u!33 &1109178233 168 | MeshFilter: 169 | m_ObjectHideFlags: 0 170 | m_CorrespondingSourceObject: {fileID: 0} 171 | m_PrefabInstance: {fileID: 0} 172 | m_PrefabAsset: {fileID: 0} 173 | m_GameObject: {fileID: 1110403961} 174 | m_Mesh: {fileID: 4300000, guid: bad44485595a74242a3e222c993436e6, type: 3} 175 | --- !u!4 &1109981017 176 | Transform: 177 | m_ObjectHideFlags: 0 178 | m_CorrespondingSourceObject: {fileID: 0} 179 | m_PrefabInstance: {fileID: 0} 180 | m_PrefabAsset: {fileID: 0} 181 | m_GameObject: {fileID: 1110403961} 182 | m_LocalRotation: {x: 0, y: -0, z: -0, w: 1} 183 | m_LocalPosition: {x: -0, y: 0, z: 0} 184 | m_LocalScale: {x: 1, y: 1, z: 1} 185 | m_Children: [] 186 | m_Father: {fileID: 1109981019} 187 | m_RootOrder: 0 188 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 189 | --- !u!4 &1109981019 190 | Transform: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 1110403963} 196 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 197 | m_LocalPosition: {x: 0, y: 0, z: 0} 198 | m_LocalScale: {x: 1, y: 1, z: 1} 199 | m_Children: 200 | - {fileID: 1109981017} 201 | m_Father: {fileID: 0} 202 | m_RootOrder: 2 203 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 204 | --- !u!114 &1110371803 205 | MonoBehaviour: 206 | m_ObjectHideFlags: 0 207 | m_CorrespondingSourceObject: {fileID: 0} 208 | m_PrefabInstance: {fileID: 0} 209 | m_PrefabAsset: {fileID: 0} 210 | m_GameObject: {fileID: 1110403963} 211 | m_Enabled: 1 212 | m_EditorHideFlags: 0 213 | m_Script: {fileID: 11500000, guid: 0ea054b58ae3e1b4c8f4f9c5956c1559, type: 3} 214 | m_Name: 215 | m_EditorClassIdentifier: 216 | size: 32 217 | drawAABBTree: 0 218 | --- !u!1 &1110403961 219 | GameObject: 220 | m_ObjectHideFlags: 0 221 | m_CorrespondingSourceObject: {fileID: 0} 222 | m_PrefabInstance: {fileID: 0} 223 | m_PrefabAsset: {fileID: 0} 224 | serializedVersion: 6 225 | m_Component: 226 | - component: {fileID: 1109981017} 227 | - component: {fileID: 1109178233} 228 | - component: {fileID: 1108211129} 229 | m_Layer: 0 230 | m_Name: default 231 | m_TagString: Untagged 232 | m_Icon: {fileID: 0} 233 | m_NavMeshLayer: 0 234 | m_StaticEditorFlags: 0 235 | m_IsActive: 1 236 | --- !u!1 &1110403963 237 | GameObject: 238 | m_ObjectHideFlags: 0 239 | m_CorrespondingSourceObject: {fileID: 0} 240 | m_PrefabInstance: {fileID: 0} 241 | m_PrefabAsset: {fileID: 0} 242 | serializedVersion: 6 243 | m_Component: 244 | - component: {fileID: 1109981019} 245 | - component: {fileID: 1110371803} 246 | m_Layer: 0 247 | m_Name: Torus 248 | m_TagString: Untagged 249 | m_Icon: {fileID: 0} 250 | m_NavMeshLayer: 0 251 | m_StaticEditorFlags: 0 252 | m_IsActive: 1 253 | --- !u!1 &1186551166 254 | GameObject: 255 | m_ObjectHideFlags: 0 256 | m_CorrespondingSourceObject: {fileID: 0} 257 | m_PrefabInstance: {fileID: 0} 258 | m_PrefabAsset: {fileID: 0} 259 | serializedVersion: 6 260 | m_Component: 261 | - component: {fileID: 1186551170} 262 | - component: {fileID: 1186551169} 263 | m_Layer: 0 264 | m_Name: Main Camera 265 | m_TagString: MainCamera 266 | m_Icon: {fileID: 0} 267 | m_NavMeshLayer: 0 268 | m_StaticEditorFlags: 0 269 | m_IsActive: 1 270 | --- !u!20 &1186551169 271 | Camera: 272 | m_ObjectHideFlags: 0 273 | m_CorrespondingSourceObject: {fileID: 0} 274 | m_PrefabInstance: {fileID: 0} 275 | m_PrefabAsset: {fileID: 0} 276 | m_GameObject: {fileID: 1186551166} 277 | m_Enabled: 1 278 | serializedVersion: 2 279 | m_ClearFlags: 2 280 | m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} 281 | m_projectionMatrixMode: 1 282 | m_GateFitMode: 2 283 | m_FOVAxisMode: 0 284 | m_SensorSize: {x: 36, y: 24} 285 | m_LensShift: {x: 0, y: 0} 286 | m_FocalLength: 50 287 | m_NormalizedViewPortRect: 288 | serializedVersion: 2 289 | x: 0 290 | y: 0 291 | width: 1 292 | height: 1 293 | near clip plane: 0.3 294 | far clip plane: 1000 295 | field of view: 60 296 | orthographic: 0 297 | orthographic size: 5 298 | m_Depth: -1 299 | m_CullingMask: 300 | serializedVersion: 2 301 | m_Bits: 4294967295 302 | m_RenderingPath: -1 303 | m_TargetTexture: {fileID: 0} 304 | m_TargetDisplay: 0 305 | m_TargetEye: 3 306 | m_HDR: 0 307 | m_AllowMSAA: 1 308 | m_AllowDynamicResolution: 0 309 | m_ForceIntoRT: 0 310 | m_OcclusionCulling: 1 311 | m_StereoConvergence: 10 312 | m_StereoSeparation: 0.022 313 | --- !u!4 &1186551170 314 | Transform: 315 | m_ObjectHideFlags: 0 316 | m_CorrespondingSourceObject: {fileID: 0} 317 | m_PrefabInstance: {fileID: 0} 318 | m_PrefabAsset: {fileID: 0} 319 | m_GameObject: {fileID: 1186551166} 320 | m_LocalRotation: {x: 0.113612846, y: -0.24606173, z: 0.029081762, w: 0.96213305} 321 | m_LocalPosition: {x: 1.515, y: 0.633, z: -2.298} 322 | m_LocalScale: {x: 1, y: 1, z: 1} 323 | m_Children: [] 324 | m_Father: {fileID: 0} 325 | m_RootOrder: 0 326 | m_LocalEulerAnglesHint: {x: 13.47, y: -28.691002, z: 0.003} 327 | --- !u!1 &1867001095 328 | GameObject: 329 | m_ObjectHideFlags: 0 330 | m_CorrespondingSourceObject: {fileID: 0} 331 | m_PrefabInstance: {fileID: 0} 332 | m_PrefabAsset: {fileID: 0} 333 | serializedVersion: 6 334 | m_Component: 335 | - component: {fileID: 1867001097} 336 | - component: {fileID: 1867001096} 337 | m_Layer: 0 338 | m_Name: Directional Light 339 | m_TagString: Untagged 340 | m_Icon: {fileID: 0} 341 | m_NavMeshLayer: 0 342 | m_StaticEditorFlags: 0 343 | m_IsActive: 1 344 | --- !u!108 &1867001096 345 | Light: 346 | m_ObjectHideFlags: 0 347 | m_CorrespondingSourceObject: {fileID: 0} 348 | m_PrefabInstance: {fileID: 0} 349 | m_PrefabAsset: {fileID: 0} 350 | m_GameObject: {fileID: 1867001095} 351 | m_Enabled: 1 352 | serializedVersion: 10 353 | m_Type: 1 354 | m_Shape: 0 355 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 356 | m_Intensity: 1 357 | m_Range: 10 358 | m_SpotAngle: 30 359 | m_InnerSpotAngle: 21.80208 360 | m_CookieSize: 10 361 | m_Shadows: 362 | m_Type: 2 363 | m_Resolution: -1 364 | m_CustomResolution: -1 365 | m_Strength: 1 366 | m_Bias: 0.05 367 | m_NormalBias: 0.4 368 | m_NearPlane: 0.2 369 | m_CullingMatrixOverride: 370 | e00: 1 371 | e01: 0 372 | e02: 0 373 | e03: 0 374 | e10: 0 375 | e11: 1 376 | e12: 0 377 | e13: 0 378 | e20: 0 379 | e21: 0 380 | e22: 1 381 | e23: 0 382 | e30: 0 383 | e31: 0 384 | e32: 0 385 | e33: 1 386 | m_UseCullingMatrixOverride: 0 387 | m_Cookie: {fileID: 0} 388 | m_DrawHalo: 0 389 | m_Flare: {fileID: 0} 390 | m_RenderMode: 0 391 | m_CullingMask: 392 | serializedVersion: 2 393 | m_Bits: 4294967295 394 | m_RenderingLayerMask: 1 395 | m_Lightmapping: 4 396 | m_LightShadowCasterMode: 0 397 | m_AreaSize: {x: 1, y: 1} 398 | m_BounceIntensity: 1 399 | m_ColorTemperature: 6570 400 | m_UseColorTemperature: 0 401 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 402 | m_UseBoundingSphereOverride: 0 403 | m_ShadowRadius: 0 404 | m_ShadowAngle: 0 405 | --- !u!4 &1867001097 406 | Transform: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 1867001095} 412 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 413 | m_LocalPosition: {x: 0, y: 3, z: 0} 414 | m_LocalScale: {x: 1, y: 1, z: 1} 415 | m_Children: [] 416 | m_Father: {fileID: 0} 417 | m_RootOrder: 1 418 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 419 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Torus.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.75 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | mtllib Torus.mtl 4 | o Torus 5 | v 1.250000 0.000000 0.000000 6 | v 1.216506 -0.000000 0.125000 7 | v 1.125000 -0.000000 0.216506 8 | v 1.000000 -0.000000 0.250000 9 | v 0.875000 -0.000000 0.216506 10 | v 0.783494 -0.000000 0.125000 11 | v 0.750000 -0.000000 0.000000 12 | v 0.783494 0.000000 -0.125000 13 | v 0.875000 0.000000 -0.216506 14 | v 1.000000 0.000000 -0.250000 15 | v 1.125000 0.000000 -0.216506 16 | v 1.216506 0.000000 -0.125000 17 | v 1.154850 0.478354 0.000000 18 | v 1.123905 0.465537 0.125000 19 | v 1.039365 0.430519 0.216506 20 | v 0.923880 0.382683 0.250000 21 | v 0.808395 0.334848 0.216506 22 | v 0.723854 0.299830 0.125000 23 | v 0.692910 0.287013 0.000000 24 | v 0.723854 0.299830 -0.125000 25 | v 0.808395 0.334848 -0.216506 26 | v 0.923880 0.382683 -0.250000 27 | v 1.039365 0.430519 -0.216506 28 | v 1.123905 0.465537 -0.125000 29 | v 0.883883 0.883884 0.000000 30 | v 0.860200 0.860200 0.125000 31 | v 0.795495 0.795495 0.216506 32 | v 0.707107 0.707107 0.250000 33 | v 0.618718 0.618718 0.216506 34 | v 0.554014 0.554014 0.125000 35 | v 0.530330 0.530330 0.000000 36 | v 0.554014 0.554014 -0.125000 37 | v 0.618718 0.618718 -0.216506 38 | v 0.707107 0.707107 -0.250000 39 | v 0.795495 0.795495 -0.216506 40 | v 0.860200 0.860200 -0.125000 41 | v 0.478355 1.154849 0.000000 42 | v 0.465537 1.123905 0.125000 43 | v 0.430519 1.039364 0.216506 44 | v 0.382684 0.923879 0.250000 45 | v 0.334848 0.808394 0.216506 46 | v 0.299830 0.723854 0.125000 47 | v 0.287013 0.692910 0.000000 48 | v 0.299830 0.723854 -0.125000 49 | v 0.334848 0.808394 -0.216506 50 | v 0.382684 0.923879 -0.250000 51 | v 0.430519 1.039364 -0.216506 52 | v 0.465537 1.123905 -0.125000 53 | v 0.000000 1.250000 0.000000 54 | v 0.000000 1.216506 0.125000 55 | v 0.000000 1.125000 0.216506 56 | v 0.000000 1.000000 0.250000 57 | v 0.000000 0.875000 0.216506 58 | v 0.000000 0.783494 0.125000 59 | v 0.000000 0.750000 0.000000 60 | v 0.000000 0.783494 -0.125000 61 | v 0.000000 0.875000 -0.216506 62 | v 0.000000 1.000000 -0.250000 63 | v 0.000000 1.125000 -0.216506 64 | v 0.000000 1.216506 -0.125000 65 | v -0.478354 1.154849 0.000000 66 | v -0.465537 1.123905 0.125000 67 | v -0.430519 1.039364 0.216506 68 | v -0.382684 0.923880 0.250000 69 | v -0.334848 0.808395 0.216506 70 | v -0.299830 0.723854 0.125000 71 | v -0.287013 0.692910 0.000000 72 | v -0.299830 0.723854 -0.125000 73 | v -0.334848 0.808395 -0.216506 74 | v -0.382684 0.923880 -0.250000 75 | v -0.430519 1.039364 -0.216506 76 | v -0.465537 1.123905 -0.125000 77 | v -0.883884 0.883883 0.000000 78 | v -0.860200 0.860200 0.125000 79 | v -0.795495 0.795495 0.216506 80 | v -0.707107 0.707107 0.250000 81 | v -0.618719 0.618718 0.216506 82 | v -0.554014 0.554013 0.125000 83 | v -0.530330 0.530330 0.000000 84 | v -0.554014 0.554013 -0.125000 85 | v -0.618719 0.618718 -0.216506 86 | v -0.707107 0.707107 -0.250000 87 | v -0.795495 0.795495 -0.216506 88 | v -0.860200 0.860200 -0.125000 89 | v -1.154849 0.478354 0.000000 90 | v -1.123905 0.465537 0.125000 91 | v -1.039364 0.430519 0.216506 92 | v -0.923879 0.382683 0.250000 93 | v -0.808394 0.334848 0.216506 94 | v -0.723854 0.299830 0.125000 95 | v -0.692910 0.287013 0.000000 96 | v -0.723854 0.299830 -0.125000 97 | v -0.808394 0.334848 -0.216506 98 | v -0.923879 0.382683 -0.250000 99 | v -1.039364 0.430519 -0.216506 100 | v -1.123905 0.465537 -0.125000 101 | v -1.250000 0.000000 0.000000 102 | v -1.216506 0.000000 0.125000 103 | v -1.125000 0.000000 0.216506 104 | v -1.000000 0.000000 0.250000 105 | v -0.875000 0.000000 0.216506 106 | v -0.783494 0.000000 0.125000 107 | v -0.750000 0.000000 0.000000 108 | v -0.783494 0.000000 -0.125000 109 | v -0.875000 0.000000 -0.216506 110 | v -1.000000 0.000000 -0.250000 111 | v -1.125000 0.000000 -0.216506 112 | v -1.216506 0.000000 -0.125000 113 | v -1.154850 -0.478354 -0.000000 114 | v -1.123906 -0.465536 0.125000 115 | v -1.039365 -0.430518 0.216506 116 | v -0.923880 -0.382683 0.250000 117 | v -0.808395 -0.334848 0.216506 118 | v -0.723854 -0.299830 0.125000 119 | v -0.692910 -0.287012 -0.000000 120 | v -0.723854 -0.299830 -0.125000 121 | v -0.808395 -0.334848 -0.216506 122 | v -0.923880 -0.382683 -0.250000 123 | v -1.039365 -0.430518 -0.216506 124 | v -1.123906 -0.465536 -0.125000 125 | v -0.883884 -0.883883 -0.000000 126 | v -0.860200 -0.860200 0.125000 127 | v -0.795495 -0.795495 0.216506 128 | v -0.707107 -0.707107 0.250000 129 | v -0.618719 -0.618718 0.216506 130 | v -0.554014 -0.554013 0.125000 131 | v -0.530330 -0.530330 -0.000000 132 | v -0.554014 -0.554013 -0.125000 133 | v -0.618719 -0.618718 -0.216506 134 | v -0.707107 -0.707107 -0.250000 135 | v -0.795495 -0.795495 -0.216506 136 | v -0.860200 -0.860200 -0.125000 137 | v -0.478354 -1.154849 -0.000000 138 | v -0.465537 -1.123905 0.125000 139 | v -0.430519 -1.039364 0.216506 140 | v -0.382684 -0.923880 0.250000 141 | v -0.334848 -0.808395 0.216506 142 | v -0.299830 -0.723854 0.125000 143 | v -0.287013 -0.692910 -0.000000 144 | v -0.299830 -0.723854 -0.125000 145 | v -0.334848 -0.808395 -0.216506 146 | v -0.382684 -0.923880 -0.250000 147 | v -0.430519 -1.039364 -0.216506 148 | v -0.465537 -1.123905 -0.125000 149 | v 0.000000 -1.250000 -0.000000 150 | v 0.000000 -1.216506 0.125000 151 | v 0.000000 -1.125000 0.216506 152 | v 0.000000 -1.000000 0.250000 153 | v 0.000000 -0.875000 0.216506 154 | v 0.000000 -0.783494 0.125000 155 | v 0.000000 -0.750000 -0.000000 156 | v 0.000000 -0.783494 -0.125000 157 | v 0.000000 -0.875000 -0.216506 158 | v 0.000000 -1.000000 -0.250000 159 | v 0.000000 -1.125000 -0.216506 160 | v 0.000000 -1.216506 -0.125000 161 | v 0.478355 -1.154849 -0.000000 162 | v 0.465537 -1.123905 0.125000 163 | v 0.430519 -1.039364 0.216506 164 | v 0.382684 -0.923879 0.250000 165 | v 0.334848 -0.808394 0.216506 166 | v 0.299830 -0.723854 0.125000 167 | v 0.287013 -0.692910 -0.000000 168 | v 0.299830 -0.723854 -0.125000 169 | v 0.334848 -0.808394 -0.216506 170 | v 0.382684 -0.923879 -0.250000 171 | v 0.430519 -1.039364 -0.216506 172 | v 0.465537 -1.123905 -0.125000 173 | v 0.883883 -0.883884 -0.000000 174 | v 0.860199 -0.860200 0.125000 175 | v 0.795495 -0.795496 0.216506 176 | v 0.707106 -0.707107 0.250000 177 | v 0.618718 -0.618719 0.216506 178 | v 0.554013 -0.554014 0.125000 179 | v 0.530330 -0.530330 -0.000000 180 | v 0.554013 -0.554014 -0.125000 181 | v 0.618718 -0.618719 -0.216506 182 | v 0.707106 -0.707107 -0.250000 183 | v 0.795495 -0.795496 -0.216506 184 | v 0.860199 -0.860200 -0.125000 185 | v 1.154849 -0.478355 -0.000000 186 | v 1.123905 -0.465537 0.125000 187 | v 1.039364 -0.430519 0.216506 188 | v 0.923879 -0.382684 0.250000 189 | v 0.808394 -0.334848 0.216506 190 | v 0.723854 -0.299830 0.125000 191 | v 0.692909 -0.287013 -0.000000 192 | v 0.723854 -0.299830 -0.125000 193 | v 0.808394 -0.334848 -0.216506 194 | v 0.923879 -0.382684 -0.250000 195 | v 1.039364 -0.430519 -0.216506 196 | v 1.123905 -0.465537 -0.125000 197 | vn 0.948600 0.188700 0.254200 198 | vn 0.700200 0.139300 0.700200 199 | vn 0.258500 0.051400 0.964600 200 | vn -0.258500 -0.051400 0.964600 201 | vn -0.700200 -0.139300 0.700200 202 | vn -0.948600 -0.188700 0.254200 203 | vn -0.948600 -0.188700 -0.254200 204 | vn -0.700200 -0.139300 -0.700200 205 | vn -0.258500 -0.051400 -0.964600 206 | vn 0.258500 0.051400 -0.964600 207 | vn 0.700200 0.139300 -0.700200 208 | vn 0.948600 0.188700 -0.254200 209 | vn 0.804200 0.537300 0.254200 210 | vn 0.593600 0.396600 0.700200 211 | vn 0.219100 0.146400 0.964600 212 | vn -0.219100 -0.146400 0.964600 213 | vn -0.593600 -0.396600 0.700200 214 | vn -0.804200 -0.537300 0.254200 215 | vn -0.804200 -0.537300 -0.254200 216 | vn -0.593600 -0.396600 -0.700200 217 | vn -0.219100 -0.146400 -0.964600 218 | vn 0.219100 0.146400 -0.964600 219 | vn 0.593600 0.396600 -0.700200 220 | vn 0.804200 0.537300 -0.254200 221 | vn 0.537300 0.804200 0.254200 222 | vn 0.396600 0.593600 0.700200 223 | vn 0.146400 0.219100 0.964600 224 | vn -0.146400 -0.219100 0.964600 225 | vn -0.396600 -0.593600 0.700200 226 | vn -0.537300 -0.804200 0.254200 227 | vn -0.537300 -0.804200 -0.254200 228 | vn -0.396600 -0.593600 -0.700200 229 | vn -0.146400 -0.219100 -0.964600 230 | vn 0.146400 0.219100 -0.964600 231 | vn 0.396600 0.593600 -0.700200 232 | vn 0.537300 0.804200 -0.254200 233 | vn 0.188700 0.948600 0.254200 234 | vn 0.139300 0.700200 0.700200 235 | vn 0.051400 0.258500 0.964600 236 | vn -0.051400 -0.258500 0.964600 237 | vn -0.139300 -0.700200 0.700200 238 | vn -0.188700 -0.948600 0.254200 239 | vn -0.188700 -0.948600 -0.254200 240 | vn -0.139300 -0.700200 -0.700200 241 | vn -0.051400 -0.258500 -0.964600 242 | vn 0.051400 0.258500 -0.964600 243 | vn 0.139300 0.700200 -0.700200 244 | vn 0.188700 0.948600 -0.254200 245 | vn -0.188700 0.948600 0.254200 246 | vn -0.139300 0.700200 0.700200 247 | vn -0.051400 0.258500 0.964600 248 | vn 0.051400 -0.258500 0.964600 249 | vn 0.139300 -0.700200 0.700200 250 | vn 0.188700 -0.948600 0.254200 251 | vn 0.188700 -0.948600 -0.254200 252 | vn 0.139300 -0.700200 -0.700200 253 | vn 0.051400 -0.258500 -0.964600 254 | vn -0.051400 0.258500 -0.964600 255 | vn -0.139300 0.700200 -0.700200 256 | vn -0.188700 0.948600 -0.254200 257 | vn -0.537300 0.804200 0.254200 258 | vn -0.396600 0.593600 0.700200 259 | vn -0.146400 0.219100 0.964600 260 | vn 0.146400 -0.219100 0.964600 261 | vn 0.396600 -0.593600 0.700200 262 | vn 0.537300 -0.804200 0.254200 263 | vn 0.537300 -0.804200 -0.254200 264 | vn 0.396600 -0.593600 -0.700200 265 | vn 0.146400 -0.219100 -0.964600 266 | vn -0.146400 0.219100 -0.964600 267 | vn -0.396600 0.593600 -0.700200 268 | vn -0.537300 0.804200 -0.254200 269 | vn -0.804200 0.537300 0.254200 270 | vn -0.593600 0.396600 0.700200 271 | vn -0.219100 0.146400 0.964600 272 | vn 0.219100 -0.146400 0.964600 273 | vn 0.593600 -0.396600 0.700200 274 | vn 0.804200 -0.537300 0.254200 275 | vn 0.804200 -0.537300 -0.254200 276 | vn 0.593600 -0.396600 -0.700200 277 | vn 0.219100 -0.146400 -0.964600 278 | vn -0.219100 0.146400 -0.964600 279 | vn -0.593600 0.396600 -0.700200 280 | vn -0.804200 0.537300 -0.254200 281 | vn -0.948600 0.188700 0.254200 282 | vn -0.700200 0.139300 0.700200 283 | vn -0.258500 0.051400 0.964600 284 | vn 0.258500 -0.051400 0.964600 285 | vn 0.700200 -0.139300 0.700200 286 | vn 0.948600 -0.188700 0.254200 287 | vn 0.948600 -0.188700 -0.254200 288 | vn 0.700200 -0.139300 -0.700200 289 | vn 0.258500 -0.051400 -0.964600 290 | vn -0.258500 0.051400 -0.964600 291 | vn -0.700200 0.139300 -0.700200 292 | vn -0.948600 0.188700 -0.254200 293 | usemtl None 294 | s off 295 | f 1//1 13//1 14//1 2//1 296 | f 2//2 14//2 15//2 3//2 297 | f 3//3 15//3 16//3 4//3 298 | f 4//4 16//4 17//4 5//4 299 | f 5//5 17//5 18//5 6//5 300 | f 6//6 18//6 19//6 7//6 301 | f 7//7 19//7 20//7 8//7 302 | f 8//8 20//8 21//8 9//8 303 | f 9//9 21//9 22//9 10//9 304 | f 10//10 22//10 23//10 11//10 305 | f 11//11 23//11 24//11 12//11 306 | f 1//12 12//12 24//12 13//12 307 | f 13//13 25//13 26//13 14//13 308 | f 14//14 26//14 27//14 15//14 309 | f 15//15 27//15 28//15 16//15 310 | f 16//16 28//16 29//16 17//16 311 | f 17//17 29//17 30//17 18//17 312 | f 18//18 30//18 31//18 19//18 313 | f 19//19 31//19 32//19 20//19 314 | f 20//20 32//20 33//20 21//20 315 | f 21//21 33//21 34//21 22//21 316 | f 22//22 34//22 35//22 23//22 317 | f 23//23 35//23 36//23 24//23 318 | f 24//24 36//24 25//24 13//24 319 | f 25//25 37//25 38//25 26//25 320 | f 26//26 38//26 39//26 27//26 321 | f 27//27 39//27 40//27 28//27 322 | f 28//28 40//28 41//28 29//28 323 | f 29//29 41//29 42//29 30//29 324 | f 30//30 42//30 43//30 31//30 325 | f 31//31 43//31 44//31 32//31 326 | f 32//32 44//32 45//32 33//32 327 | f 33//33 45//33 46//33 34//33 328 | f 34//34 46//34 47//34 35//34 329 | f 35//35 47//35 48//35 36//35 330 | f 36//36 48//36 37//36 25//36 331 | f 37//37 49//37 50//37 38//37 332 | f 38//38 50//38 51//38 39//38 333 | f 39//39 51//39 52//39 40//39 334 | f 40//40 52//40 53//40 41//40 335 | f 41//41 53//41 54//41 42//41 336 | f 42//42 54//42 55//42 43//42 337 | f 43//43 55//43 56//43 44//43 338 | f 44//44 56//44 57//44 45//44 339 | f 45//45 57//45 58//45 46//45 340 | f 46//46 58//46 59//46 47//46 341 | f 47//47 59//47 60//47 48//47 342 | f 48//48 60//48 49//48 37//48 343 | f 49//49 61//49 62//49 50//49 344 | f 50//50 62//50 63//50 51//50 345 | f 51//51 63//51 64//51 52//51 346 | f 52//52 64//52 65//52 53//52 347 | f 53//53 65//53 66//53 54//53 348 | f 54//54 66//54 67//54 55//54 349 | f 55//55 67//55 68//55 56//55 350 | f 56//56 68//56 69//56 57//56 351 | f 57//57 69//57 70//57 58//57 352 | f 58//58 70//58 71//58 59//58 353 | f 59//59 71//59 72//59 60//59 354 | f 60//60 72//60 61//60 49//60 355 | f 61//61 73//61 74//61 62//61 356 | f 62//62 74//62 75//62 63//62 357 | f 63//63 75//63 76//63 64//63 358 | f 64//64 76//64 77//64 65//64 359 | f 65//65 77//65 78//65 66//65 360 | f 66//66 78//66 79//66 67//66 361 | f 67//67 79//67 80//67 68//67 362 | f 68//68 80//68 81//68 69//68 363 | f 69//69 81//69 82//69 70//69 364 | f 70//70 82//70 83//70 71//70 365 | f 71//71 83//71 84//71 72//71 366 | f 72//72 84//72 73//72 61//72 367 | f 73//73 85//73 86//73 74//73 368 | f 74//74 86//74 87//74 75//74 369 | f 75//75 87//75 88//75 76//75 370 | f 76//76 88//76 89//76 77//76 371 | f 77//77 89//77 90//77 78//77 372 | f 78//78 90//78 91//78 79//78 373 | f 79//79 91//79 92//79 80//79 374 | f 80//80 92//80 93//80 81//80 375 | f 81//81 93//81 94//81 82//81 376 | f 82//82 94//82 95//82 83//82 377 | f 83//83 95//83 96//83 84//83 378 | f 84//84 96//84 85//84 73//84 379 | f 85//85 97//85 98//85 86//85 380 | f 86//86 98//86 99//86 87//86 381 | f 87//87 99//87 100//87 88//87 382 | f 88//88 100//88 101//88 89//88 383 | f 89//89 101//89 102//89 90//89 384 | f 90//90 102//90 103//90 91//90 385 | f 91//91 103//91 104//91 92//91 386 | f 92//92 104//92 105//92 93//92 387 | f 93//93 105//93 106//93 94//93 388 | f 94//94 106//94 107//94 95//94 389 | f 95//95 107//95 108//95 96//95 390 | f 96//96 108//96 97//96 85//96 391 | f 97//6 109//6 110//6 98//6 392 | f 98//5 110//5 111//5 99//5 393 | f 99//4 111//4 112//4 100//4 394 | f 100//3 112//3 113//3 101//3 395 | f 101//2 113//2 114//2 102//2 396 | f 102//1 114//1 115//1 103//1 397 | f 103//12 115//12 116//12 104//12 398 | f 104//11 116//11 117//11 105//11 399 | f 105//10 117//10 118//10 106//10 400 | f 106//9 118//9 119//9 107//9 401 | f 107//8 119//8 120//8 108//8 402 | f 108//7 120//7 109//7 97//7 403 | f 109//18 121//18 122//18 110//18 404 | f 110//17 122//17 123//17 111//17 405 | f 111//16 123//16 124//16 112//16 406 | f 112//15 124//15 125//15 113//15 407 | f 113//14 125//14 126//14 114//14 408 | f 114//13 126//13 127//13 115//13 409 | f 115//24 127//24 128//24 116//24 410 | f 116//23 128//23 129//23 117//23 411 | f 117//22 129//22 130//22 118//22 412 | f 118//21 130//21 131//21 119//21 413 | f 119//20 131//20 132//20 120//20 414 | f 120//19 132//19 121//19 109//19 415 | f 121//30 133//30 134//30 122//30 416 | f 122//29 134//29 135//29 123//29 417 | f 123//28 135//28 136//28 124//28 418 | f 124//27 136//27 137//27 125//27 419 | f 125//26 137//26 138//26 126//26 420 | f 126//25 138//25 139//25 127//25 421 | f 127//36 139//36 140//36 128//36 422 | f 128//35 140//35 141//35 129//35 423 | f 129//34 141//34 142//34 130//34 424 | f 130//33 142//33 143//33 131//33 425 | f 131//32 143//32 144//32 132//32 426 | f 132//31 144//31 133//31 121//31 427 | f 133//42 145//42 146//42 134//42 428 | f 134//41 146//41 147//41 135//41 429 | f 135//40 147//40 148//40 136//40 430 | f 136//39 148//39 149//39 137//39 431 | f 137//38 149//38 150//38 138//38 432 | f 138//37 150//37 151//37 139//37 433 | f 139//48 151//48 152//48 140//48 434 | f 140//47 152//47 153//47 141//47 435 | f 141//46 153//46 154//46 142//46 436 | f 142//45 154//45 155//45 143//45 437 | f 143//44 155//44 156//44 144//44 438 | f 144//43 156//43 145//43 133//43 439 | f 145//54 157//54 158//54 146//54 440 | f 146//53 158//53 159//53 147//53 441 | f 147//52 159//52 160//52 148//52 442 | f 148//51 160//51 161//51 149//51 443 | f 149//50 161//50 162//50 150//50 444 | f 150//49 162//49 163//49 151//49 445 | f 151//60 163//60 164//60 152//60 446 | f 152//59 164//59 165//59 153//59 447 | f 153//58 165//58 166//58 154//58 448 | f 154//57 166//57 167//57 155//57 449 | f 155//56 167//56 168//56 156//56 450 | f 156//55 168//55 157//55 145//55 451 | f 157//66 169//66 170//66 158//66 452 | f 158//65 170//65 171//65 159//65 453 | f 159//64 171//64 172//64 160//64 454 | f 160//63 172//63 173//63 161//63 455 | f 161//62 173//62 174//62 162//62 456 | f 162//61 174//61 175//61 163//61 457 | f 163//72 175//72 176//72 164//72 458 | f 164//71 176//71 177//71 165//71 459 | f 165//70 177//70 178//70 166//70 460 | f 166//69 178//69 179//69 167//69 461 | f 167//68 179//68 180//68 168//68 462 | f 168//67 180//67 169//67 157//67 463 | f 169//78 181//78 182//78 170//78 464 | f 170//77 182//77 183//77 171//77 465 | f 171//76 183//76 184//76 172//76 466 | f 172//75 184//75 185//75 173//75 467 | f 173//74 185//74 186//74 174//74 468 | f 174//73 186//73 187//73 175//73 469 | f 175//84 187//84 188//84 176//84 470 | f 176//83 188//83 189//83 177//83 471 | f 177//82 189//82 190//82 178//82 472 | f 178//81 190//81 191//81 179//81 473 | f 179//80 191//80 192//80 180//80 474 | f 180//79 192//79 181//79 169//79 475 | f 181//90 1//90 2//90 182//90 476 | f 182//89 2//89 3//89 183//89 477 | f 183//88 3//88 4//88 184//88 478 | f 184//87 4//87 5//87 185//87 479 | f 185//86 5//86 6//86 186//86 480 | f 186//85 6//85 7//85 187//85 481 | f 187//96 7//96 8//96 188//96 482 | f 188//95 8//95 9//95 189//95 483 | f 189//94 9//94 10//94 190//94 484 | f 190//93 10//93 11//93 191//93 485 | f 191//92 11//92 12//92 192//92 486 | f 192//91 12//91 1//91 181//91 487 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Scripts/MeshRayTracer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | using UnityEngine; 5 | 6 | namespace MeshVoxelizerProject 7 | { 8 | 9 | public struct MeshRay 10 | { 11 | public float u, v, w; 12 | public bool hit; 13 | public float distance; 14 | public float faceSign; 15 | public int faceIndex; 16 | } 17 | 18 | public class MeshRayTracer 19 | { 20 | 21 | public int MaxDepth { get; private set; } 22 | 23 | public int LeafNodes { get; private set; } 24 | 25 | public float AvgFacesPerLeaf { get { return Faces.Length / (float)LeafNodes; } } 26 | 27 | private IList Vertices { get; set; } 28 | 29 | private IList Indices { get; set; } 30 | 31 | private int NumFaces { get; set; } 32 | 33 | private int FreeNode { get; set; } 34 | 35 | private int InnerNodes { get; set; } 36 | 37 | private List Nodes { get; set; } 38 | 39 | private int[] Faces { get; set; } 40 | 41 | private List FaceBounds { get; set; } 42 | 43 | private int CurrentDepth { get; set; } 44 | 45 | public MeshRayTracer(IList vertices, IList indices) 46 | { 47 | Vertices = vertices; 48 | Indices = indices; 49 | NumFaces = indices.Count / 3; 50 | 51 | Nodes = new List((int)(NumFaces * 1.5)); 52 | Faces = new int[NumFaces]; 53 | FaceBounds = new List(); 54 | 55 | Build(); 56 | } 57 | 58 | public List GetBounds(int level = -1) 59 | { 60 | List bounds = new List(); 61 | 62 | for (int i = 0; i < Nodes.Count; i++) 63 | { 64 | if (Nodes[i].Level == level || level == -1) 65 | bounds.Add(Nodes[i].Bounds); 66 | } 67 | 68 | return bounds; 69 | } 70 | 71 | private void Build() 72 | { 73 | 74 | MaxDepth = 0; 75 | InnerNodes = 0; 76 | LeafNodes = 0; 77 | CurrentDepth = 0; 78 | FaceBounds.Clear(); 79 | 80 | for (int i = 0; i < NumFaces; i++) 81 | { 82 | Box3 top = CalculateFaceBounds(i); 83 | 84 | Faces[i] = i; 85 | FaceBounds.Add(top); 86 | } 87 | 88 | CurrentDepth = 0; 89 | FreeNode = 1; 90 | BuildRecursive(0, 0, NumFaces); 91 | 92 | } 93 | 94 | public MeshRay TraceRay(Vector3 start, Vector3 dir) 95 | { 96 | 97 | MeshRay ray = new MeshRay(); 98 | ray.distance = float.PositiveInfinity; 99 | 100 | TraceRecursive(0, start, dir, ref ray); 101 | 102 | ray.hit = ray.distance != float.PositiveInfinity; 103 | 104 | return ray; 105 | } 106 | 107 | private void TraceRecursive(int nodeIndex, Vector3 start, Vector3 dir, ref MeshRay ray) 108 | { 109 | AABBNode node = Nodes[nodeIndex]; 110 | 111 | if (node.Faces == null) 112 | { 113 | // find closest node 114 | AABBNode leftChild = Nodes[node.Children+0]; 115 | AABBNode rightChild = Nodes[node.Children+1]; 116 | 117 | float[] dist = new float[]{float.PositiveInfinity, float.PositiveInfinity}; 118 | 119 | IntersectRayAABB(start, dir, leftChild.Bounds.Min, leftChild.Bounds.Max, out dist[0]); 120 | IntersectRayAABB(start, dir, rightChild.Bounds.Min, rightChild.Bounds.Max, out dist[1]); 121 | 122 | int closest = 0; 123 | int furthest = 1; 124 | 125 | if (dist[1] < dist[0]) 126 | { 127 | closest = 1; 128 | furthest = 0; 129 | } 130 | 131 | if (dist[closest] < ray.distance) 132 | TraceRecursive(node.Children + closest, start, dir, ref ray); 133 | 134 | if (dist[furthest] < ray.distance) 135 | TraceRecursive(node.Children + furthest, start, dir, ref ray); 136 | } 137 | else 138 | { 139 | float t, u, v, w, s; 140 | 141 | for (int i=0; i < node.Faces.Length; ++i) 142 | { 143 | int indexStart = node.Faces[i]*3; 144 | 145 | Vector3 a = Vertices[Indices[indexStart + 0]]; 146 | Vector3 b = Vertices[Indices[indexStart + 1]]; 147 | Vector3 c = Vertices[Indices[indexStart + 2]]; 148 | 149 | if (IntersectRayTriTwoSided(start, dir, a, b, c, out t, out u, out v, out w, out s)) 150 | { 151 | if (t < ray.distance) 152 | { 153 | ray.distance = t; 154 | ray.u = u; 155 | ray.v = v; 156 | ray.w = w; 157 | ray.faceSign = s; 158 | ray.faceIndex = node.Faces[i]; 159 | } 160 | } 161 | } 162 | } 163 | } 164 | 165 | public MeshRay TraceRaySlow(Vector3 start, Vector3 dir) 166 | { 167 | float minT, minU, minV, minW, minS; 168 | minT = minU = minV = minW = minS = float.PositiveInfinity; 169 | 170 | float t, u, v, w, s; 171 | bool hit = false; 172 | int minIndex = 0; 173 | 174 | for (int i = 0; i < NumFaces; ++i) 175 | { 176 | Vector3 a = Vertices[Indices[i*3+0]]; 177 | Vector3 b = Vertices[Indices[i*3+1]]; 178 | Vector3 c = Vertices[Indices[i * 3 + 2]]; 179 | 180 | if (IntersectRayTriTwoSided(start, dir, a, b, c, out t, out u, out v, out w, out s)) 181 | { 182 | if (t < minT) 183 | { 184 | minT = t; 185 | minU = u; 186 | minV = v; 187 | minW = w; 188 | minS = s; 189 | minIndex = i; 190 | hit = true; 191 | } 192 | } 193 | } 194 | 195 | MeshRay ray = new MeshRay(); 196 | 197 | ray.distance = minT; 198 | ray.u = minU; 199 | ray.v = minV; 200 | ray.w = minW; 201 | ray.faceSign = minS; 202 | ray.faceIndex = minIndex; 203 | ray.hit = hit; 204 | 205 | return ray; 206 | } 207 | 208 | private void BuildRecursive(int nodeIndex, int start, int numFaces) 209 | { 210 | int MaxFacesPerLeaf = 6; 211 | 212 | // a reference to the current node, need to be careful here as this reference may become invalid if array is resized 213 | AABBNode n = GetNode(nodeIndex); 214 | 215 | // track max tree depth 216 | ++CurrentDepth; 217 | MaxDepth = Math.Max(MaxDepth, CurrentDepth); 218 | 219 | int[] faces = GetFaces(start, numFaces); 220 | 221 | Vector3 min, max; 222 | CalculateFaceBounds(faces, out min, out max); 223 | 224 | n.Bounds = new Box3(min, max); 225 | n.Level = CurrentDepth - 1; 226 | 227 | // calculate bounds of faces and add node 228 | if (numFaces <= MaxFacesPerLeaf) 229 | { 230 | n.Faces = faces; 231 | ++LeafNodes; 232 | } 233 | else 234 | { 235 | ++InnerNodes; 236 | 237 | // face counts for each branch 238 | //const uint32_t leftCount = PartitionMedian(n, faces, numFaces); 239 | int leftCount = PartitionSAH(faces); 240 | int rightCount = numFaces - leftCount; 241 | 242 | // alloc 2 nodes 243 | Nodes[nodeIndex].Children = FreeNode; 244 | 245 | // allocate two nodes 246 | FreeNode += 2; 247 | 248 | // split faces in half and build each side recursively 249 | BuildRecursive(GetNode(nodeIndex).Children + 0, start, leftCount); 250 | BuildRecursive(GetNode(nodeIndex).Children + 1, start + leftCount, rightCount); 251 | } 252 | 253 | --CurrentDepth; 254 | } 255 | 256 | // partion faces based on the surface area heuristic 257 | private int PartitionSAH(int[] faces) 258 | { 259 | int numFaces = faces.Length; 260 | int bestAxis = 0; 261 | int bestIndex = 0; 262 | float bestCost = float.PositiveInfinity; 263 | 264 | FaceSorter predicate = new FaceSorter(); 265 | predicate.Vertices = Vertices; 266 | predicate.Indices = Indices; 267 | 268 | // two passes over data to calculate upper and lower bounds 269 | float[] cumulativeLower = new float[numFaces]; 270 | float[] cumulativeUpper = new float[numFaces]; 271 | 272 | for (int a = 0; a < 3; ++a) 273 | { 274 | // sort faces by centroids 275 | predicate.Axis = a; 276 | Array.Sort(faces, predicate); 277 | 278 | Box3 lower = new Box3(float.PositiveInfinity, float.NegativeInfinity); 279 | Box3 upper = new Box3(float.PositiveInfinity, float.NegativeInfinity); 280 | 281 | for (int i = 0; i < numFaces; ++i) 282 | { 283 | lower.Min = Min(lower.Min, FaceBounds[faces[i]].Min); 284 | lower.Max = Max(lower.Max, FaceBounds[faces[i]].Max); 285 | 286 | upper.Min = Min(upper.Min, FaceBounds[faces[numFaces - i - 1]].Min); 287 | upper.Max = Max(upper.Max, FaceBounds[faces[numFaces - i - 1]].Max); 288 | 289 | cumulativeLower[i] = lower.SurfaceArea; 290 | cumulativeUpper[numFaces - i - 1] = upper.SurfaceArea; 291 | } 292 | 293 | float invTotalSA = 1.0f / cumulativeUpper[0]; 294 | 295 | // test all split positions 296 | for (int i = 0; i < numFaces-1; ++i) 297 | { 298 | float pBelow = cumulativeLower[i] * invTotalSA; 299 | float pAbove = cumulativeUpper[i] * invTotalSA; 300 | 301 | float cost = 0.125f + (pBelow * i + pAbove * (numFaces - i)); 302 | if (cost <= bestCost) 303 | { 304 | bestCost = cost; 305 | bestIndex = i; 306 | bestAxis = a; 307 | } 308 | } 309 | } 310 | 311 | // re-sort by best axis 312 | predicate.Axis = bestAxis; 313 | Array.Sort(faces, predicate); 314 | 315 | return bestIndex+1; 316 | } 317 | 318 | private void CalculateFaceBounds(int[] faces, out Vector3 outMin, out Vector3 outMax) 319 | { 320 | Vector3 min = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity); 321 | Vector3 max = new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity); 322 | 323 | // calculate face bounds 324 | for (int i = 0; i < faces.Length; ++i) 325 | { 326 | Vector3 a = Vertices[Indices[faces[i] * 3 + 0]]; 327 | Vector3 b = Vertices[Indices[faces[i] * 3 + 1]]; 328 | Vector3 c = Vertices[Indices[faces[i] * 3 + 2]]; 329 | 330 | min = Min(a, min); 331 | max = Max(a, max); 332 | 333 | min = Min(b, min); 334 | max = Max(b, max); 335 | 336 | min = Min(c, min); 337 | max = Max(c, max); 338 | } 339 | 340 | outMin = min; 341 | outMax = max; 342 | } 343 | 344 | private Box3 CalculateFaceBounds(int i) 345 | { 346 | Vector3 min = new Vector3(float.PositiveInfinity, float.PositiveInfinity, float.PositiveInfinity); 347 | Vector3 max = new Vector3(float.NegativeInfinity, float.NegativeInfinity, float.NegativeInfinity); 348 | 349 | Vector3 a = Vertices[Indices[i + 0]]; 350 | Vector3 b = Vertices[Indices[i + 1]]; 351 | Vector3 c = Vertices[Indices[i + 2]]; 352 | 353 | min = Min(a, min); 354 | max = Max(a, max); 355 | 356 | min = Min(b, min); 357 | max = Max(b, max); 358 | 359 | min = Min(c, min); 360 | max = Max(c, max); 361 | 362 | return new Box3(min, max); 363 | } 364 | 365 | private Vector3 Min(Vector3 a, Vector3 b) 366 | { 367 | a.x = Math.Min(a.x, b.x); 368 | a.y = Math.Min(a.y, b.y); 369 | a.z = Math.Min(a.z, b.z); 370 | 371 | return a; 372 | } 373 | 374 | private Vector3 Max(Vector3 a, Vector3 b) 375 | { 376 | a.x = Math.Max(a.x, b.x); 377 | a.y = Math.Max(a.y, b.y); 378 | a.z = Math.Max(a.z, b.z); 379 | 380 | return a; 381 | } 382 | 383 | private AABBNode GetNode(int index) 384 | { 385 | if (index >= Nodes.Count) 386 | { 387 | int diff = index - Nodes.Count + 1; 388 | for(int i = 0; i < diff; i++) 389 | Nodes.Add(new AABBNode()); 390 | } 391 | 392 | return Nodes[index]; 393 | } 394 | 395 | private int[] GetFaces(int start, int num) 396 | { 397 | int[] faces = new int[num]; 398 | 399 | for (int i = 0; i < num; i++) 400 | faces[i] = Faces[i + start]; 401 | 402 | return faces; 403 | } 404 | 405 | private bool IntersectRayTriTwoSided(Vector3 p, Vector3 dir, Vector3 a, Vector3 b, Vector3 c, out float t, out float u, out float v, out float w, out float sign) 406 | { 407 | // Moller and Trumbore's method 408 | Vector3 ab = b - a; 409 | Vector3 ac = c - a; 410 | Vector3 n = Vector3.Cross(ab, ac); 411 | 412 | float d = Vector3.Dot(dir * -1.0f, n); 413 | float ood = 1.0f / d; 414 | Vector3 ap = p - a; 415 | 416 | t = u = v = w = sign = 0.0f; 417 | 418 | t = Vector3.Dot(ap, n) * ood; 419 | if (t < 0.0f) 420 | return false; 421 | 422 | Vector3 e = Vector3.Cross(dir * -1.0f, ap); 423 | 424 | v = Vector3.Dot(ac, e) * ood; 425 | if (v < 0.0 || v > 1.0) 426 | return false; 427 | 428 | w = -Vector3.Dot(ab, e) * ood; 429 | if (w < 0.0 || v + w > 1.0) 430 | return false; 431 | 432 | u = 1.0f - v - w; 433 | sign = d; 434 | 435 | return true; 436 | } 437 | 438 | private bool IntersectRayAABB(Vector3 start, Vector3 dir, Vector3 min, Vector3 max, out float t) 439 | { 440 | //calculate candidate plane on each axis 441 | float tx = -1.0f, ty = -1.0f, tz = -1.0f; 442 | bool inside = true; 443 | t = 0; 444 | 445 | if (start.x < min.x) 446 | { 447 | if (dir.x != 0.0) 448 | tx = (min.x-start.x)/dir.x; 449 | inside = false; 450 | } 451 | else if (start.x > max.x) 452 | { 453 | if (dir.x != 0.0) 454 | tx = (max.x-start.x)/dir.x; 455 | inside = false; 456 | } 457 | 458 | if (start.y < min.y) 459 | { 460 | if (dir.y != 0.0) 461 | ty = (min.y-start.y)/dir.y; 462 | inside = false; 463 | } 464 | else if (start.y > max.y) 465 | { 466 | if (dir.y != 0.0) 467 | ty = (max.y-start.y)/dir.y; 468 | inside = false; 469 | } 470 | 471 | if (start.z < min.z) 472 | { 473 | if (dir.z != 0.0) 474 | tz = (min.z-start.z)/dir.z; 475 | inside = false; 476 | } 477 | else if (start.z > max.z) 478 | { 479 | if (dir.z != 0.0) 480 | tz = (max.z-start.z)/dir.z; 481 | inside = false; 482 | } 483 | 484 | //if point inside all planes 485 | if (inside) 486 | { 487 | t = 0.0f; 488 | return true; 489 | } 490 | 491 | //we now have t values for each of possible intersection planes 492 | //find the maximum to get the intersection point 493 | float tmax = tx; 494 | int taxis = 0; 495 | 496 | if (ty > tmax) 497 | { 498 | tmax = ty; 499 | taxis = 1; 500 | } 501 | if (tz > tmax) 502 | { 503 | tmax = tz; 504 | taxis = 2; 505 | } 506 | 507 | if (tmax < 0.0f) 508 | return false; 509 | 510 | //check that the intersection point lies on the plane we picked 511 | //we don't test the axis of closest intersection for precision reasons 512 | 513 | //no eps for now 514 | float eps = 0.0f; 515 | 516 | Vector3 hit = start + dir*tmax; 517 | 518 | if ((hit.x < min.x-eps || hit.x > max.x+eps) && taxis != 0) 519 | return false; 520 | if ((hit.y < min.y-eps || hit.y > max.y+eps) && taxis != 1) 521 | return false; 522 | if ((hit.z < min.z-eps || hit.z > max.z+eps) && taxis != 2) 523 | return false; 524 | 525 | //output results 526 | t = tmax; 527 | return true; 528 | } 529 | 530 | private class AABBNode 531 | { 532 | public Box3 Bounds { get; internal set; } 533 | 534 | public bool IsLeaf { get { return Faces == null; } } 535 | 536 | public int Level { get; internal set; } 537 | 538 | internal int[] Faces { get; set; } 539 | 540 | internal int Children { get; set; } 541 | }; 542 | 543 | private class FaceSorter : IComparer 544 | { 545 | internal IList Vertices; 546 | internal IList Indices; 547 | internal int Axis; 548 | 549 | public int Compare(int i0, int i1) 550 | { 551 | float a = GetCentroid(i0); 552 | float b = GetCentroid(i1); 553 | 554 | return a.CompareTo(b); 555 | } 556 | 557 | private float GetCentroid(int face) 558 | { 559 | Vector3 a = Vertices[Indices[face * 3 + 0]]; 560 | Vector3 b = Vertices[Indices[face * 3 + 1]]; 561 | Vector3 c = Vertices[Indices[face * 3 + 2]]; 562 | 563 | return (a[Axis] + b[Axis] + c[Axis]) / 3.0f; 564 | } 565 | } 566 | 567 | } 568 | 569 | } -------------------------------------------------------------------------------- /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: 20 7 | productGUID: 6ef3e27e0a087ef40b64f7d179c69002 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: Mesh-Voxelization 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 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: 0 51 | m_MTRendering: 1 52 | mipStripping: 0 53 | numberOfMipsStripped: 0 54 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 55 | iosShowActivityIndicatorOnLoading: -1 56 | androidShowActivityIndicatorOnLoading: -1 57 | iosUseCustomAppBackgroundBehavior: 0 58 | iosAllowHTTPDownload: 1 59 | allowedAutorotateToPortrait: 1 60 | allowedAutorotateToPortraitUpsideDown: 1 61 | allowedAutorotateToLandscapeRight: 1 62 | allowedAutorotateToLandscapeLeft: 1 63 | useOSAutorotation: 1 64 | use32BitDisplayBuffer: 1 65 | preserveFramebufferAlpha: 0 66 | disableDepthAndStencilBuffers: 0 67 | androidStartInFullscreen: 1 68 | androidRenderOutsideSafeArea: 1 69 | androidUseSwappy: 1 70 | androidBlitType: 0 71 | defaultIsNativeResolution: 1 72 | macRetinaSupport: 1 73 | runInBackground: 0 74 | captureSingleScreen: 0 75 | muteOtherAudioSources: 0 76 | Prepare IOS For Recording: 0 77 | Force IOS Speakers When Recording: 0 78 | deferSystemGesturesMode: 0 79 | hideHomeButton: 0 80 | submitAnalytics: 1 81 | usePlayerLog: 1 82 | bakeCollisionMeshes: 0 83 | forceSingleInstance: 0 84 | useFlipModelSwapchain: 1 85 | resizableWindow: 0 86 | useMacAppStoreValidation: 0 87 | macAppStoreCategory: public.app-category.games 88 | gpuSkinning: 0 89 | xboxPIXTextureCapture: 0 90 | xboxEnableAvatar: 0 91 | xboxEnableKinect: 0 92 | xboxEnableKinectAutoTracking: 0 93 | xboxEnableFitness: 0 94 | visibleInBackground: 1 95 | allowFullscreenSwitch: 1 96 | fullscreenMode: 1 97 | xboxSpeechDB: 0 98 | xboxEnableHeadOrientation: 0 99 | xboxEnableGuest: 0 100 | xboxEnablePIXSampling: 0 101 | metalFramebufferOnly: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOneEnableTypeOptimization: 0 109 | xboxOnePresentImmediateThreshold: 0 110 | switchQueueCommandMemory: 1048576 111 | switchQueueControlMemory: 16384 112 | switchQueueComputeMemory: 262144 113 | switchNVNShaderPoolsGranularity: 33554432 114 | switchNVNDefaultPoolsGranularity: 16777216 115 | switchNVNOtherPoolsGranularity: 16777216 116 | switchNVNMaxPublicTextureIDCount: 0 117 | switchNVNMaxPublicSamplerIDCount: 0 118 | stadiaPresentMode: 0 119 | stadiaTargetFramerate: 0 120 | vulkanNumSwapchainBuffers: 3 121 | vulkanEnableSetSRGBWrite: 0 122 | vulkanEnableLateAcquireNextImage: 0 123 | m_SupportedAspectRatios: 124 | 4:3: 1 125 | 5:4: 1 126 | 16:10: 1 127 | 16:9: 1 128 | Others: 1 129 | bundleVersion: 1.0 130 | preloadedAssets: [] 131 | metroInputSource: 0 132 | wsaTransparentSwapchain: 0 133 | m_HolographicPauseOnTrackingLoss: 1 134 | xboxOneDisableKinectGpuReservation: 1 135 | xboxOneEnable7thCore: 1 136 | vrSettings: 137 | cardboard: 138 | depthFormat: 0 139 | enableTransitionView: 0 140 | daydream: 141 | depthFormat: 0 142 | useSustainedPerformanceMode: 0 143 | enableVideoLayer: 0 144 | useProtectedVideoMemory: 0 145 | minimumSupportedHeadTracking: 0 146 | maximumSupportedHeadTracking: 1 147 | hololens: 148 | depthFormat: 1 149 | depthBufferSharingEnabled: 1 150 | lumin: 151 | depthFormat: 0 152 | frameTiming: 2 153 | enableGLCache: 0 154 | glCacheMaxBlobSize: 524288 155 | glCacheMaxFileSize: 8388608 156 | oculus: 157 | sharedDepthBuffer: 1 158 | dashSupport: 1 159 | lowOverheadMode: 0 160 | protectedContext: 0 161 | v2Signing: 1 162 | enable360StereoCapture: 0 163 | isWsaHolographicRemotingEnabled: 0 164 | enableFrameTimingStats: 0 165 | useHDRDisplay: 0 166 | D3DHDRBitDepth: 0 167 | m_ColorGamuts: 00000000 168 | targetPixelDensity: 0 169 | resolutionScalingMode: 0 170 | androidSupportedAspectRatio: 1 171 | androidMaxAspectRatio: 2.1 172 | applicationIdentifier: {} 173 | buildNumber: {} 174 | AndroidBundleVersionCode: 1 175 | AndroidMinSdkVersion: 19 176 | AndroidTargetSdkVersion: 0 177 | AndroidPreferredInstallLocation: 1 178 | aotOptions: 179 | stripEngineCode: 1 180 | iPhoneStrippingLevel: 0 181 | iPhoneScriptCallOptimization: 0 182 | ForceInternetPermission: 0 183 | ForceSDCardPermission: 0 184 | CreateWallpaper: 0 185 | APKExpansionFiles: 0 186 | keepLoadedShadersAlive: 0 187 | StripUnusedMeshComponents: 0 188 | VertexChannelCompressionMask: 4054 189 | iPhoneSdkVersion: 988 190 | iOSTargetOSVersionString: 191 | tvOSSdkVersion: 0 192 | tvOSRequireExtendedGameController: 0 193 | tvOSTargetOSVersionString: 194 | uIPrerenderedIcon: 0 195 | uIRequiresPersistentWiFi: 0 196 | uIRequiresFullScreen: 1 197 | uIStatusBarHidden: 1 198 | uIExitOnSuspend: 0 199 | uIStatusBarStyle: 0 200 | appleTVSplashScreen: {fileID: 0} 201 | appleTVSplashScreen2x: {fileID: 0} 202 | tvOSSmallIconLayers: [] 203 | tvOSSmallIconLayers2x: [] 204 | tvOSLargeIconLayers: [] 205 | tvOSLargeIconLayers2x: [] 206 | tvOSTopShelfImageLayers: [] 207 | tvOSTopShelfImageLayers2x: [] 208 | tvOSTopShelfImageWideLayers: [] 209 | tvOSTopShelfImageWideLayers2x: [] 210 | iOSLaunchScreenType: 0 211 | iOSLaunchScreenPortrait: {fileID: 0} 212 | iOSLaunchScreenLandscape: {fileID: 0} 213 | iOSLaunchScreenBackgroundColor: 214 | serializedVersion: 2 215 | rgba: 0 216 | iOSLaunchScreenFillPct: 100 217 | iOSLaunchScreenSize: 100 218 | iOSLaunchScreenCustomXibPath: 219 | iOSLaunchScreeniPadType: 0 220 | iOSLaunchScreeniPadImage: {fileID: 0} 221 | iOSLaunchScreeniPadBackgroundColor: 222 | serializedVersion: 2 223 | rgba: 0 224 | iOSLaunchScreeniPadFillPct: 100 225 | iOSLaunchScreeniPadSize: 100 226 | iOSLaunchScreeniPadCustomXibPath: 227 | iOSUseLaunchScreenStoryboard: 0 228 | iOSLaunchScreenCustomStoryboardPath: 229 | iOSDeviceRequirements: [] 230 | iOSURLSchemes: [] 231 | iOSBackgroundModes: 0 232 | iOSMetalForceHardShadows: 0 233 | metalEditorSupport: 1 234 | metalAPIValidation: 1 235 | iOSRenderExtraFrameOnPause: 0 236 | iosCopyPluginsCodeInsteadOfSymlink: 0 237 | appleDeveloperTeamID: 238 | iOSManualSigningProvisioningProfileID: 239 | tvOSManualSigningProvisioningProfileID: 240 | iOSManualSigningProvisioningProfileType: 0 241 | tvOSManualSigningProvisioningProfileType: 0 242 | appleEnableAutomaticSigning: 0 243 | iOSRequireARKit: 0 244 | iOSAutomaticallyDetectAndAddCapabilities: 1 245 | appleEnableProMotion: 0 246 | clonedFromGUID: 00000000000000000000000000000000 247 | templatePackageId: 248 | templateDefaultScene: 249 | AndroidTargetArchitectures: 1 250 | AndroidSplashScreenScale: 0 251 | androidSplashScreen: {fileID: 0} 252 | AndroidKeystoreName: 253 | AndroidKeyaliasName: 254 | AndroidBuildApkPerCpuArchitecture: 0 255 | AndroidTVCompatibility: 0 256 | AndroidIsGame: 1 257 | AndroidEnableTango: 0 258 | androidEnableBanner: 1 259 | androidUseLowAccuracyLocation: 0 260 | androidUseCustomKeystore: 0 261 | m_AndroidBanners: 262 | - width: 320 263 | height: 180 264 | banner: {fileID: 0} 265 | androidGamepadSupportLevel: 0 266 | AndroidMinifyWithR8: 0 267 | AndroidMinifyRelease: 0 268 | AndroidMinifyDebug: 0 269 | AndroidValidateAppBundleSize: 1 270 | AndroidAppBundleSizeToValidate: 150 271 | m_BuildTargetIcons: [] 272 | m_BuildTargetPlatformIcons: [] 273 | m_BuildTargetBatching: [] 274 | m_BuildTargetGraphicsJobs: [] 275 | m_BuildTargetGraphicsJobMode: [] 276 | m_BuildTargetGraphicsAPIs: [] 277 | m_BuildTargetVRSettings: [] 278 | openGLRequireES31: 0 279 | openGLRequireES31AEP: 0 280 | openGLRequireES32: 0 281 | m_TemplateCustomTags: {} 282 | mobileMTRendering: 283 | Android: 1 284 | iPhone: 1 285 | tvOS: 1 286 | m_BuildTargetGroupLightmapEncodingQuality: [] 287 | m_BuildTargetGroupLightmapSettings: [] 288 | playModeTestRunnerEnabled: 0 289 | runPlayModeTestAsEditModeTest: 0 290 | actionOnDotNetUnhandledException: 1 291 | enableInternalProfiler: 0 292 | logObjCUncaughtExceptions: 1 293 | enableCrashReportAPI: 0 294 | cameraUsageDescription: 295 | locationUsageDescription: 296 | microphoneUsageDescription: 297 | switchNMETAOverride: 298 | switchNetLibKey: 299 | switchSocketMemoryPoolSize: 6144 300 | switchSocketAllocatorPoolSize: 128 301 | switchSocketConcurrencyLimit: 14 302 | switchScreenResolutionBehavior: 2 303 | switchUseCPUProfiler: 0 304 | switchUseGOLDLinker: 0 305 | switchApplicationID: 0x01004b9000490000 306 | switchNSODependencies: 307 | switchTitleNames_0: 308 | switchTitleNames_1: 309 | switchTitleNames_2: 310 | switchTitleNames_3: 311 | switchTitleNames_4: 312 | switchTitleNames_5: 313 | switchTitleNames_6: 314 | switchTitleNames_7: 315 | switchTitleNames_8: 316 | switchTitleNames_9: 317 | switchTitleNames_10: 318 | switchTitleNames_11: 319 | switchTitleNames_12: 320 | switchTitleNames_13: 321 | switchTitleNames_14: 322 | switchPublisherNames_0: 323 | switchPublisherNames_1: 324 | switchPublisherNames_2: 325 | switchPublisherNames_3: 326 | switchPublisherNames_4: 327 | switchPublisherNames_5: 328 | switchPublisherNames_6: 329 | switchPublisherNames_7: 330 | switchPublisherNames_8: 331 | switchPublisherNames_9: 332 | switchPublisherNames_10: 333 | switchPublisherNames_11: 334 | switchPublisherNames_12: 335 | switchPublisherNames_13: 336 | switchPublisherNames_14: 337 | switchIcons_0: {fileID: 0} 338 | switchIcons_1: {fileID: 0} 339 | switchIcons_2: {fileID: 0} 340 | switchIcons_3: {fileID: 0} 341 | switchIcons_4: {fileID: 0} 342 | switchIcons_5: {fileID: 0} 343 | switchIcons_6: {fileID: 0} 344 | switchIcons_7: {fileID: 0} 345 | switchIcons_8: {fileID: 0} 346 | switchIcons_9: {fileID: 0} 347 | switchIcons_10: {fileID: 0} 348 | switchIcons_11: {fileID: 0} 349 | switchIcons_12: {fileID: 0} 350 | switchIcons_13: {fileID: 0} 351 | switchIcons_14: {fileID: 0} 352 | switchSmallIcons_0: {fileID: 0} 353 | switchSmallIcons_1: {fileID: 0} 354 | switchSmallIcons_2: {fileID: 0} 355 | switchSmallIcons_3: {fileID: 0} 356 | switchSmallIcons_4: {fileID: 0} 357 | switchSmallIcons_5: {fileID: 0} 358 | switchSmallIcons_6: {fileID: 0} 359 | switchSmallIcons_7: {fileID: 0} 360 | switchSmallIcons_8: {fileID: 0} 361 | switchSmallIcons_9: {fileID: 0} 362 | switchSmallIcons_10: {fileID: 0} 363 | switchSmallIcons_11: {fileID: 0} 364 | switchSmallIcons_12: {fileID: 0} 365 | switchSmallIcons_13: {fileID: 0} 366 | switchSmallIcons_14: {fileID: 0} 367 | switchManualHTML: 368 | switchAccessibleURLs: 369 | switchLegalInformation: 370 | switchMainThreadStackSize: 1048576 371 | switchPresenceGroupId: 372 | switchLogoHandling: 0 373 | switchReleaseVersion: 0 374 | switchDisplayVersion: 1.0.0 375 | switchStartupUserAccount: 0 376 | switchTouchScreenUsage: 0 377 | switchSupportedLanguagesMask: 0 378 | switchLogoType: 0 379 | switchApplicationErrorCodeCategory: 380 | switchUserAccountSaveDataSize: 0 381 | switchUserAccountSaveDataJournalSize: 0 382 | switchApplicationAttribute: 0 383 | switchCardSpecSize: -1 384 | switchCardSpecClock: -1 385 | switchRatingsMask: 0 386 | switchRatingsInt_0: 0 387 | switchRatingsInt_1: 0 388 | switchRatingsInt_2: 0 389 | switchRatingsInt_3: 0 390 | switchRatingsInt_4: 0 391 | switchRatingsInt_5: 0 392 | switchRatingsInt_6: 0 393 | switchRatingsInt_7: 0 394 | switchRatingsInt_8: 0 395 | switchRatingsInt_9: 0 396 | switchRatingsInt_10: 0 397 | switchRatingsInt_11: 0 398 | switchRatingsInt_12: 0 399 | switchLocalCommunicationIds_0: 400 | switchLocalCommunicationIds_1: 401 | switchLocalCommunicationIds_2: 402 | switchLocalCommunicationIds_3: 403 | switchLocalCommunicationIds_4: 404 | switchLocalCommunicationIds_5: 405 | switchLocalCommunicationIds_6: 406 | switchLocalCommunicationIds_7: 407 | switchParentalControl: 0 408 | switchAllowsScreenshot: 1 409 | switchAllowsVideoCapturing: 1 410 | switchAllowsRuntimeAddOnContentInstall: 0 411 | switchDataLossConfirmation: 0 412 | switchUserAccountLockEnabled: 0 413 | switchSystemResourceMemory: 16777216 414 | switchSupportedNpadStyles: 22 415 | switchNativeFsCacheSize: 32 416 | switchIsHoldTypeHorizontal: 0 417 | switchSupportedNpadCount: 8 418 | switchSocketConfigEnabled: 0 419 | switchTcpInitialSendBufferSize: 32 420 | switchTcpInitialReceiveBufferSize: 64 421 | switchTcpAutoSendBufferSizeMax: 256 422 | switchTcpAutoReceiveBufferSizeMax: 256 423 | switchUdpSendBufferSize: 9 424 | switchUdpReceiveBufferSize: 42 425 | switchSocketBufferEfficiency: 4 426 | switchSocketInitializeEnabled: 1 427 | switchNetworkInterfaceManagerInitializeEnabled: 1 428 | switchPlayerConnectionEnabled: 1 429 | ps4NPAgeRating: 12 430 | ps4NPTitleSecret: 431 | ps4NPTrophyPackPath: 432 | ps4ParentalLevel: 11 433 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 434 | ps4Category: 0 435 | ps4MasterVersion: 01.00 436 | ps4AppVersion: 01.00 437 | ps4AppType: 0 438 | ps4ParamSfxPath: 439 | ps4VideoOutPixelFormat: 0 440 | ps4VideoOutInitialWidth: 1920 441 | ps4VideoOutBaseModeInitialWidth: 1920 442 | ps4VideoOutReprojectionRate: 60 443 | ps4PronunciationXMLPath: 444 | ps4PronunciationSIGPath: 445 | ps4BackgroundImagePath: 446 | ps4StartupImagePath: 447 | ps4StartupImagesFolder: 448 | ps4IconImagesFolder: 449 | ps4SaveDataImagePath: 450 | ps4SdkOverride: 451 | ps4BGMPath: 452 | ps4ShareFilePath: 453 | ps4ShareOverlayImagePath: 454 | ps4PrivacyGuardImagePath: 455 | ps4ExtraSceSysFile: 456 | ps4NPtitleDatPath: 457 | ps4RemotePlayKeyAssignment: -1 458 | ps4RemotePlayKeyMappingDir: 459 | ps4PlayTogetherPlayerCount: 0 460 | ps4EnterButtonAssignment: 2 461 | ps4ApplicationParam1: 0 462 | ps4ApplicationParam2: 0 463 | ps4ApplicationParam3: 0 464 | ps4ApplicationParam4: 0 465 | ps4DownloadDataSize: 0 466 | ps4GarlicHeapSize: 2048 467 | ps4ProGarlicHeapSize: 2560 468 | playerPrefsMaxSize: 32768 469 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 470 | ps4pnSessions: 1 471 | ps4pnPresence: 1 472 | ps4pnFriends: 1 473 | ps4pnGameCustomData: 1 474 | playerPrefsSupport: 0 475 | enableApplicationExit: 0 476 | resetTempFolder: 1 477 | restrictedAudioUsageRights: 0 478 | ps4UseResolutionFallback: 0 479 | ps4ReprojectionSupport: 0 480 | ps4UseAudio3dBackend: 0 481 | ps4UseLowGarlicFragmentationMode: 1 482 | ps4SocialScreenEnabled: 0 483 | ps4ScriptOptimizationLevel: 2 484 | ps4Audio3dVirtualSpeakerCount: 14 485 | ps4attribCpuUsage: 0 486 | ps4PatchPkgPath: 487 | ps4PatchLatestPkgPath: 488 | ps4PatchChangeinfoPath: 489 | ps4PatchDayOne: 0 490 | ps4attribUserManagement: 0 491 | ps4attribMoveSupport: 0 492 | ps4attrib3DSupport: 0 493 | ps4attribShareSupport: 0 494 | ps4attribExclusiveVR: 0 495 | ps4disableAutoHideSplash: 0 496 | ps4videoRecordingFeaturesUsed: 0 497 | ps4contentSearchFeaturesUsed: 0 498 | ps4CompatibilityPS5: 0 499 | ps4GPU800MHz: 1 500 | ps4attribEyeToEyeDistanceSettingVR: 0 501 | ps4IncludedModules: [] 502 | ps4attribVROutputEnabled: 0 503 | monoEnv: 504 | splashScreenBackgroundSourceLandscape: {fileID: 0} 505 | splashScreenBackgroundSourcePortrait: {fileID: 0} 506 | blurSplashScreenBackground: 1 507 | spritePackerPolicy: 508 | webGLMemorySize: 32 509 | webGLExceptionSupport: 1 510 | webGLNameFilesAsHashes: 0 511 | webGLDataCaching: 1 512 | webGLDebugSymbols: 0 513 | webGLEmscriptenArgs: 514 | webGLModulesDirectory: 515 | webGLTemplate: APPLICATION:Default 516 | webGLAnalyzeBuildSize: 0 517 | webGLUseEmbeddedResources: 0 518 | webGLCompressionFormat: 0 519 | webGLWasmArithmeticExceptions: 0 520 | webGLLinkerTarget: 1 521 | webGLThreadsSupport: 0 522 | webGLDecompressionFallback: 0 523 | scriptingDefineSymbols: {} 524 | platformArchitecture: {} 525 | scriptingBackend: {} 526 | il2cppCompilerConfiguration: {} 527 | managedStrippingLevel: {} 528 | incrementalIl2cppBuild: {} 529 | suppressCommonWarnings: 1 530 | allowUnsafeCode: 0 531 | useDeterministicCompilation: 1 532 | additionalIl2CppArgs: 533 | scriptingRuntimeVersion: 1 534 | gcIncremental: 1 535 | gcWBarrierValidation: 0 536 | apiCompatibilityLevelPerPlatform: {} 537 | m_RenderingPath: 1 538 | m_MobileRenderingPath: 1 539 | metroPackageName: Mesh-Voxelization 540 | metroPackageVersion: 541 | metroCertificatePath: 542 | metroCertificatePassword: 543 | metroCertificateSubject: 544 | metroCertificateIssuer: 545 | metroCertificateNotAfter: 0000000000000000 546 | metroApplicationDescription: Mesh-Voxelization 547 | wsaImages: {} 548 | metroTileShortName: 549 | metroTileShowName: 0 550 | metroMediumTileShowName: 0 551 | metroLargeTileShowName: 0 552 | metroWideTileShowName: 0 553 | metroSupportStreamingInstall: 0 554 | metroLastRequiredScene: 0 555 | metroDefaultTileSize: 1 556 | metroTileForegroundText: 2 557 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 558 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1} 559 | metroSplashScreenUseBackgroundColor: 0 560 | platformCapabilities: {} 561 | metroTargetDeviceFamilies: {} 562 | metroFTAName: 563 | metroFTAFileTypes: [] 564 | metroProtocolName: 565 | XboxOneProductId: 566 | XboxOneUpdateKey: 567 | XboxOneSandboxId: 568 | XboxOneContentId: 569 | XboxOneTitleId: 570 | XboxOneSCId: 571 | XboxOneGameOsOverridePath: 572 | XboxOnePackagingOverridePath: 573 | XboxOneAppManifestOverridePath: 574 | XboxOneVersion: 1.0.0.0 575 | XboxOnePackageEncryption: 0 576 | XboxOnePackageUpdateGranularity: 2 577 | XboxOneDescription: 578 | XboxOneLanguage: 579 | - enus 580 | XboxOneCapability: [] 581 | XboxOneGameRating: {} 582 | XboxOneIsContentPackage: 0 583 | XboxOneEnableGPUVariability: 1 584 | XboxOneSockets: {} 585 | XboxOneSplashScreen: {fileID: 0} 586 | XboxOneAllowedProductIds: [] 587 | XboxOnePersistentLocalStorageSize: 0 588 | XboxOneXTitleMemory: 8 589 | XboxOneOverrideIdentityName: 590 | XboxOneOverrideIdentityPublisher: 591 | vrEditorSettings: 592 | daydream: 593 | daydreamIconForeground: {fileID: 0} 594 | daydreamIconBackground: {fileID: 0} 595 | cloudServicesEnabled: {} 596 | luminIcon: 597 | m_Name: 598 | m_ModelFolderPath: 599 | m_PortalFolderPath: 600 | luminCert: 601 | m_CertPath: 602 | m_SignPackage: 1 603 | luminIsChannelApp: 0 604 | luminVersion: 605 | m_VersionCode: 1 606 | m_VersionName: 607 | apiCompatibilityLevel: 6 608 | cloudProjectId: 609 | framebufferDepthMemorylessMode: 0 610 | projectName: 611 | organizationId: 612 | cloudEnabled: 0 613 | enableNativePlatformBackendsForNewInputSystem: 0 614 | disableOldInputManagerSupport: 0 615 | legacyClampBlendShapeWeights: 0 616 | virtualTexturingSupportEnabled: 0 617 | -------------------------------------------------------------------------------- /Assets/MeshVoxelizer/Meshes/Monkey.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.75 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | mtllib Monkey.mtl 4 | o Suzanne 5 | v 0.437500 0.164062 0.765625 6 | v -0.437500 0.164062 0.765625 7 | v 0.500000 0.093750 0.687500 8 | v -0.500000 0.093750 0.687500 9 | v 0.546875 0.054688 0.578125 10 | v -0.546875 0.054688 0.578125 11 | v 0.351562 -0.023438 0.617188 12 | v -0.351562 -0.023438 0.617188 13 | v 0.351562 0.031250 0.718750 14 | v -0.351562 0.031250 0.718750 15 | v 0.351562 0.132812 0.781250 16 | v -0.351562 0.132812 0.781250 17 | v 0.273438 0.164062 0.796875 18 | v -0.273438 0.164062 0.796875 19 | v 0.203125 0.093750 0.742188 20 | v -0.203125 0.093750 0.742188 21 | v 0.156250 0.054688 0.648438 22 | v -0.156250 0.054688 0.648438 23 | v 0.078125 0.242188 0.656250 24 | v -0.078125 0.242188 0.656250 25 | v 0.140625 0.242188 0.742188 26 | v -0.140625 0.242188 0.742188 27 | v 0.242188 0.242188 0.796875 28 | v -0.242188 0.242188 0.796875 29 | v 0.273438 0.328125 0.796875 30 | v -0.273438 0.328125 0.796875 31 | v 0.203125 0.390625 0.742188 32 | v -0.203125 0.390625 0.742188 33 | v 0.156250 0.437500 0.648438 34 | v -0.156250 0.437500 0.648438 35 | v 0.351562 0.515625 0.617188 36 | v -0.351562 0.515625 0.617188 37 | v 0.351562 0.453125 0.718750 38 | v -0.351562 0.453125 0.718750 39 | v 0.351562 0.359375 0.781250 40 | v -0.351562 0.359375 0.781250 41 | v 0.437500 0.328125 0.765625 42 | v -0.437500 0.328125 0.765625 43 | v 0.500000 0.390625 0.687500 44 | v -0.500000 0.390625 0.687500 45 | v 0.546875 0.437500 0.578125 46 | v -0.546875 0.437500 0.578125 47 | v 0.625000 0.242188 0.562500 48 | v -0.625000 0.242188 0.562500 49 | v 0.562500 0.242188 0.671875 50 | v -0.562500 0.242188 0.671875 51 | v 0.468750 0.242188 0.757812 52 | v -0.468750 0.242188 0.757812 53 | v 0.476562 0.242188 0.773438 54 | v -0.476562 0.242188 0.773438 55 | v 0.445312 0.335938 0.781250 56 | v -0.445312 0.335938 0.781250 57 | v 0.351562 0.375000 0.804688 58 | v -0.351562 0.375000 0.804688 59 | v 0.265625 0.335938 0.820312 60 | v -0.265625 0.335938 0.820312 61 | v 0.226562 0.242188 0.820312 62 | v -0.226562 0.242188 0.820312 63 | v 0.265625 0.156250 0.820312 64 | v -0.265625 0.156250 0.820312 65 | v 0.351562 0.242188 0.828125 66 | v -0.351562 0.242188 0.828125 67 | v 0.351562 0.117188 0.804688 68 | v -0.351562 0.117188 0.804688 69 | v 0.445312 0.156250 0.781250 70 | v -0.445312 0.156250 0.781250 71 | v 0.000000 0.429688 0.742188 72 | v 0.000000 0.351562 0.820312 73 | v 0.000000 -0.679688 0.734375 74 | v 0.000000 -0.320312 0.781250 75 | v 0.000000 -0.187500 0.796875 76 | v 0.000000 -0.773438 0.718750 77 | v 0.000000 0.406250 0.601562 78 | v 0.000000 0.570312 0.570312 79 | v 0.000000 0.898438 -0.546875 80 | v 0.000000 0.562500 -0.851562 81 | v 0.000000 0.070312 -0.828125 82 | v 0.000000 -0.382812 -0.351562 83 | v 0.203125 -0.187500 0.562500 84 | v -0.203125 -0.187500 0.562500 85 | v 0.312500 -0.437500 0.570312 86 | v -0.312500 -0.437500 0.570312 87 | v 0.351562 -0.695312 0.570312 88 | v -0.351562 -0.695312 0.570312 89 | v 0.367188 -0.890625 0.531250 90 | v -0.367188 -0.890625 0.531250 91 | v 0.328125 -0.945312 0.523438 92 | v -0.328125 -0.945312 0.523438 93 | v 0.179688 -0.968750 0.554688 94 | v -0.179688 -0.968750 0.554688 95 | v 0.000000 -0.984375 0.578125 96 | v 0.437500 -0.140625 0.531250 97 | v -0.437500 -0.140625 0.531250 98 | v 0.632812 -0.039062 0.539062 99 | v -0.632812 -0.039062 0.539062 100 | v 0.828125 0.148438 0.445312 101 | v -0.828125 0.148438 0.445312 102 | v 0.859375 0.429688 0.593750 103 | v -0.859375 0.429688 0.593750 104 | v 0.710938 0.484375 0.625000 105 | v -0.710938 0.484375 0.625000 106 | v 0.492188 0.601562 0.687500 107 | v -0.492188 0.601562 0.687500 108 | v 0.320312 0.757812 0.734375 109 | v -0.320312 0.757812 0.734375 110 | v 0.156250 0.718750 0.757812 111 | v -0.156250 0.718750 0.757812 112 | v 0.062500 0.492188 0.750000 113 | v -0.062500 0.492188 0.750000 114 | v 0.164062 0.414062 0.773438 115 | v -0.164062 0.414062 0.773438 116 | v 0.125000 0.304688 0.765625 117 | v -0.125000 0.304688 0.765625 118 | v 0.203125 0.093750 0.742188 119 | v -0.203125 0.093750 0.742188 120 | v 0.375000 0.015625 0.703125 121 | v -0.375000 0.015625 0.703125 122 | v 0.492188 0.062500 0.671875 123 | v -0.492188 0.062500 0.671875 124 | v 0.625000 0.187500 0.648438 125 | v -0.625000 0.187500 0.648438 126 | v 0.640625 0.296875 0.648438 127 | v -0.640625 0.296875 0.648438 128 | v 0.601562 0.375000 0.664062 129 | v -0.601562 0.375000 0.664062 130 | v 0.429688 0.437500 0.718750 131 | v -0.429688 0.437500 0.718750 132 | v 0.250000 0.468750 0.757812 133 | v -0.250000 0.468750 0.757812 134 | v 0.000000 -0.765625 0.734375 135 | v 0.109375 -0.718750 0.734375 136 | v -0.109375 -0.718750 0.734375 137 | v 0.117188 -0.835938 0.710938 138 | v -0.117188 -0.835938 0.710938 139 | v 0.062500 -0.882812 0.695312 140 | v -0.062500 -0.882812 0.695312 141 | v 0.000000 -0.890625 0.687500 142 | v 0.000000 -0.195312 0.750000 143 | v 0.000000 -0.140625 0.742188 144 | v 0.101562 -0.148438 0.742188 145 | v -0.101562 -0.148438 0.742188 146 | v 0.125000 -0.226562 0.750000 147 | v -0.125000 -0.226562 0.750000 148 | v 0.085938 -0.289062 0.742188 149 | v -0.085938 -0.289062 0.742188 150 | v 0.398438 -0.046875 0.671875 151 | v -0.398438 -0.046875 0.671875 152 | v 0.617188 0.054688 0.625000 153 | v -0.617188 0.054688 0.625000 154 | v 0.726562 0.203125 0.601562 155 | v -0.726562 0.203125 0.601562 156 | v 0.742188 0.375000 0.656250 157 | v -0.742188 0.375000 0.656250 158 | v 0.687500 0.414062 0.726562 159 | v -0.687500 0.414062 0.726562 160 | v 0.437500 0.546875 0.796875 161 | v -0.437500 0.546875 0.796875 162 | v 0.312500 0.640625 0.835938 163 | v -0.312500 0.640625 0.835938 164 | v 0.203125 0.617188 0.851562 165 | v -0.203125 0.617188 0.851562 166 | v 0.101562 0.429688 0.843750 167 | v -0.101562 0.429688 0.843750 168 | v 0.125000 -0.101562 0.812500 169 | v -0.125000 -0.101562 0.812500 170 | v 0.210938 -0.445312 0.710938 171 | v -0.210938 -0.445312 0.710938 172 | v 0.250000 -0.703125 0.687500 173 | v -0.250000 -0.703125 0.687500 174 | v 0.265625 -0.820312 0.664062 175 | v -0.265625 -0.820312 0.664062 176 | v 0.234375 -0.914062 0.632812 177 | v -0.234375 -0.914062 0.632812 178 | v 0.164062 -0.929688 0.632812 179 | v -0.164062 -0.929688 0.632812 180 | v 0.000000 -0.945312 0.640625 181 | v 0.000000 0.046875 0.726562 182 | v 0.000000 0.210938 0.765625 183 | v 0.328125 0.476562 0.742188 184 | v -0.328125 0.476562 0.742188 185 | v 0.164062 0.140625 0.750000 186 | v -0.164062 0.140625 0.750000 187 | v 0.132812 0.210938 0.757812 188 | v -0.132812 0.210938 0.757812 189 | v 0.117188 -0.687500 0.734375 190 | v -0.117188 -0.687500 0.734375 191 | v 0.078125 -0.445312 0.750000 192 | v -0.078125 -0.445312 0.750000 193 | v 0.000000 -0.445312 0.750000 194 | v 0.000000 -0.328125 0.742188 195 | v 0.093750 -0.273438 0.781250 196 | v -0.093750 -0.273438 0.781250 197 | v 0.132812 -0.226562 0.796875 198 | v -0.132812 -0.226562 0.796875 199 | v 0.109375 -0.132812 0.781250 200 | v -0.109375 -0.132812 0.781250 201 | v 0.039062 -0.125000 0.781250 202 | v -0.039062 -0.125000 0.781250 203 | v 0.000000 -0.203125 0.828125 204 | v 0.046875 -0.148438 0.812500 205 | v -0.046875 -0.148438 0.812500 206 | v 0.093750 -0.156250 0.812500 207 | v -0.093750 -0.156250 0.812500 208 | v 0.109375 -0.226562 0.828125 209 | v -0.109375 -0.226562 0.828125 210 | v 0.078125 -0.250000 0.804688 211 | v -0.078125 -0.250000 0.804688 212 | v 0.000000 -0.289062 0.804688 213 | v 0.257812 -0.312500 0.554688 214 | v -0.257812 -0.312500 0.554688 215 | v 0.164062 -0.242188 0.710938 216 | v -0.164062 -0.242188 0.710938 217 | v 0.179688 -0.312500 0.710938 218 | v -0.179688 -0.312500 0.710938 219 | v 0.234375 -0.250000 0.554688 220 | v -0.234375 -0.250000 0.554688 221 | v 0.000000 -0.875000 0.687500 222 | v 0.046875 -0.867188 0.687500 223 | v -0.046875 -0.867188 0.687500 224 | v 0.093750 -0.820312 0.710938 225 | v -0.093750 -0.820312 0.710938 226 | v 0.093750 -0.742188 0.726562 227 | v -0.093750 -0.742188 0.726562 228 | v 0.000000 -0.781250 0.656250 229 | v 0.093750 -0.750000 0.664062 230 | v -0.093750 -0.750000 0.664062 231 | v 0.093750 -0.812500 0.640625 232 | v -0.093750 -0.812500 0.640625 233 | v 0.046875 -0.851562 0.632812 234 | v -0.046875 -0.851562 0.632812 235 | v 0.000000 -0.859375 0.632812 236 | v 0.171875 0.218750 0.781250 237 | v -0.171875 0.218750 0.781250 238 | v 0.187500 0.156250 0.773438 239 | v -0.187500 0.156250 0.773438 240 | v 0.335938 0.429688 0.757812 241 | v -0.335938 0.429688 0.757812 242 | v 0.273438 0.421875 0.773438 243 | v -0.273438 0.421875 0.773438 244 | v 0.421875 0.398438 0.773438 245 | v -0.421875 0.398438 0.773438 246 | v 0.562500 0.351562 0.695312 247 | v -0.562500 0.351562 0.695312 248 | v 0.585938 0.289062 0.687500 249 | v -0.585938 0.289062 0.687500 250 | v 0.578125 0.195312 0.679688 251 | v -0.578125 0.195312 0.679688 252 | v 0.476562 0.101562 0.718750 253 | v -0.476562 0.101562 0.718750 254 | v 0.375000 0.062500 0.742188 255 | v -0.375000 0.062500 0.742188 256 | v 0.226562 0.109375 0.781250 257 | v -0.226562 0.109375 0.781250 258 | v 0.179688 0.296875 0.781250 259 | v -0.179688 0.296875 0.781250 260 | v 0.210938 0.375000 0.781250 261 | v -0.210938 0.375000 0.781250 262 | v 0.234375 0.359375 0.757812 263 | v -0.234375 0.359375 0.757812 264 | v 0.195312 0.296875 0.757812 265 | v -0.195312 0.296875 0.757812 266 | v 0.242188 0.125000 0.757812 267 | v -0.242188 0.125000 0.757812 268 | v 0.375000 0.085938 0.726562 269 | v -0.375000 0.085938 0.726562 270 | v 0.460938 0.117188 0.703125 271 | v -0.460938 0.117188 0.703125 272 | v 0.546875 0.210938 0.671875 273 | v -0.546875 0.210938 0.671875 274 | v 0.554688 0.281250 0.671875 275 | v -0.554688 0.281250 0.671875 276 | v 0.531250 0.335938 0.679688 277 | v -0.531250 0.335938 0.679688 278 | v 0.414062 0.390625 0.750000 279 | v -0.414062 0.390625 0.750000 280 | v 0.281250 0.398438 0.765625 281 | v -0.281250 0.398438 0.765625 282 | v 0.335938 0.406250 0.750000 283 | v -0.335938 0.406250 0.750000 284 | v 0.203125 0.171875 0.750000 285 | v -0.203125 0.171875 0.750000 286 | v 0.195312 0.226562 0.750000 287 | v -0.195312 0.226562 0.750000 288 | v 0.109375 0.460938 0.609375 289 | v -0.109375 0.460938 0.609375 290 | v 0.195312 0.664062 0.617188 291 | v -0.195312 0.664062 0.617188 292 | v 0.335938 0.687500 0.593750 293 | v -0.335938 0.687500 0.593750 294 | v 0.484375 0.554688 0.554688 295 | v -0.484375 0.554688 0.554688 296 | v 0.679688 0.453125 0.492188 297 | v -0.679688 0.453125 0.492188 298 | v 0.796875 0.406250 0.460938 299 | v -0.796875 0.406250 0.460938 300 | v 0.773438 0.164062 0.375000 301 | v -0.773438 0.164062 0.375000 302 | v 0.601562 0.000000 0.414062 303 | v -0.601562 0.000000 0.414062 304 | v 0.437500 -0.093750 0.468750 305 | v -0.437500 -0.093750 0.468750 306 | v 0.000000 0.898438 0.289062 307 | v 0.000000 0.984375 -0.078125 308 | v 0.000000 -0.195312 -0.671875 309 | v 0.000000 -0.460938 0.187500 310 | v 0.000000 -0.976562 0.460938 311 | v 0.000000 -0.804688 0.343750 312 | v 0.000000 -0.570312 0.320312 313 | v 0.000000 -0.484375 0.281250 314 | v 0.851562 0.234375 0.054688 315 | v -0.851562 0.234375 0.054688 316 | v 0.859375 0.320312 -0.046875 317 | v -0.859375 0.320312 -0.046875 318 | v 0.773438 0.265625 -0.437500 319 | v -0.773438 0.265625 -0.437500 320 | v 0.460938 0.437500 -0.703125 321 | v -0.460938 0.437500 -0.703125 322 | v 0.734375 -0.046875 0.070312 323 | v -0.734375 -0.046875 0.070312 324 | v 0.593750 -0.125000 -0.164062 325 | v -0.593750 -0.125000 -0.164062 326 | v 0.640625 -0.007812 -0.429688 327 | v -0.640625 -0.007812 -0.429688 328 | v 0.335938 0.054688 -0.664062 329 | v -0.335938 0.054688 -0.664062 330 | v 0.234375 -0.351562 0.406250 331 | v -0.234375 -0.351562 0.406250 332 | v 0.179688 -0.414062 0.257812 333 | v -0.179688 -0.414062 0.257812 334 | v 0.289062 -0.710938 0.382812 335 | v -0.289062 -0.710938 0.382812 336 | v 0.250000 -0.500000 0.390625 337 | v -0.250000 -0.500000 0.390625 338 | v 0.328125 -0.914062 0.398438 339 | v -0.328125 -0.914062 0.398438 340 | v 0.140625 -0.757812 0.367188 341 | v -0.140625 -0.757812 0.367188 342 | v 0.125000 -0.539062 0.359375 343 | v -0.125000 -0.539062 0.359375 344 | v 0.164062 -0.945312 0.437500 345 | v -0.164062 -0.945312 0.437500 346 | v 0.218750 -0.281250 0.429688 347 | v -0.218750 -0.281250 0.429688 348 | v 0.210938 -0.226562 0.468750 349 | v -0.210938 -0.226562 0.468750 350 | v 0.203125 -0.171875 0.500000 351 | v -0.203125 -0.171875 0.500000 352 | v 0.210938 -0.390625 0.164062 353 | v -0.210938 -0.390625 0.164062 354 | v 0.296875 -0.312500 -0.265625 355 | v -0.296875 -0.312500 -0.265625 356 | v 0.343750 -0.148438 -0.539062 357 | v -0.343750 -0.148438 -0.539062 358 | v 0.453125 0.867188 -0.382812 359 | v -0.453125 0.867188 -0.382812 360 | v 0.453125 0.929688 -0.070312 361 | v -0.453125 0.929688 -0.070312 362 | v 0.453125 0.851562 0.234375 363 | v -0.453125 0.851562 0.234375 364 | v 0.460938 0.523438 0.429688 365 | v -0.460938 0.523438 0.429688 366 | v 0.726562 0.406250 0.335938 367 | v -0.726562 0.406250 0.335938 368 | v 0.632812 0.453125 0.281250 369 | v -0.632812 0.453125 0.281250 370 | v 0.640625 0.703125 0.054688 371 | v -0.640625 0.703125 0.054688 372 | v 0.796875 0.562500 0.125000 373 | v -0.796875 0.562500 0.125000 374 | v 0.796875 0.617188 -0.117188 375 | v -0.796875 0.617188 -0.117188 376 | v 0.640625 0.750000 -0.195312 377 | v -0.640625 0.750000 -0.195312 378 | v 0.640625 0.679688 -0.445312 379 | v -0.640625 0.679688 -0.445312 380 | v 0.796875 0.539062 -0.359375 381 | v -0.796875 0.539062 -0.359375 382 | v 0.617188 0.328125 -0.585938 383 | v -0.617188 0.328125 -0.585938 384 | v 0.484375 0.023438 -0.546875 385 | v -0.484375 0.023438 -0.546875 386 | v 0.820312 0.328125 -0.203125 387 | v -0.820312 0.328125 -0.203125 388 | v 0.406250 -0.171875 0.148438 389 | v -0.406250 -0.171875 0.148438 390 | v 0.429688 -0.195312 -0.210938 391 | v -0.429688 -0.195312 -0.210938 392 | v 0.890625 0.406250 -0.234375 393 | v -0.890625 0.406250 -0.234375 394 | v 0.773438 -0.140625 -0.125000 395 | v -0.773438 -0.140625 -0.125000 396 | v 1.039062 -0.101562 -0.328125 397 | v -1.039062 -0.101562 -0.328125 398 | v 1.281250 0.054688 -0.429688 399 | v -1.281250 0.054688 -0.429688 400 | v 1.351562 0.320312 -0.421875 401 | v -1.351562 0.320312 -0.421875 402 | v 1.234375 0.507812 -0.421875 403 | v -1.234375 0.507812 -0.421875 404 | v 1.023438 0.476562 -0.312500 405 | v -1.023438 0.476562 -0.312500 406 | v 1.015625 0.414062 -0.289062 407 | v -1.015625 0.414062 -0.289062 408 | v 1.187500 0.437500 -0.390625 409 | v -1.187500 0.437500 -0.390625 410 | v 1.265625 0.289062 -0.406250 411 | v -1.265625 0.289062 -0.406250 412 | v 1.210938 0.078125 -0.406250 413 | v -1.210938 0.078125 -0.406250 414 | v 1.031250 -0.039062 -0.304688 415 | v -1.031250 -0.039062 -0.304688 416 | v 0.828125 -0.070312 -0.132812 417 | v -0.828125 -0.070312 -0.132812 418 | v 0.921875 0.359375 -0.218750 419 | v -0.921875 0.359375 -0.218750 420 | v 0.945312 0.304688 -0.289062 421 | v -0.945312 0.304688 -0.289062 422 | v 0.882812 -0.023438 -0.210938 423 | v -0.882812 -0.023438 -0.210938 424 | v 1.039062 0.000000 -0.367188 425 | v -1.039062 0.000000 -0.367188 426 | v 1.187500 0.093750 -0.445312 427 | v -1.187500 0.093750 -0.445312 428 | v 1.234375 0.250000 -0.445312 429 | v -1.234375 0.250000 -0.445312 430 | v 1.171875 0.359375 -0.437500 431 | v -1.171875 0.359375 -0.437500 432 | v 1.023438 0.343750 -0.359375 433 | v -1.023438 0.343750 -0.359375 434 | v 0.843750 0.289062 -0.210938 435 | v -0.843750 0.289062 -0.210938 436 | v 0.835938 0.171875 -0.273438 437 | v -0.835938 0.171875 -0.273438 438 | v 0.757812 0.093750 -0.273438 439 | v -0.757812 0.093750 -0.273438 440 | v 0.820312 0.085938 -0.273438 441 | v -0.820312 0.085938 -0.273438 442 | v 0.843750 0.015625 -0.273438 443 | v -0.843750 0.015625 -0.273438 444 | v 0.812500 -0.015625 -0.273438 445 | v -0.812500 -0.015625 -0.273438 446 | v 0.726562 0.000000 -0.070312 447 | v -0.726562 0.000000 -0.070312 448 | v 0.718750 -0.023438 -0.171875 449 | v -0.718750 -0.023438 -0.171875 450 | v 0.718750 0.039062 -0.187500 451 | v -0.718750 0.039062 -0.187500 452 | v 0.796875 0.203125 -0.210938 453 | v -0.796875 0.203125 -0.210938 454 | v 0.890625 0.242188 -0.265625 455 | v -0.890625 0.242188 -0.265625 456 | v 0.890625 0.234375 -0.320312 457 | v -0.890625 0.234375 -0.320312 458 | v 0.812500 -0.015625 -0.320312 459 | v -0.812500 -0.015625 -0.320312 460 | v 0.851562 0.015625 -0.320312 461 | v -0.851562 0.015625 -0.320312 462 | v 0.828125 0.078125 -0.320312 463 | v -0.828125 0.078125 -0.320312 464 | v 0.765625 0.093750 -0.320312 465 | v -0.765625 0.093750 -0.320312 466 | v 0.843750 0.171875 -0.320312 467 | v -0.843750 0.171875 -0.320312 468 | v 1.039062 0.328125 -0.414062 469 | v -1.039062 0.328125 -0.414062 470 | v 1.187500 0.343750 -0.484375 471 | v -1.187500 0.343750 -0.484375 472 | v 1.257812 0.242188 -0.492188 473 | v -1.257812 0.242188 -0.492188 474 | v 1.210938 0.085938 -0.484375 475 | v -1.210938 0.085938 -0.484375 476 | v 1.046875 0.000000 -0.421875 477 | v -1.046875 0.000000 -0.421875 478 | v 0.882812 -0.015625 -0.265625 479 | v -0.882812 -0.015625 -0.265625 480 | v 0.953125 0.289062 -0.343750 481 | v -0.953125 0.289062 -0.343750 482 | v 0.890625 0.109375 -0.328125 483 | v -0.890625 0.109375 -0.328125 484 | v 0.937500 0.062500 -0.335938 485 | v -0.937500 0.062500 -0.335938 486 | v 1.000000 0.125000 -0.367188 487 | v -1.000000 0.125000 -0.367188 488 | v 0.960938 0.171875 -0.351562 489 | v -0.960938 0.171875 -0.351562 490 | v 1.015625 0.234375 -0.375000 491 | v -1.015625 0.234375 -0.375000 492 | v 1.054688 0.187500 -0.382812 493 | v -1.054688 0.187500 -0.382812 494 | v 1.109375 0.210938 -0.390625 495 | v -1.109375 0.210938 -0.390625 496 | v 1.085938 0.273438 -0.390625 497 | v -1.085938 0.273438 -0.390625 498 | v 1.023438 0.437500 -0.484375 499 | v -1.023438 0.437500 -0.484375 500 | v 1.250000 0.468750 -0.546875 501 | v -1.250000 0.468750 -0.546875 502 | v 1.367188 0.296875 -0.500000 503 | v -1.367188 0.296875 -0.500000 504 | v 1.312500 0.054688 -0.531250 505 | v -1.312500 0.054688 -0.531250 506 | v 1.039062 -0.085938 -0.492188 507 | v -1.039062 -0.085938 -0.492188 508 | v 0.789062 -0.125000 -0.328125 509 | v -0.789062 -0.125000 -0.328125 510 | v 0.859375 0.382812 -0.382812 511 | v -0.859375 0.382812 -0.382812 512 | vn 0.665000 -0.200800 0.719400 513 | vn -0.665000 -0.200800 0.719400 514 | vn 0.829400 -0.303600 0.468900 515 | vn -0.829400 -0.303600 0.468900 516 | vn 0.415500 -0.793300 0.444900 517 | vn -0.415500 -0.793300 0.444900 518 | vn 0.360000 -0.508900 0.782000 519 | vn -0.360000 -0.508900 0.782000 520 | vn -0.078700 -0.539400 0.838400 521 | vn 0.078700 -0.539400 0.838400 522 | vn -0.269600 -0.841300 0.468500 523 | vn 0.269600 -0.841300 0.468500 524 | vn -0.770700 -0.335200 0.542000 525 | vn 0.770700 -0.335200 0.542000 526 | vn -0.468900 -0.194000 0.861700 527 | vn 0.468900 -0.194000 0.861700 528 | vn -0.476700 0.190700 0.858100 529 | vn 0.476700 0.190700 0.858100 530 | vn -0.767200 0.326400 0.552100 531 | vn 0.767200 0.326400 0.552100 532 | vn -0.251900 0.817300 0.518200 533 | vn 0.251900 0.817300 0.518200 534 | vn -0.094900 0.569600 0.816400 535 | vn 0.094900 0.569600 0.816400 536 | vn 0.366700 0.537000 0.759700 537 | vn -0.366700 0.537000 0.759700 538 | vn 0.414100 0.767200 0.489800 539 | vn -0.414100 0.767200 0.489800 540 | vn 0.827700 0.295200 0.477100 541 | vn -0.827700 0.295200 0.477100 542 | vn 0.671300 0.197100 0.714500 543 | vn -0.671300 0.197100 0.714500 544 | vn 0.811100 0.324400 -0.486700 545 | vn -0.811100 0.324400 -0.486700 546 | vn 0.205200 0.820600 -0.533400 547 | vn -0.205200 0.820600 -0.533400 548 | vn -0.422300 0.780600 -0.460700 549 | vn 0.422300 0.780600 -0.460700 550 | vn -0.824100 0.322500 -0.465800 551 | vn 0.824100 0.322500 -0.465800 552 | vn -0.813700 -0.348700 -0.465000 553 | vn 0.813700 -0.348700 -0.465000 554 | vn -0.422300 -0.780600 -0.460700 555 | vn 0.422300 -0.780600 -0.460700 556 | vn 0.205200 -0.820600 -0.533400 557 | vn -0.205200 -0.820600 -0.533400 558 | vn 0.799500 -0.351000 -0.487500 559 | vn -0.799500 -0.351000 -0.487500 560 | vn 0.400000 -0.062300 0.914400 561 | vn -0.400000 -0.062300 0.914400 562 | vn 0.306900 -0.175400 0.935400 563 | vn -0.306900 -0.175400 0.935400 564 | vn 0.094500 -0.183500 0.978500 565 | vn -0.094500 -0.183500 0.978500 566 | vn -0.062400 -0.028300 0.997700 567 | vn 0.062400 -0.028300 0.997700 568 | vn -0.062400 0.026000 0.997700 569 | vn 0.062400 0.026000 0.997700 570 | vn 0.099600 0.172900 0.979900 571 | vn -0.099600 0.172900 0.979900 572 | vn 0.303600 0.165600 0.938300 573 | vn -0.303600 0.165600 0.938300 574 | vn 0.400200 0.057200 0.914700 575 | vn -0.400200 0.057200 0.914700 576 | vn 0.123100 -0.861600 0.492400 577 | vn -0.123100 -0.861600 0.492400 578 | vn 0.219000 -0.864700 0.452000 579 | vn -0.219000 -0.864700 0.452000 580 | vn 0.590200 -0.455000 0.666800 581 | vn -0.590200 -0.455000 0.666800 582 | vn 0.768900 -0.050600 0.637400 583 | vn -0.768900 -0.050600 0.637400 584 | vn 0.779600 0.090000 0.619700 585 | vn -0.779600 0.090000 0.619700 586 | vn 0.324100 -0.818800 0.473900 587 | vn -0.324100 -0.818800 0.473900 588 | vn 0.385700 -0.662900 0.641700 589 | vn -0.385700 -0.662900 0.641700 590 | vn 0.689500 -0.419300 0.590600 591 | vn -0.689500 -0.419300 0.590600 592 | vn 0.658800 -0.363400 0.658800 593 | vn -0.658800 -0.363400 0.658800 594 | vn 0.546500 0.370700 0.750900 595 | vn -0.546500 0.370700 0.750900 596 | vn 0.506400 0.646400 0.570600 597 | vn -0.506400 0.646400 0.570600 598 | vn 0.609200 0.516700 0.601500 599 | vn -0.609200 0.516700 0.601500 600 | vn -0.044100 0.661000 0.749100 601 | vn 0.044100 0.661000 0.749100 602 | vn -0.724600 0.318700 0.611000 603 | vn 0.724600 0.318700 0.611000 604 | vn -0.588000 0.555400 0.588000 605 | vn 0.588000 0.555400 0.588000 606 | vn 0.536100 -0.390900 0.748200 607 | vn -0.536100 -0.390900 0.748200 608 | vn 0.220700 -0.469000 0.855200 609 | vn -0.220700 -0.469000 0.855200 610 | vn -0.079400 -0.532100 0.842900 611 | vn 0.079400 -0.532100 0.842900 612 | vn -0.082500 -0.657500 0.749000 613 | vn 0.082500 -0.657500 0.749000 614 | vn 0.045700 -0.566700 0.822600 615 | vn -0.045700 -0.566700 0.822600 616 | vn 0.278400 -0.213000 0.936500 617 | vn -0.278400 -0.213000 0.936500 618 | vn 0.381300 -0.182400 0.906300 619 | vn -0.381300 -0.182400 0.906300 620 | vn 0.335700 -0.287800 0.896900 621 | vn -0.335700 -0.287800 0.896900 622 | vn 0.376200 0.060300 0.924600 623 | vn -0.376200 0.060300 0.924600 624 | vn -0.135200 0.268000 0.953900 625 | vn 0.135200 0.268000 0.953900 626 | vn 0.396100 -0.432100 0.810200 627 | vn -0.396100 -0.432100 0.810200 628 | vn 0.185600 -0.247400 0.951000 629 | vn -0.185600 -0.247400 0.951000 630 | vn 0.009900 -0.194800 0.980800 631 | vn -0.009900 -0.194800 0.980800 632 | vn 0.072100 -0.696600 0.713800 633 | vn -0.072100 -0.696600 0.713800 634 | vn 0.186300 -0.572300 0.798600 635 | vn -0.186300 -0.572300 0.798600 636 | vn 0.315700 -0.270800 0.909400 637 | vn -0.315700 -0.270800 0.909400 638 | vn 0.306300 -0.026500 0.951600 639 | vn -0.306300 -0.026500 0.951600 640 | vn 0.326600 -0.130600 0.936100 641 | vn -0.326600 -0.130600 0.936100 642 | vn -0.013700 0.057400 0.998300 643 | vn 0.013700 0.057400 0.998300 644 | vn -0.002600 -0.065600 0.997800 645 | vn 0.002600 -0.065600 0.997800 646 | vn 0.000000 0.000000 1.000000 647 | vn 0.817400 -0.574400 -0.044200 648 | vn -0.817400 -0.574400 -0.044200 649 | vn 0.949400 0.229700 -0.214400 650 | vn -0.949400 0.229700 -0.214400 651 | vn 0.082500 0.907300 -0.412400 652 | vn -0.082500 0.907300 -0.412400 653 | vn -0.883600 0.355500 0.304700 654 | vn 0.883600 0.355500 0.304700 655 | vn 0.420700 -0.879700 0.221800 656 | vn -0.420700 -0.879700 0.221800 657 | vn 0.287300 -0.574700 0.766300 658 | vn -0.287300 -0.574700 0.766300 659 | vn -0.654200 0.601900 0.458000 660 | vn 0.654200 0.601900 0.458000 661 | vn 0.105200 0.789200 0.605100 662 | vn -0.105200 0.789200 0.605100 663 | vn 0.758200 0.291600 0.583200 664 | vn -0.758200 0.291600 0.583200 665 | vn 0.388900 -0.713000 0.583400 666 | vn -0.388900 -0.713000 0.583400 667 | vn 0.046300 0.231400 0.971800 668 | vn -0.046300 0.231400 0.971800 669 | vn 0.033500 -0.401800 0.915100 670 | vn -0.033500 -0.401800 0.915100 671 | vn -0.445200 -0.161000 0.880900 672 | vn 0.445200 -0.161000 0.880900 673 | vn -0.218200 -0.436400 0.872900 674 | vn 0.218200 -0.436400 0.872900 675 | vn 0.434100 -0.129000 0.891600 676 | vn -0.434100 -0.129000 0.891600 677 | vn 0.300800 0.050100 0.952400 678 | vn -0.300800 0.050100 0.952400 679 | vn 0.812300 0.301000 0.499600 680 | vn -0.812300 0.301000 0.499600 681 | vn 0.875300 0.257400 0.409300 682 | vn -0.875300 0.257400 0.409300 683 | vn 0.938500 0.160100 0.306000 684 | vn -0.938500 0.160100 0.306000 685 | vn 0.223700 -0.653900 0.722700 686 | vn -0.223700 -0.653900 0.722700 687 | vn -0.153600 -0.199700 0.967700 688 | vn 0.153600 -0.199700 0.967700 689 | vn -0.273300 -0.102500 0.956500 690 | vn 0.273300 -0.102500 0.956500 691 | vn -0.097600 0.195200 0.975900 692 | vn 0.097600 0.195200 0.975900 693 | vn -0.158200 0.949400 0.271300 694 | vn 0.158200 0.949400 0.271300 695 | vn -0.693400 0.708200 0.132800 696 | vn 0.693400 0.708200 0.132800 697 | vn -1.000000 0.000000 0.000000 698 | vn 1.000000 0.000000 0.000000 699 | vn 0.305100 -0.945000 0.118100 700 | vn -0.305100 -0.945000 0.118100 701 | vn 0.029800 -0.298100 0.954100 702 | vn -0.029800 -0.298100 0.954100 703 | vn 0.135300 -0.347900 0.927700 704 | vn -0.135300 -0.347900 0.927700 705 | vn -0.508500 -0.275500 0.815800 706 | vn 0.508500 -0.275500 0.815800 707 | vn -0.384300 -0.041900 0.922300 708 | vn 0.384300 -0.041900 0.922300 709 | vn -0.208300 0.037400 0.977400 710 | vn 0.208300 0.037400 0.977400 711 | vn -0.572100 -0.476700 0.667400 712 | vn 0.572100 -0.476700 0.667400 713 | vn -0.136900 -0.753100 0.643500 714 | vn 0.136900 -0.753100 0.643500 715 | vn 0.408800 -0.607100 0.681400 716 | vn -0.408800 -0.607100 0.681400 717 | vn 0.574000 -0.413000 0.707000 718 | vn -0.574000 -0.413000 0.707000 719 | vn 0.566500 -0.096800 0.818300 720 | vn -0.566500 -0.096800 0.818300 721 | vn 0.570300 0.118000 0.812900 722 | vn -0.570300 0.118000 0.812900 723 | vn 0.482300 0.562100 0.671900 724 | vn -0.482300 0.562100 0.671900 725 | vn 0.260400 0.611400 0.747300 726 | vn -0.260400 0.611400 0.747300 727 | vn 0.164000 0.360700 0.918200 728 | vn -0.164000 0.360700 0.918200 729 | vn -0.017800 0.249500 0.968200 730 | vn 0.017800 0.249500 0.968200 731 | vn 0.327300 -0.416600 0.848100 732 | vn -0.327300 -0.416600 0.848100 733 | vn 0.281100 -0.261000 0.923500 734 | vn -0.281100 -0.261000 0.923500 735 | vn -0.254200 -0.651400 0.714900 736 | vn 0.254200 -0.651400 0.714900 737 | vn -0.026000 -0.845500 0.533300 738 | vn 0.026000 -0.845500 0.533300 739 | vn -0.351800 -0.260600 0.899100 740 | vn 0.351800 -0.260600 0.899100 741 | vn -0.352300 -0.011000 0.935800 742 | vn 0.352300 -0.011000 0.935800 743 | vn -0.131700 0.460800 0.877700 744 | vn 0.131700 0.460800 0.877700 745 | vn -0.034200 0.615900 0.787000 746 | vn 0.034200 0.615900 0.787000 747 | vn 0.360300 0.583600 0.727700 748 | vn -0.360300 0.583600 0.727700 749 | vn 0.498800 0.530000 0.685800 750 | vn -0.498800 0.530000 0.685800 751 | vn 0.666700 -0.333300 0.666700 752 | vn -0.666700 -0.333300 0.666700 753 | vn 0.816500 -0.073100 0.572700 754 | vn -0.816500 -0.073100 0.572700 755 | vn 0.784000 0.116100 0.609800 756 | vn -0.784000 0.116100 0.609800 757 | vn -0.530600 0.811100 -0.246100 758 | vn 0.530600 0.811100 -0.246100 759 | vn -0.851100 0.369500 -0.373000 760 | vn 0.851100 0.369500 -0.373000 761 | vn -0.244600 0.867500 -0.433100 762 | vn 0.244600 0.867500 -0.433100 763 | vn 0.592400 0.746500 -0.303000 764 | vn -0.592400 0.746500 -0.303000 765 | vn 0.368500 0.875800 -0.311800 766 | vn -0.368500 0.875800 -0.311800 767 | vn 0.282100 0.915100 -0.288000 768 | vn -0.282100 0.915100 -0.288000 769 | vn 0.856100 0.134000 -0.499100 770 | vn -0.856100 0.134000 -0.499100 771 | vn 0.534200 -0.723300 -0.437600 772 | vn -0.534200 -0.723300 -0.437600 773 | vn 0.384900 -0.813100 -0.436800 774 | vn -0.384900 -0.813100 -0.436800 775 | vn 0.233500 -0.580600 -0.780000 776 | vn -0.233500 -0.580600 -0.780000 777 | vn 0.244900 -0.058300 -0.967800 778 | vn -0.244900 -0.058300 -0.967800 779 | vn 0.116300 -0.453500 -0.883700 780 | vn -0.116300 -0.453500 -0.883700 781 | vn 0.115200 -0.983600 -0.138800 782 | vn -0.115200 -0.983600 -0.138800 783 | vn 0.118400 -0.966900 -0.226000 784 | vn -0.118400 -0.966900 -0.226000 785 | vn 0.959700 -0.008500 -0.280800 786 | vn -0.959700 -0.008500 -0.280800 787 | vn 0.931900 0.162900 -0.324200 788 | vn -0.931900 0.162900 -0.324200 789 | vn 0.162600 0.020700 -0.986500 790 | vn -0.162600 0.020700 -0.986500 791 | vn -0.018800 -0.217700 -0.975800 792 | vn 0.018800 -0.217700 -0.975800 793 | vn 0.753800 -0.292600 -0.588400 794 | vn -0.753800 -0.292600 -0.588400 795 | vn 0.919600 0.137900 -0.367800 796 | vn -0.919600 0.137900 -0.367800 797 | vn 0.929700 0.312700 -0.194400 798 | vn -0.929700 0.312700 -0.194400 799 | vn 0.912000 0.337600 -0.232900 800 | vn -0.912000 0.337600 -0.232900 801 | vn 0.940700 0.333800 -0.060700 802 | vn -0.940700 0.333800 -0.060700 803 | vn 0.176100 -0.880500 -0.440200 804 | vn -0.176100 -0.880500 -0.440200 805 | vn 0.370800 -0.473300 -0.799100 806 | vn -0.370800 -0.473300 -0.799100 807 | vn 0.310700 -0.828400 -0.466000 808 | vn -0.310700 -0.828400 -0.466000 809 | vn 0.279300 -0.951500 -0.128700 810 | vn -0.279300 -0.951500 -0.128700 811 | vn 0.313900 -0.932100 -0.180700 812 | vn -0.313900 -0.932100 -0.180700 813 | vn 0.976200 -0.208300 -0.060900 814 | vn -0.976200 -0.208300 -0.060900 815 | vn 0.826700 -0.506600 0.244700 816 | vn -0.826700 -0.506600 0.244700 817 | vn 0.344900 -0.115800 -0.931500 818 | vn -0.344900 -0.115800 -0.931500 819 | vn 0.120300 0.964400 0.235500 820 | vn -0.120300 0.964400 0.235500 821 | vn 0.127500 0.974400 -0.185100 822 | vn -0.127500 0.974400 -0.185100 823 | vn 0.349200 0.594700 -0.724100 824 | vn -0.349200 0.594700 -0.724100 825 | vn 0.415300 0.898100 -0.144900 826 | vn -0.415300 0.898100 -0.144900 827 | vn 0.184500 0.703600 0.686300 828 | vn -0.184500 0.703600 0.686300 829 | vn 0.605600 0.779400 0.160800 830 | vn -0.605600 0.779400 0.160800 831 | vn 0.703300 0.680600 -0.205300 832 | vn -0.703300 0.680600 -0.205300 833 | vn 0.667900 0.200700 -0.716600 834 | vn -0.667900 0.200700 -0.716600 835 | vn 0.494800 0.434200 -0.752800 836 | vn -0.494800 0.434200 -0.752800 837 | vn 0.642300 0.745900 -0.176100 838 | vn -0.642300 0.745900 -0.176100 839 | vn 0.718200 0.678800 0.153000 840 | vn -0.718200 0.678800 0.153000 841 | vn 0.738800 0.397200 0.544400 842 | vn -0.738800 0.397200 0.544400 843 | vn 0.342800 0.926100 -0.157900 844 | vn -0.342800 0.926100 -0.157900 845 | vn 0.227000 0.574000 0.786700 846 | vn -0.227000 0.574000 0.786700 847 | vn -0.172200 0.104600 -0.979500 848 | vn 0.172200 0.104600 -0.979500 849 | vn 0.042500 0.915000 0.401300 850 | vn -0.042500 0.915000 0.401300 851 | vn -0.161600 0.184700 0.969400 852 | vn 0.161600 0.184700 0.969400 853 | vn 0.979100 0.197300 0.048300 854 | vn -0.979100 0.197300 0.048300 855 | vn 0.947000 0.091800 0.307900 856 | vn -0.947000 0.091800 0.307900 857 | vn 0.979400 0.190500 -0.066100 858 | vn -0.979400 0.190500 -0.066100 859 | vn 0.993800 0.031200 -0.107000 860 | vn -0.993800 0.031200 -0.107000 861 | vn 0.711600 -0.700800 0.050100 862 | vn -0.711600 -0.700800 0.050100 863 | vn 0.372200 -0.924300 0.084700 864 | vn -0.372200 -0.924300 0.084700 865 | vn 0.446500 -0.864400 0.231000 866 | vn -0.446500 -0.864400 0.231000 867 | vn 0.606600 -0.757800 0.240500 868 | vn -0.606600 -0.757800 0.240500 869 | vn 0.732500 -0.636800 0.240700 870 | vn -0.732500 -0.636800 0.240700 871 | vn 0.263700 -0.449900 0.853300 872 | vn -0.263700 -0.449900 0.853300 873 | vn 0.556800 -0.318100 -0.767300 874 | vn -0.556800 -0.318100 -0.767300 875 | vn 0.500400 -0.280700 -0.819000 876 | vn -0.500400 -0.280700 -0.819000 877 | vn 0.319000 -0.849400 -0.420500 878 | vn -0.319000 -0.849400 -0.420500 879 | vn 0.719800 -0.635600 -0.279300 880 | vn -0.719800 -0.635600 -0.279300 881 | vn 0.497200 -0.440800 -0.747300 882 | vn -0.497200 -0.440800 -0.747300 883 | vn 0.350600 0.380700 0.855700 884 | vn -0.350600 0.380700 0.855700 885 | vn 0.456600 0.171500 0.873000 886 | vn -0.456600 0.171500 0.873000 887 | vn 0.258300 0.105500 0.960300 888 | vn -0.258300 0.105500 0.960300 889 | vn 0.245500 -0.080200 0.966100 890 | vn -0.245500 -0.080200 0.966100 891 | vn 0.464300 -0.059900 0.883700 892 | vn -0.464300 -0.059900 0.883700 893 | vn 0.622500 -0.304500 0.721000 894 | vn -0.622500 -0.304500 0.721000 895 | vn 0.450000 0.659000 0.602700 896 | vn -0.450000 0.659000 0.602700 897 | vn -0.266700 0.830900 0.488400 898 | vn 0.266700 0.830900 0.488400 899 | vn -0.828400 0.229100 0.511100 900 | vn 0.828400 0.229100 0.511100 901 | vn -0.525100 -0.356600 0.772700 902 | vn 0.525100 -0.356600 0.772700 903 | vn 0.454600 -0.566500 0.687300 904 | vn -0.454600 -0.566500 0.687300 905 | vn 0.699600 -0.449700 0.555200 906 | vn -0.699600 -0.449700 0.555200 907 | vn 0.722000 -0.682700 -0.112600 908 | vn -0.722000 -0.682700 -0.112600 909 | vn -0.191900 0.286000 0.938800 910 | vn 0.191900 0.286000 0.938800 911 | vn 0.904800 -0.373400 -0.204700 912 | vn -0.904800 -0.373400 -0.204700 913 | vn 0.103400 0.155100 0.982500 914 | vn -0.103400 0.155100 0.982500 915 | vn 0.084100 0.931800 0.353000 916 | vn -0.084100 0.931800 0.353000 917 | vn 0.644600 -0.088300 0.759400 918 | vn -0.644600 -0.088300 0.759400 919 | vn 0.430900 0.474000 0.767800 920 | vn -0.430900 0.474000 0.767800 921 | vn 0.803200 -0.484700 0.346200 922 | vn -0.803200 -0.484700 0.346200 923 | vn 0.581100 -0.412800 0.701400 924 | vn -0.581100 -0.412800 0.701400 925 | vn 0.591000 -0.430500 0.682200 926 | vn -0.591000 -0.430500 0.682200 927 | vn 0.981800 -0.180400 -0.059100 928 | vn -0.981800 -0.180400 -0.059100 929 | vn 0.910500 -0.396500 -0.117500 930 | vn -0.910500 -0.396500 -0.117500 931 | vn 0.997200 -0.018100 -0.072500 932 | vn -0.997200 -0.018100 -0.072500 933 | vn 0.731300 -0.654300 0.192500 934 | vn -0.731300 -0.654300 0.192500 935 | vn 0.786700 -0.607900 0.107300 936 | vn -0.786700 -0.607900 0.107300 937 | vn 0.702200 -0.702200 0.117000 938 | vn -0.702200 -0.702200 0.117000 939 | vn 0.184000 0.981600 -0.051100 940 | vn -0.184000 0.981600 -0.051100 941 | vn 0.935200 0.330100 0.128400 942 | vn -0.935200 0.330100 0.128400 943 | vn 0.663300 -0.746300 0.055300 944 | vn -0.663300 -0.746300 0.055300 945 | vn -0.008500 0.997000 0.076700 946 | vn 0.008500 0.997000 0.076700 947 | vn 0.623700 -0.706100 0.335400 948 | vn -0.623700 -0.706100 0.335400 949 | vn 0.273300 -0.892500 0.358700 950 | vn -0.273300 -0.892500 0.358700 951 | vn -0.832800 -0.508000 -0.220000 952 | vn 0.832800 -0.508000 -0.220000 953 | vn -0.833900 0.237700 -0.498100 954 | vn 0.833900 0.237700 -0.498100 955 | vn -0.565500 0.784700 -0.253900 956 | vn 0.565500 0.784700 -0.253900 957 | vn -0.056000 0.996200 0.067200 958 | vn 0.056000 0.996200 0.067200 959 | vn 0.144500 0.022200 0.989300 960 | vn -0.144500 0.022200 0.989300 961 | vn 0.327500 0.064500 0.942700 962 | vn -0.327500 0.064500 0.942700 963 | vn 0.312700 0.023200 0.949600 964 | vn -0.312700 0.023200 0.949600 965 | vn 0.171000 0.027400 0.984900 966 | vn -0.171000 0.027400 0.984900 967 | vn 0.348700 0.284900 0.892900 968 | vn -0.348700 0.284900 0.892900 969 | vn 0.400600 -0.034300 0.915600 970 | vn -0.400600 -0.034300 0.915600 971 | vn 0.257200 -0.060300 0.964500 972 | vn -0.257200 -0.060300 0.964500 973 | vn 0.063700 -0.010600 0.997900 974 | vn -0.063700 -0.010600 0.997900 975 | vn -0.363700 0.703900 0.610100 976 | vn 0.363700 0.703900 0.610100 977 | vn 0.629900 0.035500 0.775900 978 | vn -0.629900 0.035500 0.775900 979 | vn 0.447200 -0.200200 0.871700 980 | vn -0.447200 -0.200200 0.871700 981 | vn 0.507200 -0.214100 0.834800 982 | vn -0.507200 -0.214100 0.834800 983 | vn 0.525800 0.261900 0.809300 984 | vn -0.525800 0.261900 0.809300 985 | vn 0.298000 0.580200 0.758000 986 | vn -0.298000 0.580200 0.758000 987 | vn 0.093000 -0.992400 -0.080500 988 | vn -0.093000 -0.992400 -0.080500 989 | vn 0.500600 -0.865700 0.008000 990 | vn -0.500600 -0.865700 0.008000 991 | vn 0.928500 -0.249700 0.274800 992 | vn -0.928500 -0.249700 0.274800 993 | vn 0.839300 0.542400 -0.037800 994 | vn -0.839300 0.542400 -0.037800 995 | vn -0.235500 0.936700 -0.258900 996 | vn 0.235500 0.936700 -0.258900 997 | vn -0.449900 0.883800 -0.128500 998 | vn 0.449900 0.883800 -0.128500 999 | vn -0.538400 -0.009800 -0.842700 1000 | vn 0.538400 -0.009800 -0.842700 1001 | vn -0.191000 -0.024100 -0.981300 1002 | vn 0.191000 -0.024100 -0.981300 1003 | vn 0.404600 0.026600 -0.914100 1004 | vn -0.404600 0.026600 -0.914100 1005 | vn -0.781900 0.623100 0.019700 1006 | vn 0.781900 0.623100 0.019700 1007 | vn 0.542800 -0.206300 -0.814200 1008 | vn -0.542800 -0.206300 -0.814200 1009 | vn -0.247400 -0.923100 -0.294500 1010 | vn 0.247400 -0.923100 -0.294500 1011 | usemtl None 1012 | s off 1013 | f 47//1 1//1 3//1 45//1 1014 | f 4//2 2//2 48//2 46//2 1015 | f 45//3 3//3 5//3 43//3 1016 | f 6//4 4//4 46//4 44//4 1017 | f 3//5 9//5 7//5 5//5 1018 | f 8//6 10//6 4//6 6//6 1019 | f 1//7 11//7 9//7 3//7 1020 | f 10//8 12//8 2//8 4//8 1021 | f 11//9 13//9 15//9 9//9 1022 | f 16//10 14//10 12//10 10//10 1023 | f 9//11 15//11 17//11 7//11 1024 | f 18//12 16//12 10//12 8//12 1025 | f 15//13 21//13 19//13 17//13 1026 | f 20//14 22//14 16//14 18//14 1027 | f 13//15 23//15 21//15 15//15 1028 | f 22//16 24//16 14//16 16//16 1029 | f 23//17 25//17 27//17 21//17 1030 | f 28//18 26//18 24//18 22//18 1031 | f 21//19 27//19 29//19 19//19 1032 | f 30//20 28//20 22//20 20//20 1033 | f 27//21 33//21 31//21 29//21 1034 | f 32//22 34//22 28//22 30//22 1035 | f 25//23 35//23 33//23 27//23 1036 | f 34//24 36//24 26//24 28//24 1037 | f 35//25 37//25 39//25 33//25 1038 | f 40//26 38//26 36//26 34//26 1039 | f 33//27 39//27 41//27 31//27 1040 | f 42//28 40//28 34//28 32//28 1041 | f 39//29 45//29 43//29 41//29 1042 | f 44//30 46//30 40//30 42//30 1043 | f 37//31 47//31 45//31 39//31 1044 | f 46//32 48//32 38//32 40//32 1045 | f 47//33 37//33 51//33 49//33 1046 | f 52//34 38//34 48//34 50//34 1047 | f 37//35 35//35 53//35 51//35 1048 | f 54//36 36//36 38//36 52//36 1049 | f 35//37 25//37 55//37 53//37 1050 | f 56//38 26//38 36//38 54//38 1051 | f 25//39 23//39 57//39 55//39 1052 | f 58//40 24//40 26//40 56//40 1053 | f 23//41 13//41 59//41 57//41 1054 | f 60//42 14//42 24//42 58//42 1055 | f 13//43 11//43 63//43 59//43 1056 | f 64//44 12//44 14//44 60//44 1057 | f 11//45 1//45 65//45 63//45 1058 | f 66//46 2//46 12//46 64//46 1059 | f 1//47 47//47 49//47 65//47 1060 | f 50//48 48//48 2//48 66//48 1061 | f 61//49 65//49 49//49 1062 | f 50//50 66//50 62//50 1063 | f 63//51 65//51 61//51 1064 | f 62//52 66//52 64//52 1065 | f 61//53 59//53 63//53 1066 | f 64//54 60//54 62//54 1067 | f 61//55 57//55 59//55 1068 | f 60//56 58//56 62//56 1069 | f 61//57 55//57 57//57 1070 | f 58//58 56//58 62//58 1071 | f 61//59 53//59 55//59 1072 | f 56//60 54//60 62//60 1073 | f 61//61 51//61 53//61 1074 | f 54//62 52//62 62//62 1075 | f 61//63 49//63 51//63 1076 | f 52//64 50//64 62//64 1077 | f 89//65 174//65 176//65 91//65 1078 | f 176//66 175//66 90//66 91//66 1079 | f 87//67 172//67 174//67 89//67 1080 | f 175//68 173//68 88//68 90//68 1081 | f 85//69 170//69 172//69 87//69 1082 | f 173//70 171//70 86//70 88//70 1083 | f 83//71 168//71 170//71 85//71 1084 | f 171//72 169//72 84//72 86//72 1085 | f 81//73 166//73 168//73 83//73 1086 | f 169//74 167//74 82//74 84//74 1087 | f 79//75 92//75 146//75 164//75 1088 | f 147//76 93//76 80//76 165//76 1089 | f 92//77 94//77 148//77 146//77 1090 | f 149//78 95//78 93//78 147//78 1091 | f 94//79 96//79 150//79 148//79 1092 | f 151//80 97//80 95//80 149//80 1093 | f 96//81 98//81 152//81 150//81 1094 | f 153//82 99//82 97//82 151//82 1095 | f 98//83 100//83 154//83 152//83 1096 | f 155//84 101//84 99//84 153//84 1097 | f 100//85 102//85 156//85 154//85 1098 | f 157//86 103//86 101//86 155//86 1099 | f 102//87 104//87 158//87 156//87 1100 | f 159//88 105//88 103//88 157//88 1101 | f 104//89 106//89 160//89 158//89 1102 | f 161//90 107//90 105//90 159//90 1103 | f 106//91 108//91 162//91 160//91 1104 | f 163//92 109//92 107//92 161//92 1105 | f 108//93 67//93 68//93 162//93 1106 | f 68//94 67//94 109//94 163//94 1107 | f 110//95 128//95 160//95 162//95 1108 | f 161//96 129//96 111//96 163//96 1109 | f 128//97 179//97 158//97 160//97 1110 | f 159//98 180//98 129//98 161//98 1111 | f 126//99 156//99 158//99 179//99 1112 | f 159//100 157//100 127//100 180//100 1113 | f 124//101 154//101 156//101 126//101 1114 | f 157//102 155//102 125//102 127//102 1115 | f 122//103 152//103 154//103 124//103 1116 | f 155//104 153//104 123//104 125//104 1117 | f 120//105 150//105 152//105 122//105 1118 | f 153//106 151//106 121//106 123//106 1119 | f 118//107 148//107 150//107 120//107 1120 | f 151//108 149//108 119//108 121//108 1121 | f 116//109 146//109 148//109 118//109 1122 | f 149//110 147//110 117//110 119//110 1123 | f 114//111 164//111 146//111 116//111 1124 | f 147//112 165//112 115//112 117//112 1125 | f 114//113 181//113 177//113 164//113 1126 | f 177//114 182//114 115//114 165//114 1127 | f 110//115 162//115 68//115 112//115 1128 | f 68//116 163//116 111//116 113//116 1129 | f 112//117 68//117 178//117 183//117 1130 | f 178//118 68//118 113//118 184//118 1131 | f 177//119 181//119 183//119 178//119 1132 | f 184//120 182//120 177//120 178//120 1133 | f 135//121 137//121 176//121 174//121 1134 | f 176//122 137//122 136//122 175//122 1135 | f 133//123 135//123 174//123 172//123 1136 | f 175//124 136//124 134//124 173//124 1137 | f 131//125 133//125 172//125 170//125 1138 | f 173//126 134//126 132//126 171//126 1139 | f 166//127 187//127 185//127 168//127 1140 | f 186//128 188//128 167//128 169//128 1141 | f 131//129 170//129 168//129 185//129 1142 | f 169//130 171//130 132//130 186//130 1143 | f 144//131 190//131 189//131 187//131 1144 | f 189//132 190//132 145//132 188//132 1145 | f 185//133 187//133 189//133 69//133 1146 | f 189//134 188//134 186//134 69//134 1147 | f 130//135 131//135 185//135 69//135 1148 | f 186//135 132//135 130//135 69//135 1149 | f 142//136 193//136 191//136 144//136 1150 | f 192//137 194//137 143//137 145//137 1151 | f 140//138 195//138 193//138 142//138 1152 | f 194//139 196//139 141//139 143//139 1153 | f 139//140 197//140 195//140 140//140 1154 | f 196//141 198//141 139//141 141//141 1155 | f 138//142 71//142 197//142 139//142 1156 | f 198//143 71//143 138//143 139//143 1157 | f 190//144 144//144 191//144 70//144 1158 | f 192//145 145//145 190//145 70//145 1159 | f 70//146 191//146 206//146 208//146 1160 | f 207//147 192//147 70//147 208//147 1161 | f 71//148 199//148 200//148 197//148 1162 | f 201//149 199//149 71//149 198//149 1163 | f 197//150 200//150 202//150 195//150 1164 | f 203//151 201//151 198//151 196//151 1165 | f 195//152 202//152 204//152 193//152 1166 | f 205//153 203//153 196//153 194//153 1167 | f 193//154 204//154 206//154 191//154 1168 | f 207//155 205//155 194//155 192//155 1169 | f 199//156 204//156 202//156 200//156 1170 | f 203//157 205//157 199//157 201//157 1171 | f 199//158 208//158 206//158 204//158 1172 | f 207//159 208//159 199//159 205//159 1173 | f 139//160 140//160 164//160 177//160 1174 | f 165//161 141//161 139//161 177//161 1175 | f 140//162 142//162 211//162 164//162 1176 | f 212//163 143//163 141//163 165//163 1177 | f 142//164 144//164 213//164 211//164 1178 | f 214//165 145//165 143//165 212//165 1179 | f 144//166 187//166 166//166 213//166 1180 | f 167//167 188//167 145//167 214//167 1181 | f 81//168 209//168 213//168 166//168 1182 | f 214//169 210//169 82//169 167//169 1183 | f 209//170 215//170 211//170 213//170 1184 | f 212//171 216//171 210//171 214//171 1185 | f 79//172 164//172 211//172 215//172 1186 | f 212//173 165//173 80//173 216//173 1187 | f 131//174 130//174 72//174 222//174 1188 | f 72//175 130//175 132//175 223//175 1189 | f 133//176 131//176 222//176 220//176 1190 | f 223//177 132//177 134//177 221//177 1191 | f 135//178 133//178 220//178 218//178 1192 | f 221//179 134//179 136//179 219//179 1193 | f 137//180 135//180 218//180 217//180 1194 | f 219//181 136//181 137//181 217//181 1195 | f 217//182 218//182 229//182 231//182 1196 | f 230//183 219//183 217//183 231//183 1197 | f 218//184 220//184 227//184 229//184 1198 | f 228//185 221//185 219//185 230//185 1199 | f 220//186 222//186 225//186 227//186 1200 | f 226//187 223//187 221//187 228//187 1201 | f 222//188 72//188 224//188 225//188 1202 | f 224//189 72//189 223//189 226//189 1203 | f 224//190 231//190 229//190 225//190 1204 | f 230//191 231//191 224//191 226//191 1205 | f 225//192 229//192 227//192 1206 | f 228//193 230//193 226//193 1207 | f 183//194 181//194 234//194 232//194 1208 | f 235//195 182//195 184//195 233//195 1209 | f 112//196 183//196 232//196 254//196 1210 | f 233//197 184//197 113//197 255//197 1211 | f 110//198 112//198 254//198 256//198 1212 | f 255//199 113//199 111//199 257//199 1213 | f 181//200 114//200 252//200 234//200 1214 | f 253//201 115//201 182//201 235//201 1215 | f 114//202 116//202 250//202 252//202 1216 | f 251//203 117//203 115//203 253//203 1217 | f 116//204 118//204 248//204 250//204 1218 | f 249//205 119//205 117//205 251//205 1219 | f 118//206 120//206 246//206 248//206 1220 | f 247//207 121//207 119//207 249//207 1221 | f 120//208 122//208 244//208 246//208 1222 | f 245//209 123//209 121//209 247//209 1223 | f 122//210 124//210 242//210 244//210 1224 | f 243//211 125//211 123//211 245//211 1225 | f 124//212 126//212 240//212 242//212 1226 | f 241//213 127//213 125//213 243//213 1227 | f 126//214 179//214 236//214 240//214 1228 | f 237//215 180//215 127//215 241//215 1229 | f 179//216 128//216 238//216 236//216 1230 | f 239//217 129//217 180//217 237//217 1231 | f 128//218 110//218 256//218 238//218 1232 | f 257//219 111//219 129//219 239//219 1233 | f 238//220 256//220 258//220 276//220 1234 | f 259//221 257//221 239//221 277//221 1235 | f 236//222 238//222 276//222 278//222 1236 | f 277//223 239//223 237//223 279//223 1237 | f 240//224 236//224 278//224 274//224 1238 | f 279//225 237//225 241//225 275//225 1239 | f 242//226 240//226 274//226 272//226 1240 | f 275//227 241//227 243//227 273//227 1241 | f 244//228 242//228 272//228 270//228 1242 | f 273//229 243//229 245//229 271//229 1243 | f 246//230 244//230 270//230 268//230 1244 | f 271//231 245//231 247//231 269//231 1245 | f 248//232 246//232 268//232 266//232 1246 | f 269//233 247//233 249//233 267//233 1247 | f 250//234 248//234 266//234 264//234 1248 | f 267//235 249//235 251//235 265//235 1249 | f 252//236 250//236 264//236 262//236 1250 | f 265//237 251//237 253//237 263//237 1251 | f 234//238 252//238 262//238 280//238 1252 | f 263//239 253//239 235//239 281//239 1253 | f 256//240 254//240 260//240 258//240 1254 | f 261//241 255//241 257//241 259//241 1255 | f 254//242 232//242 282//242 260//242 1256 | f 283//243 233//243 255//243 261//243 1257 | f 232//244 234//244 280//244 282//244 1258 | f 281//245 235//245 233//245 283//245 1259 | f 67//246 108//246 284//246 73//246 1260 | f 285//247 109//247 67//247 73//247 1261 | f 108//248 106//248 286//248 284//248 1262 | f 287//249 107//249 109//249 285//249 1263 | f 106//250 104//250 288//250 286//250 1264 | f 289//251 105//251 107//251 287//251 1265 | f 104//252 102//252 290//252 288//252 1266 | f 291//253 103//253 105//253 289//253 1267 | f 102//254 100//254 292//254 290//254 1268 | f 293//255 101//255 103//255 291//255 1269 | f 100//256 98//256 294//256 292//256 1270 | f 295//257 99//257 101//257 293//257 1271 | f 98//258 96//258 296//258 294//258 1272 | f 297//259 97//259 99//259 295//259 1273 | f 96//260 94//260 298//260 296//260 1274 | f 299//261 95//261 97//261 297//261 1275 | f 94//262 92//262 300//262 298//262 1276 | f 301//263 93//263 95//263 299//263 1277 | f 308//264 309//264 328//264 338//264 1278 | f 329//265 309//265 308//265 339//265 1279 | f 307//266 308//266 338//266 336//266 1280 | f 339//267 308//267 307//267 337//267 1281 | f 306//268 307//268 336//268 340//268 1282 | f 337//269 307//269 306//269 341//269 1283 | f 89//270 91//270 306//270 340//270 1284 | f 306//271 91//271 90//271 341//271 1285 | f 87//272 89//272 340//272 334//272 1286 | f 341//273 90//273 88//273 335//273 1287 | f 85//274 87//274 334//274 330//274 1288 | f 335//275 88//275 86//275 331//275 1289 | f 83//276 85//276 330//276 332//276 1290 | f 331//277 86//277 84//277 333//277 1291 | f 330//278 336//278 338//278 332//278 1292 | f 339//279 337//279 331//279 333//279 1293 | f 330//280 334//280 340//280 336//280 1294 | f 341//281 335//281 331//281 337//281 1295 | f 326//282 332//282 338//282 328//282 1296 | f 339//283 333//283 327//283 329//283 1297 | f 81//284 83//284 332//284 326//284 1298 | f 333//285 84//285 82//285 327//285 1299 | f 209//286 342//286 344//286 215//286 1300 | f 345//287 343//287 210//287 216//287 1301 | f 81//288 326//288 342//288 209//288 1302 | f 343//289 327//289 82//289 210//289 1303 | f 79//290 215//290 344//290 346//290 1304 | f 345//291 216//291 80//291 347//291 1305 | f 79//292 346//292 300//292 92//292 1306 | f 301//293 347//293 80//293 93//293 1307 | f 77//294 324//294 352//294 304//294 1308 | f 353//295 325//295 77//295 304//295 1309 | f 304//296 352//296 350//296 78//296 1310 | f 351//297 353//297 304//297 78//297 1311 | f 78//298 350//298 348//298 305//298 1312 | f 349//299 351//299 78//299 305//299 1313 | f 305//300 348//300 328//300 309//300 1314 | f 329//301 349//301 305//301 309//301 1315 | f 326//302 328//302 348//302 342//302 1316 | f 349//303 329//303 327//303 343//303 1317 | f 296//304 298//304 318//304 310//304 1318 | f 319//305 299//305 297//305 311//305 1319 | f 76//306 316//306 324//306 77//306 1320 | f 325//307 317//307 76//307 77//307 1321 | f 302//308 358//308 356//308 303//308 1322 | f 357//309 359//309 302//309 303//309 1323 | f 303//310 356//310 354//310 75//310 1324 | f 355//311 357//311 303//311 75//311 1325 | f 75//312 354//312 316//312 76//312 1326 | f 317//313 355//313 75//313 76//313 1327 | f 292//314 294//314 362//314 364//314 1328 | f 363//315 295//315 293//315 365//315 1329 | f 364//316 362//316 368//316 366//316 1330 | f 369//317 363//317 365//317 367//317 1331 | f 366//318 368//318 370//318 372//318 1332 | f 371//319 369//319 367//319 373//319 1333 | f 372//320 370//320 376//320 374//320 1334 | f 377//321 371//321 373//321 375//321 1335 | f 314//322 378//322 374//322 376//322 1336 | f 375//323 379//323 315//323 377//323 1337 | f 316//324 354//324 374//324 378//324 1338 | f 375//325 355//325 317//325 379//325 1339 | f 354//326 356//326 372//326 374//326 1340 | f 373//327 357//327 355//327 375//327 1341 | f 356//328 358//328 366//328 372//328 1342 | f 367//329 359//329 357//329 373//329 1343 | f 358//330 360//330 364//330 366//330 1344 | f 365//331 361//331 359//331 367//331 1345 | f 290//332 292//332 364//332 360//332 1346 | f 365//333 293//333 291//333 361//333 1347 | f 74//334 360//334 358//334 302//334 1348 | f 359//335 361//335 74//335 302//335 1349 | f 284//336 286//336 288//336 290//336 1350 | f 289//337 287//337 285//337 291//337 1351 | f 284//338 290//338 360//338 74//338 1352 | f 361//339 291//339 285//339 74//339 1353 | f 73//340 284//340 74//340 1354 | f 74//341 285//341 73//341 1355 | f 294//342 296//342 310//342 362//342 1356 | f 311//343 297//343 295//343 363//343 1357 | f 310//344 312//344 368//344 362//344 1358 | f 369//345 313//345 311//345 363//345 1359 | f 312//346 382//346 370//346 368//346 1360 | f 371//347 383//347 313//347 369//347 1361 | f 314//348 376//348 370//348 382//348 1362 | f 371//349 377//349 315//349 383//349 1363 | f 348//350 350//350 386//350 384//350 1364 | f 387//351 351//351 349//351 385//351 1365 | f 318//352 384//352 386//352 320//352 1366 | f 387//353 385//353 319//353 321//353 1367 | f 298//354 300//354 384//354 318//354 1368 | f 385//355 301//355 299//355 319//355 1369 | f 300//356 344//356 342//356 384//356 1370 | f 343//357 345//357 301//357 385//357 1371 | f 342//358 348//358 384//358 1372 | f 385//359 349//359 343//359 1373 | f 300//360 346//360 344//360 1374 | f 345//361 347//361 301//361 1375 | f 314//362 322//362 380//362 378//362 1376 | f 381//363 323//363 315//363 379//363 1377 | f 316//364 378//364 380//364 324//364 1378 | f 381//365 379//365 317//365 325//365 1379 | f 320//366 386//366 380//366 322//366 1380 | f 381//367 387//367 321//367 323//367 1381 | f 350//368 352//368 380//368 386//368 1382 | f 381//369 353//369 351//369 387//369 1383 | f 324//370 380//370 352//370 1384 | f 353//371 381//371 325//371 1385 | f 400//372 388//372 414//372 402//372 1386 | f 415//373 389//373 401//373 403//373 1387 | f 400//374 402//374 404//374 398//374 1388 | f 405//375 403//375 401//375 399//375 1389 | f 398//376 404//376 406//376 396//376 1390 | f 407//377 405//377 399//377 397//377 1391 | f 396//378 406//378 408//378 394//378 1392 | f 409//379 407//379 397//379 395//379 1393 | f 394//380 408//380 410//380 392//380 1394 | f 411//381 409//381 395//381 393//381 1395 | f 392//382 410//382 412//382 390//382 1396 | f 413//383 411//383 393//383 391//383 1397 | f 410//384 420//384 418//384 412//384 1398 | f 419//385 421//385 411//385 413//385 1399 | f 408//386 422//386 420//386 410//386 1400 | f 421//387 423//387 409//387 411//387 1401 | f 406//388 424//388 422//388 408//388 1402 | f 423//389 425//389 407//389 409//389 1403 | f 404//390 426//390 424//390 406//390 1404 | f 425//391 427//391 405//391 407//391 1405 | f 402//392 428//392 426//392 404//392 1406 | f 427//393 429//393 403//393 405//393 1407 | f 402//394 414//394 416//394 428//394 1408 | f 417//395 415//395 403//395 429//395 1409 | f 318//396 320//396 444//396 442//396 1410 | f 445//397 321//397 319//397 443//397 1411 | f 320//398 390//398 412//398 444//398 1412 | f 413//399 391//399 321//399 445//399 1413 | f 310//400 318//400 442//400 312//400 1414 | f 443//401 319//401 311//401 313//401 1415 | f 382//402 430//402 414//402 388//402 1416 | f 415//403 431//403 383//403 389//403 1417 | f 412//404 418//404 440//404 444//404 1418 | f 441//405 419//405 413//405 445//405 1419 | f 438//406 446//406 444//406 440//406 1420 | f 445//407 447//407 439//407 441//407 1421 | f 434//408 446//408 438//408 436//408 1422 | f 439//409 447//409 435//409 437//409 1423 | f 432//410 448//410 446//410 434//410 1424 | f 447//411 449//411 433//411 435//411 1425 | f 430//412 448//412 432//412 450//412 1426 | f 433//413 449//413 431//413 451//413 1427 | f 414//414 430//414 450//414 416//414 1428 | f 451//415 431//415 415//415 417//415 1429 | f 312//416 448//416 430//416 382//416 1430 | f 431//417 449//417 313//417 383//417 1431 | f 312//418 442//418 446//418 448//418 1432 | f 447//419 443//419 313//419 449//419 1433 | f 442//420 444//420 446//420 1434 | f 447//421 445//421 443//421 1435 | f 416//422 450//422 452//422 476//422 1436 | f 453//423 451//423 417//423 477//423 1437 | f 450//424 432//424 462//424 452//424 1438 | f 463//425 433//425 451//425 453//425 1439 | f 432//426 434//426 460//426 462//426 1440 | f 461//427 435//427 433//427 463//427 1441 | f 434//428 436//428 458//428 460//428 1442 | f 459//429 437//429 435//429 461//429 1443 | f 436//430 438//430 456//430 458//430 1444 | f 457//431 439//431 437//431 459//431 1445 | f 438//432 440//432 454//432 456//432 1446 | f 455//433 441//433 439//433 457//433 1447 | f 440//434 418//434 474//434 454//434 1448 | f 475//435 419//435 441//435 455//435 1449 | f 428//436 416//436 476//436 464//436 1450 | f 477//437 417//437 429//437 465//437 1451 | f 426//438 428//438 464//438 466//438 1452 | f 465//439 429//439 427//439 467//439 1453 | f 424//440 426//440 466//440 468//440 1454 | f 467//441 427//441 425//441 469//441 1455 | f 422//442 424//442 468//442 470//442 1456 | f 469//443 425//443 423//443 471//443 1457 | f 420//444 422//444 470//444 472//444 1458 | f 471//445 423//445 421//445 473//445 1459 | f 418//446 420//446 472//446 474//446 1460 | f 473//447 421//447 419//447 475//447 1461 | f 458//448 456//448 480//448 478//448 1462 | f 481//449 457//449 459//449 479//449 1463 | f 478//450 480//450 482//450 484//450 1464 | f 483//451 481//451 479//451 485//451 1465 | f 484//452 482//452 488//452 486//452 1466 | f 489//453 483//453 485//453 487//453 1467 | f 486//454 488//454 490//454 492//454 1468 | f 491//455 489//455 487//455 493//455 1469 | f 464//456 476//456 486//456 492//456 1470 | f 487//457 477//457 465//457 493//457 1471 | f 452//458 484//458 486//458 476//458 1472 | f 487//459 485//459 453//459 477//459 1473 | f 452//460 462//460 478//460 484//460 1474 | f 479//461 463//461 453//461 485//461 1475 | f 458//462 478//462 462//462 460//462 1476 | f 463//463 479//463 459//463 461//463 1477 | f 454//464 474//464 480//464 456//464 1478 | f 481//465 475//465 455//465 457//465 1479 | f 472//466 482//466 480//466 474//466 1480 | f 481//467 483//467 473//467 475//467 1481 | f 470//468 488//468 482//468 472//468 1482 | f 483//469 489//469 471//469 473//469 1483 | f 468//470 490//470 488//470 470//470 1484 | f 489//471 491//471 469//471 471//471 1485 | f 466//472 492//472 490//472 468//472 1486 | f 491//473 493//473 467//473 469//473 1487 | f 464//474 492//474 466//474 1488 | f 467//475 493//475 465//475 1489 | f 392//476 390//476 504//476 502//476 1490 | f 505//477 391//477 393//477 503//477 1491 | f 394//478 392//478 502//478 500//478 1492 | f 503//479 393//479 395//479 501//479 1493 | f 396//480 394//480 500//480 498//480 1494 | f 501//481 395//481 397//481 499//481 1495 | f 398//482 396//482 498//482 496//482 1496 | f 499//483 397//483 399//483 497//483 1497 | f 400//484 398//484 496//484 494//484 1498 | f 497//485 399//485 401//485 495//485 1499 | f 388//486 400//486 494//486 506//486 1500 | f 495//487 401//487 389//487 507//487 1501 | f 494//488 502//488 504//488 506//488 1502 | f 505//489 503//489 495//489 507//489 1503 | f 494//490 496//490 500//490 502//490 1504 | f 501//491 497//491 495//491 503//491 1505 | f 496//492 498//492 500//492 1506 | f 501//493 499//493 497//493 1507 | f 314//494 382//494 388//494 506//494 1508 | f 389//495 383//495 315//495 507//495 1509 | f 314//496 506//496 504//496 322//496 1510 | f 505//497 507//497 315//497 323//497 1511 | f 320//498 322//498 504//498 390//498 1512 | f 505//499 323//499 321//499 391//499 1513 | --------------------------------------------------------------------------------