├── .gitignore ├── Assets ├── Cloth.meta ├── Cloth │ ├── Editor.meta │ ├── Editor │ │ ├── ClothSpawnerEditor.cs │ │ └── ClothSpawnerEditor.cs.meta │ ├── Materials.meta │ ├── Materials │ │ ├── SimpleCloth.mat │ │ └── SimpleCloth.mat.meta │ ├── Resources.meta │ ├── Resources │ │ ├── ClothCompute.compute │ │ └── ClothCompute.compute.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── ClothSpawner.cs │ │ ├── ClothSpawner.cs.meta │ │ ├── GPUCollision.cs │ │ └── GPUCollision.cs.meta │ ├── Shaders.meta │ └── Shaders │ │ ├── GPUCollision.cginc │ │ ├── GPUCollision.cginc.meta │ │ ├── SimpleCloth.shader │ │ └── SimpleCloth.shader.meta ├── Prefabs.meta ├── Prefabs │ ├── ClothPrefab.prefab │ ├── ClothPrefab.prefab.meta │ ├── Euler.prefab │ ├── Euler.prefab.meta │ ├── Leapfrog.prefab │ └── Leapfrog.prefab.meta ├── Scenes.meta ├── Scenes │ ├── Burning Cloth.meta │ ├── Burning Cloth │ │ ├── BurnController.cs │ │ ├── BurnController.cs.meta │ │ ├── BurningCloth.mat │ │ ├── BurningCloth.mat.meta │ │ ├── BurningCloth.shader │ │ ├── BurningCloth.shader.meta │ │ ├── burnalpha.bmp │ │ ├── burnalpha.bmp.meta │ │ ├── flowmap.bmp │ │ └── flowmap.bmp.meta │ ├── Comparison.unity │ ├── Comparison.unity.meta │ ├── Scene.unity │ └── Scene.unity.meta ├── Scripts.meta └── Scripts │ ├── Mover.cs │ ├── Mover.cs.meta │ ├── ParameterAdjuster.cs │ ├── ParameterAdjuster.cs.meta │ ├── Walker.cs │ ├── Walker.cs.meta │ ├── WindController.cs │ ├── WindController.cs.meta │ ├── WindStrength.cs │ └── WindStrength.cs.meta ├── LICENSE ├── Logs └── Packages-Update.log ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset └── VFXManager.asset ├── README.md └── img └── cs4wZme.gif /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | [Ll]ibrary/ 4 | [Tt]emp/ 5 | [Oo]bj/ 6 | [Bb]uild/ 7 | [Bb]uilds/ 8 | Assets/AssetStoreTools* 9 | 10 | # Visual Studio cache directory 11 | .vs/ 12 | 13 | # Autogenerated VS/MD/Consulo solution and project files 14 | ExportedObj/ 15 | .consulo/ 16 | *.csproj 17 | *.unityproj 18 | *.sln 19 | *.suo 20 | *.tmp 21 | *.user 22 | *.userprefs 23 | *.pidb 24 | *.booproj 25 | *.svd 26 | *.pdb 27 | *.opendb 28 | 29 | # Unity3D generated meta files 30 | *.pidb.meta 31 | *.pdb.meta 32 | 33 | # Unity3D Generated File On Crash Reports 34 | sysinfo.txt 35 | 36 | # Builds 37 | *.apk 38 | *.unitypackage 39 | -------------------------------------------------------------------------------- /Assets/Cloth.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53b62310c68cd5947ac8723957b80bde 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78bc1f12f082e464dba9a06303541255 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Editor/ClothSpawnerEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | using System.Collections; 4 | 5 | [CustomEditor(typeof(ClothSpawner))] 6 | public class ClothSpawnerEditor : Editor { 7 | private bool showSimulationProperties = false; 8 | private bool showParallelSpringProperties = false; 9 | private bool showDiagonalSpringProperties = false; 10 | private bool showBendingSpringProperties = false; 11 | private bool showWindProperties = false; 12 | 13 | private SerializedProperty restrained; 14 | private SerializedProperty sphereColliders; 15 | 16 | void OnEnable() { 17 | restrained = serializedObject.FindProperty("restrained"); 18 | sphereColliders = serializedObject.FindProperty("sphereColliders"); 19 | } 20 | 21 | public override void OnInspectorGUI() { 22 | ClothSpawner clothSpawner = (ClothSpawner)target; 23 | 24 | EditorGUILayout.Space(); 25 | showSimulationProperties = EditorGUILayout.Foldout(showSimulationProperties, "Simulation Properties", true); 26 | if (showSimulationProperties) { 27 | clothSpawner.positionOffset = EditorGUILayout.Vector3Field("Position Offset", clothSpawner.positionOffset); 28 | 29 | // Disable certain parameters that cannot be changed at runtime. 30 | clothSpawner.method = (ClothSpawner.IntegrationMethod)EditorGUILayout.EnumPopup("Integration Method", clothSpawner.method); 31 | 32 | if (clothSpawner.WasSuccessfullyInitialized()) { 33 | GUI.enabled = false; 34 | } 35 | 36 | clothSpawner.resolution = (int)Mathf.Max(EditorGUILayout.IntField("Cloth Resolution", clothSpawner.resolution), 1.0f); 37 | clothSpawner.size = Mathf.Max(EditorGUILayout.FloatField("Cloth Size", clothSpawner.size), 1.0f); 38 | 39 | GUI.enabled = true; 40 | 41 | clothSpawner.loops = (int)Mathf.Max(EditorGUILayout.IntField("Simulation Loops per Timestep", clothSpawner.loops), 1.0f); 42 | clothSpawner.cor = EditorGUILayout.Slider("Coefficient of Restitution", clothSpawner.cor, 0f, 1f); 43 | clothSpawner.mass = Mathf.Max(EditorGUILayout.FloatField("Point Mass", clothSpawner.mass), 0.001f); 44 | } 45 | 46 | EditorGUILayout.Space(); 47 | showParallelSpringProperties = EditorGUILayout.Foldout(showParallelSpringProperties, "Parallel Spring Properties", true); 48 | if (showParallelSpringProperties) { 49 | clothSpawner.pScale = EditorGUILayout.Slider("Contribution", clothSpawner.pScale, 0f, 1f); 50 | clothSpawner.pKs = Mathf.Min(EditorGUILayout.FloatField("Spring Constant (ks)", clothSpawner.pKs), -1.0f); 51 | clothSpawner.pKd = Mathf.Min(EditorGUILayout.FloatField("Damping Constant (kd)", clothSpawner.pKd), 0.0f); 52 | } 53 | 54 | EditorGUILayout.Space(); 55 | showDiagonalSpringProperties = EditorGUILayout.Foldout(showDiagonalSpringProperties, "Diagonal Spring Properties", true); 56 | if (showDiagonalSpringProperties) { 57 | clothSpawner.dScale = EditorGUILayout.Slider("Contribution", clothSpawner.dScale, 0f, 1f); 58 | clothSpawner.dKs = Mathf.Min(EditorGUILayout.FloatField("Spring Constant (ks)", clothSpawner.dKs), -1.0f); 59 | clothSpawner.dKd = Mathf.Min(EditorGUILayout.FloatField("Damping Constant (kd)", clothSpawner.dKd), 0.0f); 60 | } 61 | 62 | EditorGUILayout.Space(); 63 | showBendingSpringProperties = EditorGUILayout.Foldout(showBendingSpringProperties, "Bending Spring Properties", true); 64 | if (showBendingSpringProperties) { 65 | clothSpawner.bScale = EditorGUILayout.Slider("Contribution", clothSpawner.bScale, 0f, 1f); 66 | clothSpawner.bKs = Mathf.Min(EditorGUILayout.FloatField("Spring Constant (ks)", clothSpawner.bKs), -1.0f); 67 | clothSpawner.bKd = Mathf.Min(EditorGUILayout.FloatField("Damping Constant (kd)", clothSpawner.bKd), 0.0f); 68 | } 69 | 70 | EditorGUILayout.Space(); 71 | showWindProperties = EditorGUILayout.Foldout(showWindProperties, "Wind Properties", true); 72 | if (showWindProperties) { 73 | clothSpawner.windScale = EditorGUILayout.Slider("Contribution", clothSpawner.windScale, 0f, 1f); 74 | clothSpawner.dragCoefficient = Mathf.Max(EditorGUILayout.FloatField("Drag Coefficient (cd)", clothSpawner.dragCoefficient), 1.0f); 75 | clothSpawner.windVelocity = EditorGUILayout.Vector3Field("Wind Velocity", clothSpawner.windVelocity); 76 | } 77 | 78 | EditorGUILayout.Space(); 79 | EditorGUILayout.PropertyField(restrained, true); 80 | serializedObject.ApplyModifiedProperties(); 81 | 82 | EditorGUILayout.Space(); 83 | clothSpawner.copyFromScene = EditorGUILayout.Toggle("Copy From Scene", clothSpawner.copyFromScene); 84 | EditorGUILayout.PropertyField(sphereColliders, true); 85 | serializedObject.ApplyModifiedProperties(); 86 | 87 | clothSpawner.Recalculate(); 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /Assets/Cloth/Editor/ClothSpawnerEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8099241ca2767684396a661b6c891b50 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Cloth/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 24b8b0061c4f8444984d203712d4e22e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Materials/SimpleCloth.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: SimpleCloth 11 | m_Shader: {fileID: 4800000, guid: 9218509a77cc3534baba7ab55ad9496d, type: 3} 12 | m_ShaderKeywords: _EMISSION 13 | m_LightmapFlags: 0 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 | - _Diffuse: 23 | m_Texture: {fileID: 2800000, guid: a08960dd6e8274e7f8fca616e09c48ed, type: 3} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _texcoord: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | m_Floats: 31 | - __dirty: 0 32 | m_Colors: [] 33 | -------------------------------------------------------------------------------- /Assets/Cloth/Materials/SimpleCloth.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5d32e0489174e344bf5e5f7167cfd61 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a0c0f552a4576240960dbfe2bda1ac4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Resources/ClothCompute.compute: -------------------------------------------------------------------------------- 1 | #include "../Shaders/GPUCollision.cginc" 2 | #pragma kernel Spring 3 | #pragma kernel Drag 4 | #pragma kernel Integrate 5 | 6 | 7 | 8 | // 9 | // SIMULATION STORAGE 10 | // 11 | 12 | /* Buffers to hold the current position, velocity, and force of each node. */ 13 | RWStructuredBuffer positionBuffer; 14 | RWStructuredBuffer velocityBuffer; 15 | RWStructuredBuffer forceBuffer; 16 | 17 | /* A list of which nodes are fixed (1) or not (0). */ 18 | RWStructuredBuffer restrainedBuffer; 19 | 20 | /* The total number of nodes, and the number of nodes per row in the cloth. */ 21 | uint count, dim; 22 | 23 | /* A list of triangles, where each component of the uint3 is a node index. */ 24 | RWStructuredBuffer triangleBuffer; 25 | uint triangleCount; 26 | 27 | 28 | 29 | // 30 | // COLLISION STORAGE 31 | // 32 | 33 | RWStructuredBuffer sphereBuffer; 34 | uint sphereCount; 35 | 36 | 37 | 38 | // 39 | // SIMULATION PARAMETERS 40 | // 41 | 42 | uint euler; 43 | 44 | float mass; 45 | float cor; 46 | float dt; 47 | 48 | /* Wind parameters. */ 49 | float windScale; 50 | float dragCoefficient; 51 | float3 windVelocity; 52 | 53 | /* Spring parameters (multiplier, rest length, spring constant, damping constant) 54 | for parallel, diagonal, and bending springs. */ 55 | float pScale, pRl, pKs, pKd; 56 | float dScale, dRl, dKs, dKd; 57 | float bScale, bRl, bKs, bKd; 58 | 59 | 60 | 61 | // 62 | // INDEXING UTILITIES 63 | // 64 | 65 | /* Converts 1D buffer index to hypothetical 2D index. */ 66 | int2 To2D(uint id) { 67 | return int2(id%dim, id/dim); 68 | } 69 | 70 | /* Converts hypothetical 2D index to 1D buffer index. */ 71 | uint To1D(int2 id) { 72 | return (uint)(id.y * dim + id.x); 73 | } 74 | 75 | /* Returns whether the 2d index is valid, i.e. within the cloth. */ 76 | bool IsValid2D(int2 id) { 77 | return !(id.x < 0 || id.x >= (int)dim || id.y < 0 || id.y >= (int)dim); 78 | } 79 | 80 | 81 | 82 | // 83 | // SPRING FORCE CALCULATORS 84 | // 85 | 86 | /* Gets the force on node A by the spring AB. */ 87 | float3 GetSpringForce(uint a, uint b, float restLength, float ks, float kd) { 88 | float3 aPos = positionBuffer[a]; 89 | float3 bPos = positionBuffer[b]; 90 | 91 | float3 aVel = velocityBuffer[a]; 92 | float3 bVel = velocityBuffer[b]; 93 | 94 | if (length(bPos - aPos) < 0.00001) { 95 | return float3(0,0,0); 96 | } 97 | 98 | float3 dir = normalize(bPos - aPos); 99 | 100 | float springForce = -ks * (length(bPos-aPos) - restLength); 101 | float dampingForce = -kd * (dot(bVel, dir)-dot(aVel, dir)); 102 | // float dampingForce = -kd * dot(bVel-aVel, dir); // same thing 103 | 104 | return (springForce + dampingForce)*dir; 105 | } 106 | 107 | /* Get the forces from all parallel springs acting on node i. */ 108 | float3 GetParallelSpringForces(uint i) { 109 | float3 force = float3(0,0,0); 110 | 111 | int2 above = To2D(i) + int2(0, 1); 112 | int2 below = To2D(i) + int2(0, -1); 113 | int2 left = To2D(i) + int2(-1, 0); 114 | int2 right = To2D(i) + int2(1, 0); 115 | 116 | if (IsValid2D(above)) { 117 | force += GetSpringForce(i, To1D(above), pRl, pKs, pKd); 118 | } 119 | 120 | if (IsValid2D(below)) { 121 | force += GetSpringForce(i, To1D(below), pRl, pKs, pKd); 122 | } 123 | 124 | if (IsValid2D(left)) { 125 | force += GetSpringForce(i, To1D(left), pRl, pKs, pKd); 126 | } 127 | 128 | if (IsValid2D(right)) { 129 | force += GetSpringForce(i, To1D(right), pRl, pKs, pKd); 130 | } 131 | 132 | return force; 133 | } 134 | 135 | /* Get the forces from all diagonal springs acting on node i. */ 136 | float3 GetDiagonalSpringForces(uint i) { 137 | float3 force = float3(0,0,0); 138 | 139 | int2 ll = To2D(i) + int2(-1, -1); 140 | int2 ul = To2D(i) + int2(-1, 1); 141 | int2 lr = To2D(i) + int2(1, -1); 142 | int2 ur = To2D(i) + int2(1, 1); 143 | 144 | if (IsValid2D(ll)) { 145 | force += GetSpringForce(i, To1D(ll), dRl, dKs, dKd); 146 | } 147 | 148 | if (IsValid2D(ul)) { 149 | force += GetSpringForce(i, To1D(ul), dRl, dKs, dKd); 150 | } 151 | 152 | if (IsValid2D(lr)) { 153 | force += GetSpringForce(i, To1D(lr), dRl, dKs, dKd); 154 | } 155 | 156 | if (IsValid2D(ur)) { 157 | force += GetSpringForce(i, To1D(ur), dRl, dKs, dKd); 158 | } 159 | 160 | return force; 161 | } 162 | 163 | /* Get the forces from all bending springs acting on node i. */ 164 | float3 GetBendingSpringForces(uint i) { 165 | float3 force = float3(0,0,0); 166 | 167 | int2 ll = To2D(i) + int2(-2, -2); 168 | int2 ul = To2D(i) + int2(-2, 2); 169 | int2 lr = To2D(i) + int2(2, -2); 170 | int2 ur = To2D(i) + int2(2, 2); 171 | 172 | if (IsValid2D(ll)) { 173 | force += GetSpringForce(i, To1D(ll), bRl, bKs, bKd); 174 | } 175 | 176 | if (IsValid2D(ul)) { 177 | force += GetSpringForce(i, To1D(ul), bRl, bKs, bKd); 178 | } 179 | 180 | if (IsValid2D(lr)) { 181 | force += GetSpringForce(i, To1D(lr), bRl, bKs, bKd); 182 | } 183 | 184 | if (IsValid2D(ur)) { 185 | force += GetSpringForce(i, To1D(ur), bRl, bKs, bKd); 186 | } 187 | 188 | return force; 189 | } 190 | 191 | 192 | // 193 | // KERNEL METHODS 194 | // 195 | 196 | [numthreads(256, 1, 1)] 197 | void Spring (uint3 id : SV_DispatchThreadID) { 198 | 199 | if (id.x < count) { 200 | forceBuffer[id.x] += GetParallelSpringForces(id.x) * saturate(pScale); 201 | forceBuffer[id.x] += GetDiagonalSpringForces(id.x) * saturate(dScale); 202 | forceBuffer[id.x] += GetBendingSpringForces(id.x) * saturate(bScale); 203 | } 204 | } 205 | 206 | [numthreads(256, 1, 1)] 207 | void Drag(uint3 id : SV_DispatchThreadID) { 208 | if (id.x < triangleCount) { 209 | 210 | // get vertex ids from triangle buffer 211 | uint a = triangleBuffer[id.x].x; 212 | uint b = triangleBuffer[id.x].y; 213 | uint c = triangleBuffer[id.x].z; 214 | 215 | float rho = 1.225; // kg/m^3, density of air at sea level 216 | 217 | // velocity of triangle relative to air 218 | float3 velocity = (velocityBuffer[a]+velocityBuffer[b]+velocityBuffer[c])/3.0 - windVelocity; 219 | 220 | // triangle normal 221 | float3 normal = normalize(cross(positionBuffer[b]-positionBuffer[a], positionBuffer[c]-positionBuffer[a])); 222 | 223 | // triangle area, and cross sectional area (area exposed to flow) 224 | float area = 0.5 * length(cross(positionBuffer[b]-positionBuffer[a], positionBuffer[c]-positionBuffer[a])); 225 | float crossSectionArea = area * dot(velocity, normal); 226 | 227 | // error before, on first frame velocities are all 0 so length(velocity) == 0 causing division by zero 228 | if (length(velocity) > 0.000001) { 229 | crossSectionArea /= length(velocity); 230 | } 231 | 232 | float3 force = -0.5 * rho * pow(length(velocity), 2.0) * dragCoefficient * crossSectionArea * normal; 233 | 234 | // divide force by three, distributed across 3 vertices 235 | forceBuffer[a] += force/3.0 * saturate(windScale); 236 | forceBuffer[b] += force/3.0 * saturate(windScale); 237 | forceBuffer[c] += force/3.0 * saturate(windScale); 238 | } 239 | } 240 | 241 | 242 | 243 | [numthreads(256, 1, 1)] 244 | void Integrate (uint3 id : SV_DispatchThreadID) { 245 | if (id.x < count) { 246 | float3 g = float3(0, -9.81, 0); 247 | 248 | float3 a = g + forceBuffer[id.x]/mass; 249 | 250 | if (restrainedBuffer[id.x] == 0) { 251 | 252 | float3 op = positionBuffer[id.x]; 253 | 254 | if (euler == 0) { 255 | positionBuffer[id.x] += velocityBuffer[id.x] * dt; 256 | velocityBuffer[id.x] += a * dt; 257 | } 258 | else { 259 | // Leapfrog integration, where the velocity is off from the position 260 | // by a half-step. 261 | velocityBuffer[id.x] += a * dt; 262 | positionBuffer[id.x] += velocityBuffer[id.x] * dt; 263 | } 264 | 265 | // Collision detection. 266 | Ray r; 267 | r.origin = op; 268 | r.direction = (positionBuffer[id.x] - op); 269 | 270 | for (uint s = 0; s < sphereCount; s++) { 271 | Hit h = RaySphereCollision(r, sphereBuffer[s], 0.05); 272 | if (h.collision) { 273 | positionBuffer[id.x] = h.hitPoint; 274 | velocityBuffer[id.x] = saturate(cor) * Reflect(velocityBuffer[id.x], h.hitNormal); 275 | } 276 | } 277 | } 278 | } 279 | } 280 | -------------------------------------------------------------------------------- /Assets/Cloth/Resources/ClothCompute.compute.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0c901fb95de9c6458849ef702d16d71 3 | ComputeShaderImporter: 4 | externalObjects: {} 5 | currentAPIMask: 4 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15c58c4ec56e87749aa23d89ab7e8db1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Scripts/ClothSpawner.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | [RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] 6 | public class ClothSpawner : MonoBehaviour { 7 | 8 | public enum IntegrationMethod {EULARIAN, LEAPFROG}; 9 | 10 | // Simulation settings. 11 | public Vector3 positionOffset = Vector3.zero; 12 | public IntegrationMethod method = IntegrationMethod.EULARIAN; // Not changeable at runtime. 13 | public int resolution = 25; // Not changeable at runtime. 14 | public float size = 10f; // Not changeable at runtime. 15 | public int loops = 500; 16 | public float cor = 0.1f; 17 | public float mass = 1.0f; 18 | 19 | // parallel spring parameters 20 | public float pScale = 1.0f; 21 | public float pKs = -10000.0f; 22 | public float pKd = -1000.0f; 23 | 24 | // Diagonal spring parameters. 25 | public float dScale = 1.0f; 26 | public float dKs = -10000.0f; 27 | public float dKd = -1000.0f; 28 | 29 | // Bending spring parameters. 30 | public float bScale = 1.0f; 31 | public float bKs = -10000.0f; 32 | public float bKd = -1000.0f; 33 | 34 | // Wind / drag parameters. 35 | public float windScale = 1.0f; 36 | public float dragCoefficient = 50.0f; 37 | public Vector3 windVelocity = Vector3.zero; 38 | 39 | // Restrained vertex ids. 40 | public int[] restrained; 41 | 42 | // Mesh and mesh arrays. 43 | private Mesh mesh; 44 | private Vector3[] vertices; 45 | private int[] triangles; 46 | 47 | // Compute shader and kernels. 48 | public ComputeShader clothCompute; 49 | private int springKernel; 50 | private int dragKernel; 51 | private int integrateKernel; 52 | 53 | // Compute buffers. 54 | private ComputeBuffer positionBuffer; 55 | private ComputeBuffer velocityBuffer; 56 | private ComputeBuffer forceBuffer; 57 | private ComputeBuffer restrainedBuffer; 58 | private ComputeBuffer triangleBuffer; 59 | 60 | // Other. 61 | private int count; // total number of nodes. 62 | private int dim; // number of nodes per row in cloth. 63 | private float segmentLength; // length of one square of cloth. 64 | private Vector3[] zeros; 65 | private bool successfullyInitialized = false; 66 | 67 | // Collision. 68 | public bool copyFromScene; 69 | public GPUCollision.SphereCollider[] sphereColliders; 70 | private ComputeBuffer sphereBuffer; 71 | private int sphereCount = 0; 72 | 73 | public void Recalculate() { 74 | // Update the resolution-related parameters. 75 | dim = resolution + 1; 76 | count = dim*dim; 77 | 78 | segmentLength = size / (float)resolution; 79 | 80 | // Recalculate the vertices array to be drawn as gizmos. 81 | vertices = new Vector3[count]; 82 | for (int y = 0; y < dim; y++) { 83 | for (int x = 0; x < dim; x++) { 84 | vertices[y*dim+x] = new Vector3((float)x*segmentLength, 0f, (float)y*segmentLength) + positionOffset; 85 | } 86 | } 87 | } 88 | 89 | 90 | 91 | void Awake() { 92 | clothCompute = (ComputeShader)Instantiate(Resources.Load("ClothCompute")); 93 | 94 | // Recalculate all parameters one final time. 95 | Recalculate(); 96 | 97 | // Create and set the mesh. 98 | mesh = CreateMesh("ClothMesh"); 99 | GetComponent().mesh = mesh; 100 | 101 | // Create and set the position buffer. 102 | positionBuffer = new ComputeBuffer(count, 12); 103 | positionBuffer.SetData(vertices); 104 | 105 | // Create the zeros array. 106 | zeros = new Vector3[count]; 107 | for (int i = 0; i < count; i++) { 108 | zeros[i] = Vector3.zero; 109 | } 110 | 111 | // Create and set the velocity buffer. 112 | velocityBuffer = new ComputeBuffer(count, 12); 113 | velocityBuffer.SetData(zeros); 114 | 115 | // Create and set the force buffer. 116 | forceBuffer = new ComputeBuffer(count, 12); 117 | forceBuffer.SetData(zeros); 118 | 119 | // Create an array representing which vertices to hold fixed. 120 | int[] restrainedArray = new int[count]; 121 | for (int i = 0; i < count; i++) { 122 | restrainedArray[i] = (System.Array.Exists(restrained, element => element == i)) ? 1 : 0; 123 | } 124 | 125 | // Create and set the restrained buffer. 126 | restrainedBuffer = new ComputeBuffer(count, 4); 127 | restrainedBuffer.SetData(restrainedArray); 128 | 129 | // Create an array to hold the triangles as integer vectors. 130 | Vector3Int[] triangleArray = new Vector3Int[triangles.Length/3]; 131 | for (int i = 0; i < triangles.Length; i += 3) { 132 | triangleArray[i/3] = new Vector3Int(triangles[i], triangles[i+1], triangles[i+2]); 133 | } 134 | 135 | // Create and set the triangle buffer. 136 | triangleBuffer = new ComputeBuffer(triangleArray.Length, 12); 137 | triangleBuffer.SetData(triangleArray); 138 | 139 | // Get the kernels from the compute shader. 140 | springKernel = clothCompute.FindKernel("Spring"); 141 | dragKernel = clothCompute.FindKernel("Drag"); 142 | integrateKernel = clothCompute.FindKernel("Integrate"); 143 | 144 | // Upload the buffers to the gpu, and make them available to each kernel. 145 | clothCompute.SetBuffer(springKernel, "positionBuffer", positionBuffer); 146 | clothCompute.SetBuffer(springKernel, "velocityBuffer", velocityBuffer); 147 | clothCompute.SetBuffer(springKernel, "forceBuffer", forceBuffer); 148 | 149 | clothCompute.SetBuffer(dragKernel, "positionBuffer", positionBuffer); 150 | clothCompute.SetBuffer(dragKernel, "velocityBuffer", velocityBuffer); 151 | clothCompute.SetBuffer(dragKernel, "forceBuffer", forceBuffer); 152 | clothCompute.SetBuffer(dragKernel, "triangleBuffer", triangleBuffer); // only need triangles for drag calculations. 153 | 154 | clothCompute.SetBuffer(integrateKernel, "positionBuffer", positionBuffer); 155 | clothCompute.SetBuffer(integrateKernel, "velocityBuffer", velocityBuffer); 156 | clothCompute.SetBuffer(integrateKernel, "forceBuffer", forceBuffer); 157 | clothCompute.SetBuffer(integrateKernel, "restrainedBuffer", restrainedBuffer); // only need fixed vertices during integration phase. 158 | 159 | // Upload the constant parameters to the gpu. 160 | clothCompute.SetInt("count", count); 161 | clothCompute.SetInt("dim", dim); 162 | clothCompute.SetInt("triangleCount", triangleArray.Length); 163 | 164 | clothCompute.SetFloat("pRl", segmentLength); 165 | clothCompute.SetFloat("dRl", segmentLength * Mathf.Sqrt(2.0f)); 166 | clothCompute.SetFloat("bRl", segmentLength * Mathf.Sqrt(2.0f) * 2.0f); 167 | 168 | clothCompute.SetInt("euler", 1); 169 | 170 | if (method == IntegrationMethod.LEAPFROG) { 171 | // compute half-step ahead positions by eulerian integration for leapfrog method. 172 | 173 | // Update the positions to a half time step 174 | UpdateSimulation(1, Time.deltaTime*0.5f); 175 | 176 | // Clear out the velocity buffer to "reset" it, since the velocity is advanced first in 177 | // leapfrog method. 178 | velocityBuffer.SetData(zeros); 179 | 180 | clothCompute.SetInt("euler", 0); 181 | } 182 | 183 | // Initialization was successful. 184 | successfullyInitialized = true; 185 | } 186 | 187 | 188 | 189 | void UpdateSimulation(int t, float dt) { 190 | // Update the dynamic simulation variables. 191 | clothCompute.SetFloat("mass", mass); 192 | clothCompute.SetFloat("cor", cor); 193 | clothCompute.SetFloat("dt", dt/(float)t); 194 | 195 | clothCompute.SetFloat("windScale", windScale); 196 | clothCompute.SetFloat("dragCoefficient", dragCoefficient); 197 | clothCompute.SetVector("windVelocity", windVelocity); 198 | 199 | clothCompute.SetFloat("pScale", pScale); 200 | clothCompute.SetFloat("pKs", pKs); 201 | clothCompute.SetFloat("pKd", pKd); 202 | 203 | clothCompute.SetFloat("dScale", dScale); 204 | clothCompute.SetFloat("dKs", dKs); 205 | clothCompute.SetFloat("dKd", dKd); 206 | 207 | clothCompute.SetFloat("bScale", bScale); 208 | clothCompute.SetFloat("bKs", bKs); 209 | clothCompute.SetFloat("bKd", bKd); 210 | 211 | // Reset sphereColliders array from scene, if enabled. 212 | if (copyFromScene) { 213 | SphereCollider[] inScene = FindObjectsOfType(); 214 | sphereColliders = new GPUCollision.SphereCollider[inScene.Length]; 215 | for (int i = 0; i < inScene.Length; i++) { 216 | sphereColliders[i].center = inScene[i].transform.TransformPoint(inScene[i].center); 217 | sphereColliders[i].radius = inScene[i].radius; 218 | } 219 | } 220 | 221 | // Update the collision buffers. 222 | if (sphereBuffer != null) { 223 | sphereBuffer.Release(); 224 | } 225 | 226 | if (sphereColliders != null && sphereColliders.Length > 0) { 227 | sphereCount = sphereColliders.Length; 228 | sphereBuffer = new ComputeBuffer(sphereCount, GPUCollision.SphereColliderSize()); 229 | sphereBuffer.SetData(sphereColliders); 230 | clothCompute.SetInt("sphereCount", sphereCount); 231 | clothCompute.SetBuffer(integrateKernel, "sphereBuffer", sphereBuffer); 232 | } 233 | else { 234 | clothCompute.SetInt("sphereCount", 0); 235 | } 236 | 237 | // Advance the simulation n times. 238 | for (int i = 0; i < t; i++) { 239 | // Clear the force buffer. 240 | forceBuffer.SetData(zeros); 241 | 242 | // Accumulate the spring and drag forces. 243 | clothCompute.Dispatch(springKernel, count/256+1, 1, 1); 244 | clothCompute.Dispatch(dragKernel, (triangles.Length/3)/256+1, 1, 1); 245 | 246 | // Update the simulation. 247 | clothCompute.Dispatch(integrateKernel, count/256+1, 1, 1); 248 | } 249 | } 250 | 251 | 252 | 253 | void FixedUpdate() { 254 | if (successfullyInitialized) { 255 | UpdateSimulation(loops, Time.deltaTime); 256 | 257 | // Get the recalculated positions back and set them as the mesh vertices. 258 | positionBuffer.GetData(vertices); 259 | mesh.vertices = vertices; 260 | 261 | // Recalculate the mesh normals. 262 | mesh.RecalculateNormals(); 263 | } 264 | } 265 | 266 | 267 | 268 | void OnDestroy() { 269 | if (positionBuffer != null) { 270 | positionBuffer.Release(); 271 | } 272 | 273 | if (velocityBuffer != null) { 274 | velocityBuffer.Release(); 275 | } 276 | 277 | if (forceBuffer != null) { 278 | forceBuffer.Release(); 279 | } 280 | 281 | if (restrainedBuffer != null) { 282 | restrainedBuffer.Release(); 283 | } 284 | 285 | if (triangleBuffer != null) { 286 | triangleBuffer.Release(); 287 | } 288 | 289 | if (sphereBuffer != null) { 290 | sphereBuffer.Release(); 291 | } 292 | } 293 | 294 | 295 | 296 | void OnDrawGizmos() { 297 | if (vertices != null && !successfullyInitialized) { 298 | for (int i = 0; i < vertices.Length; i++) { 299 | if (restrained != null && System.Array.Exists(restrained, element => element == i)) { 300 | Gizmos.color = Color.red; 301 | Gizmos.DrawSphere(vertices[i], segmentLength*0.25f); 302 | } 303 | else { 304 | Gizmos.color = Color.white; 305 | Gizmos.DrawSphere(vertices[i], segmentLength*0.125f); 306 | } 307 | } 308 | } 309 | 310 | if (sphereColliders != null) { 311 | foreach (GPUCollision.SphereCollider s in sphereColliders) { 312 | Gizmos.DrawWireSphere(s.center, s.radius); 313 | } 314 | } 315 | } 316 | 317 | 318 | 319 | 320 | private Mesh CreateMesh(string name) { 321 | Mesh mesh = new Mesh(); 322 | mesh.name = name; 323 | 324 | mesh.vertices = vertices; 325 | 326 | triangles = new int[resolution*resolution * 6]; 327 | for (int ti = 0, vi = 0, y = 0; y < resolution; y++, vi++) { 328 | for (int x = 0; x < resolution; x++, ti += 6, vi++) { 329 | triangles[ti] = vi; 330 | triangles[ti + 3] = triangles[ti + 2] = vi + 1; 331 | triangles[ti + 4] = triangles[ti + 1] = vi + resolution + 1; 332 | triangles[ti + 5] = vi + resolution + 2; 333 | } 334 | } 335 | mesh.triangles = triangles; 336 | 337 | Vector2[] uvs = new Vector2[vertices.Length]; 338 | for (int y = 0; y < dim; y++) { 339 | for (int x = 0; x < dim; x++) { 340 | float u = (float)x/(float)resolution; 341 | float v = (float)y/(float)resolution; 342 | uvs[y*dim+x] = new Vector2(u, v); 343 | } 344 | } 345 | mesh.uv = uvs; 346 | 347 | mesh.RecalculateNormals(); 348 | return mesh; 349 | } 350 | 351 | public bool WasSuccessfullyInitialized() { 352 | return successfullyInitialized; 353 | } 354 | } -------------------------------------------------------------------------------- /Assets/Cloth/Scripts/ClothSpawner.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bdd779c478425d47b8e380f48cf0f3d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Cloth/Scripts/GPUCollision.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class GPUCollision { 6 | [System.Serializable] 7 | public struct SphereCollider { 8 | public Vector3 center; 9 | public float radius; 10 | } 11 | 12 | public static int SphereColliderSize() { 13 | return 16; 14 | } 15 | 16 | 17 | 18 | [System.Serializable] 19 | public struct BoxCollider { 20 | public Vector3 center, extents; 21 | } 22 | 23 | public static int BoxColliderSize() { 24 | return 24; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Cloth/Scripts/GPUCollision.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76ad2ff158120cb42af8957c9460d837 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Cloth/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 533ea21d426dc8e478d8f38a452721ce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Shaders/GPUCollision.cginc: -------------------------------------------------------------------------------- 1 | // 2 | // DEFINES 3 | // 4 | 5 | #define EPSILON 0.001 6 | 7 | 8 | 9 | // 10 | // TYPES 11 | // 12 | 13 | struct Ray { 14 | float3 origin, direction; 15 | }; 16 | 17 | struct SphereCollider { 18 | float3 center; 19 | float radius; 20 | }; 21 | 22 | struct BoxCollider { 23 | float3 center; 24 | float3 extents; 25 | }; 26 | 27 | struct Hit { 28 | bool collision; 29 | float3 hitPoint, hitNormal; 30 | }; 31 | 32 | 33 | // 34 | // UTILITY METHODS 35 | // 36 | 37 | float3 NearestPointOnRay(Ray r, float3 p) { 38 | // If the ray is sufficiently short, just return the midpoint. 39 | if (length(r.direction) < EPSILON) { 40 | return r.origin +r.direction/2.0; 41 | } 42 | 43 | float t = dot(p - r.origin, r.direction)/dot(r.direction, r.direction); 44 | return r.origin + t*normalize(r.direction); 45 | } 46 | 47 | float3 Reflect(float3 original, float3 normal) { 48 | return original - 2.0*dot(original, normal)*normal; 49 | } 50 | 51 | 52 | 53 | // 54 | // COLLISIONS 55 | // 56 | 57 | /* Ray Sphere Intersection. */ 58 | Hit RaySphereCollision(Ray r, SphereCollider s, float padding) { 59 | Hit h; 60 | h.collision = false; 61 | h.hitPoint = float3(0,0,0); 62 | h.hitNormal = float3(0,1,0); 63 | 64 | // Get the nearest point along the line to the sphere center. 65 | float3 nearestPoint = NearestPointOnRay(r, s.center); 66 | 67 | /* If the nearest point on the ray is less than the radius of the sphere, 68 | then the ray must have passed through the sphere. */ 69 | if (length(nearestPoint - s.center) <= s.radius+padding) { 70 | h.collision = true; 71 | h.hitNormal = normalize(nearestPoint - s.center); 72 | h.hitPoint = nearestPoint + h.hitNormal*EPSILON; 73 | } 74 | 75 | return h; 76 | } 77 | 78 | Hit RayBoxCollision(Ray r, BoxCollider b) { 79 | Hit h; 80 | h.collision = false; 81 | h.hitPoint = float3(0, 0, 0); 82 | h.hitNormal = h.hitPoint; 83 | 84 | 85 | 86 | 87 | return h; 88 | } 89 | -------------------------------------------------------------------------------- /Assets/Cloth/Shaders/GPUCollision.cginc.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8429608f2aa4bb84faf9ff13cf3a97a2 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Cloth/Shaders/SimpleCloth.shader: -------------------------------------------------------------------------------- 1 | // Made with Amplify Shader Editor 2 | // Available at the Unity Asset Store - http://u3d.as/y3X 3 | Shader "SimpleCloth" 4 | { 5 | Properties 6 | { 7 | _Diffuse("Diffuse", 2D) = "white" {} 8 | [HideInInspector] _texcoord( "", 2D ) = "white" {} 9 | [HideInInspector] __dirty( "", Int ) = 1 10 | } 11 | 12 | SubShader 13 | { 14 | Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" } 15 | Cull Off 16 | CGINCLUDE 17 | #include "UnityCG.cginc" 18 | #include "UnityPBSLighting.cginc" 19 | #include "Lighting.cginc" 20 | #pragma target 3.0 21 | struct Input 22 | { 23 | float3 worldPos; 24 | float3 worldNormal; 25 | half ASEVFace : VFACE; 26 | half2 uv_texcoord; 27 | }; 28 | 29 | uniform sampler2D _Diffuse; 30 | uniform float4 _Diffuse_ST; 31 | 32 | inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten ) 33 | { 34 | return half4 ( 0, 0, 0, s.Alpha ); 35 | } 36 | 37 | void surf( Input i , inout SurfaceOutput o ) 38 | { 39 | float3 ase_worldPos = i.worldPos; 40 | #if defined(LIGHTMAP_ON) && UNITY_VERSION < 560 //aseld 41 | float3 ase_worldlightDir = 0; 42 | #else //aseld 43 | float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) ); 44 | #endif //aseld 45 | half3 ase_worldNormal = i.worldNormal; 46 | float dotResult2 = dot( ase_worldlightDir , ase_worldNormal ); 47 | float dotResult3 = dot( -ase_worldlightDir , ase_worldNormal ); 48 | float switchResult1 = (((i.ASEVFace>0)?(dotResult2):(dotResult3))); 49 | float2 uv_Diffuse = i.uv_texcoord * _Diffuse_ST.xy + _Diffuse_ST.zw; 50 | o.Emission = ( max( switchResult1 , 0.2 ) * tex2D( _Diffuse, uv_Diffuse ) ).rgb; 51 | o.Alpha = 1; 52 | } 53 | 54 | ENDCG 55 | CGPROGRAM 56 | #pragma surface surf Unlit keepalpha fullforwardshadows 57 | 58 | ENDCG 59 | Pass 60 | { 61 | Name "ShadowCaster" 62 | Tags{ "LightMode" = "ShadowCaster" } 63 | ZWrite On 64 | CGPROGRAM 65 | #pragma vertex vert 66 | #pragma fragment frag 67 | #pragma target 3.0 68 | #pragma multi_compile_shadowcaster 69 | #pragma multi_compile UNITY_PASS_SHADOWCASTER 70 | #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 71 | #include "HLSLSupport.cginc" 72 | #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN ) 73 | #define CAN_SKIP_VPOS 74 | #endif 75 | #include "UnityCG.cginc" 76 | #include "Lighting.cginc" 77 | #include "UnityPBSLighting.cginc" 78 | struct v2f 79 | { 80 | V2F_SHADOW_CASTER; 81 | float2 customPack1 : TEXCOORD1; 82 | float3 worldPos : TEXCOORD2; 83 | float3 worldNormal : TEXCOORD3; 84 | UNITY_VERTEX_INPUT_INSTANCE_ID 85 | }; 86 | v2f vert( appdata_full v ) 87 | { 88 | v2f o; 89 | UNITY_SETUP_INSTANCE_ID( v ); 90 | UNITY_INITIALIZE_OUTPUT( v2f, o ); 91 | UNITY_TRANSFER_INSTANCE_ID( v, o ); 92 | Input customInputData; 93 | float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz; 94 | half3 worldNormal = UnityObjectToWorldNormal( v.normal ); 95 | o.worldNormal = worldNormal; 96 | o.customPack1.xy = customInputData.uv_texcoord; 97 | o.customPack1.xy = v.texcoord; 98 | o.worldPos = worldPos; 99 | TRANSFER_SHADOW_CASTER_NORMALOFFSET( o ) 100 | return o; 101 | } 102 | half4 frag( v2f IN 103 | #if !defined( CAN_SKIP_VPOS ) 104 | , UNITY_VPOS_TYPE vpos : VPOS 105 | #endif 106 | ) : SV_Target 107 | { 108 | UNITY_SETUP_INSTANCE_ID( IN ); 109 | Input surfIN; 110 | UNITY_INITIALIZE_OUTPUT( Input, surfIN ); 111 | surfIN.uv_texcoord = IN.customPack1.xy; 112 | float3 worldPos = IN.worldPos; 113 | half3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) ); 114 | surfIN.worldPos = worldPos; 115 | surfIN.worldNormal = IN.worldNormal; 116 | SurfaceOutput o; 117 | UNITY_INITIALIZE_OUTPUT( SurfaceOutput, o ) 118 | surf( surfIN, o ); 119 | #if defined( CAN_SKIP_VPOS ) 120 | float2 vpos = IN.pos; 121 | #endif 122 | SHADOW_CASTER_FRAGMENT( IN ) 123 | } 124 | ENDCG 125 | } 126 | } 127 | Fallback "Diffuse" 128 | CustomEditor "ASEMaterialInspector" 129 | } 130 | /*ASEBEGIN 131 | Version=16211 132 | 204;92;1437;650;1911.354;336.8272;1.717051;True;False 133 | Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;4;-1478.005,48.53435;Float;False;False;1;0;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 134 | Node;AmplifyShaderEditor.NegateNode;5;-1181.234,152.8053;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 135 | Node;AmplifyShaderEditor.WorldNormalVector;6;-1441.911,206.9461;Float;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 136 | Node;AmplifyShaderEditor.DotProductOpNode;3;-976.7027,182.8834;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 137 | Node;AmplifyShaderEditor.DotProductOpNode;2;-980.7131,42.51878;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0 138 | Node;AmplifyShaderEditor.SwitchByFaceNode;1;-784.6208,95.47594;Float;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 139 | Node;AmplifyShaderEditor.SimpleMaxOpNode;7;-534.2793,155.4197;Float;False;2;0;FLOAT;0;False;1;FLOAT;0.2;False;1;FLOAT;0 140 | Node;AmplifyShaderEditor.SamplerNode;9;-702.5497,269.2917;Float;True;Property;_Diffuse;Diffuse;0;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 141 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-307.6287,194.9119;Float;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 142 | Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-70.39907,149.3834;Half;False;True;2;Half;ASEMaterialInspector;0;0;Unlit;SimpleCloth;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;True;0;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 143 | WireConnection;5;0;4;0 144 | WireConnection;3;0;5;0 145 | WireConnection;3;1;6;0 146 | WireConnection;2;0;4;0 147 | WireConnection;2;1;6;0 148 | WireConnection;1;0;2;0 149 | WireConnection;1;1;3;0 150 | WireConnection;7;0;1;0 151 | WireConnection;8;0;7;0 152 | WireConnection;8;1;9;0 153 | WireConnection;0;2;8;0 154 | ASEEND*/ 155 | //CHKSM=F01A8B15E60B3471D08BBD6337289D85AE501F96 -------------------------------------------------------------------------------- /Assets/Cloth/Shaders/SimpleCloth.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9218509a77cc3534baba7ab55ad9496d 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31451e3b01a518c458cca029661f0462 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/ClothPrefab.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1544227017932386 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4775959566001480} 12 | - component: {fileID: 33607456294397776} 13 | - component: {fileID: 23252122827253438} 14 | - component: {fileID: 114148055552445962} 15 | m_Layer: 0 16 | m_Name: ClothPrefab 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &4775959566001480 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 1544227017932386} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &33607456294397776 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 1544227017932386} 43 | m_Mesh: {fileID: 0} 44 | --- !u!23 &23252122827253438 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 1544227017932386} 51 | m_Enabled: 1 52 | m_CastShadows: 2 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: e5d32e0489174e344bf5e5f7167cfd61, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!114 &114148055552445962 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 0 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInstance: {fileID: 0} 86 | m_PrefabAsset: {fileID: 0} 87 | m_GameObject: {fileID: 1544227017932386} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: 1bdd779c478425d47b8e380f48cf0f3d, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | positionOffset: {x: -5, y: 5, z: -5} 94 | method: 0 95 | resolution: 25 96 | size: 10 97 | loops: 250 98 | cor: 0.1 99 | mass: 1 100 | pScale: 1 101 | pKs: -10000 102 | pKd: -1000 103 | dScale: 1 104 | dKs: -10000 105 | dKd: -1000 106 | bScale: 1 107 | bKs: -10000 108 | bKd: -1000 109 | windScale: 1 110 | dragCoefficient: 50 111 | windVelocity: {x: 0, y: 0, z: 0} 112 | restrained: 0000000019000000fe0000004e020000 113 | clothCompute: {fileID: 7200000, guid: c0c901fb95de9c6458849ef702d16d71, type: 3} 114 | copyFromScene: 0 115 | sphereColliders: 116 | - center: {x: 0, y: 0, z: 0} 117 | radius: 2 118 | -------------------------------------------------------------------------------- /Assets/Prefabs/ClothPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d008fc6479f3a9c43af62a33690acc9a 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Prefabs/Euler.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1372228519161442 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4727685087054206} 12 | - component: {fileID: 33401655394188632} 13 | - component: {fileID: 23289278350856118} 14 | - component: {fileID: 114078348029653798} 15 | m_Layer: 0 16 | m_Name: Euler 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &4727685087054206 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 1372228519161442} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &33401655394188632 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 1372228519161442} 43 | m_Mesh: {fileID: 0} 44 | --- !u!23 &23289278350856118 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 1372228519161442} 51 | m_Enabled: 1 52 | m_CastShadows: 2 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: e5d32e0489174e344bf5e5f7167cfd61, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!114 &114078348029653798 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 0 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInstance: {fileID: 0} 86 | m_PrefabAsset: {fileID: 0} 87 | m_GameObject: {fileID: 1372228519161442} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: 1bdd779c478425d47b8e380f48cf0f3d, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | positionOffset: {x: -11, y: 5, z: -5} 94 | method: 0 95 | resolution: 25 96 | size: 10 97 | loops: 250 98 | cor: 0.1 99 | mass: 1 100 | pScale: 1 101 | pKs: -10000 102 | pKd: -1000 103 | dScale: 1 104 | dKs: -10000 105 | dKd: -1000 106 | bScale: 1 107 | bKs: -10000 108 | bKd: -1000 109 | windScale: 1 110 | dragCoefficient: 50 111 | windVelocity: {x: 0, y: 0, z: 0} 112 | restrained: 0000000019000000fe0000004e020000 113 | clothCompute: {fileID: 7200000, guid: c0c901fb95de9c6458849ef702d16d71, type: 3} 114 | copyFromScene: 0 115 | sphereColliders: 116 | - center: {x: 0, y: 0, z: 0} 117 | radius: 2 118 | -------------------------------------------------------------------------------- /Assets/Prefabs/Euler.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e93d49b8bca443442a5e2a65d4d1b55a 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Prefabs/Leapfrog.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &1953961344682752 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 4944139698221354} 12 | - component: {fileID: 33589775103926186} 13 | - component: {fileID: 23798690128550864} 14 | - component: {fileID: 114754681548312452} 15 | m_Layer: 0 16 | m_Name: Leapfrog 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &4944139698221354 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 1953961344682752} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &33589775103926186 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 1953961344682752} 43 | m_Mesh: {fileID: 0} 44 | --- !u!23 &23798690128550864 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 1953961344682752} 51 | m_Enabled: 1 52 | m_CastShadows: 2 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: e5d32e0489174e344bf5e5f7167cfd61, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_PreserveUVs: 0 70 | m_IgnoreNormalsForChartDetection: 0 71 | m_ImportantGI: 0 72 | m_StitchLightmapSeams: 0 73 | m_SelectedEditorRenderState: 3 74 | m_MinimumChartSize: 4 75 | m_AutoUVMaxDistance: 0.5 76 | m_AutoUVMaxAngle: 89 77 | m_LightmapParameters: {fileID: 0} 78 | m_SortingLayerID: 0 79 | m_SortingLayer: 0 80 | m_SortingOrder: 0 81 | --- !u!114 &114754681548312452 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 0 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInstance: {fileID: 0} 86 | m_PrefabAsset: {fileID: 0} 87 | m_GameObject: {fileID: 1953961344682752} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: 1bdd779c478425d47b8e380f48cf0f3d, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | positionOffset: {x: 1, y: 5, z: -5} 94 | method: 1 95 | resolution: 25 96 | size: 10 97 | loops: 250 98 | cor: 0.1 99 | mass: 1 100 | pScale: 1 101 | pKs: -10000 102 | pKd: -1000 103 | dScale: 1 104 | dKs: -10000 105 | dKd: -1000 106 | bScale: 1 107 | bKs: -10000 108 | bKd: -1000 109 | windScale: 1 110 | dragCoefficient: 50 111 | windVelocity: {x: 0, y: 0, z: 0} 112 | restrained: 0000000019000000fe0000004e020000 113 | clothCompute: {fileID: 7200000, guid: c0c901fb95de9c6458849ef702d16d71, type: 3} 114 | copyFromScene: 0 115 | sphereColliders: 116 | - center: {x: 0, y: 0, z: 0} 117 | radius: 2 118 | -------------------------------------------------------------------------------- /Assets/Prefabs/Leapfrog.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ec451bc0e47bf74090841180bcc8f44 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37414d8fdb7bbe6408c96812b1e26266 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc3d90702c0c2bd44bb14346b238e49c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurnController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class BurnController : MonoBehaviour { 6 | 7 | public Material burningCloth; 8 | 9 | private bool burn = false; 10 | private float t = 0f; 11 | 12 | public float burnDuration = 0.25f; 13 | 14 | public Transform lights; 15 | private Light[] lightComps; 16 | 17 | public GameObject flameParticles; 18 | private GameObject flames; 19 | 20 | private Vector3 ogPos; 21 | 22 | public AnimationCurve particleOffset; 23 | 24 | void Start() { 25 | ogPos = lights.position; 26 | lightComps = lights.GetComponentsInChildren(); 27 | } 28 | 29 | void OnGUI () { 30 | if (GUI.Button(new Rect(10, 10, 75, 25), burn ? "Unburn" : "Burn")) { 31 | burn = !burn; 32 | } 33 | } 34 | 35 | // Update is called once per frame 36 | void Update () { 37 | if (burn) { 38 | t += Time.deltaTime * burnDuration; 39 | 40 | //if (flames == null) { 41 | // flames = Instantiate(flameParticles, lights.position, Quaternion.identity, null); 42 | //} 43 | } 44 | else { 45 | t -= Time.deltaTime * burnDuration; 46 | } 47 | 48 | 49 | t = Mathf.Clamp(t, 0f, 1f); 50 | burningCloth.SetFloat("_BurnAmount", t); 51 | 52 | foreach (Light l in lightComps) { 53 | l.intensity = Mathf.Lerp(0f, 1.75f, Mathf.Clamp(t, 0f, 0.1f)/0.1f); 54 | } 55 | 56 | lights.position = Vector3.Lerp(ogPos, ogPos + Vector3.up * 10f, t); 57 | 58 | //flames.transform.position = lights.position + Vector3.up*particleOffset.Evaluate(t); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurnController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1cbf7d6b87e9bed4688d245a7776848b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurningCloth.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BurningCloth 10 | m_Shader: {fileID: 4800000, guid: 57f859a77e281d74bad8bcced4d6f8a1, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 0 13 | m_EnableInstancingVariants: 0 14 | m_DoubleSidedGI: 0 15 | m_CustomRenderQueue: -1 16 | stringTagMap: {} 17 | disabledShaderPasses: [] 18 | m_SavedProperties: 19 | serializedVersion: 3 20 | m_TexEnvs: 21 | - _BurnAlpha: 22 | m_Texture: {fileID: 2800000, guid: 04fdde3e577033c40ae6554f6b0d296b, type: 3} 23 | m_Scale: {x: 1, y: 1} 24 | m_Offset: {x: 0, y: 0} 25 | - _Diffuse: 26 | m_Texture: {fileID: 2800000, guid: a08960dd6e8274e7f8fca616e09c48ed, type: 3} 27 | m_Scale: {x: 1, y: 1} 28 | m_Offset: {x: 0, y: 0} 29 | - _Flowmap: 30 | m_Texture: {fileID: 2800000, guid: 15df6e4ad8e42e94e94697739fe2fb19, type: 3} 31 | m_Scale: {x: 1, y: 0} 32 | m_Offset: {x: 0, y: 0} 33 | - _TextureSample0: 34 | m_Texture: {fileID: 2800000, guid: 04fdde3e577033c40ae6554f6b0d296b, type: 3} 35 | m_Scale: {x: 1, y: 1} 36 | m_Offset: {x: 0, y: -0.33} 37 | - _texcoord: 38 | m_Texture: {fileID: 0} 39 | m_Scale: {x: 1, y: 1} 40 | m_Offset: {x: 0, y: 0} 41 | m_Floats: 42 | - _Burn: 0 43 | - _BurnAmount: 0.50977325 44 | - _Cutoff: 0.5 45 | - _DiffuseOffset: 0.01 46 | - _EmissionOffset: 0 47 | - _Float0: 4.29 48 | - _Mult: 0.6 49 | - _SmokeOffset: 0.075 50 | - __dirty: 0 51 | - _add: 0.06 52 | - _div: 2.51 53 | - _tamp: 0.15 54 | - _tscale: 1 55 | m_Colors: 56 | - _Emission: {r: 2.255, g: 1.3182373, b: 0.13264692, a: 0} 57 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurningCloth.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65d15df46847be64e811a9cddc7dd0d7 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurningCloth.shader: -------------------------------------------------------------------------------- 1 | // Made with Amplify Shader Editor 2 | // Available at the Unity Asset Store - http://u3d.as/y3X 3 | Shader "BurningCloth" 4 | { 5 | Properties 6 | { 7 | _Diffuse("Diffuse", 2D) = "white" {} 8 | _Cutoff( "Mask Clip Value", Float ) = 0.5 9 | _BurnAmount("Burn Amount", Range( 0 , 1)) = 0 10 | _BurnAlpha("Burn Alpha", 2D) = "white" {} 11 | _SmokeOffset("Smoke Offset", Range( 0 , 1)) = 0 12 | [HDR]_Emission("Emission", Color) = (0,0,0,0) 13 | _Flowmap("Flowmap", 2D) = "white" {} 14 | _tscale("tscale", Float) = 1 15 | _tamp("tamp", Float) = 1 16 | [HideInInspector] _texcoord( "", 2D ) = "white" {} 17 | [HideInInspector] __dirty( "", Int ) = 1 18 | } 19 | 20 | SubShader 21 | { 22 | Tags{ "RenderType" = "TransparentCutout" "Queue" = "Geometry+0" "IsEmissive" = "true" } 23 | Cull Off 24 | CGPROGRAM 25 | #include "UnityShaderVariables.cginc" 26 | #pragma target 3.0 27 | #pragma surface surf Standard keepalpha addshadow fullforwardshadows 28 | struct Input 29 | { 30 | half2 uv_texcoord; 31 | }; 32 | 33 | uniform sampler2D _Diffuse; 34 | uniform float4 _Diffuse_ST; 35 | uniform sampler2D _BurnAlpha; 36 | uniform float4 _BurnAlpha_ST; 37 | uniform sampler2D _Flowmap; 38 | uniform float4 _Flowmap_ST; 39 | uniform half _tscale; 40 | uniform half _tamp; 41 | uniform half _BurnAmount; 42 | uniform half _SmokeOffset; 43 | uniform half4 _Emission; 44 | uniform float _Cutoff = 0.5; 45 | 46 | void surf( Input i , inout SurfaceOutputStandard o ) 47 | { 48 | float2 uv_Diffuse = i.uv_texcoord * _Diffuse_ST.xy + _Diffuse_ST.zw; 49 | float2 uv_BurnAlpha = i.uv_texcoord * _BurnAlpha_ST.xy + _BurnAlpha_ST.zw; 50 | float2 uv_Flowmap = i.uv_texcoord * _Flowmap_ST.xy + _Flowmap_ST.zw; 51 | float mulTime61 = _Time.y * _tscale; 52 | float2 break47 = ( uv_BurnAlpha + ( (tex2D( _Flowmap, uv_Flowmap )).rg * ( sin( mulTime61 ) * _tamp ) ) ); 53 | float temp_output_29_0 = ( break47.y + (-0.4 + (_BurnAmount - 0.0) * (0.9 - -0.4) / (1.0 - 0.0)) ); 54 | float2 appendResult34 = (half2(break47.x , ( temp_output_29_0 + _SmokeOffset ))); 55 | o.Albedo = ( tex2D( _Diffuse, uv_Diffuse ) * tex2D( _BurnAlpha, appendResult34 ).a ).rgb; 56 | float2 appendResult28 = (half2(break47.x , temp_output_29_0)); 57 | half4 tex2DNode24 = tex2D( _BurnAlpha, appendResult28 ); 58 | o.Emission = ( ( 1.0 - tex2DNode24.a ) * _Emission ).rgb; 59 | o.Alpha = 1; 60 | clip( tex2DNode24.a - _Cutoff ); 61 | } 62 | 63 | ENDCG 64 | } 65 | Fallback "Diffuse" 66 | CustomEditor "ASEMaterialInspector" 67 | } 68 | /*ASEBEGIN 69 | Version=16211 70 | 205;92;1436;650;2409.904;-355.0359;1.3;True;False 71 | Node;AmplifyShaderEditor.RangedFloatNode;62;-1533.705,1005.036;Float;False;Property;_tscale;tscale;7;0;Create;True;0;0;False;0;1;0;0;0;0;1;FLOAT;0 72 | Node;AmplifyShaderEditor.SimpleTimeNode;61;-1359.505,1008.936;Float;False;1;0;FLOAT;1;False;1;FLOAT;0 73 | Node;AmplifyShaderEditor.RangedFloatNode;65;-1211.304,1098.636;Float;False;Property;_tamp;tamp;8;0;Create;True;0;0;False;0;1;0;0;0;0;1;FLOAT;0 74 | Node;AmplifyShaderEditor.SinOpNode;63;-1146.305,1002.436;Float;False;1;0;FLOAT;0;False;1;FLOAT;0 75 | Node;AmplifyShaderEditor.SamplerNode;49;-1987.404,722.9357;Float;True;Property;_Flowmap;Flowmap;6;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 76 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-1013.704,1042.736;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 77 | Node;AmplifyShaderEditor.ComponentMaskNode;50;-1697.504,722.9357;Float;False;True;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT2;0 78 | Node;AmplifyShaderEditor.TextureCoordinatesNode;26;-2261.147,575.8281;Float;False;0;30;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 79 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;-1458.305,778.8358;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 80 | Node;AmplifyShaderEditor.SimpleAddOpNode;48;-1499.904,581.2357;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 81 | Node;AmplifyShaderEditor.RangedFloatNode;25;-1333.337,662.8354;Float;False;Property;_BurnAmount;Burn Amount;2;0;Create;True;0;0;False;0;0;0;0;1;0;1;FLOAT;0 82 | Node;AmplifyShaderEditor.BreakToComponentsNode;47;-1372.101,520.045;Float;False;FLOAT2;1;0;FLOAT2;0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 83 | Node;AmplifyShaderEditor.RelayNode;45;-1073.11,547.4239;Float;False;1;0;FLOAT;0;False;1;FLOAT;0 84 | Node;AmplifyShaderEditor.TFHCRemapNode;27;-1047.147,668.0283;Float;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-0.4;False;4;FLOAT;0.9;False;1;FLOAT;0 85 | Node;AmplifyShaderEditor.SimpleAddOpNode;29;-846.1465,644.0283;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 86 | Node;AmplifyShaderEditor.RelayNode;44;-1072.11,472.4239;Float;False;1;0;FLOAT;0;False;1;FLOAT;0 87 | Node;AmplifyShaderEditor.RangedFloatNode;33;-1177.174,299.2672;Float;False;Property;_SmokeOffset;Smoke Offset;4;0;Create;True;0;0;False;0;0;0;0;1;0;1;FLOAT;0 88 | Node;AmplifyShaderEditor.SimpleAddOpNode;32;-864.7289,280.5945;Float;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 89 | Node;AmplifyShaderEditor.DynamicAppendNode;28;-704.1466,573.0283;Float;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 90 | Node;AmplifyShaderEditor.TexturePropertyNode;30;-1424.637,229.4301;Float;True;Property;_BurnAlpha;Burn Alpha;3;0;Create;True;0;0;False;0;None;None;False;white;Auto;Texture2D;0;1;SAMPLER2D;0 91 | Node;AmplifyShaderEditor.SamplerNode;24;-432.0957,546.5762;Float;True;Property;_Sample1;Sample1;2;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 92 | Node;AmplifyShaderEditor.DynamicAppendNode;34;-660.2213,254.986;Float;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0 93 | Node;AmplifyShaderEditor.OneMinusNode;43;-85.99573,871.1736;Float;False;1;0;FLOAT;0;False;1;FLOAT;0 94 | Node;AmplifyShaderEditor.SamplerNode;9;-490.2844,13.46139;Float;True;Property;_Diffuse;Diffuse;0;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 95 | Node;AmplifyShaderEditor.SamplerNode;31;-499.2917,224.8517;Float;True;Property;_TextureSample0;Texture Sample 0;2;0;Create;True;0;0;False;0;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 96 | Node;AmplifyShaderEditor.ColorNode;42;-365.7587,1048.385;Float;False;Property;_Emission;Emission;5;1;[HDR];Create;True;0;0;False;0;0,0,0,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 97 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;41;-77.06882,958.1693;Float;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 98 | Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-110.6914,176.1926;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 99 | Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;203.6293,263.4086;Half;False;True;2;Half;ASEMaterialInspector;0;0;Standard;BurningCloth;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;True;0;True;TransparentCutout;;Geometry;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;True;0;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 100 | WireConnection;61;0;62;0 101 | WireConnection;63;0;61;0 102 | WireConnection;64;0;63;0 103 | WireConnection;64;1;65;0 104 | WireConnection;50;0;49;0 105 | WireConnection;60;0;50;0 106 | WireConnection;60;1;64;0 107 | WireConnection;48;0;26;0 108 | WireConnection;48;1;60;0 109 | WireConnection;47;0;48;0 110 | WireConnection;45;0;47;1 111 | WireConnection;27;0;25;0 112 | WireConnection;29;0;45;0 113 | WireConnection;29;1;27;0 114 | WireConnection;44;0;47;0 115 | WireConnection;32;0;29;0 116 | WireConnection;32;1;33;0 117 | WireConnection;28;0;44;0 118 | WireConnection;28;1;29;0 119 | WireConnection;24;0;30;0 120 | WireConnection;24;1;28;0 121 | WireConnection;34;0;44;0 122 | WireConnection;34;1;32;0 123 | WireConnection;43;0;24;4 124 | WireConnection;31;0;30;0 125 | WireConnection;31;1;34;0 126 | WireConnection;41;0;43;0 127 | WireConnection;41;1;42;0 128 | WireConnection;8;0;9;0 129 | WireConnection;8;1;31;4 130 | WireConnection;0;0;8;0 131 | WireConnection;0;2;41;0 132 | WireConnection;0;10;24;4 133 | ASEEND*/ 134 | //CHKSM=F6C6B005E3783533D9B946C99ACA3971E0C7232B -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/BurningCloth.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57f859a77e281d74bad8bcced4d6f8a1 3 | ShaderImporter: 4 | externalObjects: {} 5 | defaultTextures: [] 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/burnalpha.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielshervheim/unity-cloth-simulation/f73c448e6a972ebe97fa8f4e5d28d25227acaff6/Assets/Scenes/Burning Cloth/burnalpha.bmp -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/burnalpha.bmp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04fdde3e577033c40ae6554f6b0d296b 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: 1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: 1 36 | wrapV: 1 37 | wrapW: 1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 2 50 | alphaIsTransparency: 1 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | resizeAlgorithm: 0 61 | textureFormat: -1 62 | textureCompression: 1 63 | compressionQuality: 50 64 | crunchedCompression: 0 65 | allowsAlphaSplitting: 0 66 | overridden: 0 67 | androidETC2FallbackOverride: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | androidETC2FallbackOverride: 0 78 | spriteSheet: 79 | serializedVersion: 2 80 | sprites: [] 81 | outline: [] 82 | physicsShape: [] 83 | spritePackingTag: 84 | userData: 85 | assetBundleName: 86 | assetBundleVariant: 87 | -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/flowmap.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielshervheim/unity-cloth-simulation/f73c448e6a972ebe97fa8f4e5d28d25227acaff6/Assets/Scenes/Burning Cloth/flowmap.bmp -------------------------------------------------------------------------------- /Assets/Scenes/Burning Cloth/flowmap.bmp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15df6e4ad8e42e94e94697739fe2fb19 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | externalObjects: {} 6 | serializedVersion: 4 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | seamlessCubemap: 0 28 | textureFormat: 1 29 | maxTextureSize: 2048 30 | textureSettings: 31 | serializedVersion: 2 32 | filterMode: -1 33 | aniso: -1 34 | mipBias: -1 35 | wrapU: -1 36 | wrapV: -1 37 | wrapW: -1 38 | nPOTScale: 1 39 | lightmap: 0 40 | compressionQuality: 50 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spritePixelsToUnits: 100 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spriteGenerateFallbackPhysicsShape: 1 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | resizeAlgorithm: 0 61 | textureFormat: -1 62 | textureCompression: 1 63 | compressionQuality: 50 64 | crunchedCompression: 0 65 | allowsAlphaSplitting: 0 66 | overridden: 0 67 | androidETC2FallbackOverride: 0 68 | spriteSheet: 69 | serializedVersion: 2 70 | sprites: [] 71 | outline: [] 72 | physicsShape: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/Scenes/Comparison.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: 1 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 952335419} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 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: 0 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 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_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 0 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1001 &750618609 116 | PrefabInstance: 117 | m_ObjectHideFlags: 0 118 | serializedVersion: 2 119 | m_Modification: 120 | m_TransformParent: {fileID: 0} 121 | m_Modifications: 122 | - target: {fileID: 1953961344682752, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 123 | propertyPath: m_Name 124 | value: Leapfrog 125 | objectReference: {fileID: 0} 126 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 127 | propertyPath: m_LocalPosition.x 128 | value: 0 129 | objectReference: {fileID: 0} 130 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 131 | propertyPath: m_LocalPosition.y 132 | value: 0 133 | objectReference: {fileID: 0} 134 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 135 | propertyPath: m_LocalPosition.z 136 | value: 0 137 | objectReference: {fileID: 0} 138 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 139 | propertyPath: m_LocalRotation.x 140 | value: 0 141 | objectReference: {fileID: 0} 142 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 143 | propertyPath: m_LocalRotation.y 144 | value: 0 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 147 | propertyPath: m_LocalRotation.z 148 | value: 0 149 | objectReference: {fileID: 0} 150 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 151 | propertyPath: m_LocalRotation.w 152 | value: 1 153 | objectReference: {fileID: 0} 154 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 155 | propertyPath: m_RootOrder 156 | value: 3 157 | objectReference: {fileID: 0} 158 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 159 | propertyPath: m_LocalEulerAnglesHint.x 160 | value: 0 161 | objectReference: {fileID: 0} 162 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 163 | propertyPath: m_LocalEulerAnglesHint.y 164 | value: 0 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 4944139698221354, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 167 | propertyPath: m_LocalEulerAnglesHint.z 168 | value: 0 169 | objectReference: {fileID: 0} 170 | m_RemovedComponents: [] 171 | m_SourcePrefab: {fileID: 100100000, guid: 9ec451bc0e47bf74090841180bcc8f44, type: 3} 172 | --- !u!114 &822879194 stripped 173 | MonoBehaviour: 174 | m_CorrespondingSourceObject: {fileID: 114754681548312452, guid: 9ec451bc0e47bf74090841180bcc8f44, 175 | type: 3} 176 | m_PrefabInstance: {fileID: 750618609} 177 | m_PrefabAsset: {fileID: 0} 178 | m_GameObject: {fileID: 0} 179 | m_Enabled: 1 180 | m_EditorHideFlags: 0 181 | m_Script: {fileID: 11500000, guid: 1bdd779c478425d47b8e380f48cf0f3d, type: 3} 182 | m_Name: 183 | m_EditorClassIdentifier: 184 | --- !u!1 &952335418 185 | GameObject: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | serializedVersion: 6 191 | m_Component: 192 | - component: {fileID: 952335420} 193 | - component: {fileID: 952335419} 194 | m_Layer: 0 195 | m_Name: Directional Light 196 | m_TagString: Untagged 197 | m_Icon: {fileID: 0} 198 | m_NavMeshLayer: 0 199 | m_StaticEditorFlags: 0 200 | m_IsActive: 1 201 | --- !u!108 &952335419 202 | Light: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 952335418} 208 | m_Enabled: 1 209 | serializedVersion: 8 210 | m_Type: 1 211 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 212 | m_Intensity: 1 213 | m_Range: 10 214 | m_SpotAngle: 30 215 | m_CookieSize: 10 216 | m_Shadows: 217 | m_Type: 2 218 | m_Resolution: -1 219 | m_CustomResolution: -1 220 | m_Strength: 1 221 | m_Bias: 0.05 222 | m_NormalBias: 0.4 223 | m_NearPlane: 0.2 224 | m_Cookie: {fileID: 0} 225 | m_DrawHalo: 0 226 | m_Flare: {fileID: 0} 227 | m_RenderMode: 0 228 | m_CullingMask: 229 | serializedVersion: 2 230 | m_Bits: 4294967295 231 | m_Lightmapping: 4 232 | m_LightShadowCasterMode: 0 233 | m_AreaSize: {x: 1, y: 1} 234 | m_BounceIntensity: 1 235 | m_ColorTemperature: 6570 236 | m_UseColorTemperature: 0 237 | m_ShadowRadius: 0 238 | m_ShadowAngle: 0 239 | --- !u!4 &952335420 240 | Transform: 241 | m_ObjectHideFlags: 0 242 | m_CorrespondingSourceObject: {fileID: 0} 243 | m_PrefabInstance: {fileID: 0} 244 | m_PrefabAsset: {fileID: 0} 245 | m_GameObject: {fileID: 952335418} 246 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 247 | m_LocalPosition: {x: 0, y: 3, z: 0} 248 | m_LocalScale: {x: 1, y: 1, z: 1} 249 | m_Children: [] 250 | m_Father: {fileID: 0} 251 | m_RootOrder: 1 252 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 253 | --- !u!114 &1319069795 stripped 254 | MonoBehaviour: 255 | m_CorrespondingSourceObject: {fileID: 114078348029653798, guid: e93d49b8bca443442a5e2a65d4d1b55a, 256 | type: 3} 257 | m_PrefabInstance: {fileID: 1962565482} 258 | m_PrefabAsset: {fileID: 0} 259 | m_GameObject: {fileID: 0} 260 | m_Enabled: 1 261 | m_EditorHideFlags: 0 262 | m_Script: {fileID: 11500000, guid: 1bdd779c478425d47b8e380f48cf0f3d, type: 3} 263 | m_Name: 264 | m_EditorClassIdentifier: 265 | --- !u!1 &1401473222 266 | GameObject: 267 | m_ObjectHideFlags: 0 268 | m_CorrespondingSourceObject: {fileID: 0} 269 | m_PrefabInstance: {fileID: 0} 270 | m_PrefabAsset: {fileID: 0} 271 | serializedVersion: 6 272 | m_Component: 273 | - component: {fileID: 1401473224} 274 | - component: {fileID: 1401473223} 275 | - component: {fileID: 1401473225} 276 | - component: {fileID: 1401473226} 277 | - component: {fileID: 1401473227} 278 | m_Layer: 0 279 | m_Name: Main Camera 280 | m_TagString: MainCamera 281 | m_Icon: {fileID: 0} 282 | m_NavMeshLayer: 0 283 | m_StaticEditorFlags: 0 284 | m_IsActive: 1 285 | --- !u!20 &1401473223 286 | Camera: 287 | m_ObjectHideFlags: 0 288 | m_CorrespondingSourceObject: {fileID: 0} 289 | m_PrefabInstance: {fileID: 0} 290 | m_PrefabAsset: {fileID: 0} 291 | m_GameObject: {fileID: 1401473222} 292 | m_Enabled: 1 293 | serializedVersion: 2 294 | m_ClearFlags: 1 295 | m_BackGroundColor: {r: 0.81660897, g: 0.83645713, b: 0.86764705, a: 0} 296 | m_projectionMatrixMode: 1 297 | m_SensorSize: {x: 36, y: 24} 298 | m_LensShift: {x: 0, y: 0} 299 | m_GateFitMode: 2 300 | m_FocalLength: 50 301 | m_NormalizedViewPortRect: 302 | serializedVersion: 2 303 | x: 0 304 | y: 0 305 | width: 1 306 | height: 1 307 | near clip plane: 0.3 308 | far clip plane: 1000 309 | field of view: 60 310 | orthographic: 0 311 | orthographic size: 5 312 | m_Depth: -1 313 | m_CullingMask: 314 | serializedVersion: 2 315 | m_Bits: 4294967295 316 | m_RenderingPath: 1 317 | m_TargetTexture: {fileID: 0} 318 | m_TargetDisplay: 0 319 | m_TargetEye: 3 320 | m_HDR: 1 321 | m_AllowMSAA: 0 322 | m_AllowDynamicResolution: 0 323 | m_ForceIntoRT: 0 324 | m_OcclusionCulling: 1 325 | m_StereoConvergence: 10 326 | m_StereoSeparation: 0.022 327 | --- !u!4 &1401473224 328 | Transform: 329 | m_ObjectHideFlags: 0 330 | m_CorrespondingSourceObject: {fileID: 0} 331 | m_PrefabInstance: {fileID: 0} 332 | m_PrefabAsset: {fileID: 0} 333 | m_GameObject: {fileID: 1401473222} 334 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 335 | m_LocalPosition: {x: 0, y: 1, z: -10} 336 | m_LocalScale: {x: 1, y: 1, z: 1} 337 | m_Children: [] 338 | m_Father: {fileID: 0} 339 | m_RootOrder: 0 340 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 341 | --- !u!114 &1401473225 342 | MonoBehaviour: 343 | m_ObjectHideFlags: 0 344 | m_CorrespondingSourceObject: {fileID: 0} 345 | m_PrefabInstance: {fileID: 0} 346 | m_PrefabAsset: {fileID: 0} 347 | m_GameObject: {fileID: 1401473222} 348 | m_Enabled: 1 349 | m_EditorHideFlags: 0 350 | m_Script: {fileID: 11500000, guid: ff26db721962cdf4a8edcdfa9a767d2a, type: 3} 351 | m_Name: 352 | m_EditorClassIdentifier: 353 | --- !u!114 &1401473226 354 | MonoBehaviour: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | m_GameObject: {fileID: 1401473222} 360 | m_Enabled: 1 361 | m_EditorHideFlags: 0 362 | m_Script: {fileID: 11500000, guid: b64dd7dc0dcd84a4abaa31e412a9a1e0, type: 3} 363 | m_Name: 364 | m_EditorClassIdentifier: 365 | moveSpeed: 5 366 | lookSpeed: 2.5 367 | --- !u!114 &1401473227 368 | MonoBehaviour: 369 | m_ObjectHideFlags: 0 370 | m_CorrespondingSourceObject: {fileID: 0} 371 | m_PrefabInstance: {fileID: 0} 372 | m_PrefabAsset: {fileID: 0} 373 | m_GameObject: {fileID: 1401473222} 374 | m_Enabled: 1 375 | m_EditorHideFlags: 0 376 | m_Script: {fileID: 11500000, guid: a9abfa27cdc714d40b6150c613d420eb, type: 3} 377 | m_Name: 378 | m_EditorClassIdentifier: 379 | loops: 250 380 | k: -10000 381 | cloths: 382 | - {fileID: 1319069795} 383 | - {fileID: 822879194} 384 | --- !u!1001 &1962565482 385 | PrefabInstance: 386 | m_ObjectHideFlags: 0 387 | serializedVersion: 2 388 | m_Modification: 389 | m_TransformParent: {fileID: 0} 390 | m_Modifications: 391 | - target: {fileID: 1372228519161442, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 392 | propertyPath: m_Name 393 | value: Euler 394 | objectReference: {fileID: 0} 395 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 396 | propertyPath: m_LocalPosition.x 397 | value: 0 398 | objectReference: {fileID: 0} 399 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 400 | propertyPath: m_LocalPosition.y 401 | value: 0 402 | objectReference: {fileID: 0} 403 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 404 | propertyPath: m_LocalPosition.z 405 | value: 0 406 | objectReference: {fileID: 0} 407 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 408 | propertyPath: m_LocalRotation.x 409 | value: 0 410 | objectReference: {fileID: 0} 411 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 412 | propertyPath: m_LocalRotation.y 413 | value: 0 414 | objectReference: {fileID: 0} 415 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 416 | propertyPath: m_LocalRotation.z 417 | value: 0 418 | objectReference: {fileID: 0} 419 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 420 | propertyPath: m_LocalRotation.w 421 | value: 1 422 | objectReference: {fileID: 0} 423 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 424 | propertyPath: m_RootOrder 425 | value: 2 426 | objectReference: {fileID: 0} 427 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 428 | propertyPath: m_LocalEulerAnglesHint.x 429 | value: 0 430 | objectReference: {fileID: 0} 431 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 432 | propertyPath: m_LocalEulerAnglesHint.y 433 | value: 0 434 | objectReference: {fileID: 0} 435 | - target: {fileID: 4727685087054206, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 436 | propertyPath: m_LocalEulerAnglesHint.z 437 | value: 0 438 | objectReference: {fileID: 0} 439 | m_RemovedComponents: [] 440 | m_SourcePrefab: {fileID: 100100000, guid: e93d49b8bca443442a5e2a65d4d1b55a, type: 3} 441 | -------------------------------------------------------------------------------- /Assets/Scenes/Comparison.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d77c8d9092056814a8b913b04ea3ad51 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scenes/Scene.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: 1 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 952335419} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 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: 0 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 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_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 0 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 500 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1001 &80364581 116 | PrefabInstance: 117 | m_ObjectHideFlags: 0 118 | serializedVersion: 2 119 | m_Modification: 120 | m_TransformParent: {fileID: 0} 121 | m_Modifications: 122 | - target: {fileID: 1544227017932386, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 123 | propertyPath: m_Name 124 | value: ClothPrefab 125 | objectReference: {fileID: 0} 126 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 127 | propertyPath: m_LocalPosition.x 128 | value: 0 129 | objectReference: {fileID: 0} 130 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 131 | propertyPath: m_LocalPosition.y 132 | value: 0 133 | objectReference: {fileID: 0} 134 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 135 | propertyPath: m_LocalPosition.z 136 | value: 0 137 | objectReference: {fileID: 0} 138 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 139 | propertyPath: m_LocalRotation.x 140 | value: 0 141 | objectReference: {fileID: 0} 142 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 143 | propertyPath: m_LocalRotation.y 144 | value: 0 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 147 | propertyPath: m_LocalRotation.z 148 | value: 0 149 | objectReference: {fileID: 0} 150 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 151 | propertyPath: m_LocalRotation.w 152 | value: 1 153 | objectReference: {fileID: 0} 154 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 155 | propertyPath: m_RootOrder 156 | value: 2 157 | objectReference: {fileID: 0} 158 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 159 | propertyPath: m_LocalEulerAnglesHint.x 160 | value: 0 161 | objectReference: {fileID: 0} 162 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 163 | propertyPath: m_LocalEulerAnglesHint.y 164 | value: 0 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 4775959566001480, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 167 | propertyPath: m_LocalEulerAnglesHint.z 168 | value: 0 169 | objectReference: {fileID: 0} 170 | m_RemovedComponents: [] 171 | m_SourcePrefab: {fileID: 100100000, guid: d008fc6479f3a9c43af62a33690acc9a, type: 3} 172 | --- !u!1 &952335418 173 | GameObject: 174 | m_ObjectHideFlags: 0 175 | m_CorrespondingSourceObject: {fileID: 0} 176 | m_PrefabInstance: {fileID: 0} 177 | m_PrefabAsset: {fileID: 0} 178 | serializedVersion: 6 179 | m_Component: 180 | - component: {fileID: 952335420} 181 | - component: {fileID: 952335419} 182 | m_Layer: 0 183 | m_Name: Directional Light 184 | m_TagString: Untagged 185 | m_Icon: {fileID: 0} 186 | m_NavMeshLayer: 0 187 | m_StaticEditorFlags: 0 188 | m_IsActive: 1 189 | --- !u!108 &952335419 190 | Light: 191 | m_ObjectHideFlags: 0 192 | m_CorrespondingSourceObject: {fileID: 0} 193 | m_PrefabInstance: {fileID: 0} 194 | m_PrefabAsset: {fileID: 0} 195 | m_GameObject: {fileID: 952335418} 196 | m_Enabled: 1 197 | serializedVersion: 8 198 | m_Type: 1 199 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 200 | m_Intensity: 1 201 | m_Range: 10 202 | m_SpotAngle: 30 203 | m_CookieSize: 10 204 | m_Shadows: 205 | m_Type: 2 206 | m_Resolution: -1 207 | m_CustomResolution: -1 208 | m_Strength: 1 209 | m_Bias: 0.05 210 | m_NormalBias: 0.4 211 | m_NearPlane: 0.2 212 | m_Cookie: {fileID: 0} 213 | m_DrawHalo: 0 214 | m_Flare: {fileID: 0} 215 | m_RenderMode: 0 216 | m_CullingMask: 217 | serializedVersion: 2 218 | m_Bits: 4294967295 219 | m_Lightmapping: 4 220 | m_LightShadowCasterMode: 0 221 | m_AreaSize: {x: 1, y: 1} 222 | m_BounceIntensity: 1 223 | m_ColorTemperature: 6570 224 | m_UseColorTemperature: 0 225 | m_ShadowRadius: 0 226 | m_ShadowAngle: 0 227 | --- !u!4 &952335420 228 | Transform: 229 | m_ObjectHideFlags: 0 230 | m_CorrespondingSourceObject: {fileID: 0} 231 | m_PrefabInstance: {fileID: 0} 232 | m_PrefabAsset: {fileID: 0} 233 | m_GameObject: {fileID: 952335418} 234 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 235 | m_LocalPosition: {x: 0, y: 3, z: 0} 236 | m_LocalScale: {x: 1, y: 1, z: 1} 237 | m_Children: [] 238 | m_Father: {fileID: 0} 239 | m_RootOrder: 1 240 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 241 | --- !u!1 &1401473222 242 | GameObject: 243 | m_ObjectHideFlags: 0 244 | m_CorrespondingSourceObject: {fileID: 0} 245 | m_PrefabInstance: {fileID: 0} 246 | m_PrefabAsset: {fileID: 0} 247 | serializedVersion: 6 248 | m_Component: 249 | - component: {fileID: 1401473224} 250 | - component: {fileID: 1401473223} 251 | - component: {fileID: 1401473226} 252 | m_Layer: 0 253 | m_Name: Main Camera 254 | m_TagString: MainCamera 255 | m_Icon: {fileID: 0} 256 | m_NavMeshLayer: 0 257 | m_StaticEditorFlags: 0 258 | m_IsActive: 1 259 | --- !u!20 &1401473223 260 | Camera: 261 | m_ObjectHideFlags: 0 262 | m_CorrespondingSourceObject: {fileID: 0} 263 | m_PrefabInstance: {fileID: 0} 264 | m_PrefabAsset: {fileID: 0} 265 | m_GameObject: {fileID: 1401473222} 266 | m_Enabled: 1 267 | serializedVersion: 2 268 | m_ClearFlags: 1 269 | m_BackGroundColor: {r: 0.81660897, g: 0.83645713, b: 0.86764705, a: 0} 270 | m_projectionMatrixMode: 1 271 | m_SensorSize: {x: 36, y: 24} 272 | m_LensShift: {x: 0, y: 0} 273 | m_GateFitMode: 2 274 | m_FocalLength: 50 275 | m_NormalizedViewPortRect: 276 | serializedVersion: 2 277 | x: 0 278 | y: 0 279 | width: 1 280 | height: 1 281 | near clip plane: 0.3 282 | far clip plane: 1000 283 | field of view: 60 284 | orthographic: 0 285 | orthographic size: 5 286 | m_Depth: -1 287 | m_CullingMask: 288 | serializedVersion: 2 289 | m_Bits: 4294967295 290 | m_RenderingPath: 1 291 | m_TargetTexture: {fileID: 0} 292 | m_TargetDisplay: 0 293 | m_TargetEye: 3 294 | m_HDR: 1 295 | m_AllowMSAA: 0 296 | m_AllowDynamicResolution: 0 297 | m_ForceIntoRT: 0 298 | m_OcclusionCulling: 1 299 | m_StereoConvergence: 10 300 | m_StereoSeparation: 0.022 301 | --- !u!4 &1401473224 302 | Transform: 303 | m_ObjectHideFlags: 0 304 | m_CorrespondingSourceObject: {fileID: 0} 305 | m_PrefabInstance: {fileID: 0} 306 | m_PrefabAsset: {fileID: 0} 307 | m_GameObject: {fileID: 1401473222} 308 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 309 | m_LocalPosition: {x: 0, y: 1, z: -10} 310 | m_LocalScale: {x: 1, y: 1, z: 1} 311 | m_Children: [] 312 | m_Father: {fileID: 0} 313 | m_RootOrder: 0 314 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 315 | --- !u!114 &1401473226 316 | MonoBehaviour: 317 | m_ObjectHideFlags: 0 318 | m_CorrespondingSourceObject: {fileID: 0} 319 | m_PrefabInstance: {fileID: 0} 320 | m_PrefabAsset: {fileID: 0} 321 | m_GameObject: {fileID: 1401473222} 322 | m_Enabled: 1 323 | m_EditorHideFlags: 0 324 | m_Script: {fileID: 11500000, guid: b64dd7dc0dcd84a4abaa31e412a9a1e0, type: 3} 325 | m_Name: 326 | m_EditorClassIdentifier: 327 | moveSpeed: 5 328 | lookSpeed: 2.5 329 | -------------------------------------------------------------------------------- /Assets/Scenes/Scene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a21f61242d78e664791da55554606aca 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d20dcd3a936a9447a1a978090c92592 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/Mover.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © Daniel Shervheim, 2019 3 | // www.danielshervheim.com 4 | // 5 | 6 | using System.Collections; 7 | using System.Collections.Generic; 8 | using UnityEngine; 9 | 10 | public class Mover : MonoBehaviour { 11 | private float pitch = 0f; 12 | private float yaw = 0f; 13 | 14 | public float moveSpeed = 1f; 15 | public float lookSpeed = 1f; 16 | 17 | private bool locked = false; 18 | 19 | // Update is called once per frame 20 | void Update () { 21 | Cursor.visible = locked; 22 | 23 | if (Input.GetKeyUp("l")) { 24 | locked = !locked; 25 | } 26 | 27 | if (!locked) { 28 | Vector3 forward = Vector3.Normalize(Vector3.Scale(transform.forward, new Vector3(1f, 0f, 1f))); 29 | Vector3 right = Vector3.Normalize(Vector3.Scale(transform.right, new Vector3(1f, 0f, 1f))); 30 | transform.position += (forward*Input.GetAxis("Vertical") + right*Input.GetAxis("Horizontal")) * moveSpeed * Time.deltaTime; 31 | 32 | 33 | float vertical = System.Convert.ToSingle(Input.GetKey(KeyCode.Space)) - System.Convert.ToSingle(Input.GetKey(KeyCode.LeftShift)); 34 | transform.position += vertical*Vector3.up*moveSpeed*Time.deltaTime; 35 | } 36 | } 37 | 38 | void LateUpdate () { 39 | if (!locked) { 40 | pitch -= Input.GetAxis("Mouse Y") * lookSpeed; 41 | yaw += Input.GetAxis("Mouse X") * lookSpeed; 42 | 43 | transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.Euler(pitch, yaw, 0f), Time.deltaTime*10f); 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /Assets/Scripts/Mover.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b64dd7dc0dcd84a4abaa31e412a9a1e0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/ParameterAdjuster.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ParameterAdjuster : MonoBehaviour { 6 | public int loops = 250; 7 | 8 | public float k = -10000f; 9 | 10 | public ClothSpawner[] cloths; 11 | 12 | void OnGUI() { 13 | // Loops 14 | 15 | if (GUI.Button(new Rect(10, 10, 150, 20), "Decrease Loops")) { 16 | loops -= 10; 17 | } 18 | 19 | if (GUI.Button(new Rect(10, 40, 150, 20), "Increase Loops")) { 20 | loops += 10; 21 | } 22 | 23 | GUI.Label(new Rect(10, 70, 100, 20), "" + loops); 24 | 25 | loops = (int)Mathf.Max(loops, 1f); 26 | 27 | // Constant 28 | 29 | if (GUI.Button(new Rect(10, 100, 150, 20), "Decrease Constant")) { 30 | k *= 2f; 31 | } 32 | 33 | if (GUI.Button(new Rect(10, 130, 150, 20), "Increase Constant")) { 34 | k /= 2f; 35 | } 36 | 37 | GUI.Label(new Rect(10, 160, 100, 20), "" + k); 38 | 39 | k = Mathf.Min(k, -1f); 40 | } 41 | 42 | void FixedUpdate() { 43 | for (int i = 0; i < cloths.Length; i++) { 44 | cloths[i].loops = loops; 45 | cloths[i].pKs = k; 46 | cloths[i].dKs = k; 47 | cloths[i].bKs = k; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/Scripts/ParameterAdjuster.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9abfa27cdc714d40b6150c613d420eb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/Walker.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Walker : MonoBehaviour { 6 | 7 | public float walkSpeed = 1.25f; 8 | public float rotateSpeed = 1f; 9 | 10 | private Animator anim; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | anim = GetComponent(); 15 | } 16 | 17 | // Update is called once per frame 18 | void Update () { 19 | anim.SetFloat("Blend", Mathf.Clamp(Input.GetAxis("Vertical"), 0f, 1f)); 20 | transform.position += transform.forward * Mathf.Clamp(Input.GetAxis("Vertical"), 0f, 1f) * Time.deltaTime * walkSpeed; 21 | transform.Rotate(Vector3.up * Time.deltaTime * rotateSpeed * Input.GetAxis("Horizontal")); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Assets/Scripts/Walker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a5ed42756d2b3c46963a05d92a7a02e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/WindController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class WindController : MonoBehaviour { 6 | 7 | public ClothSpawner cs; 8 | 9 | private float x = 0; 10 | private float y = 0; 11 | private float z = 0; 12 | 13 | void OnGUI () { 14 | x = GUI.VerticalSlider(new Rect(10, 10, 25, 100), x, 10.0f, -10.0f); 15 | y = GUI.VerticalSlider(new Rect(10, 120, 25, 100), y, 10.0f, -10.0f); 16 | z = GUI.VerticalSlider(new Rect(10, 230, 25, 100), z, 10.0f, -10.0f); 17 | 18 | cs.windVelocity = new Vector3(x, y, z); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/Scripts/WindController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e1ec72b0ef11ed4ba5b3789595c8dd7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/Scripts/WindStrength.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class windStrength : MonoBehaviour { 6 | 7 | private float t; 8 | public ClothSpawner cs; 9 | 10 | // Update is called once per frame 11 | void FixedUpdate () { 12 | t += Time.deltaTime; 13 | cs.windScale = 0.5f*(Mathf.Sin(t) + 1f); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assets/Scripts/WindStrength.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2df912615c02b794f8b5139d50279a31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2019, Daniel Shervheim 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Logs/Packages-Update.log: -------------------------------------------------------------------------------- 1 | 2 | === Tue Jun 18 17:49:58 2019 3 | 4 | Packages were changed. 5 | Update Mode: resetToDefaultDependencies 6 | 7 | The following packages were added: 8 | com.unity.analytics@3.2.2 9 | com.unity.purchasing@2.0.3 10 | com.unity.ads@2.0.8 11 | com.unity.textmeshpro@1.3.0 12 | com.unity.package-manager-ui@2.0.3 13 | com.unity.collab-proxy@1.2.15 14 | com.unity.modules.ai@1.0.0 15 | com.unity.modules.animation@1.0.0 16 | com.unity.modules.assetbundle@1.0.0 17 | com.unity.modules.audio@1.0.0 18 | com.unity.modules.cloth@1.0.0 19 | com.unity.modules.director@1.0.0 20 | com.unity.modules.imageconversion@1.0.0 21 | com.unity.modules.imgui@1.0.0 22 | com.unity.modules.jsonserialize@1.0.0 23 | com.unity.modules.particlesystem@1.0.0 24 | com.unity.modules.physics@1.0.0 25 | com.unity.modules.physics2d@1.0.0 26 | com.unity.modules.screencapture@1.0.0 27 | com.unity.modules.terrain@1.0.0 28 | com.unity.modules.terrainphysics@1.0.0 29 | com.unity.modules.tilemap@1.0.0 30 | com.unity.modules.ui@1.0.0 31 | com.unity.modules.uielements@1.0.0 32 | com.unity.modules.umbra@1.0.0 33 | com.unity.modules.unityanalytics@1.0.0 34 | com.unity.modules.unitywebrequest@1.0.0 35 | com.unity.modules.unitywebrequestassetbundle@1.0.0 36 | com.unity.modules.unitywebrequestaudio@1.0.0 37 | com.unity.modules.unitywebrequesttexture@1.0.0 38 | com.unity.modules.unitywebrequestwww@1.0.0 39 | com.unity.modules.vehicles@1.0.0 40 | com.unity.modules.video@1.0.0 41 | com.unity.modules.vr@1.0.0 42 | com.unity.modules.wind@1.0.0 43 | com.unity.modules.xr@1.0.0 44 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "3.2.2", 5 | "com.unity.collab-proxy": "1.2.15", 6 | "com.unity.package-manager-ui": "2.0.3", 7 | "com.unity.purchasing": "2.0.3", 8 | "com.unity.textmeshpro": "1.3.0", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | -------------------------------------------------------------------------------- /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/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: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInPlayMode: 1 24 | -------------------------------------------------------------------------------- /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: 12 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_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | 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 | -------------------------------------------------------------------------------- /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/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 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /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: 4 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_AutoSimulation: 1 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 | -------------------------------------------------------------------------------- /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 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /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: 15 7 | productGUID: 7eb744500e265a849859f09b4f82e4ee 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: Cloth-Simulation 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 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidStartInFullscreen: 1 67 | androidRenderOutsideSafeArea: 0 68 | androidBlitType: 0 69 | defaultIsNativeResolution: 1 70 | macRetinaSupport: 1 71 | runInBackground: 0 72 | captureSingleScreen: 0 73 | muteOtherAudioSources: 0 74 | Prepare IOS For Recording: 0 75 | Force IOS Speakers When Recording: 0 76 | deferSystemGesturesMode: 0 77 | hideHomeButton: 0 78 | submitAnalytics: 1 79 | usePlayerLog: 1 80 | bakeCollisionMeshes: 0 81 | forceSingleInstance: 0 82 | resizableWindow: 0 83 | useMacAppStoreValidation: 0 84 | macAppStoreCategory: public.app-category.games 85 | gpuSkinning: 0 86 | graphicsJobs: 0 87 | xboxPIXTextureCapture: 0 88 | xboxEnableAvatar: 0 89 | xboxEnableKinect: 0 90 | xboxEnableKinectAutoTracking: 0 91 | xboxEnableFitness: 0 92 | visibleInBackground: 1 93 | allowFullscreenSwitch: 1 94 | graphicsJobMode: 0 95 | fullscreenMode: 1 96 | xboxSpeechDB: 0 97 | xboxEnableHeadOrientation: 0 98 | xboxEnableGuest: 0 99 | xboxEnablePIXSampling: 0 100 | metalFramebufferOnly: 0 101 | xboxOneResolution: 0 102 | xboxOneSResolution: 0 103 | xboxOneXResolution: 3 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | switchQueueCommandMemory: 0 109 | vulkanEnableSetSRGBWrite: 0 110 | m_SupportedAspectRatios: 111 | 4:3: 1 112 | 5:4: 1 113 | 16:10: 1 114 | 16:9: 1 115 | Others: 1 116 | bundleVersion: 1.0 117 | preloadedAssets: [] 118 | metroInputSource: 0 119 | wsaTransparentSwapchain: 0 120 | m_HolographicPauseOnTrackingLoss: 1 121 | xboxOneDisableKinectGpuReservation: 0 122 | xboxOneEnable7thCore: 1 123 | isWsaHolographicRemotingEnabled: 0 124 | vrSettings: 125 | cardboard: 126 | depthFormat: 0 127 | enableTransitionView: 0 128 | daydream: 129 | depthFormat: 0 130 | useSustainedPerformanceMode: 0 131 | enableVideoLayer: 0 132 | useProtectedVideoMemory: 0 133 | minimumSupportedHeadTracking: 0 134 | maximumSupportedHeadTracking: 1 135 | hololens: 136 | depthFormat: 1 137 | depthBufferSharingEnabled: 0 138 | oculus: 139 | sharedDepthBuffer: 1 140 | dashSupport: 1 141 | enable360StereoCapture: 0 142 | protectGraphicsMemory: 0 143 | enableFrameTimingStats: 0 144 | useHDRDisplay: 0 145 | m_ColorGamuts: 00000000 146 | targetPixelDensity: 30 147 | resolutionScalingMode: 0 148 | androidSupportedAspectRatio: 1 149 | androidMaxAspectRatio: 2.1 150 | applicationIdentifier: {} 151 | buildNumber: {} 152 | AndroidBundleVersionCode: 1 153 | AndroidMinSdkVersion: 16 154 | AndroidTargetSdkVersion: 0 155 | AndroidPreferredInstallLocation: 1 156 | aotOptions: 157 | stripEngineCode: 1 158 | iPhoneStrippingLevel: 0 159 | iPhoneScriptCallOptimization: 0 160 | ForceInternetPermission: 0 161 | ForceSDCardPermission: 0 162 | CreateWallpaper: 0 163 | APKExpansionFiles: 0 164 | keepLoadedShadersAlive: 0 165 | StripUnusedMeshComponents: 0 166 | VertexChannelCompressionMask: 4054 167 | iPhoneSdkVersion: 988 168 | iOSTargetOSVersionString: 9.0 169 | tvOSSdkVersion: 0 170 | tvOSRequireExtendedGameController: 0 171 | tvOSTargetOSVersionString: 9.0 172 | uIPrerenderedIcon: 0 173 | uIRequiresPersistentWiFi: 0 174 | uIRequiresFullScreen: 1 175 | uIStatusBarHidden: 1 176 | uIExitOnSuspend: 0 177 | uIStatusBarStyle: 0 178 | iPhoneSplashScreen: {fileID: 0} 179 | iPhoneHighResSplashScreen: {fileID: 0} 180 | iPhoneTallHighResSplashScreen: {fileID: 0} 181 | iPhone47inSplashScreen: {fileID: 0} 182 | iPhone55inPortraitSplashScreen: {fileID: 0} 183 | iPhone55inLandscapeSplashScreen: {fileID: 0} 184 | iPhone58inPortraitSplashScreen: {fileID: 0} 185 | iPhone58inLandscapeSplashScreen: {fileID: 0} 186 | iPadPortraitSplashScreen: {fileID: 0} 187 | iPadHighResPortraitSplashScreen: {fileID: 0} 188 | iPadLandscapeSplashScreen: {fileID: 0} 189 | iPadHighResLandscapeSplashScreen: {fileID: 0} 190 | appleTVSplashScreen: {fileID: 0} 191 | appleTVSplashScreen2x: {fileID: 0} 192 | tvOSSmallIconLayers: [] 193 | tvOSSmallIconLayers2x: [] 194 | tvOSLargeIconLayers: [] 195 | tvOSLargeIconLayers2x: [] 196 | tvOSTopShelfImageLayers: [] 197 | tvOSTopShelfImageLayers2x: [] 198 | tvOSTopShelfImageWideLayers: [] 199 | tvOSTopShelfImageWideLayers2x: [] 200 | iOSLaunchScreenType: 0 201 | iOSLaunchScreenPortrait: {fileID: 0} 202 | iOSLaunchScreenLandscape: {fileID: 0} 203 | iOSLaunchScreenBackgroundColor: 204 | serializedVersion: 2 205 | rgba: 0 206 | iOSLaunchScreenFillPct: 100 207 | iOSLaunchScreenSize: 100 208 | iOSLaunchScreenCustomXibPath: 209 | iOSLaunchScreeniPadType: 0 210 | iOSLaunchScreeniPadImage: {fileID: 0} 211 | iOSLaunchScreeniPadBackgroundColor: 212 | serializedVersion: 2 213 | rgba: 0 214 | iOSLaunchScreeniPadFillPct: 100 215 | iOSLaunchScreeniPadSize: 100 216 | iOSLaunchScreeniPadCustomXibPath: 217 | iOSUseLaunchScreenStoryboard: 0 218 | iOSLaunchScreenCustomStoryboardPath: 219 | iOSDeviceRequirements: [] 220 | iOSURLSchemes: [] 221 | iOSBackgroundModes: 0 222 | iOSMetalForceHardShadows: 0 223 | metalEditorSupport: 1 224 | metalAPIValidation: 1 225 | iOSRenderExtraFrameOnPause: 0 226 | appleDeveloperTeamID: 227 | iOSManualSigningProvisioningProfileID: 228 | tvOSManualSigningProvisioningProfileID: 229 | iOSManualSigningProvisioningProfileType: 0 230 | tvOSManualSigningProvisioningProfileType: 0 231 | appleEnableAutomaticSigning: 0 232 | iOSRequireARKit: 0 233 | appleEnableProMotion: 0 234 | clonedFromGUID: 00000000000000000000000000000000 235 | templatePackageId: 236 | templateDefaultScene: 237 | AndroidTargetArchitectures: 1 238 | AndroidSplashScreenScale: 0 239 | androidSplashScreen: {fileID: 0} 240 | AndroidKeystoreName: 241 | AndroidKeyaliasName: 242 | AndroidBuildApkPerCpuArchitecture: 0 243 | AndroidTVCompatibility: 0 244 | AndroidIsGame: 1 245 | AndroidEnableTango: 0 246 | androidEnableBanner: 1 247 | androidUseLowAccuracyLocation: 0 248 | m_AndroidBanners: 249 | - width: 320 250 | height: 180 251 | banner: {fileID: 0} 252 | androidGamepadSupportLevel: 0 253 | resolutionDialogBanner: {fileID: 0} 254 | m_BuildTargetIcons: [] 255 | m_BuildTargetPlatformIcons: [] 256 | m_BuildTargetBatching: [] 257 | m_BuildTargetGraphicsAPIs: [] 258 | m_BuildTargetVRSettings: [] 259 | m_BuildTargetEnableVuforiaSettings: [] 260 | openGLRequireES31: 0 261 | openGLRequireES31AEP: 0 262 | m_TemplateCustomTags: {} 263 | mobileMTRendering: 264 | Android: 1 265 | iPhone: 1 266 | tvOS: 1 267 | m_BuildTargetGroupLightmapEncodingQuality: [] 268 | m_BuildTargetGroupLightmapSettings: [] 269 | playModeTestRunnerEnabled: 0 270 | runPlayModeTestAsEditModeTest: 0 271 | actionOnDotNetUnhandledException: 1 272 | enableInternalProfiler: 0 273 | logObjCUncaughtExceptions: 1 274 | enableCrashReportAPI: 0 275 | cameraUsageDescription: 276 | locationUsageDescription: 277 | microphoneUsageDescription: 278 | switchNetLibKey: 279 | switchSocketMemoryPoolSize: 6144 280 | switchSocketAllocatorPoolSize: 128 281 | switchSocketConcurrencyLimit: 14 282 | switchScreenResolutionBehavior: 2 283 | switchUseCPUProfiler: 0 284 | switchApplicationID: 0x01004b9000490000 285 | switchNSODependencies: 286 | switchTitleNames_0: 287 | switchTitleNames_1: 288 | switchTitleNames_2: 289 | switchTitleNames_3: 290 | switchTitleNames_4: 291 | switchTitleNames_5: 292 | switchTitleNames_6: 293 | switchTitleNames_7: 294 | switchTitleNames_8: 295 | switchTitleNames_9: 296 | switchTitleNames_10: 297 | switchTitleNames_11: 298 | switchTitleNames_12: 299 | switchTitleNames_13: 300 | switchTitleNames_14: 301 | switchPublisherNames_0: 302 | switchPublisherNames_1: 303 | switchPublisherNames_2: 304 | switchPublisherNames_3: 305 | switchPublisherNames_4: 306 | switchPublisherNames_5: 307 | switchPublisherNames_6: 308 | switchPublisherNames_7: 309 | switchPublisherNames_8: 310 | switchPublisherNames_9: 311 | switchPublisherNames_10: 312 | switchPublisherNames_11: 313 | switchPublisherNames_12: 314 | switchPublisherNames_13: 315 | switchPublisherNames_14: 316 | switchIcons_0: {fileID: 0} 317 | switchIcons_1: {fileID: 0} 318 | switchIcons_2: {fileID: 0} 319 | switchIcons_3: {fileID: 0} 320 | switchIcons_4: {fileID: 0} 321 | switchIcons_5: {fileID: 0} 322 | switchIcons_6: {fileID: 0} 323 | switchIcons_7: {fileID: 0} 324 | switchIcons_8: {fileID: 0} 325 | switchIcons_9: {fileID: 0} 326 | switchIcons_10: {fileID: 0} 327 | switchIcons_11: {fileID: 0} 328 | switchIcons_12: {fileID: 0} 329 | switchIcons_13: {fileID: 0} 330 | switchIcons_14: {fileID: 0} 331 | switchSmallIcons_0: {fileID: 0} 332 | switchSmallIcons_1: {fileID: 0} 333 | switchSmallIcons_2: {fileID: 0} 334 | switchSmallIcons_3: {fileID: 0} 335 | switchSmallIcons_4: {fileID: 0} 336 | switchSmallIcons_5: {fileID: 0} 337 | switchSmallIcons_6: {fileID: 0} 338 | switchSmallIcons_7: {fileID: 0} 339 | switchSmallIcons_8: {fileID: 0} 340 | switchSmallIcons_9: {fileID: 0} 341 | switchSmallIcons_10: {fileID: 0} 342 | switchSmallIcons_11: {fileID: 0} 343 | switchSmallIcons_12: {fileID: 0} 344 | switchSmallIcons_13: {fileID: 0} 345 | switchSmallIcons_14: {fileID: 0} 346 | switchManualHTML: 347 | switchAccessibleURLs: 348 | switchLegalInformation: 349 | switchMainThreadStackSize: 1048576 350 | switchPresenceGroupId: 351 | switchLogoHandling: 0 352 | switchReleaseVersion: 0 353 | switchDisplayVersion: 1.0.0 354 | switchStartupUserAccount: 0 355 | switchTouchScreenUsage: 0 356 | switchSupportedLanguagesMask: 0 357 | switchLogoType: 0 358 | switchApplicationErrorCodeCategory: 359 | switchUserAccountSaveDataSize: 0 360 | switchUserAccountSaveDataJournalSize: 0 361 | switchApplicationAttribute: 0 362 | switchCardSpecSize: -1 363 | switchCardSpecClock: -1 364 | switchRatingsMask: 0 365 | switchRatingsInt_0: 0 366 | switchRatingsInt_1: 0 367 | switchRatingsInt_2: 0 368 | switchRatingsInt_3: 0 369 | switchRatingsInt_4: 0 370 | switchRatingsInt_5: 0 371 | switchRatingsInt_6: 0 372 | switchRatingsInt_7: 0 373 | switchRatingsInt_8: 0 374 | switchRatingsInt_9: 0 375 | switchRatingsInt_10: 0 376 | switchRatingsInt_11: 0 377 | switchLocalCommunicationIds_0: 378 | switchLocalCommunicationIds_1: 379 | switchLocalCommunicationIds_2: 380 | switchLocalCommunicationIds_3: 381 | switchLocalCommunicationIds_4: 382 | switchLocalCommunicationIds_5: 383 | switchLocalCommunicationIds_6: 384 | switchLocalCommunicationIds_7: 385 | switchParentalControl: 0 386 | switchAllowsScreenshot: 1 387 | switchAllowsVideoCapturing: 1 388 | switchAllowsRuntimeAddOnContentInstall: 0 389 | switchDataLossConfirmation: 0 390 | switchUserAccountLockEnabled: 0 391 | switchSupportedNpadStyles: 6 392 | switchNativeFsCacheSize: 32 393 | switchIsHoldTypeHorizontal: 0 394 | switchSupportedNpadCount: 8 395 | switchSocketConfigEnabled: 0 396 | switchTcpInitialSendBufferSize: 32 397 | switchTcpInitialReceiveBufferSize: 64 398 | switchTcpAutoSendBufferSizeMax: 256 399 | switchTcpAutoReceiveBufferSizeMax: 256 400 | switchUdpSendBufferSize: 9 401 | switchUdpReceiveBufferSize: 42 402 | switchSocketBufferEfficiency: 4 403 | switchSocketInitializeEnabled: 1 404 | switchNetworkInterfaceManagerInitializeEnabled: 1 405 | switchPlayerConnectionEnabled: 1 406 | ps4NPAgeRating: 12 407 | ps4NPTitleSecret: 408 | ps4NPTrophyPackPath: 409 | ps4ParentalLevel: 11 410 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 411 | ps4Category: 0 412 | ps4MasterVersion: 01.00 413 | ps4AppVersion: 01.00 414 | ps4AppType: 0 415 | ps4ParamSfxPath: 416 | ps4VideoOutPixelFormat: 0 417 | ps4VideoOutInitialWidth: 1920 418 | ps4VideoOutBaseModeInitialWidth: 1920 419 | ps4VideoOutReprojectionRate: 60 420 | ps4PronunciationXMLPath: 421 | ps4PronunciationSIGPath: 422 | ps4BackgroundImagePath: 423 | ps4StartupImagePath: 424 | ps4StartupImagesFolder: 425 | ps4IconImagesFolder: 426 | ps4SaveDataImagePath: 427 | ps4SdkOverride: 428 | ps4BGMPath: 429 | ps4ShareFilePath: 430 | ps4ShareOverlayImagePath: 431 | ps4PrivacyGuardImagePath: 432 | ps4NPtitleDatPath: 433 | ps4RemotePlayKeyAssignment: -1 434 | ps4RemotePlayKeyMappingDir: 435 | ps4PlayTogetherPlayerCount: 0 436 | ps4EnterButtonAssignment: 2 437 | ps4ApplicationParam1: 0 438 | ps4ApplicationParam2: 0 439 | ps4ApplicationParam3: 0 440 | ps4ApplicationParam4: 0 441 | ps4DownloadDataSize: 0 442 | ps4GarlicHeapSize: 2048 443 | ps4ProGarlicHeapSize: 2560 444 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 445 | ps4pnSessions: 1 446 | ps4pnPresence: 1 447 | ps4pnFriends: 1 448 | ps4pnGameCustomData: 1 449 | playerPrefsSupport: 0 450 | enableApplicationExit: 0 451 | resetTempFolder: 1 452 | restrictedAudioUsageRights: 0 453 | ps4UseResolutionFallback: 0 454 | ps4ReprojectionSupport: 0 455 | ps4UseAudio3dBackend: 0 456 | ps4SocialScreenEnabled: 0 457 | ps4ScriptOptimizationLevel: 2 458 | ps4Audio3dVirtualSpeakerCount: 14 459 | ps4attribCpuUsage: 0 460 | ps4PatchPkgPath: 461 | ps4PatchLatestPkgPath: 462 | ps4PatchChangeinfoPath: 463 | ps4PatchDayOne: 0 464 | ps4attribUserManagement: 0 465 | ps4attribMoveSupport: 0 466 | ps4attrib3DSupport: 0 467 | ps4attribShareSupport: 0 468 | ps4attribExclusiveVR: 0 469 | ps4disableAutoHideSplash: 0 470 | ps4videoRecordingFeaturesUsed: 0 471 | ps4contentSearchFeaturesUsed: 0 472 | ps4attribEyeToEyeDistanceSettingVR: 0 473 | ps4IncludedModules: [] 474 | monoEnv: 475 | splashScreenBackgroundSourceLandscape: {fileID: 0} 476 | splashScreenBackgroundSourcePortrait: {fileID: 0} 477 | spritePackerPolicy: 478 | webGLMemorySize: 256 479 | webGLExceptionSupport: 1 480 | webGLNameFilesAsHashes: 0 481 | webGLDataCaching: 1 482 | webGLDebugSymbols: 0 483 | webGLEmscriptenArgs: 484 | webGLModulesDirectory: 485 | webGLTemplate: APPLICATION:Default 486 | webGLAnalyzeBuildSize: 0 487 | webGLUseEmbeddedResources: 0 488 | webGLCompressionFormat: 1 489 | webGLLinkerTarget: 1 490 | webGLThreadsSupport: 0 491 | scriptingDefineSymbols: {} 492 | platformArchitecture: {} 493 | scriptingBackend: {} 494 | il2cppCompilerConfiguration: {} 495 | managedStrippingLevel: {} 496 | incrementalIl2cppBuild: {} 497 | allowUnsafeCode: 0 498 | additionalIl2CppArgs: 499 | scriptingRuntimeVersion: 1 500 | apiCompatibilityLevelPerPlatform: {} 501 | m_RenderingPath: 1 502 | m_MobileRenderingPath: 1 503 | metroPackageName: Cloth-Simulation 504 | metroPackageVersion: 505 | metroCertificatePath: 506 | metroCertificatePassword: 507 | metroCertificateSubject: 508 | metroCertificateIssuer: 509 | metroCertificateNotAfter: 0000000000000000 510 | metroApplicationDescription: Cloth-Simulation 511 | wsaImages: {} 512 | metroTileShortName: 513 | metroTileShowName: 0 514 | metroMediumTileShowName: 0 515 | metroLargeTileShowName: 0 516 | metroWideTileShowName: 0 517 | metroSupportStreamingInstall: 0 518 | metroLastRequiredScene: 0 519 | metroDefaultTileSize: 1 520 | metroTileForegroundText: 2 521 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 522 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 523 | a: 1} 524 | metroSplashScreenUseBackgroundColor: 0 525 | platformCapabilities: {} 526 | metroTargetDeviceFamilies: {} 527 | metroFTAName: 528 | metroFTAFileTypes: [] 529 | metroProtocolName: 530 | metroCompilationOverrides: 1 531 | XboxOneProductId: 532 | XboxOneUpdateKey: 533 | XboxOneSandboxId: 534 | XboxOneContentId: 535 | XboxOneTitleId: 536 | XboxOneSCId: 537 | XboxOneGameOsOverridePath: 538 | XboxOnePackagingOverridePath: 539 | XboxOneAppManifestOverridePath: 540 | XboxOneVersion: 1.0.0.0 541 | XboxOnePackageEncryption: 0 542 | XboxOnePackageUpdateGranularity: 2 543 | XboxOneDescription: 544 | XboxOneLanguage: 545 | - enus 546 | XboxOneCapability: [] 547 | XboxOneGameRating: {} 548 | XboxOneIsContentPackage: 0 549 | XboxOneEnableGPUVariability: 1 550 | XboxOneSockets: {} 551 | XboxOneSplashScreen: {fileID: 0} 552 | XboxOneAllowedProductIds: [] 553 | XboxOnePersistentLocalStorageSize: 0 554 | XboxOneXTitleMemory: 8 555 | xboxOneScriptCompiler: 0 556 | XboxOneOverrideIdentityName: 557 | vrEditorSettings: 558 | daydream: 559 | daydreamIconForeground: {fileID: 0} 560 | daydreamIconBackground: {fileID: 0} 561 | cloudServicesEnabled: {} 562 | luminIcon: 563 | m_Name: 564 | m_ModelFolderPath: 565 | m_PortalFolderPath: 566 | luminCert: 567 | m_CertPath: 568 | m_PrivateKeyPath: 569 | luminIsChannelApp: 0 570 | luminVersion: 571 | m_VersionCode: 1 572 | m_VersionName: 573 | facebookSdkVersion: 574 | facebookAppId: 575 | facebookCookies: 1 576 | facebookLogging: 1 577 | facebookStatus: 1 578 | facebookXfbml: 0 579 | facebookFrictionlessRequests: 1 580 | apiCompatibilityLevel: 6 581 | cloudProjectId: 582 | framebufferDepthMemorylessMode: 0 583 | projectName: 584 | organizationId: 585 | cloudEnabled: 0 586 | enableNativePlatformBackendsForNewInputSystem: 0 587 | disableOldInputManagerSupport: 0 588 | legacyClampBlendShapeWeights: 0 589 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.3.4f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 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 | blendWeights: 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 | excludedTargetPlatforms: [] 44 | - serializedVersion: 2 45 | name: Low 46 | pixelLightCount: 0 47 | shadows: 0 48 | shadowResolution: 0 49 | shadowProjection: 1 50 | shadowCascades: 1 51 | shadowDistance: 20 52 | shadowNearPlaneOffset: 3 53 | shadowCascade2Split: 0.33333334 54 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 55 | shadowmaskMode: 0 56 | blendWeights: 2 57 | textureQuality: 0 58 | anisotropicTextures: 0 59 | antiAliasing: 0 60 | softParticles: 0 61 | softVegetation: 0 62 | realtimeReflectionProbes: 0 63 | billboardsFaceCameraPosition: 0 64 | vSyncCount: 0 65 | lodBias: 0.4 66 | maximumLODLevel: 0 67 | streamingMipmapsActive: 0 68 | streamingMipmapsAddAllCameras: 1 69 | streamingMipmapsMemoryBudget: 512 70 | streamingMipmapsRenderersPerFrame: 512 71 | streamingMipmapsMaxLevelReduction: 2 72 | streamingMipmapsMaxFileIORequests: 1024 73 | particleRaycastBudget: 16 74 | asyncUploadTimeSlice: 2 75 | asyncUploadBufferSize: 16 76 | asyncUploadPersistentBuffer: 1 77 | resolutionScalingFixedDPIFactor: 1 78 | excludedTargetPlatforms: [] 79 | - serializedVersion: 2 80 | name: Medium 81 | pixelLightCount: 1 82 | shadows: 1 83 | shadowResolution: 0 84 | shadowProjection: 1 85 | shadowCascades: 1 86 | shadowDistance: 20 87 | shadowNearPlaneOffset: 3 88 | shadowCascade2Split: 0.33333334 89 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 90 | shadowmaskMode: 0 91 | blendWeights: 2 92 | textureQuality: 0 93 | anisotropicTextures: 1 94 | antiAliasing: 0 95 | softParticles: 0 96 | softVegetation: 0 97 | realtimeReflectionProbes: 0 98 | billboardsFaceCameraPosition: 0 99 | vSyncCount: 1 100 | lodBias: 0.7 101 | maximumLODLevel: 0 102 | streamingMipmapsActive: 0 103 | streamingMipmapsAddAllCameras: 1 104 | streamingMipmapsMemoryBudget: 512 105 | streamingMipmapsRenderersPerFrame: 512 106 | streamingMipmapsMaxLevelReduction: 2 107 | streamingMipmapsMaxFileIORequests: 1024 108 | particleRaycastBudget: 64 109 | asyncUploadTimeSlice: 2 110 | asyncUploadBufferSize: 16 111 | asyncUploadPersistentBuffer: 1 112 | resolutionScalingFixedDPIFactor: 1 113 | excludedTargetPlatforms: [] 114 | - serializedVersion: 2 115 | name: High 116 | pixelLightCount: 2 117 | shadows: 2 118 | shadowResolution: 1 119 | shadowProjection: 1 120 | shadowCascades: 2 121 | shadowDistance: 40 122 | shadowNearPlaneOffset: 3 123 | shadowCascade2Split: 0.33333334 124 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 125 | shadowmaskMode: 1 126 | blendWeights: 2 127 | textureQuality: 0 128 | anisotropicTextures: 1 129 | antiAliasing: 0 130 | softParticles: 0 131 | softVegetation: 1 132 | realtimeReflectionProbes: 1 133 | billboardsFaceCameraPosition: 1 134 | vSyncCount: 1 135 | lodBias: 1 136 | maximumLODLevel: 0 137 | streamingMipmapsActive: 0 138 | streamingMipmapsAddAllCameras: 1 139 | streamingMipmapsMemoryBudget: 512 140 | streamingMipmapsRenderersPerFrame: 512 141 | streamingMipmapsMaxLevelReduction: 2 142 | streamingMipmapsMaxFileIORequests: 1024 143 | particleRaycastBudget: 256 144 | asyncUploadTimeSlice: 2 145 | asyncUploadBufferSize: 16 146 | asyncUploadPersistentBuffer: 1 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Very High 151 | pixelLightCount: 3 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 2 156 | shadowDistance: 70 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 2 164 | antiAliasing: 2 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 1.5 171 | maximumLODLevel: 0 172 | streamingMipmapsActive: 0 173 | streamingMipmapsAddAllCameras: 1 174 | streamingMipmapsMemoryBudget: 512 175 | streamingMipmapsRenderersPerFrame: 512 176 | streamingMipmapsMaxLevelReduction: 2 177 | streamingMipmapsMaxFileIORequests: 1024 178 | particleRaycastBudget: 1024 179 | asyncUploadTimeSlice: 2 180 | asyncUploadBufferSize: 16 181 | asyncUploadPersistentBuffer: 1 182 | resolutionScalingFixedDPIFactor: 1 183 | excludedTargetPlatforms: [] 184 | - serializedVersion: 2 185 | name: Ultra 186 | pixelLightCount: 4 187 | shadows: 2 188 | shadowResolution: 2 189 | shadowProjection: 1 190 | shadowCascades: 4 191 | shadowDistance: 150 192 | shadowNearPlaneOffset: 3 193 | shadowCascade2Split: 0.33333334 194 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 195 | shadowmaskMode: 1 196 | blendWeights: 4 197 | textureQuality: 0 198 | anisotropicTextures: 2 199 | antiAliasing: 2 200 | softParticles: 1 201 | softVegetation: 1 202 | realtimeReflectionProbes: 1 203 | billboardsFaceCameraPosition: 1 204 | vSyncCount: 1 205 | lodBias: 2 206 | maximumLODLevel: 0 207 | streamingMipmapsActive: 0 208 | streamingMipmapsAddAllCameras: 1 209 | streamingMipmapsMemoryBudget: 512 210 | streamingMipmapsRenderersPerFrame: 512 211 | streamingMipmapsMaxLevelReduction: 2 212 | streamingMipmapsMaxFileIORequests: 1024 213 | particleRaycastBudget: 4096 214 | asyncUploadTimeSlice: 2 215 | asyncUploadBufferSize: 16 216 | asyncUploadPersistentBuffer: 1 217 | resolutionScalingFixedDPIFactor: 1 218 | excludedTargetPlatforms: [] 219 | m_PerPlatformDefaultQuality: 220 | Android: 2 221 | Lumin: 5 222 | Nintendo Switch: 5 223 | PS4: 5 224 | Standalone: 5 225 | WebGL: 3 226 | Windows Store Apps: 5 227 | XboxOne: 5 228 | iPhone: 2 229 | tvOS: 2 230 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cloth Simulation 2 | 3 | I wrote this cloth simulation as a project for an animation and planning course I took in university. 4 | 5 | Read more about it [here](https://danielshervheim.com/coursework/csci-5611/cloth-simulation). 6 | 7 | ![image](img/cs4wZme.gif) 8 | -------------------------------------------------------------------------------- /img/cs4wZme.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/danielshervheim/unity-cloth-simulation/f73c448e6a972ebe97fa8f4e5d28d25227acaff6/img/cs4wZme.gif --------------------------------------------------------------------------------